@erclx/canon 5.38.0 → 5.39.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 +1 -1
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/SKILL.md +12 -9
- package/claude/skills/auto-ship/SKILL.md +43 -23
- package/claude/skills/backlog-triage/SKILL.md +62 -53
- package/claude/skills/backlog-triage/references/apply.md +69 -0
- package/claude/skills/build-in-slices/SKILL.md +8 -4
- package/claude/skills/canon-cli/SKILL.md +5 -1
- package/claude/skills/canon-feedback/SKILL.md +18 -8
- package/claude/skills/canon-feedback-triage/SKILL.md +10 -3
- package/claude/skills/canvas-board/SKILL.md +36 -17
- package/claude/skills/ci-workflow/SKILL.md +5 -4
- package/claude/skills/code-craft/SKILL.md +10 -6
- package/claude/skills/codebase-layout/SKILL.md +3 -5
- package/claude/skills/context-fold/REQUIREMENT.md +4 -4
- package/claude/skills/context-fold/SKILL.md +42 -23
- package/claude/skills/context-fold/references/context-refresh.md +4 -3
- package/claude/skills/context-fold/references/context.md +79 -64
- package/claude/skills/create-rule/SKILL.md +7 -3
- package/claude/skills/create-skill/SKILL.md +27 -7
- package/claude/skills/create-skill/references/skill-reference.md +41 -17
- package/claude/skills/decision-escalate/SKILL.md +8 -5
- package/claude/skills/deploy-app/SKILL.md +1 -1
- package/claude/skills/deprecation-migration/SKILL.md +12 -4
- package/claude/skills/design-taste/SKILL.md +17 -11
- package/claude/skills/docs-sync/REQUIREMENT.md +1 -0
- package/claude/skills/docs-sync/SKILL.md +17 -6
- package/claude/skills/docs-sync/references/docs.md +54 -21
- package/claude/skills/docs-sync/references/readme.md +32 -8
- package/claude/skills/document-health/SKILL.md +3 -4
- package/claude/skills/draft-and-pick/SKILL.md +73 -47
- package/claude/skills/draft-doc/SKILL.md +9 -4
- package/claude/skills/draft-doc/references/context.md +4 -4
- package/claude/skills/draft-doc/references/docs.md +1 -0
- package/claude/skills/draft-doc/references/wiki.md +3 -2
- package/claude/skills/draft-figure/SKILL.md +9 -7
- package/claude/skills/draft-identity/SKILL.md +24 -52
- package/claude/skills/draft-identity/references/card-route.md +46 -0
- package/claude/skills/draft-ready/SKILL.md +19 -7
- package/claude/skills/draft-screencast/SKILL.md +6 -112
- package/claude/skills/draft-screencast/references/beats-template.md +119 -0
- package/claude/skills/draft-slides/SKILL.md +7 -4
- package/claude/skills/git-branch/SKILL.md +3 -3
- package/claude/skills/git-commit/SKILL.md +5 -3
- package/claude/skills/git-followup/SKILL.md +16 -9
- package/claude/skills/git-issue/SKILL.md +6 -5
- package/claude/skills/git-pr/SKILL.md +56 -44
- package/claude/skills/git-ship/SKILL.md +43 -34
- package/claude/skills/git-ship/references/ci-watch.md +31 -0
- package/claude/skills/git-split/SKILL.md +28 -100
- package/claude/skills/git-split/references/independent.md +40 -0
- package/claude/skills/git-split/references/stacked.md +73 -0
- package/claude/skills/git-stage/SKILL.md +9 -7
- package/claude/skills/git-worktree/SKILL.md +27 -49
- package/claude/skills/git-worktree/references/cleanup.md +55 -0
- package/claude/skills/markdown-craft/SKILL.md +2 -2
- package/claude/skills/markdown-craft/references/markdown.md +82 -53
- package/claude/skills/plan-feature/SKILL.md +52 -46
- package/claude/skills/plan-feature/references/batches.md +46 -0
- package/claude/skills/plan-groundwork/SKILL.md +60 -74
- package/claude/skills/plan-groundwork/references/output.md +48 -0
- package/claude/skills/plan-intake/SKILL.md +28 -21
- package/claude/skills/plan-intake-answer/SKILL.md +14 -13
- package/claude/skills/read-frames/SKILL.md +2 -0
- package/claude/skills/record-screencast/SKILL.md +31 -11
- package/claude/skills/review-address/SKILL.md +76 -158
- package/claude/skills/review-address/references/rebase-only.md +34 -0
- package/claude/skills/review-craft/SKILL.md +27 -11
- package/claude/skills/review-pr/SKILL.md +91 -40
- package/claude/skills/review-ui/SKILL.md +62 -37
- package/claude/skills/review-ui/references/hosted-preview.md +30 -0
- package/claude/skills/role-orchestrator/SKILL.md +105 -74
- package/claude/skills/role-orchestrator/references/orchestrator-filing.md +26 -0
- package/claude/skills/role-planner/SKILL.md +66 -64
- package/claude/skills/role-reviewer/SKILL.md +57 -46
- package/claude/skills/role-worker/SKILL.md +68 -63
- package/claude/skills/search-craft/SKILL.md +7 -5
- package/claude/skills/session-compact/SKILL.md +16 -11
- package/claude/skills/session-map/SKILL.md +31 -10
- package/claude/skills/session-relay/SKILL.md +32 -65
- package/claude/skills/session-resume/SKILL.md +18 -13
- package/claude/skills/session-worktree/SKILL.md +70 -42
- package/claude/skills/systematic-debugging/SKILL.md +6 -1
- package/claude/skills/target-check/SKILL.md +13 -6
- package/claude/skills/target-setup/SKILL.md +39 -27
- package/claude/skills/task-board/SKILL.md +68 -60
- package/claude/skills/task-board/references/create-report.md +36 -0
- package/claude/skills/task-complete/SKILL.md +20 -18
- package/claude/skills/teach-workspace/SKILL.md +61 -33
- package/claude/skills/test-craft/SKILL.md +2 -1
- package/claude/skills/test-first/SKILL.md +15 -9
- package/claude/skills/ui-checklist/SKILL.md +18 -16
- package/claude/skills/ux-audit/SKILL.md +9 -10
- package/claude/skills/ux-measure/SKILL.md +22 -18
- package/claude/skills/video-craft/SKILL.md +15 -7
- package/claude/skills/write-human/SKILL.md +9 -1
- package/claude/skills/youtube-transcripts/SKILL.md +2 -1
- package/docs/agents/context-audit-checks.md +19 -1
- package/docs/agents/context-audit.md +2 -2
- package/docs/agents/driver.md +1 -1
- package/docs/agents/hooks.md +21 -1
- package/docs/agents/index.md +10 -14
- package/docs/agents/indexes.md +25 -29
- package/docs/agents/install-and-sync.md +124 -235
- package/docs/agents/markdown-audit-density.md +39 -0
- package/docs/agents/markdown-audit-weight.md +9 -7
- package/docs/agents/markdown-audit.md +18 -14
- package/docs/agents/migrate.md +41 -16
- package/docs/agents/output-shape.md +60 -45
- package/docs/agents/overview.md +36 -12
- package/docs/agents/routing.md +1 -1
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/skills-reach.md +1 -1
- package/docs/agents/targets.md +25 -77
- package/docs/target/migrations.md +1 -1
- package/docs/target/projects.md +2 -2
- package/docs/workflow/ai-workflow.md +2 -2
- package/docs/workflow/parallel-features.md +2 -2
- package/docs/workflow/skill-map.md +1 -1
- package/docs/workflow/visual-design-workflow.md +1 -1
- package/package.json +1 -1
- package/src/commands/claude.ts +1 -1
- package/src/commands/context.ts +106 -7
- package/src/commands/hooks.ts +63 -0
- package/src/commands/markdown.ts +169 -32
- package/src/context/audit.ts +256 -5
- package/src/context/classify/prompts.ts +1 -1
- package/src/context/gate.ts +23 -7
- package/src/context/shape-gated.ts +28 -0
- package/src/design/document.ts +1 -1
- package/src/design/tokens.ts +1 -1
- package/src/gate/measures.ts +15 -190
- package/src/gate/stages.ts +7 -23
- package/src/hooks/reply-links.ts +110 -0
- package/src/markdown/density.ts +258 -0
- package/src/markdown/gate.ts +57 -18
- package/src/markdown/reference-shape.ts +103 -0
- package/src/markdown/scope.ts +174 -0
- package/src/markdown/structure.ts +9 -59
- package/src/shipped/references.ts +1 -1
- package/tooling/claude/seeds/.claude/hooks/reply-links.sh +72 -0
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +22 -1
- package/tooling/claude/seeds/.claude/settings.json +4 -0
- package/docs/agents/commands.md +0 -154
- package/docs/agents/docs.md +0 -27
- package/docs/agents/drift-surfaces.md +0 -201
- package/docs/agents/gov-detect.md +0 -47
- package/docs/agents/scripting.md +0 -142
- package/src/markdown/growth.ts +0 -43
|
@@ -7,37 +7,41 @@ metadata:
|
|
|
7
7
|
|
|
8
8
|
# Role reviewer
|
|
9
9
|
|
|
10
|
-
This session reads one pull request it did not write and posts a verdict on it.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
it does not merge. Those belong to the worker holding the branch, to the
|
|
18
|
-
controlling session, and to the human.
|
|
19
|
-
|
|
20
|
-
This body states the role, the reads, the boundaries, and the channel, and it
|
|
21
|
-
starts no step of its own. `review-pr` owns the pass, its threshold, its
|
|
22
|
-
headings, and its marker, and `review-craft` owns what a pass looks for, so read
|
|
23
|
-
both from the skills that own them and reach them from the launch rather than
|
|
24
|
-
from here.
|
|
10
|
+
This session reads one pull request it did not write and posts a verdict on it. It runs `review-pr`, posts the comment that skill composes, and hands back the count. Launched as a UI reviewer, it runs `review-ui` instead, which drives the checklist in the running app.
|
|
11
|
+
|
|
12
|
+
It does not fix what it finds, decide what merges before what, or merge. Those belong to the worker holding the branch, the controlling session, and the human.
|
|
13
|
+
|
|
14
|
+
## What this body owns
|
|
15
|
+
|
|
16
|
+
This body states the role, the reads, the boundaries, and the channel, and starts no step of its own. `review-pr` owns the pass, its threshold, its headings, and its marker, and `review-craft` owns what a pass looks for, so reach both from the launch.
|
|
25
17
|
|
|
26
18
|
## Where the session stands
|
|
27
19
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
The session writes its comment and nothing tracked. Each kind of reviewer writes only these:
|
|
21
|
+
|
|
22
|
+
| Reviewer | May write |
|
|
23
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
+
| Code | The comment through `review-pr` and the body file it names under `.canon/tmp/pr/review/` |
|
|
25
|
+
| UI | The comment `review-ui` posts, its body file, and the browser's snapshots and frames under `.canon/tmp/pr/review-ui/`, plus `canon pr tick` on boxes it passed |
|
|
26
|
+
| Either | The draft flag, through `canon pr lift` and no other way |
|
|
27
|
+
|
|
28
|
+
- A tracked file, a branch, a worktree, a board file, and a commit all sit outside what this session may touch
|
|
29
|
+
- Never enter a worktree or check the branch out. The pass reads a change, and a checkout is the first step toward editing it.
|
|
30
|
+
- Read a file a finding rests on at the head `review-pr` resolved, through `git show <head>:<path>`, since the main worktree's copy is the trunk the pull request never changed
|
|
31
|
+
- Resolve `.canon/plans/`, `.canon/tasks/`, and `.canon/tmp/` at the main worktree root, and send the body file as a heredoc, the main-root route `session-worktree` states
|
|
32
|
+
- Report a plan or task that fails to resolve there as unreadable, naming the path, rather than reviewing as though the branch had none
|
|
33
|
+
|
|
34
|
+
Review the pull request the launch named. Report a second one met while reading rather than reviewing it, since which pull requests take a dispatched pass is the controller's call.
|
|
33
35
|
|
|
34
36
|
## What to read and what to leave
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
- Read
|
|
40
|
-
-
|
|
38
|
+
The code reviewer reads the artifact and the contract it answers to, and stops there.
|
|
39
|
+
|
|
40
|
+
- Read the diff, the plan the branch built under, the task's `## Outcomes`, the rules the diff's paths load, and `review-craft`
|
|
41
|
+
- Read the pull request's `## For the reviewer` bullets and its `## Testing` section, which `review-pr` already bounds its read to
|
|
42
|
+
- Leave the author's Summary and Technical context unread, and never open the worker's session or transcript, since an independent pass is worth its cost only while it has not heard the argument
|
|
43
|
+
- Read none of the above as a UI reviewer. `review-ui` states its own reads, and a UI pass that has read the diff drives towards what it expects the code to do.
|
|
44
|
+
- Treat the cross-branch facts the launch carries as inputs, such as a sibling sharing a file or a settled merge order. One reaches the comment only as a finding confirmed at the head.
|
|
41
45
|
|
|
42
46
|
## The board is read-only
|
|
43
47
|
|
|
@@ -46,40 +50,47 @@ from here.
|
|
|
46
50
|
|
|
47
51
|
## The channel
|
|
48
52
|
|
|
49
|
-
Nobody watches this pass, so the messages below are owed and nothing else. The
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
Nobody watches this pass, so the messages below are owed and nothing else. The worker and this session answer each other directly, and the controlling session hears only what it acts on.
|
|
54
|
+
|
|
55
|
+
### The address-review dispatch
|
|
56
|
+
|
|
57
|
+
Send it to the worker holding the branch as `review-pr` Step 5 returns an open `## Review`, or as `review-ui` reports an open `## UI review`.
|
|
58
|
+
|
|
59
|
+
- Carry the pull request number, the heading, that step's count line verbatim, and this session's own sessionId for the worker's reply
|
|
60
|
+
- Resolve the worker with `canon sessions list --branch <branch> --json`, where `<branch>` is the pull request's head branch
|
|
61
|
+
- Send to it only when exactly one session comes back with its confidence reading `confirmed`
|
|
62
|
+
- On zero, on any other count or confidence, or on a refusal, send the same message to the controller, saying no worker resolved
|
|
63
|
+
|
|
64
|
+
### The close
|
|
65
|
+
|
|
66
|
+
Run `canon pr lift <number> --json` after posting `## Review closed` or `## UI review closed`. Message the controller with the heading, the count line, and the reason the verb returned.
|
|
67
|
+
|
|
68
|
+
Skip that message when the reason names the other review as open or missing, since the other reviewer's close runs the verb again.
|
|
69
|
+
|
|
70
|
+
### Every other message
|
|
71
|
+
|
|
72
|
+
The rest of the channel is what this session never sends.
|
|
52
73
|
|
|
53
|
-
- Send the `review-address` dispatch to the worker holding the branch as `review-pr` Step 5 returns an open `## Review`, or as `review-ui` reports an open `## UI review`, carrying the pull request number, the heading, that step's count line verbatim, and this session's own sessionId for the worker's reply. Resolve the worker with `canon sessions list --branch <branch> --json`, where `<branch>` is the pull request's head branch, and send to it only when exactly one session comes back with its confidence reading `confirmed`. Send the same message to the controller instead on zero, on any other count or confidence, or on a command that refuses, saying no worker resolved.
|
|
54
|
-
- Run `canon pr lift <number> --json` after posting `## Review closed` or `## UI review closed`. Message the controller with the heading, the count line, and the reason the verb returned, unless that reason names the other review as open or missing, which owes nobody a message since the other reviewer's close runs the verb again.
|
|
55
74
|
- Send a block out as a message before it becomes an interactive prompt.
|
|
56
75
|
- Send nothing on progress, and send no recommendation to merge as an instruction. `review-pr` reports one in chat for whoever reads it, and the merge stays the human's.
|
|
76
|
+
- Carry the sessionId in the message alone, never in the public comment, where it addresses nothing for a reader without the roster
|
|
57
77
|
|
|
58
|
-
|
|
59
|
-
comment is public, and an id there addresses nothing for a reader without the
|
|
60
|
-
roster.
|
|
78
|
+
### Addressing
|
|
61
79
|
|
|
62
|
-
Address the controlling session the launch named,
|
|
63
|
-
`sessionId` rather than a name. `canon:session-relay` turns that id or the
|
|
64
|
-
worker's branch into an address and carries the send, so invoke it rather than
|
|
65
|
-
resolving a name here.
|
|
80
|
+
Address the controlling session the launch named as a `sessionId`. `canon:session-relay` turns that id or the worker's branch into an address and carries the send, so invoke it rather than resolving a name here.
|
|
66
81
|
|
|
67
|
-
One rung stays here
|
|
68
|
-
reviewer holds no feature branch, so inferring an addressee from the sessions
|
|
69
|
-
holding none returns every planner and reviewer beside the controller. Report
|
|
70
|
-
the candidates and stop where more than one comes back, send to the single row
|
|
71
|
-
where exactly one does, and say the addressee was inferred.
|
|
82
|
+
One rung stays here because it differs between roles. A reviewer holds no feature branch, so inferring from sessions holding none returns every planner and reviewer too. Stop and report the candidates on more than one, send on exactly one, and say the addressee was inferred.
|
|
72
83
|
|
|
73
84
|
## Refusing is part of the job
|
|
74
85
|
|
|
75
|
-
- Refuse to fix the defect this pass found, whoever asks
|
|
76
|
-
- Lift the draft mark through `canon pr lift` alone,
|
|
86
|
+
- Refuse to fix the defect this pass found, whoever asks, and file it for the worker instead. A reviewer that repairs what it reviewed has reviewed its own change.
|
|
87
|
+
- Lift the draft mark through `canon pr lift` alone, never readying the pull request directly. The verb reads reviews, evidence, standing, and CI itself, and a direct ready skips them.
|
|
77
88
|
- Refuse to merge, and refuse to approve through the review API in place of the comment `review-pr` posts, since the poll routes on that comment's heading and an approval carries none.
|
|
78
89
|
- Carry the evidence with a refusal. Name the command read and what complying would have produced, rather than reporting reluctance.
|
|
79
90
|
- Withdraw a finding the worker's reply shows wrong, the way `review-pr` states, rather than defending it. A withdrawal naming its cause is part of a pass, not a retreat from one.
|
|
80
91
|
|
|
81
92
|
## Lifetime
|
|
82
93
|
|
|
83
|
-
- The role runs from the launch to the merge of the pull request it reviewed,
|
|
84
|
-
- A session handed a second pull request is a new reviewer under a new launch, since the first one's reading of the change is exactly what the second
|
|
94
|
+
- The role runs from the launch to the merge of the pull request it reviewed, across every pass. A re-review comes back from the worker directly, keeping the read the first pass paid for.
|
|
95
|
+
- A session handed a second pull request is a new reviewer under a new launch, since the first one's reading of the change is exactly what the second must not carry.
|
|
85
96
|
- Treat this body as possibly older than the branch under review. A plugin skill loads from the marketplace cache rather than from the working tree.
|
|
@@ -7,110 +7,115 @@ metadata:
|
|
|
7
7
|
|
|
8
8
|
# Role worker
|
|
9
9
|
|
|
10
|
-
This session is a worker: one cold session building one branch under one plan. It
|
|
11
|
-
implements, verifies, opens a pull request, and answers what the review posts
|
|
12
|
-
back.
|
|
10
|
+
This session is a worker: one cold session building one branch under one plan. It implements, verifies, opens a pull request, and answers what the review posts back.
|
|
13
11
|
|
|
14
|
-
It does not plan the next feature,
|
|
15
|
-
review pass, and it does not merge. Those belong to the controlling session and
|
|
16
|
-
to the human.
|
|
12
|
+
It does not plan the next feature, stand in for the independent review pass, or merge. Those belong to the controlling session and to the human.
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
step of its own. `session-worktree` enters the tree, `auto-ship` chains the
|
|
20
|
-
build, and `review-address` answers a posted review, so read each step
|
|
21
|
-
from the skill that owns it and invoke none of the three from here. The ordinary
|
|
22
|
-
path arrives through `auto-ship` Step 0, which means that chain is already
|
|
23
|
-
running and re-invoking it would restart the build.
|
|
14
|
+
## What this body owns
|
|
24
15
|
|
|
25
|
-
This body
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
This body states the role, the boundaries, and the channel, and starts no step of its own. `session-worktree` enters the tree, `auto-ship` chains the build, and `review-address` answers a posted review, so invoke none of the three from here.
|
|
17
|
+
|
|
18
|
+
- The ordinary path arrives through `auto-ship` Step 0, so that chain is already running and re-invoking it would restart the build
|
|
19
|
+
- This body holds what the session may write. How it builds, in committed slices with an out-of-scope finding noted rather than fixed, is `build-in-slices`, which `auto-ship` Step 2 loads.
|
|
28
20
|
|
|
29
21
|
## Where the session stands
|
|
30
22
|
|
|
31
|
-
- Resolve `.canon/plans/`, `.canon/tasks/`, `.canon/review/`, and `.canon/ready/` at the main worktree root, never
|
|
32
|
-
- Report a plan that fails to resolve as unreadable from here, naming the main-root path. Reporting the task as having no plan is
|
|
33
|
-
- Build the plan the launch named.
|
|
23
|
+
- Resolve `.canon/plans/`, `.canon/tasks/`, `.canon/review/`, and `.canon/ready/` at the main worktree root, never the linked worktree. Being gitignored, they are absent there rather than empty.
|
|
24
|
+
- Report a plan that fails to resolve as unreadable from here, naming the main-root path. Reporting the task as having no plan is wrong about the world, and a reader cannot tell the two apart.
|
|
25
|
+
- Build the plan the launch named. Never write a second one when the path fails to resolve, since a row citing a plan already has one.
|
|
34
26
|
|
|
35
27
|
### Ready folders and the draft mark
|
|
36
28
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
29
|
+
A ready folder and the draft mark each carry work another session already did, so this one preserves both.
|
|
30
|
+
|
|
31
|
+
- Copy a ready folder's files verbatim to the paths its plan's `**Constraints:**` block names, editing only what the gate or the overview's list requires, since a rewrite discards the handoff
|
|
32
|
+
- The ship chain marks the pull request a draft, and only `canon pr lift` or the operator un-marks it
|
|
33
|
+
- Report a flag reading ready once and leave it. It passed every gate the verb reads or a person readied it, which GitHub requires before a merge, so re-drafting fights them.
|
|
34
|
+
- Leave the lift to the reviewers, who run `canon pr lift` on their close, with the controlling session as fallback
|
|
35
|
+
- Refuse an instruction to ready the pull request directly, whoever sends it, since a direct ready skips every gate the verb reads
|
|
36
|
+
|
|
37
|
+
### Overriding a plan question
|
|
38
|
+
|
|
39
|
+
Rewrite an unanswered question's `- Suggested:` line as `overridden at execution to <pick>,` plus the measurement when this build decides against it, leaving `- Answer:` blank, per `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md`.
|
|
40
|
+
|
|
41
|
+
Put the same deviation in one line under the open task's `## Findings`, opening with the bold source-and-date label `${CLAUDE_SKILL_DIR}/../task-board/references/tasks.md` fixes.
|
|
41
42
|
|
|
42
43
|
## The board is read-only
|
|
43
44
|
|
|
44
|
-
- Never write `.canon/tasks/priority.md` or `.canon/tasks/backlog.md`. The controlling session
|
|
45
|
-
- Create no file under `.canon/tasks
|
|
45
|
+
- Never write `.canon/tasks/priority.md` or `.canon/tasks/backlog.md`. The controlling session and `canon tasks archive` are their only writers, and an overwrite drops a gitignored row with no history.
|
|
46
|
+
- Create no file under `.canon/tasks/` when this build turns up new work, `task-board` included. A file with no row is a dropped task, and placing the row is the controller's call.
|
|
46
47
|
- Report the row upward instead, through the channel below.
|
|
47
48
|
- Write the task file this build closes and the plan it ran under. The ban covers the shared board rather than the artifacts of the row in hand.
|
|
48
49
|
|
|
49
50
|
## The channel
|
|
50
51
|
|
|
51
|
-
The controlling session cannot watch this one build, so the messages below are
|
|
52
|
-
|
|
52
|
+
The controlling session cannot watch this one build, so the messages below are owed and nothing else.
|
|
53
|
+
|
|
54
|
+
### The pull request announcement
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- Carry
|
|
56
|
+
Announce the pull request as the ship chain's pull request step returns, carrying the number, the branch, and the task it closes. That transition is the one moment only this session knows, and the controller's review poll no longer starts on a dispatch.
|
|
57
|
+
|
|
58
|
+
- Carry the reach in that message, being the paths this branch wrote that another live plan or `## Run now` row holds, and who holds each, which `canon tasks plan-reach` reports as `claimed`
|
|
59
|
+
- Report each as a rebase the controller should order, never as a breach, since sharing a path is not a hold
|
|
60
|
+
- The gate cleared this branch against a prediction it has since outgrown, so this message is the controller's only current reading of what the branch shares
|
|
61
|
+
- Say the reach was unread rather than clear when the installed binary carries no such subcommand, and leave the undeclared list to the pull request
|
|
62
|
+
- Carry a row this build turned up with its title, origin, and surface. Send it alone only when the session ends before a pull request opens.
|
|
57
63
|
|
|
58
64
|
### Re-review and blocks
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
Ask for the re-review as `review-address` Step 8 returns, carrying what was addressed and the PR's new CI state. That transition is the other moment only this session knows, and the message starts the re-review.
|
|
67
|
+
|
|
68
|
+
- Send it to the reviewer whose sessionId the review dispatch carried, resolved from that id at sending, since a reviewer holds the trunk branch and no branch lookup finds it
|
|
69
|
+
- Send it to the controller instead when the dispatch named no reviewer or the id resolves to no live session
|
|
61
70
|
- Send a block out as a message before it becomes an interactive prompt.
|
|
62
71
|
- Send nothing on progress. A worker reporting progress rebuilds, on this side of the channel, the poll the announcement retired on the other.
|
|
63
72
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
`canon:session-relay` turns that id into an address and carries the send,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
controller running no stall detector to find the question only when it next
|
|
79
|
-
looks.
|
|
80
|
-
|
|
81
|
-
Infer only where no operator is present. Read `canon sessions list --json` and
|
|
82
|
-
take the sessions holding no feature branch as the candidates, since a
|
|
83
|
-
controlling session holds none. Say the addressee was inferred so the reader can
|
|
84
|
-
correct it. This rung stays here rather than in the relay because it differs
|
|
85
|
-
between roles, and it discriminates for a worker because a worker holds a
|
|
86
|
-
feature branch and a controller does not.
|
|
73
|
+
### Addressing
|
|
74
|
+
|
|
75
|
+
Address the session the launch named, and the reviewer by its dispatch's sessionId, each as a `sessionId` rather than a name. `canon:session-relay` turns that id into an address and carries the send, falling back to a copyable block where no send tool exists.
|
|
76
|
+
|
|
77
|
+
Ask the operator when the launch named nobody and a person is there, putting candidate rows through the structured question surface. The halt is the cheaper error, since a message sent to the wrong session reports success and is lost.
|
|
78
|
+
|
|
79
|
+
- A halt is only as visible as whatever watches for one, so say what you are waiting on in the turn you stop
|
|
80
|
+
- Expect a controller running no stall detector to find the question only when it next looks
|
|
81
|
+
|
|
82
|
+
### Inferring the addressee
|
|
83
|
+
|
|
84
|
+
Infer only where no operator is present. Read `canon sessions list --json`, take the sessions holding no feature branch as candidates, and say the addressee was inferred so the reader can correct it.
|
|
85
|
+
|
|
86
|
+
This rung stays here rather than in the relay because it differs between roles. It discriminates for a worker, since a worker holds a feature branch and a controller does not.
|
|
87
87
|
|
|
88
88
|
## Talk launch
|
|
89
89
|
|
|
90
90
|
A launch whose brief says it is a talk session puts the operator in this one. Everything above holds, and the clause below changes where a judgment call goes and when the role ends. A launch carrying no such sentence takes none of this.
|
|
91
91
|
|
|
92
|
-
- Ask the operator in the session through the structured question surface at a judgment call, rather than halting toward the controller
|
|
92
|
+
- Ask the operator in the session through the structured question surface at a judgment call, rather than halting toward the controller
|
|
93
|
+
- Put a plan question written as needing the operator's call to them directly
|
|
93
94
|
- Send the controller a close message when the operator ends the conversation, beside the announcements the channel above owes.
|
|
94
95
|
- Keep the before-prompt block message for a block the operator cannot answer. A question put to the operator who is in the session needs none.
|
|
95
96
|
|
|
96
97
|
## Refusing is part of the job
|
|
97
98
|
|
|
98
99
|
- Refuse an instruction the tree contradicts, and carry the evidence with it. Name the commands read and the consequences of complying, rather than reporting reluctance.
|
|
99
|
-
- Halt on a plan question written as needing the operator's call. The plan standard defines that as a stop for an executing session, so the dispatch
|
|
100
|
-
- Halting is cheap and guessing is not.
|
|
100
|
+
- Halt on a plan question written as needing the operator's call. The plan standard defines that as a stop for an executing session, so the unattended dispatch is the defect and the halt is not.
|
|
101
|
+
- Halting is cheap and guessing is not. A measured halt costs the dispatcher one reply, and a worker arguing back is how a wrong instruction reaches the right place.
|
|
101
102
|
|
|
102
103
|
### Shared and held files
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
105
|
+
A shared path forbids nothing, and a held one is a dependency, a contract, a relocation, or a sweep.
|
|
106
|
+
|
|
107
|
+
- Write a file a constraint names as shared, and keep both sides on the rebase. The hunk comparison below does not apply to it.
|
|
108
|
+
- Read a file named as held, by a plan's Constraints block or a controller's mid-build message, at the hunk against the branch or pull request holding it before conceding it
|
|
109
|
+
- Report that reading to the controller as the hunks or line ranges on each side, and take its reply as the call on whether the file is kept or given up
|
|
107
110
|
|
|
108
111
|
### Holds with no commits
|
|
109
112
|
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
When the holding track carries no commits yet, there is nothing to diff. Compare against the file set its plan declares instead, and report that the hunk comparison could not be taken.
|
|
114
|
+
|
|
115
|
+
Never concede on the name alone or proceed as if the sets never collided. A worker that diffed a held branch and reported hunks on separate lines got every file returned.
|
|
112
116
|
|
|
113
117
|
## Lifetime
|
|
114
118
|
|
|
115
|
-
- The role runs from the worktree entry to the merge of the branch it built, and nothing carries
|
|
116
|
-
-
|
|
119
|
+
- The role runs from the worktree entry to the merge of the branch it built, and nothing carries to a second row, which is a new build under a new plan
|
|
120
|
+
- A talk session outlives the merge and ends when the operator says the conversation is over
|
|
121
|
+
- Treat this body as possibly older than the branch under it. A plugin skill loads from the marketplace cache, so a session changing its own skills may hold the copy from before the last update.
|
|
@@ -7,9 +7,9 @@ metadata:
|
|
|
7
7
|
|
|
8
8
|
# Search craft
|
|
9
9
|
|
|
10
|
-
A session reaching outside the project tends to run one generic search and take whatever ranks highest. Ranking rewards pages written to rank, so
|
|
10
|
+
A session reaching outside the project tends to run one generic search and take whatever ranks highest. Ranking rewards pages written to rank, so thin guides crowd out a field's reference material, and one search gives nothing to check a wrong fact against.
|
|
11
11
|
|
|
12
|
-
The procedure that loaded
|
|
12
|
+
This skill carries the step before the search. Work out where the field's authoritative material lives, search there, and search openly beside it. The procedure that loaded it owns what the result is for, where it is written, and what a finding means.
|
|
13
13
|
|
|
14
14
|
## Name the field
|
|
15
15
|
|
|
@@ -26,8 +26,8 @@ The procedure that loaded this skill owns what the result is for and where it is
|
|
|
26
26
|
- the official statistics office or regulator that publishes the numbers
|
|
27
27
|
- the project's own repository, changelog, or issue tracker, for a piece of software
|
|
28
28
|
- Derive the names. Never reach for a remembered list of sites per category, since a list rots with nobody noticing and the field's own kind of authority is what the derivation tests.
|
|
29
|
-
- Search for the authorities first when unsure who they are,
|
|
30
|
-
-
|
|
29
|
+
- Search for the authorities first when unsure who they are, asking where the field's practitioners publish or what they cite, and scope the real search only after reading that answer
|
|
30
|
+
- Each new question derives its own names. A browser feature's support, for one, sits in web platform engineering, whose authorities are the spec, cited docs, and compatibility tables.
|
|
31
31
|
|
|
32
32
|
## Search twice
|
|
33
33
|
|
|
@@ -39,7 +39,7 @@ The procedure that loaded this skill owns what the result is for and where it is
|
|
|
39
39
|
|
|
40
40
|
## Prefer a structured source
|
|
41
41
|
|
|
42
|
-
- Prefer a source's public API over a fetched and summarized HTML page where one exists. An API returns the dates, authors, and identifiers a citation needs,
|
|
42
|
+
- Prefer a source's public API over a fetched and summarized HTML page where one exists. An API returns the dates, authors, and identifiers a citation needs, which a summary can drop.
|
|
43
43
|
- Reach the API with a plain request when it needs no key, rather than writing a wrapper for one search.
|
|
44
44
|
|
|
45
45
|
## Access note
|
|
@@ -70,6 +70,8 @@ Read `${CLAUDE_SKILL_DIR}/references/adopted.md` only when extending this guidan
|
|
|
70
70
|
|
|
71
71
|
### Results and access
|
|
72
72
|
|
|
73
|
+
These flags fire after the search has run.
|
|
74
|
+
|
|
73
75
|
- The scoped and open results disagree and the output does not say so.
|
|
74
76
|
- You are citing a scoped result whose domain you have not checked.
|
|
75
77
|
- You are about to pay, log in, or scrape to reach a source and have not asked the operator.
|
|
@@ -7,23 +7,25 @@ metadata:
|
|
|
7
7
|
|
|
8
8
|
# Session compact
|
|
9
9
|
|
|
10
|
-
A compaction keeps conclusions and drops the reasoning
|
|
10
|
+
A compaction keeps conclusions and drops the reasoning behind them. This skill writes that reasoning to one file, outside the task board, before it is lost.
|
|
11
11
|
|
|
12
|
-
Write only what a compaction destroys.
|
|
12
|
+
Write only what a compaction destroys. Git, the tree, and durable records are already safe, and restating them makes a handoff untrustworthy rather than long.
|
|
13
13
|
|
|
14
14
|
## Guards
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
- Decline
|
|
18
|
-
- Resolve `.canon/` at the main worktree root and send the write out as a heredoc, both the way `session-worktree` states
|
|
16
|
+
- Write the note even when `git rev-parse --git-dir` does not resolve, since the filename comes from the work rather than the branch
|
|
17
|
+
- Decline in one line and write nothing when the session holds no reasoning git or a record would not show faster. A padded note is worse than none, because a reader trusts what they find.
|
|
18
|
+
- Resolve `.canon/` at the main worktree root and send the write out as a heredoc, both the way `session-worktree` states
|
|
19
19
|
|
|
20
20
|
## Step 1: write the note
|
|
21
21
|
|
|
22
|
-
Write one file to `.canon/compact/<slug>.md
|
|
22
|
+
Write one file to `.canon/compact/<slug>.md`, overwriting any note of the same name.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
| Part | Rule |
|
|
25
|
+
| -------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
26
|
+
| `<slug>` | Short kebab-case phrase for what the session did, not the branch, so work on `main` still gets a name. `latest` if none. |
|
|
27
|
+
| Sections | Follow `${CLAUDE_SKILL_DIR}/references/handoff-note.md`, read before drafting rather than worked from memory |
|
|
28
|
+
| Count | One note per piece of work. A second file for the same work splits the handoff. |
|
|
27
29
|
|
|
28
30
|
## Step 2: report
|
|
29
31
|
|
|
@@ -32,7 +34,10 @@ Overwrite a note of the same name. One session's work has one note, and a second
|
|
|
32
34
|
Move: canon records push, then canon sessions export <id>
|
|
33
35
|
```
|
|
34
36
|
|
|
35
|
-
Print the `Move:` line only when the caller named moving the session to another machine
|
|
37
|
+
- Print the `Move:` line only when the caller named moving the session to another machine
|
|
38
|
+
- Fill `<id>` from the `sessionId` of `canon sessions list --self --json`. Leave the literal `<id>` where that read refuses, since an id from any other row packs the wrong session.
|
|
39
|
+
- The push comes first so the note travels with the session
|
|
40
|
+
- Name both commands and run neither. An export packs a transcript that can hold credentials, so the order belongs to the caller.
|
|
36
41
|
|
|
37
42
|
A decline reports itself so a caller can tell it from a failure:
|
|
38
43
|
|
|
@@ -46,7 +51,7 @@ A decline reports itself so a caller can tell it from a failure:
|
|
|
46
51
|
- Name what was decided together with what it beat. A decision with no rejected alternative reads as arbitrary and gets reopened.
|
|
47
52
|
- Write `## Where to pick up` as one instruction, not a menu. A reader who has to choose has not been handed off to.
|
|
48
53
|
- Leave the task board alone. A task is work somebody filed, and a handoff is context for one reader.
|
|
49
|
-
- Do not write a `## State` section
|
|
54
|
+
- Do not write a `## State` section, since `git status` and the log already hold it
|
|
50
55
|
|
|
51
56
|
## What this delegates
|
|
52
57
|
|
|
@@ -7,35 +7,54 @@ metadata:
|
|
|
7
7
|
|
|
8
8
|
# Session map
|
|
9
9
|
|
|
10
|
-
Write the pre-compaction handoff for the current session. `${CLAUDE_SKILL_DIR}/references/session.md` fixes the filename, the frontmatter, the three core sections, the numbered write procedure, and the citation rule
|
|
10
|
+
Write the pre-compaction handoff for the current session. `${CLAUDE_SKILL_DIR}/references/session.md` fixes the filename, the frontmatter, the three core sections, the numbered write procedure, and the citation rule, so follow it rather than this body.
|
|
11
11
|
|
|
12
12
|
Any session writes one. Do not assert a role on invocation, and do not add a role's sections to a map written by a session holding no such role.
|
|
13
13
|
|
|
14
|
-
Run every step
|
|
14
|
+
## Run every step
|
|
15
|
+
|
|
16
|
+
Run every step rather than judging in advance that one has nothing to act on. The drift verb answers for itself, refusal included, and a refusal recorded is a result where a prediction of one is not.
|
|
17
|
+
|
|
18
|
+
A project carrying none of the scaffolding the step reads is where skipping looks most defensible, and it is the case this rule fires on.
|
|
15
19
|
|
|
16
20
|
## What fires this
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
| Caller | Route |
|
|
23
|
+
| --------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
24
|
+
| A plain session asking for a board map | Being asked |
|
|
25
|
+
| The orchestrator | Its handoff runbook |
|
|
26
|
+
| A plain session about to compact | `session-compact`, which the `PreCompact` hook on the `manual` matcher names |
|
|
27
|
+
| A session holding `canon:role-orchestrator` at compaction | Here, through one sentence in that hook's message |
|
|
28
|
+
|
|
29
|
+
### Declining
|
|
30
|
+
|
|
31
|
+
Decline where the session holds no reasoning a reader could not get faster from git. Say so in one line and write nothing.
|
|
19
32
|
|
|
20
|
-
|
|
33
|
+
A `## State` filled from the tree is non-conforming per the standard, and a map of three such sections is worse than none, because a reader who finds a map trusts it. A decline is a result the caller can act on.
|
|
21
34
|
|
|
22
35
|
## Guards
|
|
23
36
|
|
|
24
37
|
- If `git rev-parse --git-dir` does not resolve, stop: `❌ Not a git repository. A session map takes its filename from the branch.`
|
|
25
|
-
- Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../git-branch/references/slug.md`. An empty result falls back to `latest
|
|
26
|
-
- Resolve the containing folder at the main worktree root with `git worktree list --porcelain | grep -m 1 '^worktree ' | cut -d' ' -f2
|
|
38
|
+
- Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../git-branch/references/slug.md`. An empty result falls back to `latest`, since a stop loses the reasoning the file exists to save.
|
|
39
|
+
- Resolve the containing folder at the main worktree root with `git worktree list --porcelain | grep -m 1 '^worktree ' | cut -d' ' -f2-`
|
|
40
|
+
- It takes no fallback, since the guard above already stopped where no repository answers
|
|
27
41
|
|
|
28
42
|
## Step 1: recover the commit the drift step reads
|
|
29
43
|
|
|
30
|
-
Item 1 of `## Writing one` runs `canon claude skills drift <ref>` against the commit this session started from,
|
|
44
|
+
Item 1 of `## Writing one` runs `canon claude skills drift <ref>` against the commit this session started from, which nothing on the machine records. Estimate how long the session has run, round up, and read the ref item 2 recovers:
|
|
31
45
|
|
|
32
46
|
```bash
|
|
33
47
|
git log -1 --format=%H --before='<duration> ago'
|
|
34
48
|
```
|
|
35
49
|
|
|
36
|
-
Round up rather than down.
|
|
50
|
+
Round up rather than down. An older ref over-reports, and confirming a name it raises costs one read of that body, so the generous end is the safe one.
|
|
37
51
|
|
|
38
|
-
Record what the verb names
|
|
52
|
+
### Record what the verb names
|
|
53
|
+
|
|
54
|
+
Record what the verb names under `## Standing cautions`, and keep writing.
|
|
55
|
+
|
|
56
|
+
- A refusal marks the boundary of what the verb reads, not a fault. It answers where the working directory carries `claude/skills/` with history, and refuses where the plugin comes from a cache.
|
|
57
|
+
- Record the boundary the verb reported, not the one it looked likely to report
|
|
39
58
|
|
|
40
59
|
## Step 2: write the map
|
|
41
60
|
|
|
@@ -45,7 +64,9 @@ The file sits at the main worktree root and is written whole every time, so send
|
|
|
45
64
|
|
|
46
65
|
## Step 3: extend it only where a role is held
|
|
47
66
|
|
|
48
|
-
`## Extending it` governs a section added over the core three. Add one only when this session holds the role and the surface owning that role states the section, since a section the writer cannot fill teaches its reader to skip the file.
|
|
67
|
+
`## Extending it` governs a section added over the core three. Add one only when this session holds the role and the surface owning that role states the section, since a section the writer cannot fill teaches its reader to skip the file.
|
|
68
|
+
|
|
69
|
+
A session holding no role writes the core three and stops.
|
|
49
70
|
|
|
50
71
|
## Output
|
|
51
72
|
|