Repository navigation
feat(mate): ship agent instructions and skills for Symfony AI Mate - #97
Merged
Merged
Conversation
Symfony AI Mate gives coding agents package-specific instructions and skills: `mate discover` reads `extra.ai-mate` from installed packages, merges their instructions into mate/AGENT_INSTRUCTIONS.md and copies their skills into .agents/skills (mirrored to .claude/skills). The translatable setup is the part people get wrong (mapping, groups, setters, standard_put), so the bundle now ships that knowledge where agents look for it. No Mate dependency: a package with only instructions and skills is discovered on Mate 0.15 and 1.0, so symfony/ai-mate is a suggestion. INSTRUCTIONS.md stays short, as the Mate guide asks, and repeats four context7.json rules word for word. A test keeps the files valid and the repeated rules in sync with context7.json.
This was referenced Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The translatable setup is where users go wrong (#14, #21, #27, #33): one translated field needs five members in two classes, plus the
indexBy/cascade/orphanRemovalmapping, the right serialization groups, setters throughgetOrCreateTranslation()andstandard_putoff for PUT. Symfony AI Mate lets a Symfony package give coding agents this knowledge:vendor/bin/mate discoverreadsextra.ai-matefrom installed packages, merges their instructions intomate/AGENT_INSTRUCTIONS.mdand copies their skills into.agents/skills/(mirrored to.claude/skills/). The bundle ships nothing for it yet.Changes
composer.json:extra.ai-matewithinstructionsandskills, andsymfony/ai-mateundersuggest. No new dependency: Mate discovers a package that ships only instructions and skills (checked on Mate 0.15.0 and 1.0.0-BETA1). The package type stayssymfony-bundle; discovery does not need Mate's own package type.INSTRUCTIONS.md: short on purpose (the Mate guide: "Every line costs context in every session"). It says what the bundle does, which skill to load for which task, and repeats fourcontext7.jsonrules word for word: setters throughgetOrCreateTranslation(),auto_create_translations: false, PATCH over PUT, and writes through a DTO.skills/, four skills, installed asmate-<name>:api-translation-resource: create a translatable entity pair or add a translated field (mapping, groups, validation with#[Assert\Valid],standard_put, migration, checks over HTTP).api-translation-filters:TranslationSearchFilterandTranslationOrderFilter, strategies, indexes, limits.api-translation-writes: POST, PATCH and PUT payloads, reading one or all locales, thestandard_puterror.api-translation-dto: a DTO as the API resource, with the state provider and processor variant and the Object Mapper variant inreferences/object-mapper.md. The code is the DTO recipe from docs(readme): document DTO resources #96.context7.json: the version rule now lists API Platform^5.0(missing since feat(composer): allow API Platform 5 #89), the DTO rule is added so Context7 and the skills give the same rules, andskills/plusINSTRUCTIONS.mdare excluded from indexing so Context7 does not return each example twice.tests/AgentFilesTest.php: theextra.ai-matepaths exist, each skill has anameequal to its directory and adescription, links stay inside their skill directory (Mate copies each skill alone),INSTRUCTIONS.mdlists every skill, and each rule inINSTRUCTIONS.mdis acontext7.jsonrule.