A Claude Code plugin and CLI that runs your agent's work from plan to merge, holds it to cited engineering practice, and sets up every repo the same way.
Three commands get you the plugin and the CLI. You need Bun, and Linux or macOS.
claude plugin marketplace add https://github.com/erclx/canon
claude plugin install canon@canon
bun install --global @erclx/canonThen open a project in Claude Code and run /canon:target-setup, which brings it onto canon. The project starts with its stack's own tool, such as bun init or npm create vite, or with /canon:target-scaffold in an empty folder, and canon layers on top.
/canon:target-setupdetects the stack, shows the whole chain, and writes nothing until you say yes. Then it runscanon init, checks what landed, and indexes the docs./canon:target-checkreports, domain by domain, what the project holds against what canon now ships, and repairs nothing./canon:target-updateupgrades the CLI and plugin after a release, previews the changelog and any migrations, and catches the project up on your go-ahead.
Three kinds of file land in your repo:
- Skills load live from the plugin, so there is no copy to drift
- Rules are files under
.claude/rules/that load when you edit a matching path - Configs and seeds are real files you own, laid down by
canon initand kept current bycanon sync
Give each step of a change its own session and a written record the next one reads. canon splits a change across a planner, a worker, and two reviewers, and you talk to the orchestrator that starts them.
- The orchestrator dispatches the rows on the task board
- A planner reads the code and writes one plan you approve
- A worker builds the plan and opens the pull request
- A code reviewer reads the diff from a fresh session
- A UI reviewer drives the visual checklist in the running app
Each plan, review, and handoff is a markdown file written to the same standard every time. Records live under .canon/ in the main checkout.
- Before a build: intake, groundwork, the plan, its task, and the board
- Around a pull request: the pull request itself, the code review, the UI review, and the screenshot evidence
- Across sessions: the drive log, the context entries, and the handoff a compaction would lose
The examples fill in every one of them for a single invented change, from beta feedback to a merged pull request.
Each one teaches your agent an engineering practice, and every rule in it links to the guide it came from. Each skill loads when its kind of work starts.
| Skill | Loads | Cites |
|---|---|---|
code-craft |
Before a new function or module | Google, What to look for in a code review |
test-craft |
Before writing a test | Ham Vocke, The Practical Test Pyramid |
api-design |
Before shaping a flag or output | Software Engineering at Google |
ui-craft |
When a rendered file changes | W3C, Using ARIA |
systematic-debugging |
On a bug nobody has explained | Jesse Vincent, superpowers |
Every rule links its source, and an audit fails if one goes missing.
Each one is backed by a check that stops the work when it's broken.
- Rules by path load when the agent opens a matching file, and each names the skill that owns that kind of file
- Hooks read each action before or after it runs, refusing some and reporting others back into the same turn
- The gate runs every stage before a pull request opens, and a stage that cannot read its input fails rather than passing
- A deny rule keeps the agent from merging, since a hook fails open on a timeout and a permission rule does not
Several agents can build at once without touching each other's files. Each worker builds in its own worktree on its own branch, and every session reads and writes the one .canon/ record in the main checkout, so no worktree keeps a copy of its own.
Every pull request that changes a screen comes with a short film of the new screen working in the app. canon films the change in the running app and posts the reel beside the checklist a reviewer ticks.
Run /canon:design-pick when the call is taste. canon drives the running app beside you and puts the options on a board for you to pick, then /canon:design-record lands the one you chose in the project's design record.
Queue features on the task board before you leave. canon builds and reviews them, and holds each merge for you. The orchestrator works the ready rows from now or from a set time, and stops at what only you decide.
Stay at the desk and the run is attended instead, launching each row once the rows it depends on have merged while you do the merging. Ask for a talk session when you want to shape a plan or a build with the session until you end it.
No agent merges a pull request on its own. Run canon pr merge <number> to squash it with a message carrying only the change, or name it for the orchestrator to merge. A standing authorization covers the pull requests in flight when you give it, so the orchestrator merges each as its gates pass and reports after.
Each audit lists the files and functions past a line limit, so you know what to split before it gets worse. canon measures file, function, and comment length, and charts what shipped each week.
- Every command runs without a prompt, and data on stdout pipes clean
canon <command> --helpprints each command's flags, exit codes, and examples- Rules load by path, so the agent gets the rule for the file it is editing
- AI workflow: the loop a feature runs
- Operating model: planners, workers, and reviewers in parallel
- Plan to merge: one change followed from filing to merge
- Examples: every record that change leaves, filled in
- Skill map: every skill by the moment you reach for it
- Agents: flags, exit codes, and output shapes
- Docs index: every reference doc, updating canon among them
Issues are welcome. Pull requests are by invitation, so read the contributing guide before you open one. Released under the MIT license.