Track authored Claude Code configuration
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# agent-shared
|
||||
|
||||
Shared system-prompt fragments for the agents in `../agents/`.
|
||||
|
||||
Agent definition files (`.claude/agents/*.md`) use their body **verbatim** as the
|
||||
system prompt — they do **not** expand `@import` references (only CLAUDE.md does).
|
||||
So shared text must be physically inlined into each agent. This directory holds the
|
||||
single source of truth and a script that keeps the inlined copies identical.
|
||||
|
||||
## memory-system.md
|
||||
|
||||
The shared "Persistent Agent Memory" block (memory types, save/recall rules, etc.).
|
||||
`{{AGENT_NAME}}` is substituted per agent with its filename stem — which is also its
|
||||
`agent-memory/<name>/` directory.
|
||||
|
||||
In each agent file the block lives between:
|
||||
|
||||
<!-- BEGIN shared:memory-system ... -->
|
||||
...generated...
|
||||
<!-- END shared:memory-system -->
|
||||
|
||||
Everything between the markers is generated — edit `memory-system.md`, not the agents.
|
||||
The per-agent intro line above `# Persistent Agent Memory` (it holds the agent's own
|
||||
`agent-memory/` path) is intentionally outside the block; each agent file ends at the
|
||||
END marker.
|
||||
|
||||
## sync-memory-block.sh
|
||||
|
||||
./sync-memory-block.sh --check # verify every agent matches canonical; exit 1 on drift
|
||||
./sync-memory-block.sh --write # rewrite each agent's block from canonical
|
||||
|
||||
Run `--write` after editing `memory-system.md`. Run `--check` to detect drift (e.g. in
|
||||
CI or a pre-commit hook). It auto-discovers any agent file carrying the markers, so new
|
||||
agents adopt the block just by pasting the two marker lines around the section.
|
||||
Reference in New Issue
Block a user