CodeCannon
AGENTS.md1 starsChanged 9 months agoMITView on GitHub
Instructions for AI coding agents working on the CodeCannon project itself. CodeCannon is a skill distribution system. It stores generic agent workflow skills in skills/, adapter configs in adapters/, and a sync.py script that generates agent-specific skill files for downstream projects. One source of truth, synced to every project and every AI agent. Use this section to orient yourself. Do not search for files when the answer is here. These are the single source of truth for all generated output.…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository20 other files it gives its agents.
- .cursor/rules/checkpoint.mdcCursor rule
- .cursor/rules/delegate.mdcCursor rule
- .cursor/rules/deploy.mdcCursor rule
- .cursor/rules/qa.mdcCursor rule
- .cursor/rules/review.mdcCursor rule
- .cursor/rules/setup.mdcCursor rule
- .cursor/rules/start.mdcCursor rule
- .cursor/rules/status.mdcCursor rule
- .cursor/rules/story.mdcCursor rule
- .cursor/rules/submit-for-review.mdcCursor rule
- checkpointSkill
- delegateSkill
- deploySkill
- qaSkill
- reviewSkill
- setupSkill
- startSkill
- statusSkill
- storySkill
- submit-for-reviewSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
23 rules. About 0 are common, 3 are distinctive, and 20 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
20
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Use this section to orient yourself.
- Very specific: line 73
When asked to update documentation, check docs/ first — most detailed docs live there, not in README.md.
- Distinctive: line 96
Every instruction in a skill must pass one test:
- Very specific: line 132
Use {{UPPERCASE_NAME}} syntax.
- Very specific: line 135
Add it to config.schema.yaml with description, default, and used_in list.
- Very specific: line 136
Add it with its default value to templates/codecannon.yaml.
- Very specific: line 137
Use {{PLACEHOLDER_NAME}} in the relevant skill files.
- Very specific: line 161
If someone manually edits a generated file, the hash won't match and sync.py will refuse to overwrite it (unless run with --force).
- Very specific: line 183
Run make check to validate placeholders.
- Very specific: line 184
Run make dev to preview generated output.
- Very specific: line 185
Run make sync to regenerate all adapter output.
- Distinctive: line 186
Commit the skill source and the regenerated files together in the same PR.
- Very specific: line 190
Create adapters/{name}/config.yaml — set agent, output_directory, and output_extension.
- Very specific: line 191
Create adapters/{name}/header.md — invocation header template using {skill} and {description}.
- Very specific: line 193
Document any adapter limitations in config.yaml under notes.
- Very specific: line 198
Create skills/<group>/{name}.md with frontmatter (skill, type, description, args).
- Very specific: line 199
Add any new placeholders to config.schema.yaml and templates/codecannon.yaml.
- Very specific: line 200
Run make check and make dev to verify.
- Very specific: line 201
Run make sync to generate output for all adapters.
- Very specific: line 202
Create docs/skills/{name}.md with user-facing documentation.
- Very specific: line 209
All adapter outputs are generated: after editing a skill, make sync regenerates .claude/commands/, .cursor/rules/, .agents/skills/, and …
- Very specific: line 216
Add project-specific content to skills/<group>/ — skills must remain generic.
- Very specific: line 217
Commit skill source changes without also committing the regenerated output (make sync).
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — CodeCannon
Instructions for AI coding agents working on the CodeCannon project itself.
CodeCannon is a skill distribution system. It stores generic agent workflow skills in skills/, adapter configs in adapters/, and a sync.py script that generates agent-specific skill files for downstream projects. One source of truth, synced to every project and every AI agent.
Branch strategy
feature/* → dev → mainmain— published releases. Never push directly.dev— integration branch. Never push directly.feature/*— short-lived. Branch fromdev, PR back todev.
Where things live
Use this section to orient yourself. Do not search for files when the answer is here.
Source skills (edit here)
skills/<group>/*.md Skill source files — YAML frontmatter + markdown body
Each <group> is a domain-specific bundle (e.g. github-agile)
A project enables exactly one group via skill_group: in .codecannon.yamlThese are the single source of truth for all generated output. Every edit to agent workflows starts here.
Generated output (never edit)
.claude/commands/*.md Claude Code slash commands
.cursor/rules/*.mdc Cursor agent rules
.agents/skills/ Codex / legacy agent skills
.gemini/skills/ Gemini agent skillsThese are regenerated by ./sync.py. Each file contains a hash marker for change detection. If you need to change agent output, edit the source skill under skills/<group>/ and re-run sync.
Adapters
adapters/claude/ config.yaml + header.md — Claude Code adapter
adapters/cursor/ config.yaml + header.md — Cursor adapter
adapters/codex/ config.yaml + header.md — Codex adapter
adapters/gemini/ config.yaml + header.md — Gemini adapterEach adapter has a config.yaml (output directory, file extension, agent name, notes) and a header.md (invocation header template using {skill} and {description} placeholders).
Configuration
.codecannon.yaml This project's own config (adapters list + placeholder values)
config.schema.yaml Canonical documentation for every placeholder
templates/codecannon.yaml Template config for consumer projects to copyDocumentation
docs/index.md Getting started and overview
docs/branching.md Trunk, two-branch, and three-branch workflow docs
docs/customization.md Tailoring skills to a project
docs/config-reference.md Every .codecannon.yaml setting explained
docs/adapters.md Supported agents and how to add new ones
docs/skills/*.md Per-skill documentation (start, deploy, qa, etc.)
README.md User-facing overview and quick startWhen asked to update documentation, check docs/ first — most detailed docs live there, not in README.md.
Build and workflow
Makefile CodeCannon-specific targets (sync, versioning, deployment)
Makefile.agents.mk Generic git workflow targets (branch, pr, abandon, merge, promote)
sync.py The core sync engine (Python 3)
VERSION Current version number (plain text, e.g. 0.3.3)Project meta
AGENTS.md This file — instructions for agents working on CodeCannon
ROADMAP.md Future ideas and planned work
.codecannon.yaml Project config (also listed under Configuration)Skill design philosophy
CodeCannon's skills were first written for a generation of models that needed to be told not just what outcome to produce but how to produce it — how to parse an argument string, what date format to use, which emoji maps to which CI state. Capable agents do all of that well unaided. Procedural over-specification no longer buys reliability; it burns context, crowds out the instructions that matter, and blocks a capable agent from doing something smarter than the author imagined.
Every instruction in a skill must pass one test:
Prune where model variance produces a different-but-fine result. Keep where model variance produces a wrong result.
- Prune side — report formatting, argument tokenizing, investigation method, output templates, badge-to-emoji mappings. A differently-shaped-but-correct result is harmless, so hand the agent the intent and the inputs, not the procedure.
- Keep side — ordering guarantees, human approval gates (and their exact wording), platform behaviour the model cannot derive, review policy, and the prompt-avoidance instructions (
--body-file/ no-heredoc / no-$(cat)). Variance in any of these is a defect, not a style difference.
Two categories look like removable noise when read quickly but are load-bearing — never weaken them:
- Prompt-avoidance guidance. The
--body-fileand no-heredoc blocks exist because embedding markdown in a shell command triggers permission prompts that cannot be permanently allowed. State the rule once here and point at it; do not restate it per skill and do not soften it. - Platform-behaviour notes. Facts like "unqualified
#NpopulatesclosingIssuesReferences", "Closesis inert on non-default-branch merges", and "gh issue develop --basereads from the API, not local working state" are knowledge a model has no way to derive. Keep them verbatim.
Calibrate the prune against the weakest supported harness and model size, not the strongest. Skills ship to several adapters and a range of model sizes; trusting the agent as far as the best available model would under-serve everyone else. The cost of variance decides where the line sits — not the capability of the strongest model.
story.md is the reference shape: overwhelmingly what rather than how, with business rules collected under a ## Hard rules section at the end and procedure written only where sequencing genuinely matters. Converge older skills toward it.
Skill anatomy
Each skill in skills/ follows this structure:
---
skill: start # Identifier (becomes the filename)
type: skill # "skill" (slash command) or "prompt" (non-invocable)
description: "Start a feature" # Human-readable, used in adapter headers
args: "description text" # What arguments the skill accepts
# Optional:
# output_path_override: path # Override default output location
# no_invocation_header: true # Skip the auto-generated header
---
Markdown body with instructions...Placeholders
Use {{UPPERCASE_NAME}} syntax. All placeholders are documented in config.schema.yaml with descriptions, defaults, and which skills use them.
To add a new placeholder:
- Add it to
config.schema.yamlwith description, default, andused_inlist. - Add it with its default value to
templates/codecannon.yaml. - Use
{{PLACEHOLDER_NAME}}in the relevant skill files.
Conditional blocks
Skills support conditional rendering:
{{#if BRANCH_TEST}}
Content shown only when BRANCH_TEST has a value
{{/if}}
{{#if !BRANCH_TEST}}
Content shown only when BRANCH_TEST is empty
{{/if}}Change detection
sync.py embeds an MD5 hash in a marker comment at the end of each generated file:
<!-- generated by CodeCannon/sync.py | skill: start | adapter: claude | hash: a1b2c3d4 | DO NOT EDIT -->If someone manually edits a generated file, the hash won't match and sync.py will refuse to overwrite it (unless run with --force).
Working on CodeCannon
Make targets
The primary commands for working on this project:
| Command | What it does |
make check | Validate that all skill placeholders resolve against config |
make dev | Preview what sync would generate (dry run, no file writes) |
make sync | Regenerate all adapter output from skills/<group>/ |
make branch name=X | Create feature/X from dev |
make pr | Push current branch and open PR to dev |
make merge | Merge current PR into dev |
make abandon | Discard changes and delete current feature branch |
make bump-patch | Bump version patch segment, commit, and tag |
Editing a skill
- Edit the source file under
skills/<group>/(this repo currently usesskills/github-agile/). - Run
make checkto validate placeholders. - Run
make devto preview generated output. - Run
make syncto regenerate all adapter output. - Commit the skill source and the regenerated files together in the same PR.
Adding a new adapter
- Create
adapters/{name}/config.yaml— setagent,output_directory, andoutput_extension. - Create
adapters/{name}/header.md— invocation header template using{skill}and{description}. - Test with
./sync.py --skill start. - Document any adapter limitations in
config.yamlundernotes. - Update
docs/adapters.md.
Adding a new skill
- Create
skills/<group>/{name}.mdwith frontmatter (skill,type,description,args). Use the group that matches the skill's domain. - Add any new placeholders to
config.schema.yamlandtemplates/codecannon.yaml. - Run
make checkandmake devto verify. - Run
make syncto generate output for all adapters. - Create
docs/skills/{name}.mdwith user-facing documentation.
Self-hosting: using CodeCannon to develop CodeCannon
This repo is the only project that runs sync as ./sync.py instead of CodeCannon/sync.py. Every consumer project uses the submodule path — this is the exception.
- Edit-test loop: edit a skill under
skills/<group>/→make check→make dev→make sync→ commit source + generated files together. - All adapter outputs are generated: after editing a skill,
make syncregenerates.claude/commands/,.cursor/rules/,.agents/skills/, and.gemini/skills/. Commit all of them. - Never edit generated files directly — edit the source skill under
skills/<group>/and re-runmake sync.
What agents must never do
- Push directly to
mainordev. - Edit generated files (
.claude/commands/,.cursor/rules/,.agents/skills/,.gemini/skills/) — edit the source skill underskills/<group>/instead. - Add project-specific content to
skills/<group>/— skills must remain generic. Use{{PLACEHOLDER}}tokens for anything project-specific. - Commit skill source changes without also committing the regenerated output (
make sync). - Invent placeholder names — check
config.schema.yamlfor the canonical list.
Project layout
skills/ source skill files (edit here)
adapters/ per-agent adapter configs and header templates
claude/ Claude Code (.claude/commands/*.md)
cursor/ Cursor (.cursor/rules/*.mdc)
codex/ Codex (.agents/skills/)
gemini/ Gemini (.gemini/skills/)
templates/ files for downstream projects to copy
codecannon.yaml template config
docs/ user-facing documentation
index.md getting started
branching.md branch workflow strategies
customization.md tailoring skills
config-reference.md config setting reference
adapters.md adapter documentation
skills/ per-skill documentation
config.schema.yaml placeholder documentation (canonical)
.codecannon.yaml this project's config
sync.py the sync engine
Makefile project-specific targets
Makefile.agents.mk generic git workflow targets
VERSION current version
AGENTS.md this file
README.md user-facing overview
ROADMAP.md future ideasDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

