Skip to content

feat(agents): add a skill and instructions for coding agents - #59

Merged
paullla merged 1 commit into
Locastic:masterfrom
paullla:feature/agent-skill
Dec 3, 2026
Merged

paullla merged 1 commit into
Locastic:masterfrom
paullla:feature/agent-skill

Conversation

@paullla

@paullla paullla commented Dec 3, 2026

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

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:

    1. check the installation (bundle, storage, in_memory storage for tests)
    2. make an entity loggable (#[Loggable], serialization groups, relations, the activity_log group of the logged-in user)
    3. prepare the storage (create-loggable-indexes, populate-current-data-trackers, Doctrine migrations)
    4. read and show activity logs (ActivityLogProviderInterface, dataChanges, a Twig example)
    5. check the result

    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-mate with instructions and skills. Symfony AI Mate (vendor/bin/mate discover) installs the skill as mate-loggastic in .agents/skills/ and .claude/skills/, and adds the rules to mate/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 the activity_log serialization group of the logged-in user.

  • CHANGELOG: the Added lines. This change also joins the two ### Fixed parts 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

  • No PHP code changed. The new files are documentation for agents.
  • symfony/ai-mate is not in require or require-dev. A project without Mate ignores extra.ai-mate.

Verification

  • 16 new tests (AgentInstructionsTest):

    • the extra.ai-mate section, and no symfony/ai-mate dependency
    • the skill frontmatter: name is the folder name, and description keeps the Agent Skills limits
    • each relative link stays inside the skill folder, and each README link points to a heading that exists
    • the key rules are in the skill, in INSTRUCTIONS.md and in context7.json, for example the Symfony\Component\Serializer\Attribute import and the activity_log group

    Full 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:

    • Mate 0.15.0 and 1.0.0-BETA1: vendor/bin/mate discover installs mate-loggastic. The installed skill is the same as skills/loggastic/SKILL.md, except name: mate-loggastic. mate/AGENT_INSTRUCTIONS.md gets the rules, AGENTS.md gets the managed block, and CLAUDE.md imports AGENTS.md.
    • The Twig example of the skill renders with strict_variables, for logs with and without a logged-in user.

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.
@paullla
paullla merged commit 386c483 into Locastic:master Dec 3, 2026
21 of 22 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