OpenCanon

Agent-ready. Human-readable. Runtime-enforced.

Project Examples

Small before and after projects showing how Project Canon definitions, generated docs, fixtures, Knowledge, and Proof work together.

Migration Control

Turn an active migration into a convention, fixtures, generated docs, and a changed-file check.

Command

Code
sh
opencanon setup --yes --hooks codex

Output

Code
text
Project Canon scaffolded. Hooks installed. Doctor checked.

Result

Replaced API usage must not be introduced.

Rule
old-api-migration
Severity
error
Location
src/orders.ts:2
Action
suggested edit: oldApi -> currentApi

Project Shape

What the project looks like before and after OpenCanon setup.

Before tree
migration-control/before
package.json
src/
orders.ts
After tree
migration-control/after
package.json
.gitignore
src/
orders.ts
opencanon/
conventions/index.ts
fixtures/migration-control/
docs/opencanon/
canon/migrations.md
.opencanon/ gitignored derived state

Artifacts

Switch between source, generated docs, Project Canon source, and fixtures.

Before ts
export function submitOrder(input: { total: number }) {
  return oldApi(input);
}
After ts
export function submitOrder(input: { total: number }) {
  return currentApi(input);
}