Project Examples
Small before and after projects that show how bundles install docs, validators, fixtures, and agent-facing checks.
Migration Control
Block new usage of a replaced API while keeping existing migration debt visible.
Command
sh
opencanon bundle inspect examples/bundles/migration-control.bundle.ts
Output
text
Bundle: migration-control
Docs: migrations.md
Files: migration-control.ts, old-api-migration fixtures
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 installing the bundle.
migration-control/before
package.json
src/
orders.ts
migration-control/after
package.json
.gitignore
src/
orders.ts
docs/opencanon/
canon/migrations.md
decisions.json
.opencanon/
cache/ gitignored
.agents/skills/opencanon/
.gitignore
validators/migration-control.ts
fixtures/old-api-migration/
runtime/ gitignored
Artifacts
Switch between the source, docs, validator, and fixture files created by the bundle.
export function submitOrder(input: { total: number }) {
return oldApi(input);
}
export function submitOrder(input: { total: number }) {
return currentApi(input);
}