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.
Package info
github.com/Sylius/sylius-mate-extension
Type:symfony-ai-mate
pkg:composer/sylius/sylius-mate-extension
Fund package maintenance!
Requires
- php: >=8.2
- composer/semver: ^3.4
- symfony/ai-mate: ^0.13
Requires (Dev)
- helgesverre/toon: ^3.1
- phpstan/phpstan: ^2.2
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^11.5
- sylius/sylius: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-07 09:39:30 UTC
README
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.
- Resource —
sylius_domain_list_resources,sylius_domain_resource_template,sylius_resource_inspect - Grid —
sylius_domain_list_grids,sylius_grid_actions_audit - Hook —
sylius_hooks_list,sylius_hooks_find_for_template,sylius_hooks_list_hookables,sylius_hooks_resolve_for_visibility - Twig —
sylius_twig_list_functions,sylius_twig_function_verify,sylius_test_render_template - Route —
sylius_routes_show,sylius_route_inspect - Mailer / Email —
sylius_email_capture_status,sylius_mailer_verify_template,sylius_email_template_skeleton - Service configuration —
sylius_services_yaml_profile,sylius_services_yaml_audit,sylius_services_yaml_patch_exclude - Project —
sylius_project_profile,sylius_installed_plugins,sylius_service_decorators,sylius_plugin_compatibility,sylius_project_audit - Translation —
sylius_translation_create - Admin / Playwright —
sylius_admin_restock_via_http,sylius_playwright_recipe - Cache —
sylius_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.