rossedman/canon
canon turns decision records into an MCP server, a CLI and a hook, so your coding agent checks its work and asks "how do we do X". Every finding says why.
go install github.com/rossedman/canon@latest
The problem
Standards live in wikis and review comments, so an agent writing code at 2am never reads them. canon puts each one behind a tool the agent calls mid-task, and the answer always carries the reasoning.
Core concepts
A record says what you decided and why. A rule maps a linter's output to a record. A profile says which records apply to which kind of repo.
The decision, its context and its exceptions. The summary becomes the "why" in findings.
id: go-errors-wrap
status: accepted
strength: must
rules: [golangci-errors]
Ties a checker's codes to a record. A finding without a rule is never reported.
- id: golangci-errors
record: go-errors-wrap
checker: golangci-lint
codes: [wrapcheck, errorlint]
Detects the kind of repo and selects the scopes of records in force.
name: go-cli
detect:
all: [go.mod, cmd/]
scopes: [go, containers, ci, oss, yaml]
Why canon
MCP server, CLI, Claude Code hook and CI all run the same checks, so the agent, the laptop and the pipeline agree.
Each finding carries its rule, the record it enforces and the reason, with a fix when one is known.
golangci-lint, ruff, hadolint, tflint, checkov and yamllint, plus canon's own checks for what they miss.
Six profiles detect go-cli, go-service, go-library, py-service, tf-module or generic, and pick the records in force.
Six scaffold kinds. Dry run by default, never overwrites, and the result is checked before it is reported.
Archives ship with a keyless cosign signature over checksums.txt, tied to the release workflow.
Quick start
You need Go 1.27 or newer to install from source. Linters are optional: canon reports which are missing and skips them.
Full getting-started guide$ go install github.com/rossedman/canon@latest
Registers the MCP server over stdio.
$ claude mcp add canon -- canon serve
From the root of any repository.
$ canon check
Documentation
Free and open source under the Apache-2.0 license.