Repository navigation
feat(agents): add a skill and instructions for coding agents - #59
Merged
Merged
Conversation
Adds skills/loggastic/SKILL.md (Agent Skills format) and INSTRUCTIONS.md, and the extra.ai-mate section in composer.json, so Symfony AI Mate installs the skill as mate-loggastic. README section for agents with and without Mate. New context7.json rule about the activity_log group of the user.
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.
Why
A developer can ask a coding agent (Claude Code, Codex, GitHub Copilot) to add an activity log to a Symfony app. With this change, the agent gets the Loggastic setup steps from the package itself, for the version that the project has installed.
Changes
skills/loggastic/SKILL.md: a skill in the Agent Skills format. It tells the agent how to:in_memorystorage for tests)#[Loggable], serialization groups, relations, theactivity_loggroup of the logged-in user)create-loggable-indexes,populate-current-data-trackers, Doctrine migrations)ActivityLogProviderInterface,dataChanges, a Twig example)Each optional feature gets one line with a link to its README section.
INSTRUCTIONS.md: seven short rules that the agent always has in its context.composer.json:extra.ai-matewithinstructionsandskills. Symfony AI Mate (vendor/bin/mate discover) installs the skill asmate-loggasticin.agents/skills/and.claude/skills/, and adds the rules tomate/AGENT_INSTRUCTIONS.md. Loggastic gets no new dependency.README: section "Using Loggastic with coding agents", with and without Mate.
context7.json: one new rule about theactivity_logserialization group of the logged-in user.CHANGELOG: the Added lines. This change also joins the two
### Fixedparts under Unreleased, which came from docs: fix the Twig example for activity logs #57 and fix: keep the Doctrine storage tables in schema diffs and migrations #58, into one.Backward compatibility
symfony/ai-mateis not inrequireorrequire-dev. A project without Mate ignoresextra.ai-mate.Verification
16 new tests (
AgentInstructionsTest):extra.ai-matesection, and nosymfony/ai-matedependencynameis the folder name, anddescriptionkeeps the Agent Skills limitsINSTRUCTIONS.mdand incontext7.json, for example theSymfony\Component\Serializer\Attributeimport and theactivity_loggroupFull suite: 124 tests pass. PHPStan reports no errors, and PHP-CS-Fixer reports 0 fixable files.
Symfony 7.4 test app with Loggastic from this branch:
vendor/bin/mate discoverinstallsmate-loggastic. The installed skill is the same asskills/loggastic/SKILL.md, exceptname: mate-loggastic.mate/AGENT_INSTRUCTIONS.mdgets the rules,AGENTS.mdgets the managed block, andCLAUDE.mdimportsAGENTS.md.strict_variables, for logs with and without a logged-in user.