Search by

sylius / sylius-mate-extension

Dev-only Symfony AI Mate extension for Sylius: exposes the runtime domain (resources, hooks, grids, routes, services) to AI coding agents via the Mate CLI.

Maintainers

Package info

github.com/Sylius/sylius-mate-extension

Type:symfony-ai-mate

pkg:composer/sylius/sylius-mate-extension

Transparency log

Fund package maintenance!

sylius

Statistics

Installs: 4 247

Dependents: 1

Suggesters: 0

Stars: 6

Open Issues: 0

v0.6.0 2026-08-31 06:49 UTC

README

Sylius Logo.

Sylius Mate Extension

Dev-only Symfony AI Mate extension exposing the Sylius runtime domain to AI coding agents via the Mate CLI.

About

The Sylius Mate Extension is an AI Mate extension for Sylius. It exposes the Sylius runtime domain — resources, hooks, grids, routes, services, Twig helpers, mailer configuration — to AI coding agents as Mate CLI tools, invoked with vendor/bin/mate tools:call <tool>.

Every tool runs against the host project's booted Symfony kernel, so listings, inspections, and audits reflect the real container, real grid configuration, real route map, real installed plugins. Agents generate Sylius code against the actual shape of your application instead of hallucinating Twig helpers, routes, or resource patterns.

The extension is dev-only. Install it as a require-dev dependency; never ship it to production.

Documentation

See INSTRUCTIONS.md for the full description of every tool, when to call it, and the hard rules agents must follow (Twig helper verification, route lookup, resource scaffolding, mutating-tool confirmation).

General Sylius documentation is available at docs.sylius.com.

Installation

Add the extension as a dev dependency of your Sylius project:

$ composer require --dev sylius/sylius-mate-extension

Initialize the Mate environment and discover the extension:

$ vendor/bin/mate init
$ vendor/bin/mate discover

Extension discovery runs automatically after Composer install and update. Run vendor/bin/mate discover manually to refresh discovery state and regenerate agent instruction artifacts.

Available Tools

Tools are grouped by domain. Full reference in INSTRUCTIONS.md.

  • Resourcesylius_domain_list_resources, sylius_domain_resource_template, sylius_resource_inspect
  • Gridsylius_domain_list_grids, sylius_grid_actions_audit
  • Hooksylius_hooks_list, sylius_hooks_find_for_template, sylius_hooks_list_hookables, sylius_hooks_resolve_for_visibility
  • Twigsylius_twig_list_functions, sylius_twig_function_verify, sylius_test_render_template
  • Routesylius_routes_show, sylius_route_inspect
  • Mailer / Emailsylius_email_capture_status, sylius_mailer_verify_template, sylius_email_template_skeleton
  • Service configurationsylius_services_yaml_profile, sylius_services_yaml_audit, sylius_services_yaml_patch_exclude
  • Projectsylius_project_profile, sylius_installed_plugins, sylius_service_decorators, sylius_plugin_compatibility, sylius_project_audit
  • Translationsylius_translation_create
  • Admin / Playwrightsylius_admin_restock_via_http, sylius_playwright_recipe
  • Cachesylius_cache_clear

Generic Symfony introspection is not duplicated here. Container lookups and profiler access come from symfony/ai-symfony-mate-extension (symfony-services / symfony-service-detail, symfony-profiler-* tools and resources). That bridge is optional for this extension — the sylius/sylius-ai-dev-tools pack installs both — and sylius_project_profile reports whether it is present as symfony_mate_bridge. The sylius-dev skill uses the bridge when it is there and falls back to bin/console debug:container when it is not.

Skills

The extension also ships agent skills (installed into .agents/skills/ by vendor/bin/mate discover). They are the control plane for the tools above: when and why to apply a Sylius idiom, and what to refuse.

Skill Scope
sylius-dev entry point: mental model, Mate discovery protocol, cross-cutting rules, the build map
sylius-resource entity, repository, form type, sylius_resource yaml, admin grid + route, migration, fixture, controller
sylius-frontend Twig hooks, hook templates, Twig components
sylius-events Sylius events, Doctrine onFlush/postFlush listeners, Messenger handlers
sylius-mailer sylius_mailer config, email templates, send context, translations and locales
sylius-verify verify pass, cache clear, Playwright acceptance - the definition of done

A whole feature walks all six in order; a narrow task loads sylius-dev plus the one skill it needs.

Development

$ composer install
$ vendor/bin/phpunit

Useful Mate commands while developing:

$ vendor/bin/mate debug:capabilities
$ vendor/bin/mate debug:extensions
$ vendor/bin/mate tools:list
$ vendor/bin/mate tools:call sylius_project_profile

Contributing

Would like to help us build a more capable Sylius developer experience? Start from reading our Contribution Guide.

Bug Tracking

If you want to report a bug or suggest an idea, please use GitHub issues.

Community Support

Get Sylius support on Slack, Forum or Stack Overflow.

MIT License

The Sylius Mate Extension is released under the terms of the MIT License.