@erclx/canon 4.125.0 → 4.126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/claude/.claude-plugin/plugin.json +1 -1
- package/docs/index.md +1 -9
- package/docs/target/index.md +16 -0
- package/docs/{target-projects.md → target/target-projects.md} +6 -6
- package/docs/{target-sync.md → target/target-sync.md} +1 -1
- package/docs/workflow/ai-workflow.md +1 -1
- package/docs/workflow/skill-map.md +1 -1
- package/package.json +1 -1
- package/src/gate/measures.ts +8 -12
- package/src/gate/stages.ts +3 -3
- package/src/init/steps.ts +1 -1
- /package/docs/{target-migrations.md → target/target-migrations.md} +0 -0
- /package/docs/{target-scenarios.md → target/target-scenarios.md} +0 -0
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ Working with an agent rather than reading this yourself? It loads `CLAUDE.md` at
|
|
|
96
96
|
- [AI workflow](docs/workflow/ai-workflow.md): feature-development loop inside a toolkit-managed project
|
|
97
97
|
- [Operating model](docs/workflow/operating-model.md): orchestrator, planner, and worker roles for building across parallel sessions
|
|
98
98
|
- [Visual design workflow](docs/workflow/visual-design-workflow.md): tiered guide for design and wireframe authoring
|
|
99
|
-
- [Target projects](docs/target-projects.md): scaffold, add a domain later, sync upstream drift
|
|
99
|
+
- [Target projects](docs/target/target-projects.md): scaffold, add a domain later, sync upstream drift
|
|
100
100
|
- [Agents](docs/agents/index.md): CLI flags, exit codes, and JSON output shapes
|
|
101
101
|
- [Docs index](docs/index.md): every reference doc in this repo
|
|
102
102
|
|
|
@@ -152,7 +152,7 @@ canon init
|
|
|
152
152
|
|
|
153
153
|
Pass `--stack <name>` for a framework stack, or `--skip governance` to leave rules out. A snippet resolves the same way, reached at its `@` reference through the plugin's live `claude/snippets` symlink rather than a copy. Run `canon tooling list --json` to see the catalog.
|
|
154
154
|
|
|
155
|
-
For the full journey from scaffold through adding a domain later to syncing upstream drift, see [target projects](docs/target-projects.md).
|
|
155
|
+
For the full journey from scaffold through adding a domain later to syncing upstream drift, see [target projects](docs/target/target-projects.md).
|
|
156
156
|
|
|
157
157
|
### Internal narrative
|
|
158
158
|
|
package/docs/index.md
CHANGED
|
@@ -7,14 +7,6 @@ subtitle: One-line reference for each doc in this folder.
|
|
|
7
7
|
|
|
8
8
|
One-line reference for each doc in this folder.
|
|
9
9
|
|
|
10
|
-
## Agent surface
|
|
11
|
-
|
|
12
|
-
- [Target migrations](target-migrations.md): One-time moves a project scaffolded under an older toolkit runs before its next sync
|
|
13
|
-
- [Target projects](target-projects.md): Scaffold, add domains later, and sync upstream drift in a toolkit-managed project
|
|
14
|
-
- [Target scenarios](target-scenarios.md): Worked setups for a markdown-heavy project, a web application, and a monorepo
|
|
15
|
-
- [Target sync](target-sync.md): Check what drifted in a toolkit-managed project and pull it in, per domain or all at once
|
|
16
|
-
|
|
17
|
-
## Sub-catalogs
|
|
18
|
-
|
|
19
10
|
- [Agents](agents/index.md): CLI catalog and invocation rules for agents, split by command domain. Start with overview.
|
|
11
|
+
- [Target](target/index.md): Scaffold, sync, and migrate a toolkit-managed project, with worked setups for three project shapes.
|
|
20
12
|
- [Workflow](workflow/index.md): How a person and their agents run a feature, from the design tier through the parallel-session loop to the shell that launches them.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Target
|
|
3
|
+
subtitle: Scaffold, sync, and migrate a toolkit-managed project, with worked setups for three project shapes.
|
|
4
|
+
category: Agent surface
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Target
|
|
8
|
+
|
|
9
|
+
Scaffold, sync, and migrate a toolkit-managed project, with worked setups for three project shapes.
|
|
10
|
+
|
|
11
|
+
## Agent surface
|
|
12
|
+
|
|
13
|
+
- [Target migrations](target-migrations.md): One-time moves a project scaffolded under an older toolkit runs before its next sync
|
|
14
|
+
- [Target projects](target-projects.md): Scaffold, add domains later, and sync upstream drift in a toolkit-managed project
|
|
15
|
+
- [Target scenarios](target-scenarios.md): Worked setups for a markdown-heavy project, a web application, and a monorepo
|
|
16
|
+
- [Target sync](target-sync.md): Check what drifted in a toolkit-managed project and pull it in, per domain or all at once
|
|
@@ -8,7 +8,7 @@ category: Agent surface
|
|
|
8
8
|
|
|
9
9
|
How a project outside this repo consumes the toolkit across its lifecycle. Three phases: scaffold once, add a domain later when a new need appears, and sync when the upstream toolkit moves.
|
|
10
10
|
|
|
11
|
-
This doc stays at the narrative layer. For command flags and JSON shapes, see [agents](agents/index.md). For per-domain mechanics, see each `canon/context/<domain>.md`.
|
|
11
|
+
This doc stays at the narrative layer. For command flags and JSON shapes, see [agents](../agents/index.md). For per-domain mechanics, see each `canon/context/<domain>.md`.
|
|
12
12
|
|
|
13
13
|
## Getting the skills
|
|
14
14
|
|
|
@@ -74,7 +74,7 @@ Scaffold installs tooling and seeds. It does not fill the planning docs or the d
|
|
|
74
74
|
1. Fill `canon/REQUIREMENTS.md` and `canon/ARCHITECTURE.md`. The seed provides the files, the scope and decisions are yours to write.
|
|
75
75
|
2. For a UI project, invoke `canon:design-extract` to draft `canon/DESIGN.md`. With no UI code yet it takes the greenfield path and proposes tokens from the requirements and a `## Personality` section. Skip for non-UI projects.
|
|
76
76
|
3. Optionally invoke `canon:draft-diagram` to draft entries under `.canon/diagrams/` from the architecture and the requirements. One file per diagram kind, so a later refresh of one kind leaves the others untouched. It renders each diagram it writes to verify the layout, which downloads the Mermaid CLI on first use and takes about 15 seconds.
|
|
77
|
-
4. Start the feature loop. See [AI workflow](workflow/ai-workflow.md) for the per-feature sequence.
|
|
77
|
+
4. Start the feature loop. See [AI workflow](../workflow/ai-workflow.md) for the per-feature sequence.
|
|
78
78
|
|
|
79
79
|
A machine without a renderer still gets the diagrams and is told which check was skipped.
|
|
80
80
|
|
|
@@ -135,8 +135,8 @@ When the toolkit updates, a target pulls changes per domain. A project scaffolde
|
|
|
135
135
|
|
|
136
136
|
## Related
|
|
137
137
|
|
|
138
|
-
- [agents](agents/index.md): CLI flags, exit codes, and JSON output shapes
|
|
138
|
+
- [agents](../agents/index.md): CLI flags, exit codes, and JSON output shapes
|
|
139
139
|
- [target migrations](target-migrations.md), [target sync](target-sync.md), [target scenarios](target-scenarios.md): the one-time moves, the recurring sync, and worked setups
|
|
140
|
-
- [AI workflow](workflow/ai-workflow.md): feature-development loop inside a toolkit-managed project
|
|
141
|
-
- [tooling](
|
|
142
|
-
- [sandbox](
|
|
140
|
+
- [AI workflow](../workflow/ai-workflow.md): feature-development loop inside a toolkit-managed project
|
|
141
|
+
- [tooling](../../canon/context/tooling/index.md), [governance](../../canon/context/governance/index.md), [claude plugin](../../canon/context/claude-plugin/index.md), [indexes](../../canon/context/indexes.md), [snippets](../../canon/context/snippets.md), [standards](../../canon/context/standards/index.md): per-domain mechanics
|
|
142
|
+
- [sandbox](../../canon/context/sandbox/index.md): scenario catalog for verifying domain flows
|
|
@@ -84,7 +84,7 @@ Use a targeted entry point when only one surface moved upstream. Use the catch-a
|
|
|
84
84
|
|
|
85
85
|
## Verify a sync
|
|
86
86
|
|
|
87
|
-
Before running a sync against a real project, run the relevant sandbox scenario. The sandbox provisions a representative project state and routes `SANDBOX_SCENARIO=sync` through the domain flow. See [sandbox](
|
|
87
|
+
Before running a sync against a real project, run the relevant sandbox scenario. The sandbox provisions a representative project state and routes `SANDBOX_SCENARIO=sync` through the domain flow. See [sandbox](../../canon/context/sandbox/index.md) for the scenario catalog and routing patterns.
|
|
88
88
|
|
|
89
89
|
## Running sync from an agent session
|
|
90
90
|
|
|
@@ -44,7 +44,7 @@ Run `canon init` to seed the `.claude/` directory, a root `CLAUDE.md` file, and
|
|
|
44
44
|
|
|
45
45
|
### Bootstrap a new project
|
|
46
46
|
|
|
47
|
-
See [target projects](../target-projects.md) for the scaffold decision, core domains and skips, and the full lifecycle across scaffold, add-a-domain-later, and upstream sync.
|
|
47
|
+
See [target projects](../target/target-projects.md) for the scaffold decision, core domains and skips, and the full lifecycle across scaffold, add-a-domain-later, and upstream sync.
|
|
48
48
|
|
|
49
49
|
### New feature
|
|
50
50
|
|
|
@@ -6,7 +6,7 @@ category: Workflow
|
|
|
6
6
|
|
|
7
7
|
# Skill map
|
|
8
8
|
|
|
9
|
-
Groups run in the order a project meets them, so a reader at a known point scans to that group and reads across. The set reconciles the scenarios in [AI workflow](ai-workflow.md) with the lifecycle [target projects](../target-projects.md) describes, rather than inventing a third vocabulary beside those two, so a group name matches neither source exactly and every moment either one names has a group. Each row says when to reach for the skill. What it does is the skill's own description.
|
|
9
|
+
Groups run in the order a project meets them, so a reader at a known point scans to that group and reads across. The set reconciles the scenarios in [AI workflow](ai-workflow.md) with the lifecycle [target projects](../target/target-projects.md) describes, rather than inventing a third vocabulary beside those two, so a group name matches neither source exactly and every moment either one names has a group. Each row says when to reach for the skill. What it does is the skill's own description.
|
|
10
10
|
|
|
11
11
|
This page is the corpus the coverage claim is measured against: every name `canon claude skills list --names` reports takes exactly one row here. A skill serving two moments sits at the earlier one, and a mention on any other page is prose rather than routing.
|
|
12
12
|
|
package/package.json
CHANGED
package/src/gate/measures.ts
CHANGED
|
@@ -312,10 +312,9 @@ export const skillProvenance: Measure = async (ctx) => {
|
|
|
312
312
|
/**
|
|
313
313
|
* Every tracked markdown document against the whole-document ceiling.
|
|
314
314
|
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
* replaces the warn path rather than sitting beside it.
|
|
315
|
+
* A document past the ceiling fails the stage. The failure names every one with
|
|
316
|
+
* its height rather than the first, so a contributor sees the whole set in one
|
|
317
|
+
* pass, and an exempt document is counted and never named.
|
|
319
318
|
*
|
|
320
319
|
* Read in-process rather than through `canon markdown audit`, whose exit code
|
|
321
320
|
* stays bans and dead links only. The plan and groundwork skills run that audit
|
|
@@ -353,15 +352,12 @@ export const documentCeiling: Measure = async (ctx) => {
|
|
|
353
352
|
}
|
|
354
353
|
}
|
|
355
354
|
|
|
355
|
+
const where = over
|
|
356
|
+
.map((finding) => `${finding.rel} ${finding.renderedLines} rendered lines`)
|
|
357
|
+
.join(', ')
|
|
356
358
|
return {
|
|
357
|
-
emissions: [
|
|
358
|
-
|
|
359
|
-
warn(`${finding.rel} ${finding.renderedLines} rendered lines`),
|
|
360
|
-
),
|
|
361
|
-
info(
|
|
362
|
-
`${plural(over.length, 'document')} past the ${ceiling}-line ceiling, ${exempt} exempt. Reported only, so the push is not held.`,
|
|
363
|
-
),
|
|
364
|
-
],
|
|
359
|
+
emissions: [],
|
|
360
|
+
failure: `${plural(over.length, 'document')} past the ${ceiling}-line ceiling: ${where}. Split each at a seam, or for a verbatim record add a \`<!-- canon-length-exempt: <reason> -->\` line naming why.`,
|
|
365
361
|
}
|
|
366
362
|
}
|
|
367
363
|
|
package/src/gate/stages.ts
CHANGED
|
@@ -338,7 +338,7 @@ export const STAGES: readonly Stage[] = [
|
|
|
338
338
|
// Only the citation half of the audit gates. Its length, depth, table, and
|
|
339
339
|
// index findings are judgment thresholds, and failing a push on one would
|
|
340
340
|
// make the stage something to route around. The one length reading that
|
|
341
|
-
//
|
|
341
|
+
// gates is the whole-document ceiling, which the Document ceiling stage
|
|
342
342
|
// below owns rather than this audit.
|
|
343
343
|
id: 'context-citations',
|
|
344
344
|
label: 'Context citations',
|
|
@@ -360,8 +360,8 @@ export const STAGES: readonly Stage[] = [
|
|
|
360
360
|
checks: [{ kind: 'measure', measure: architectureRecord }],
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
|
-
// Unscoped, since any branch can grow any document.
|
|
364
|
-
//
|
|
363
|
+
// Unscoped, since any branch can grow any document. A document past the
|
|
364
|
+
// ceiling fails the push.
|
|
365
365
|
id: 'document-ceiling',
|
|
366
366
|
label: 'Document ceiling',
|
|
367
367
|
checks: [{ kind: 'measure', measure: documentCeiling }],
|
package/src/init/steps.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { DomainStep } from '@/init/run'
|
|
|
5
5
|
export type RunFactory = (args: readonly string[]) => () => Promise<boolean>
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* States the same fact as `docs/target-migrations.md`'s backup section in its
|
|
8
|
+
* States the same fact as `docs/target/target-migrations.md`'s backup section in its
|
|
9
9
|
* own words. Keep the two in step by hand; nothing compares them.
|
|
10
10
|
*/
|
|
11
11
|
const RECORDS_SETUP_NOTICE =
|
|
File without changes
|
|
File without changes
|