Skip to content

feat(mate): ship agent instructions and skills for Symfony AI Mate - #97

Merged
paullla merged 1 commit into
Locastic:masterfrom
paullla:feat/ai-mate-extension
Dec 2, 2026
Merged

paullla merged 1 commit into
Locastic:masterfrom
paullla:feat/ai-mate-extension

Conversation

@paullla

@paullla paullla commented Dec 2, 2026

Copy link
Copy Markdown
Member
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Issues -
License MIT

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/orphanRemoval mapping, the right serialization groups, setters through getOrCreateTranslation() and standard_put off for PUT. Symfony AI Mate lets a Symfony package give coding agents this knowledge: vendor/bin/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 bundle ships nothing for it yet.

Changes

  • composer.json: extra.ai-mate with instructions and skills, and symfony/ai-mate under suggest. 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 stays symfony-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 four context7.json rules word for word: setters through getOrCreateTranslation(), auto_create_translations: false, PATCH over PUT, and writes through a DTO.
  • skills/, four skills, installed as mate-<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: TranslationSearchFilter and TranslationOrderFilter, strategies, indexes, limits.
    • api-translation-writes: POST, PATCH and PUT payloads, reading one or all locales, the standard_put error.
    • api-translation-dto: a DTO as the API resource, with the state provider and processor variant and the Object Mapper variant in references/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, and skills/ plus INSTRUCTIONS.md are excluded from indexing so Context7 does not return each example twice.
  • tests/AgentFilesTest.php: the extra.ai-mate paths exist, each skill has a name equal to its directory and a description, links stay inside their skill directory (Mate copies each skill alone), INSTRUCTIONS.md lists every skill, and each rule in INSTRUCTIONS.md is a context7.json rule.
  • README section "Coding agents" and a CHANGELOG entry.

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.
@paullla
paullla merged commit ed9de99 into Locastic:master Dec 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant