@erclx/canon 5.38.0 → 5.40.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 +5 -5
- 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 +37 -18
- 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 +9 -7
- package/claude/skills/draft-slides/references/deck.md +183 -0
- 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-pr/references/evidence.md +2 -2
- package/claude/skills/git-pr/references/final-command.md +1 -1
- package/claude/skills/git-pr/references/labels.md +1 -1
- package/claude/skills/git-pr/references/publish.md +1 -1
- 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 +63 -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-orchestrator/references/orchestrator-handback.md +1 -1
- 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/board.md +1 -1
- package/claude/skills/task-board/references/create-report.md +36 -0
- package/claude/skills/task-board/references/tasks.md +1 -1
- 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 +23 -19
- 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/audits.md +61 -60
- package/docs/agents/context-audit.md +40 -58
- package/docs/agents/index.md +11 -61
- package/docs/agents/indexes.md +25 -29
- package/docs/agents/install-and-sync.md +125 -235
- package/docs/agents/markdown-audit.md +54 -96
- 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/records.md +37 -79
- package/docs/agents/sessions-transfer.md +26 -70
- package/docs/agents/targets.md +25 -77
- package/docs/target/index.md +0 -1
- package/docs/target/migrations.md +57 -66
- package/docs/target/projects.md +36 -78
- package/docs/target/scenarios.md +9 -19
- package/docs/target/sync.md +27 -68
- package/docs/workflow/ai-workflow.md +22 -68
- package/docs/workflow/operating-model.md +32 -186
- package/docs/workflow/parallel-features.md +29 -66
- package/docs/workflow/skill-map-on-request.md +22 -24
- package/docs/workflow/skill-map.md +72 -76
- package/docs/workflow/visual-design-workflow.md +25 -118
- package/docs/workflow/zshrc-aliases.md +18 -37
- package/package.json +1 -1
- package/src/canvas/client/inspector/fields.css +4 -0
- package/src/canvas/index.html +6 -0
- package/src/claude/skills-reach.ts +2 -2
- package/src/cli/ui.ts +3 -1
- package/src/commands/canvas.ts +23 -0
- package/src/commands/capture.ts +14 -0
- package/src/commands/claude.ts +14 -1
- package/src/commands/context.ts +106 -7
- package/src/commands/demo.ts +22 -0
- package/src/commands/deps.ts +6 -0
- package/src/commands/driver.ts +28 -2
- package/src/commands/gov.ts +52 -18
- package/src/commands/hooks.ts +63 -0
- package/src/commands/intake.ts +17 -0
- package/src/commands/labels.ts +38 -5
- package/src/commands/markdown.ts +169 -32
- package/src/commands/pr.ts +160 -43
- package/src/commands/records.ts +8 -0
- package/src/commands/secrets.ts +6 -0
- package/src/commands/sessions.ts +8 -0
- package/src/commands/tasks.ts +52 -0
- package/src/commands/teach.ts +13 -0
- package/src/commands/upstream.ts +25 -1
- package/src/commands/worktrees.ts +5 -0
- package/src/context/audit.ts +274 -5
- package/src/context/classify/prompts.ts +1 -1
- package/src/context/folders.ts +1 -1
- package/src/context/gate.ts +23 -7
- package/src/context/shape-gated.ts +30 -0
- package/src/counts/scan.ts +1 -1
- package/src/design/components.ts +1 -1
- package/src/design/document.ts +1 -1
- package/src/design/tokens.ts +1 -1
- package/src/gate/boundaries.ts +4 -1
- package/src/gate/measures.ts +16 -191
- package/src/gate/stages.ts +14 -30
- package/src/git/env.ts +6 -0
- 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 +162 -0
- package/src/markdown/structure.ts +9 -59
- package/src/pr/lift.ts +153 -19
- package/src/pr/painted.ts +87 -0
- package/src/roots/record.ts +18 -1
- package/src/sandbox/census.ts +1 -1
- package/src/sandbox/headless/run.ts +3 -2
- package/src/sandbox/headless/watch.ts +3 -4
- package/src/shipped/references.ts +1 -1
- package/src/slides/convert/master.ts +3 -0
- package/src/sync/format.ts +46 -0
- package/src/sync/stamp.ts +6 -0
- package/tooling/astro/reference.md +2 -2
- package/tooling/base/reference.md +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/tooling/go/reference.md +1 -1
- package/tooling/nextjs/reference.md +1 -1
- package/tooling/php/reference.md +1 -1
- package/tooling/python/reference.md +1 -1
- package/tooling/vite-react/reference.md +1 -1
- package/tooling/web/reference.md +1 -1
- package/docs/agents/canvas.md +0 -86
- package/docs/agents/capture.md +0 -65
- package/docs/agents/census.md +0 -23
- package/docs/agents/commands.md +0 -154
- package/docs/agents/comments.md +0 -34
- package/docs/agents/context-audit-checks.md +0 -90
- package/docs/agents/context-classify.md +0 -101
- package/docs/agents/counts.md +0 -74
- package/docs/agents/demo.md +0 -140
- package/docs/agents/docs.md +0 -27
- package/docs/agents/drift-surfaces.md +0 -201
- package/docs/agents/driver.md +0 -103
- package/docs/agents/gate.md +0 -90
- package/docs/agents/gov-detect.md +0 -47
- package/docs/agents/hooks.md +0 -58
- package/docs/agents/intake.md +0 -81
- package/docs/agents/key-changes.md +0 -116
- package/docs/agents/label-coverage.md +0 -86
- package/docs/agents/markdown-audit-weight.md +0 -81
- package/docs/agents/pr-evidence-layout.md +0 -70
- package/docs/agents/pr-evidence.md +0 -273
- package/docs/agents/pr-frames.md +0 -131
- package/docs/agents/pr-lift.md +0 -132
- package/docs/agents/pr-local.md +0 -111
- package/docs/agents/pr-preview.md +0 -155
- package/docs/agents/pr-reads.md +0 -111
- package/docs/agents/pr-tick.md +0 -72
- package/docs/agents/records-push.md +0 -61
- package/docs/agents/records-stale.md +0 -40
- package/docs/agents/records-validate.md +0 -57
- package/docs/agents/restated.md +0 -83
- package/docs/agents/routing.md +0 -61
- package/docs/agents/rule-citations.md +0 -90
- package/docs/agents/sandbox.md +0 -126
- package/docs/agents/scripting.md +0 -142
- package/docs/agents/sessions.md +0 -128
- package/docs/agents/skills-audit.md +0 -120
- package/docs/agents/skills-reach.md +0 -64
- package/docs/agents/slides.md +0 -176
- package/docs/agents/state-scoped-risk.md +0 -105
- package/docs/agents/superseded.md +0 -85
- package/docs/agents/tasks-archive.md +0 -83
- package/docs/agents/tasks-plans.md +0 -152
- package/docs/agents/tasks-validate.md +0 -133
- package/docs/agents/tasks.md +0 -123
- package/docs/agents/teach-authoring.md +0 -118
- package/docs/agents/teach.md +0 -157
- package/docs/agents/test-order.md +0 -58
- package/docs/agents/upstream.md +0 -94
- package/docs/agents/worktrees.md +0 -118
- package/docs/target/standards-moved.md +0 -34
- package/src/markdown/growth.ts +0 -43
|
@@ -33,6 +33,8 @@ Then gather repo context in parallel:
|
|
|
33
33
|
|
|
34
34
|
### Preview
|
|
35
35
|
|
|
36
|
+
Output the preview first.
|
|
37
|
+
|
|
36
38
|
- **Title:** `<type>: <subject>`
|
|
37
39
|
- **Label:** <bug or enhancement>
|
|
38
40
|
- **Analysis:** <one line on what the issue captures>
|
|
@@ -41,9 +43,10 @@ After outputting the preview, execute the final command immediately. Claude Code
|
|
|
41
43
|
|
|
42
44
|
### Pre-publish scan
|
|
43
45
|
|
|
44
|
-
Before running the final command, run the scan in `${CLAUDE_SKILL_DIR}/../git-pr/references/publish.md` against the title and body
|
|
46
|
+
Before running the final command, run the scan in `${CLAUDE_SKILL_DIR}/../git-pr/references/publish.md` against the title and body, on top of the banned phrases in `${CLAUDE_SKILL_DIR}/references/issue.md`.
|
|
45
47
|
|
|
46
|
-
The
|
|
48
|
+
- The title and body go straight to the remote, and the `pull_request` check reads a pull request alone, so this scan is the only gate
|
|
49
|
+
- It covers the phase-label check as well as the characters, since both reach a reader who has no task board
|
|
47
50
|
|
|
48
51
|
### Final command
|
|
49
52
|
|
|
@@ -60,8 +63,6 @@ rm -rf .canon/tmp/issue
|
|
|
60
63
|
|
|
61
64
|
## After execution
|
|
62
65
|
|
|
63
|
-
Respond with exactly one line:
|
|
66
|
+
Respond with exactly one line and add no other text:
|
|
64
67
|
|
|
65
68
|
`✅ Issue: <url>`
|
|
66
|
-
|
|
67
|
-
Do not add any other text.
|
|
@@ -39,18 +39,20 @@ Then run these commands in parallel to gather git context:
|
|
|
39
39
|
|
|
40
40
|
## Diff baseline
|
|
41
41
|
|
|
42
|
-
Prefer `origin/main` over local `main`. Both reads resolve against `<base>`, so the commits listed and the changes described come from one scope.
|
|
42
|
+
Prefer `origin/main` over local `main`. Both reads resolve against `<base>`, so the commits listed and the changes described come from one scope.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Never read a two-dot range against local `main` for either half. It resolves no merge base, so once local `main` moves, the diff reports its newer commits as reversed changes and the log lists commits already on the remote.
|
|
45
|
+
|
|
46
|
+
### Unusable baseline
|
|
47
|
+
|
|
48
|
+
The baseline is unusable in two cases, and the no-commits guard below catches both, so stop there rather than describing an empty diff:
|
|
45
49
|
|
|
46
50
|
- No merge base resolves against either ref.
|
|
47
51
|
- The base equals HEAD, whichever ref resolved it. Nothing is committed ahead of the base to compare against.
|
|
48
52
|
|
|
49
|
-
Either case leaves both reads empty, which the no-commits guard below catches. Stop there rather than composing a description from an empty diff.
|
|
50
|
-
|
|
51
53
|
## Guards
|
|
52
54
|
|
|
53
|
-
- If branch name does not match `<type>/<description
|
|
55
|
+
- If the branch name does not match `<type>/<description>`, with the types `branch.md` defines, stop and output:
|
|
54
56
|
`❌ Branch name does not follow conventions. Run /git-branch to rename first.`
|
|
55
57
|
- If no commits ahead of main, stop and output:
|
|
56
58
|
`❌ No commits ahead of main. Nothing to PR.`
|
|
@@ -59,6 +61,8 @@ Either case leaves both reads empty, which the no-commits guard below catches. S
|
|
|
59
61
|
|
|
60
62
|
### Preview
|
|
61
63
|
|
|
64
|
+
Output the preview first.
|
|
65
|
+
|
|
62
66
|
- **Title:** <title>
|
|
63
67
|
- **Files changed:** <count>
|
|
64
68
|
- **Analysis:** <brief summary of impact>
|
|
@@ -73,9 +77,12 @@ Leave a box unchecked only for the human-only cases the reference defines, and n
|
|
|
73
77
|
|
|
74
78
|
### Pre-publish scan
|
|
75
79
|
|
|
76
|
-
Before running the final command, run the scan in `${CLAUDE_SKILL_DIR}/references/publish.md` against the PR title and body. The title and body go straight to the remote
|
|
80
|
+
Before running the final command, run the scan in `${CLAUDE_SKILL_DIR}/references/publish.md` against the PR title and body, on top of the banned phrases in `${CLAUDE_SKILL_DIR}/references/pr.md`. The title and body go straight to the remote, so run it whatever backs it downstream.
|
|
81
|
+
|
|
82
|
+
- It covers the phase-label check as well as the characters, since both reach a reader who has no task board
|
|
83
|
+
- It stays required where a `pull_request` job runs the same verb, since an older `canon` carries no such job and none of the newer keys
|
|
77
84
|
|
|
78
|
-
Write the body here, ahead of the final command, since the scan
|
|
85
|
+
Write the body here, ahead of the final command, since the scan needs a file to read it from:
|
|
79
86
|
|
|
80
87
|
```bash
|
|
81
88
|
mkdir -p .canon/tmp/pr
|
|
@@ -90,70 +97,75 @@ Then run:
|
|
|
90
97
|
canon labels scan --title "<title>" --body-file .canon/tmp/pr/body.md --json
|
|
91
98
|
```
|
|
92
99
|
|
|
93
|
-
|
|
100
|
+
### Reading the scan
|
|
101
|
+
|
|
102
|
+
Branch on the JSON record rather than the exit code, since a shell function wrapping `canon` can flatten a non-zero exit to 0. Stop and fix the title or body on any key below, and do not proceed to `### Final command` until a re-run comes back clean on all six.
|
|
94
103
|
|
|
95
|
-
|
|
104
|
+
| Key | Fix |
|
|
105
|
+
| ------------------- | ------------------------------------------------------------------------------------ |
|
|
106
|
+
| `phaseLabels` | Remove the phase label |
|
|
107
|
+
| `boardReferences` | Remove the board reference |
|
|
108
|
+
| `sessionLinks` | Remove the session link |
|
|
109
|
+
| `titleFormatIssues` | Fix the `## Title` rule in `pr.md` it names, being structure, casing, or length |
|
|
110
|
+
| `bannedCharacters` | Restructure the sentence around the named character |
|
|
111
|
+
| `sections` | Rename or drop each heading in `outside`, and add each required heading in `missing` |
|
|
96
112
|
|
|
97
|
-
|
|
113
|
+
Leave `cutsRelease` and `semverTags` alone, since a release-please pull request legitimately carries version references its own fixed shape explains.
|
|
98
114
|
|
|
99
115
|
### Resolving the pull request
|
|
100
116
|
|
|
101
117
|
The run resolves the pull request once, in the final command below, and every later step reads what that command printed. Nothing else looks the number up again.
|
|
102
118
|
|
|
103
|
-
Never detect by head branch alone. A lookup
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Every call goes through `gh api` against the REST endpoints rather than through `gh pr` or `gh repo view`, which run on GraphQL. A cloud session's GitHub access blocks GraphQL and serves REST, so the same block converges on a laptop and on a cloud VM.
|
|
119
|
+
- Never detect by head branch alone. A lookup ignoring state returns the closed pull request a reused branch name left behind, so scope it to `state=open`.
|
|
120
|
+
- Scope the lookup to the base as well as the head, resolved from the default branch, so detection and create agree on one pull request. A head can carry two bases.
|
|
121
|
+
- Call `gh api` against REST rather than `gh pr` or `gh repo view`, which run on GraphQL. A cloud session's GitHub access blocks GraphQL and serves REST.
|
|
108
122
|
|
|
109
123
|
A detached HEAD gives `git branch --show-current` an empty result, which would read as no open pull request and create a second one. The branch-name guard above stops the run first, since an empty name does not match `<type>/<description>`.
|
|
110
124
|
|
|
111
125
|
### Labels
|
|
112
126
|
|
|
113
|
-
Read `${CLAUDE_SKILL_DIR}/references/labels.md` on reaching this step, starting at its `## Labels at run time` section, for the verb to ask, the record to branch on, the fallback, and when `pr_labels` stays empty.
|
|
127
|
+
Read `${CLAUDE_SKILL_DIR}/references/labels.md` on reaching this step, starting at its `## Labels at run time` section, for the verb to ask, the record to branch on, the fallback, and when `pr_labels` stays empty.
|
|
114
128
|
|
|
115
|
-
|
|
129
|
+
The final command takes the resolved set as `pr_labels` and the record's `uncovered` paths as `pr_uncovered`, which only its fallback path reads.
|
|
116
130
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
### Post the rendered-surface evidence
|
|
120
|
-
|
|
121
|
-
Run this step on every pull request this skill opens or edits. Read `${CLAUDE_SKILL_DIR}/references/evidence.md` for finding the checklist and the local server, posting the evidence comparison, posting the checklist alone, and posting the preview address, each against the `<number>` the final command printed. Never judge from the diff whether an evidence image changed, since the verb answers `no-evidence` for a branch that changed none and a session cannot see an image it did not author.
|
|
122
|
-
|
|
123
|
-
### Record the number on the task
|
|
124
|
-
|
|
125
|
-
Write the `number` the final command printed onto the task the branch is closing, through `canon tasks pull-request`, and never resolve it again. Read `${CLAUDE_SKILL_DIR}/references/task-number.md` on reaching this step for which task it names, the invocation, the refusals it skips silently, and why the number lands here. Skip it when the final command refused on a head mismatch and printed no number.
|
|
126
|
-
|
|
127
|
-
## After execution
|
|
131
|
+
### Final command
|
|
128
132
|
|
|
129
|
-
|
|
133
|
+
Read `${CLAUDE_SKILL_DIR}/references/final-command.md` on reaching this step, for the one command that pushes and finds or creates the pull request over REST, and for the check binding every write to this branch's pull request.
|
|
130
134
|
|
|
131
|
-
|
|
135
|
+
That command re-scans the live body for a session link, applies the labels through `canon labels apply`, and prints `number=`, `url=`, `head=`, `owed=`, `missingOnRemote=`, and `uncovered=`.
|
|
132
136
|
|
|
133
|
-
|
|
137
|
+
### Post the rendered-surface evidence
|
|
134
138
|
|
|
135
|
-
|
|
139
|
+
Run this step on every pull request this skill opens or edits. Read `${CLAUDE_SKILL_DIR}/references/evidence.md` for finding the checklist and the local server and for posting the evidence comparison, the checklist alone, and the preview address, each against the `<number>` the final command printed.
|
|
136
140
|
|
|
137
|
-
|
|
141
|
+
Never judge from the diff whether an evidence image changed, since the verb answers `no-evidence` for a branch that changed none and a session cannot see an image it did not author.
|
|
138
142
|
|
|
139
|
-
|
|
143
|
+
### Record the number on the task
|
|
140
144
|
|
|
141
|
-
|
|
145
|
+
Write the `number` the final command printed onto the task the branch is closing, through `canon tasks pull-request`, and never resolve it again. Skip it when the final command refused on a head mismatch and printed no number.
|
|
142
146
|
|
|
143
|
-
|
|
147
|
+
Read `${CLAUDE_SKILL_DIR}/references/task-number.md` on reaching this step for which task it names, the invocation, the refusals it skips silently, and why the number lands here.
|
|
144
148
|
|
|
145
|
-
|
|
149
|
+
## After execution
|
|
146
150
|
|
|
147
|
-
|
|
151
|
+
Respond with `✅ PR: <url>`, using the `url` the final command printed, then add only the lines below whose condition holds. Add no other text.
|
|
148
152
|
|
|
149
|
-
|
|
153
|
+
| Condition | Line |
|
|
154
|
+
| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| Each path in `uncovered=` | `⚠️ No label covers <path>. Add a row to canon/config/pr-labels.toml or a [declined] entry.` |
|
|
156
|
+
| `owed=` or `missingOnRemote=` printed a value | `⚠️ Labels not applied: <owed labels not in missingOnRemote>. Not on the remote: <missingOnRemote labels>.` |
|
|
157
|
+
| A checklist posted in the evidence comment | `📋 Posted the UI checklist to <number>, in the evidence comment.` |
|
|
158
|
+
| A checklist posted alone | `📋 Posted the UI checklist to <number>, on its own.` |
|
|
159
|
+
| The preview step returned an address | `🔗 Preview: <url>` |
|
|
160
|
+
| The evidence step posted the local link | `🖥️ Local preview: <url>` |
|
|
161
|
+
| The local step refused and evidence or a checklist posted | `🖥️ No local preview: <reason>` |
|
|
150
162
|
|
|
151
|
-
|
|
163
|
+
### The labels line
|
|
152
164
|
|
|
153
|
-
|
|
165
|
+
`owed=` already holds every absent label, so the first half names `owed=` less the names in `missingOnRemote=`, and the second names `missingOnRemote=` alone. Drop either half that is empty.
|
|
154
166
|
|
|
155
|
-
|
|
167
|
+
### The no-local-preview line
|
|
156
168
|
|
|
157
|
-
|
|
169
|
+
It fires when the local step refused as `no-server` or `no-listener-reader`, since that pull request changes a rendered surface and a reviewer could have used the link. `git-followup` only carries a line forward, so it cannot add one the comment never had.
|
|
158
170
|
|
|
159
|
-
|
|
171
|
+
To add the link later, start the server and run `canon pr local --json`, then `canon pr evidence <number> --local <url> --json`, adding `--checklist` when one is still owed. Post the body the way the evidence step does.
|
|
@@ -31,7 +31,7 @@ A reviewer on the operator's machine can open the branch's running dev server, w
|
|
|
31
31
|
canon pr local --json
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
The verb reads the listening sockets on this machine, keeps those whose process runs inside this worktree, and reports the lowest port serving an HTML page. A server in another worktree or in the main checkout is never reported, since it shows a different branch. `canon
|
|
34
|
+
The verb reads the listening sockets on this machine, keeps those whose process runs inside this worktree, and reports the lowest port serving an HTML page. A server in another worktree or in the main checkout is never reported, since it shows a different branch. `canon pr local --help` states the contract. Read `reason` on the record rather than the exit code.
|
|
35
35
|
|
|
36
36
|
- `ok`: hold the record's `url` for the evidence step below.
|
|
37
37
|
- `no-server` or `no-listener-reader`: hold the reason for the closing report, pass no link, and move on. Do not start a server here, since one started inside the ship chain has no owner to stop it.
|
|
@@ -110,7 +110,7 @@ The evidence comment is already posted, so the reviewer has the screenshots whil
|
|
|
110
110
|
canon pr preview <number> --json
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
The verb dispatches the project's Pages deploy on the pull request's branch and waits on the run for up to 15 minutes. It refuses before dispatching anything when the deploy command passes no `--branch`, since that deploy would publish the branch to production, and when the workflow's own push path filter matches no path the pull request changed, since a dispatch ignores that filter and the site it published would show none of the change. `canon
|
|
113
|
+
The verb dispatches the project's Pages deploy on the pull request's branch and waits on the run for up to 15 minutes. It refuses before dispatching anything when the deploy command passes no `--branch`, since that deploy would publish the branch to production, and when the workflow's own push path filter matches no path the pull request changed, since a dispatch ignores that filter and the site it published would show none of the change. `canon pr preview --help` states the contract. Read `reason` on the record rather than the exit code.
|
|
114
114
|
|
|
115
115
|
- `ok`: re-render the evidence body with the address on the line under `## Evidence`, then post or update it exactly as the evidence step does, through the same tmp file and the `commentId` the record carries:
|
|
116
116
|
|
|
@@ -54,7 +54,7 @@ case "$links" in
|
|
|
54
54
|
printf 'Removed %s session link(s) from the live body of #%s.\n' "$links" "$pr_number" >&2
|
|
55
55
|
;;
|
|
56
56
|
esac
|
|
57
|
-
record=$(canon labels apply "$pr_number" --
|
|
57
|
+
record=$(canon labels apply "$pr_number" --json 2>/dev/null | tail -n 1)
|
|
58
58
|
if printf '%s' "$record" | jq -e 'has("earned")' >/dev/null 2>&1; then
|
|
59
59
|
owed=$(printf '%s' "$record" | jq -r '.owed | join(",")')
|
|
60
60
|
missing=$(printf '%s' "$record" | jq -r '.missingOnRemote | join(",")')
|
|
@@ -82,7 +82,7 @@ What it leaves unmeasured is a prefix reaching no path, so a row left behind by
|
|
|
82
82
|
|
|
83
83
|
Apply labels after the pull request resolves, never as a field on the create. A create carrying a label the remote lacks either fails whole or creates the label, depending on the surface, and neither is the map's call. One step against a pull request that already exists covers the create and the edit path alike. It runs over REST, so it works where GraphQL is blocked, and the REST endpoint creates any label it is handed that the remote lacks, so the step reads each name off the remote first and warns on a missing one rather than adding it.
|
|
84
84
|
|
|
85
|
-
`canon labels apply <number>` is that step. It resolves the earned set the
|
|
85
|
+
`canon labels apply <number>` is that step. It resolves the earned set from the pull request's own files listing, or from the git range when `--base` is passed, binds to the pull request only when its head is the current branch and it is open, and adds each earned label the pull request lacks. `--check` reports what is owed and writes nothing. The record carries `number`, `earned`, `present`, `added`, `owed`, `missingOnRemote`, and `uncovered`.
|
|
86
86
|
|
|
87
87
|
A pull request opened outside this skill, such as by `gh pr create`, takes the same command, since nothing else labels it.
|
|
88
88
|
|
|
@@ -44,7 +44,7 @@ A phase label is one way text names the board, and a path under a record root is
|
|
|
44
44
|
|
|
45
45
|
Two shapes get past a reader scanning for a bare label. A code span quoting a label is still the label, so read a span whose whole content is one as a hit and leave a longer token inside a span alone, which is a fixture name rather than a reference. The second shape is a path under a record root, gitignored and therefore absent from every clone, so `.canon/feedback/` names a folder the remote's reader cannot open.
|
|
46
46
|
|
|
47
|
-
Under the tracked `canon/` and `.claude/` folders there is no hit, since `canon/context/governance
|
|
47
|
+
Under the tracked `canon/` and `.claude/` folders there is no hit, since `canon/context/surfaces/governance.md` resolves everywhere. `.canon/` carries no such carve-out: one ignore line covers the root whole, so every path beneath it is a hit regardless of which folder names it.
|
|
48
48
|
|
|
49
49
|
Rewrite a hit to name what the reader can reach rather than deleting it. A row's subject stated plainly replaces its label, and what a record folder holds, said in a sentence, replaces its path.
|
|
50
50
|
|
|
@@ -9,15 +9,19 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
Run the full post-feature workflow by invoking each skill in sequence using the Skill tool. After each skill returns, invoke the next step immediately in the same response.
|
|
11
11
|
|
|
12
|
-
Do not output any text between steps and do not wait for user input. Tool permission dialogs are the only interrupts allowed. The final output is `✅ Shipped`, emitted on the wake after the step 9 watch exits on `passing
|
|
12
|
+
Do not output any text between steps and do not wait for user input. Tool permission dialogs are the only interrupts allowed. The final output is `✅ Shipped`, emitted on the wake after the step 9 watch exits on `passing`, unless a wrapping caller such as `auto-ship` closes on its own block.
|
|
13
13
|
|
|
14
14
|
## Verify
|
|
15
15
|
|
|
16
|
-
Run the verify commands `CLAUDE.md` names (lint, typecheck, tests) before the sequence starts. On a failure, stop: `❌ Verify failed. Fix the reported errors and run /git-ship again.` Make no fix attempt
|
|
16
|
+
Run the verify commands `CLAUDE.md` names (lint, typecheck, tests) before the sequence starts. On a failure, stop: `❌ Verify failed. Fix the reported errors and run /git-ship again.` Make no fix attempt, since this skill is the resume point and the user is already making the fix.
|
|
17
17
|
|
|
18
18
|
When `CLAUDE.md` names no verify command, say so on one line and continue. A project with no suite is not a project with a failing one.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
### Why verify runs first
|
|
21
|
+
|
|
22
|
+
Verify runs ahead of the sync skills so a stop leaves the tree exactly as the user left it. Re-running a suite the caller already ran costs one command.
|
|
23
|
+
|
|
24
|
+
The path it closes has no other guard. `auto-ship` verifies at its own Step 3 and hands three of its stop points back here, so a hand fix after one of those would otherwise reach the remote with nothing re-run.
|
|
21
25
|
|
|
22
26
|
## Pre-check
|
|
23
27
|
|
|
@@ -29,60 +33,65 @@ Run `git diff --cached --name-only 2>/dev/null` to check for staged files. If ou
|
|
|
29
33
|
2. Invoke `canon:task-complete` to mark the outcomes the diff shipped
|
|
30
34
|
3. Invoke `canon:docs-sync` to sync public docs against changes since main
|
|
31
35
|
4. Run `git add -A` to stage any files the sync skills wrote
|
|
32
|
-
5. Run `canon tasks plan-reach <plan> --json
|
|
33
|
-
6. Invoke `canon:git-stage` to
|
|
36
|
+
5. Run `canon tasks plan-reach <plan> --json`, naming this branch's plan by path or slug, and report both lists per `### Reading the reach` below. This step never stops the sequence.
|
|
37
|
+
6. Invoke `canon:git-stage` to commit by concern, only when `git diff --cached --name-only` prints a path. When it prints nothing, the work already reached history in slices, so continue.
|
|
34
38
|
7. Invoke `canon:git-branch` to rename branch to match conventional format
|
|
35
39
|
8. Invoke `canon:git-pr` to push branch and open pull request
|
|
36
40
|
9. After the PR opens, watch CI in the background, so the session stays reachable while CI runs. Read `### Watching CI` below for the commands and the wake.
|
|
37
41
|
|
|
38
|
-
A caller wrapping this sequence may act between step 8 and step 9,
|
|
42
|
+
A caller wrapping this sequence may act between step 8 and step 9, the one gap the order leaves open, since the pull request exists and nothing has read its checks. `auto-ship` marks the pull request draft there. A caller needing a step anywhere else is asking for a change to this body.
|
|
39
43
|
|
|
40
|
-
###
|
|
44
|
+
### Reading the reach
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
Read `claimed` first and say who holds each path, since that is the half a reader acts on, then say how many changed paths `undeclared` names. Branch on the record rather than the exit code, which a shell function wrapping `canon` can flatten to zero.
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
### Why the reach reads at step 5
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
until canon pr checks <number> --json | jq -e '.state != "pending" or .conflicted == true' >/dev/null; do sleep 30; done; canon pr checks <number> --json
|
|
48
|
-
```
|
|
50
|
+
The branch is whole at step 5 and nowhere earlier. Steps 1 and 3 write past what the plan declared, and no pull request exists to carry the answer until step 8.
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
It reports rather than acts because every crossing measured on the wave it was filed against merged clean. The undeclared list runs long enough on an ordinary branch that a gate would fire on nearly every ship.
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
### When the verb is absent
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
- `state: failing`: stop the sequence and report the failing check with its URL.
|
|
56
|
-
- `conflicted: true`: stop the sequence and report that the branch conflicts with its base, since no run will start for it. A rebase is the repair.
|
|
56
|
+
An installed binary carrying no `plan-reach` subcommand reports the reach unread rather than clear. Say that, and continue.
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
The verb ships with the CLI and this body with the plugin, so an older binary meets a missing subcommand. Reading that absence as clean would report the check passing on every branch that never ran it.
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
- The command hit its timeout and printed no final record: report CI unsettled after 60 minutes, and emit no `✅ Shipped`.
|
|
62
|
-
- The `gh pr checks --watch` fallback ran, which prints a check table rather than a record. Only a printed table carrying at least one check, every one passing, continues to After completion. Any failing check stops the sequence naming it with its URL. Empty or errored output stops the sequence and reports the message, since `no checks reported on the '<branch>' branch` is what a conflicted branch prints, and that fallback has no `conflicted` field to separate it from lag.
|
|
60
|
+
### Watching CI
|
|
63
61
|
|
|
64
|
-
|
|
62
|
+
Run `canon pr checks <number> --json` once in the foreground. When no record comes back at all, the CLI predates the verb, so read `${CLAUDE_SKILL_DIR}/references/ci-watch.md` for the fallback watch. Otherwise start this loop through the Bash tool with `run_in_background` and a 60-minute timeout:
|
|
65
63
|
|
|
66
|
-
|
|
64
|
+
```bash
|
|
65
|
+
until canon pr checks <number> --json | jq -e '.state != "pending" or .conflicted == true' >/dev/null; do sleep 30; done; canon pr checks <number> --json
|
|
66
|
+
```
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Emit `⏳ Watching CI on #<number> in the background` and end the turn, printing nothing more while the watch runs. The wake resumes this step rather than restarting at step 1, and a wake landing inside another skill, such as a `review-address` pass, goes to whichever step is waiting on CI.
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
- `owed`: run each step the record's `owed` list names, from `canon:git-pr`'s `references/evidence.md`, evidence first and then preview. Re-read once with the same command. Continue to After completion only on `settled`. Any other reading stops the sequence and reports the `reason` with the `owed` list, and the sequence never loops back for a second pass. A preview step that refuses, or a deploy that failed, leaves `preview` owed on the re-read, so that is the stop and not a retry.
|
|
72
|
-
- Any other `reason`, such as `gh-failed`: the thread went unread. Stop and report the `reason`, since an unread thread is not a settled one.
|
|
73
|
-
- No record at all, or an unknown flag error: the installed binary predates `--check`. Report the thread unread rather than settled, and continue to After completion without emitting a claim that it was checked.
|
|
70
|
+
### Reading the wake
|
|
74
71
|
|
|
75
|
-
|
|
72
|
+
Branch on the final record's fields rather than on the exit. Do not auto-fix any reading, and the watch line and a stop report are the two exceptions to the no-text-between-steps rule.
|
|
76
73
|
|
|
77
|
-
|
|
74
|
+
| Record | Route |
|
|
75
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
76
|
+
| `state: passing` | Settle the evidence thread below, then continue to After completion on `settled` |
|
|
77
|
+
| `state: failing` | Stop the sequence and report the failing check with its URL |
|
|
78
|
+
| `conflicted: true` | Stop and report the branch conflicts with its base, since no run will start. Rebase. |
|
|
79
|
+
| A `reason` and no `state`, or a timeout | Read `${CLAUDE_SKILL_DIR}/references/ci-watch.md` for the refused and unsettled reads |
|
|
80
|
+
|
|
81
|
+
### Settling the evidence thread
|
|
78
82
|
|
|
79
|
-
|
|
83
|
+
On a `passing` wake, run `canon pr evidence <number> --check --json` against the number step 8 returned. It reads the comments and edits none, so a comment a reviewer ticked stays as it is. Branch on `reason` and `owed` rather than the exit.
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
| Reading | Route |
|
|
86
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
87
|
+
| `settled` | Nothing is owed, as on a branch that changed no rendered surface, so continue |
|
|
88
|
+
| `owed` | Run each step the `owed` list names, then re-read once, as below |
|
|
89
|
+
| Any other `reason`, such as `gh-failed` | Stop and report it, since an unread thread is not a settled one |
|
|
90
|
+
| No record, or an unknown flag error | The binary predates `--check`, so report the thread unread and continue without claiming it was checked |
|
|
82
91
|
|
|
83
|
-
|
|
92
|
+
On `owed`, run the named steps from `canon:git-pr`'s `references/evidence.md`, evidence first and then preview, and re-read with the same command. Continue only on `settled`, and stop on any other reading with the `reason` and the `owed` list, never looping back.
|
|
84
93
|
|
|
85
|
-
|
|
94
|
+
A refused preview step or a failed deploy leaves `preview` owed on the re-read, so that is the stop and not a retry. The read is a closing step, so the draft mark stays the only thing between steps 8 and 9, and a caller closing on its own block waits on the same wake.
|
|
86
95
|
|
|
87
96
|
## After completion
|
|
88
97
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CI watch fallback and refusals
|
|
3
|
+
description: What the git-ship CI watch does when the installed CLI predates the checks verb, when a read is refused, and when the watch times out
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CI watch fallback and refusals
|
|
7
|
+
|
|
8
|
+
Applies to step 9 of `git-ship` once the watch wakes on anything but a `state` of `passing` or `failing` or a `conflicted: true` record, and to a target whose CLI carries no `canon pr checks`.
|
|
9
|
+
|
|
10
|
+
## The fallback watch
|
|
11
|
+
|
|
12
|
+
When `canon pr checks <number> --json` returns no record at all, the target's CLI predates the verb, and the watch command is `gh pr checks <number> --watch`. The polling loop would never exit on such a target, since an empty read never satisfies its test.
|
|
13
|
+
|
|
14
|
+
The fallback prints a check table rather than a record, and has no `conflicted` field to separate a conflict from lag.
|
|
15
|
+
|
|
16
|
+
| Output | Route |
|
|
17
|
+
| ------------------------------------- | ----------------------------------------- |
|
|
18
|
+
| At least one check, every one passing | Continue to After completion |
|
|
19
|
+
| Any failing check | Stop the sequence, naming it with its URL |
|
|
20
|
+
| Empty or errored | Stop the sequence and report the message |
|
|
21
|
+
|
|
22
|
+
Empty output stops rather than waits, since `no checks reported on the '<branch>' branch` is what a conflicted branch prints.
|
|
23
|
+
|
|
24
|
+
## Refused and unsettled reads
|
|
25
|
+
|
|
26
|
+
Neither of these is a pass, and neither emits `✅ Shipped`.
|
|
27
|
+
|
|
28
|
+
- A `reason` and no `state` means the read was refused, such as `no-remote-branch` for a branch deleted on the remote. Stop and report that `reason`.
|
|
29
|
+
- A watch that hit its timeout and printed no final record is CI unsettled after 60 minutes, so report it that way
|
|
30
|
+
|
|
31
|
+
Do not auto-fix any of these. A stop report is one of the two exceptions to the no-text-between-steps rule.
|