cclaw-cli 0.49.0 → 0.51.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.
Files changed (181) hide show
  1. package/README.md +54 -82
  2. package/dist/artifact-linter.d.ts +4 -0
  3. package/dist/artifact-linter.js +24 -3
  4. package/dist/cli.d.ts +1 -19
  5. package/dist/cli.js +49 -491
  6. package/dist/constants.d.ts +2 -13
  7. package/dist/constants.js +1 -43
  8. package/dist/content/closeout-guidance.d.ts +14 -0
  9. package/dist/content/closeout-guidance.js +42 -0
  10. package/dist/content/core-agents.js +51 -9
  11. package/dist/content/decision-protocol.d.ts +12 -0
  12. package/dist/content/decision-protocol.js +20 -0
  13. package/dist/content/diff-command.d.ts +1 -2
  14. package/dist/content/diff-command.js +8 -94
  15. package/dist/content/examples.d.ts +4 -10
  16. package/dist/content/examples.js +10 -20
  17. package/dist/content/hook-events.js +2 -2
  18. package/dist/content/hook-inline-snippets.d.ts +5 -2
  19. package/dist/content/hook-inline-snippets.js +33 -1
  20. package/dist/content/hook-manifest.d.ts +3 -4
  21. package/dist/content/hook-manifest.js +11 -12
  22. package/dist/content/hooks.js +2 -0
  23. package/dist/content/ideate-command.d.ts +2 -0
  24. package/dist/content/ideate-command.js +31 -25
  25. package/dist/content/iron-laws.d.ts +5 -5
  26. package/dist/content/iron-laws.js +5 -5
  27. package/dist/content/learnings.d.ts +3 -4
  28. package/dist/content/learnings.js +24 -50
  29. package/dist/content/meta-skill.js +31 -21
  30. package/dist/content/next-command.js +38 -38
  31. package/dist/content/node-hooks.js +17 -343
  32. package/dist/content/opencode-plugin.js +2 -100
  33. package/dist/content/research-playbooks.js +14 -14
  34. package/dist/content/review-loop.d.ts +2 -0
  35. package/dist/content/review-loop.js +8 -0
  36. package/dist/content/session-hooks.js +14 -46
  37. package/dist/content/skills.d.ts +0 -5
  38. package/dist/content/skills.js +53 -128
  39. package/dist/content/stage-common-guidance.d.ts +0 -1
  40. package/dist/content/stage-common-guidance.js +15 -14
  41. package/dist/content/stage-schema.d.ts +26 -1
  42. package/dist/content/stage-schema.js +121 -40
  43. package/dist/content/stages/_lint-metadata/index.js +9 -15
  44. package/dist/content/stages/brainstorm.js +22 -43
  45. package/dist/content/stages/design.js +37 -57
  46. package/dist/content/stages/plan.js +22 -13
  47. package/dist/content/stages/review.js +24 -27
  48. package/dist/content/stages/scope.js +34 -46
  49. package/dist/content/stages/ship.js +7 -4
  50. package/dist/content/stages/spec.js +20 -9
  51. package/dist/content/stages/tdd.js +64 -44
  52. package/dist/content/start-command.js +10 -12
  53. package/dist/content/status-command.d.ts +2 -7
  54. package/dist/content/status-command.js +19 -146
  55. package/dist/content/subagents.d.ts +0 -5
  56. package/dist/content/subagents.js +47 -28
  57. package/dist/content/templates.d.ts +1 -1
  58. package/dist/content/templates.js +126 -135
  59. package/dist/content/track-render-context.d.ts +17 -0
  60. package/dist/content/track-render-context.js +44 -0
  61. package/dist/content/tree-command.d.ts +1 -2
  62. package/dist/content/tree-command.js +4 -87
  63. package/dist/content/utility-skills.d.ts +2 -29
  64. package/dist/content/utility-skills.js +2 -1534
  65. package/dist/content/view-command.js +29 -11
  66. package/dist/delegation.d.ts +1 -1
  67. package/dist/delegation.js +5 -15
  68. package/dist/doctor-registry.js +20 -21
  69. package/dist/doctor.js +88 -344
  70. package/dist/flow-state.d.ts +3 -0
  71. package/dist/flow-state.js +2 -0
  72. package/dist/harness-adapters.d.ts +1 -1
  73. package/dist/harness-adapters.js +48 -57
  74. package/dist/install.js +128 -358
  75. package/dist/internal/advance-stage.js +3 -9
  76. package/dist/internal/compound-readiness.d.ts +1 -1
  77. package/dist/internal/compound-readiness.js +1 -1
  78. package/dist/internal/tdd-loop-status.d.ts +1 -1
  79. package/dist/internal/tdd-loop-status.js +1 -1
  80. package/dist/knowledge-store.d.ts +16 -10
  81. package/dist/knowledge-store.js +51 -15
  82. package/dist/policy.js +16 -105
  83. package/dist/run-archive.d.ts +4 -6
  84. package/dist/run-archive.js +15 -20
  85. package/dist/run-persistence.d.ts +2 -2
  86. package/dist/run-persistence.js +3 -9
  87. package/package.json +1 -2
  88. package/dist/content/archive-command.d.ts +0 -2
  89. package/dist/content/archive-command.js +0 -124
  90. package/dist/content/compound-command.d.ts +0 -5
  91. package/dist/content/compound-command.js +0 -193
  92. package/dist/content/contexts.d.ts +0 -18
  93. package/dist/content/contexts.js +0 -24
  94. package/dist/content/contracts.d.ts +0 -2
  95. package/dist/content/contracts.js +0 -51
  96. package/dist/content/doctor-references.d.ts +0 -2
  97. package/dist/content/doctor-references.js +0 -150
  98. package/dist/content/eval-scaffold.d.ts +0 -15
  99. package/dist/content/eval-scaffold.js +0 -370
  100. package/dist/content/feature-command.d.ts +0 -2
  101. package/dist/content/feature-command.js +0 -123
  102. package/dist/content/flow-map.d.ts +0 -23
  103. package/dist/content/flow-map.js +0 -134
  104. package/dist/content/harness-doc.d.ts +0 -2
  105. package/dist/content/harness-doc.js +0 -202
  106. package/dist/content/harness-playbooks.d.ts +0 -24
  107. package/dist/content/harness-playbooks.js +0 -393
  108. package/dist/content/harness-tool-refs.d.ts +0 -20
  109. package/dist/content/harness-tool-refs.js +0 -268
  110. package/dist/content/ops-command.d.ts +0 -2
  111. package/dist/content/ops-command.js +0 -71
  112. package/dist/content/protocols.d.ts +0 -7
  113. package/dist/content/protocols.js +0 -215
  114. package/dist/content/retro-command.d.ts +0 -2
  115. package/dist/content/retro-command.js +0 -165
  116. package/dist/content/rewind-command.d.ts +0 -2
  117. package/dist/content/rewind-command.js +0 -106
  118. package/dist/content/tdd-log-command.d.ts +0 -2
  119. package/dist/content/tdd-log-command.js +0 -85
  120. package/dist/eval/agents/single-shot.d.ts +0 -27
  121. package/dist/eval/agents/single-shot.js +0 -79
  122. package/dist/eval/agents/with-tools.d.ts +0 -44
  123. package/dist/eval/agents/with-tools.js +0 -261
  124. package/dist/eval/agents/workflow.d.ts +0 -31
  125. package/dist/eval/agents/workflow.js +0 -155
  126. package/dist/eval/baseline.d.ts +0 -38
  127. package/dist/eval/baseline.js +0 -282
  128. package/dist/eval/config-loader.d.ts +0 -14
  129. package/dist/eval/config-loader.js +0 -395
  130. package/dist/eval/corpus.d.ts +0 -30
  131. package/dist/eval/corpus.js +0 -330
  132. package/dist/eval/cost-guard.d.ts +0 -102
  133. package/dist/eval/cost-guard.js +0 -190
  134. package/dist/eval/diff.d.ts +0 -64
  135. package/dist/eval/diff.js +0 -323
  136. package/dist/eval/llm-client.d.ts +0 -176
  137. package/dist/eval/llm-client.js +0 -267
  138. package/dist/eval/mode.d.ts +0 -28
  139. package/dist/eval/mode.js +0 -61
  140. package/dist/eval/progress.d.ts +0 -83
  141. package/dist/eval/progress.js +0 -59
  142. package/dist/eval/report.d.ts +0 -11
  143. package/dist/eval/report.js +0 -181
  144. package/dist/eval/rubric-loader.d.ts +0 -20
  145. package/dist/eval/rubric-loader.js +0 -143
  146. package/dist/eval/runner.d.ts +0 -81
  147. package/dist/eval/runner.js +0 -746
  148. package/dist/eval/runs.d.ts +0 -41
  149. package/dist/eval/runs.js +0 -114
  150. package/dist/eval/sandbox.d.ts +0 -38
  151. package/dist/eval/sandbox.js +0 -137
  152. package/dist/eval/tools/glob.d.ts +0 -2
  153. package/dist/eval/tools/glob.js +0 -163
  154. package/dist/eval/tools/grep.d.ts +0 -2
  155. package/dist/eval/tools/grep.js +0 -152
  156. package/dist/eval/tools/index.d.ts +0 -7
  157. package/dist/eval/tools/index.js +0 -35
  158. package/dist/eval/tools/read.d.ts +0 -2
  159. package/dist/eval/tools/read.js +0 -122
  160. package/dist/eval/tools/types.d.ts +0 -49
  161. package/dist/eval/tools/types.js +0 -41
  162. package/dist/eval/tools/write.d.ts +0 -2
  163. package/dist/eval/tools/write.js +0 -92
  164. package/dist/eval/types.d.ts +0 -561
  165. package/dist/eval/types.js +0 -47
  166. package/dist/eval/verifiers/judge.d.ts +0 -40
  167. package/dist/eval/verifiers/judge.js +0 -256
  168. package/dist/eval/verifiers/rules.d.ts +0 -24
  169. package/dist/eval/verifiers/rules.js +0 -218
  170. package/dist/eval/verifiers/structural.d.ts +0 -14
  171. package/dist/eval/verifiers/structural.js +0 -171
  172. package/dist/eval/verifiers/traceability.d.ts +0 -23
  173. package/dist/eval/verifiers/traceability.js +0 -84
  174. package/dist/eval/verifiers/workflow-consistency.d.ts +0 -21
  175. package/dist/eval/verifiers/workflow-consistency.js +0 -225
  176. package/dist/eval/workflow-corpus.d.ts +0 -7
  177. package/dist/eval/workflow-corpus.js +0 -207
  178. package/dist/feature-system.d.ts +0 -42
  179. package/dist/feature-system.js +0 -432
  180. package/dist/internal/knowledge-digest.d.ts +0 -7
  181. package/dist/internal/knowledge-digest.js +0 -93
@@ -1,3 +1,4 @@
1
+ import { renderTrackTerminology, trackRenderContext } from "../track-render-context.js";
1
2
  // ---------------------------------------------------------------------------
2
3
  // TDD — RED → GREEN → REFACTOR cycle (merged test + build)
3
4
  // ---------------------------------------------------------------------------
@@ -7,9 +8,9 @@ export const TDD = {
7
8
  complexityTier: "standard",
8
9
  skillFolder: "test-driven-development",
9
10
  skillName: "test-driven-development",
10
- skillDescription: "Full TDD cycle: RED (failing tests), GREEN (minimal implementation), REFACTOR (cleanup). One plan slice at a time with strict traceability.",
11
+ skillDescription: "Full TDD cycle: discover existing tests and system impact, then RED (failing tests), GREEN (minimal implementation), REFACTOR (cleanup). One plan slice at a time with strict traceability.",
11
12
  philosophy: {
12
- hardGate: "Do NOT merge, ship, or skip review. Follow RED → GREEN → REFACTOR strictly for each plan slice. Do NOT write implementation code before RED tests exist. Do NOT skip the REFACTOR step.",
13
+ hardGate: "Do NOT merge, ship, or skip review. Follow RED → GREEN → REFACTOR strictly for each plan slice. Do NOT write implementation code before RED tests exist. Do NOT write RED tests before discovering relevant existing tests and impacted contracts. Do NOT skip the REFACTOR step.",
13
14
  ironLaw: "NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST — THE RED FAILURE IS THE SPEC.",
14
15
  purpose: "Implement features through the TDD cycle: write failing tests, make them pass with minimal code, then refactor.",
15
16
  whenToUse: [
@@ -28,50 +29,64 @@ export const TDD = {
28
29
  "Skipping evidence capture",
29
30
  "Undocumented refactor changes",
30
31
  "No full-suite GREEN evidence",
31
- "Multiple tasks implemented in one pass without justification"
32
+ "Multiple tasks implemented in one pass without justification",
33
+ "Skipping test discovery and duplicating an existing test pattern blindly",
34
+ "Ignoring callbacks, state transitions, interfaces, or contract surfaces affected by the slice",
35
+ "Collapsing RED/GREEN/REFACTOR into one unreviewable checkpoint"
32
36
  ]
33
37
  },
34
38
  executionModel: {
35
39
  checklist: [
36
- "Select plan slice — pick one task from the plan. Do not batch multiple tasks. Before starting, read `.cclaw/state/ralph-loop.json` (`loopIteration`, `acClosed[]`, `redOpenSlices[]`) so you skip cycles already closed.",
40
+ "Select plan slice — pick one task from the plan. Do not batch multiple tasks. Before starting, read `.cclaw/state/ralph-loop.json` (`loopIteration`, `acClosed[]`, `redOpenSlices[]`) so you skip cycles already closed. If `redOpenSlices[]` is non-empty, repair or explicitly park those slices before opening a new RED.",
37
41
  "Map to acceptance criterion — identify the specific spec criterion this test proves.",
38
- "Dispatch mandatory `tdd-red` execution (or `test-author` in TEST_RED_ONLY mode) produce failing behavior tests and RED evidence only (no production edits). Set `CCLAW_ACTIVE_AGENT=tdd-red` when supported.",
42
+ "Discover the test surface inspect existing tests, fixtures, helpers, test commands, and nearby assertions before authoring RED. Reuse the local test style unless the slice genuinely needs a new pattern.",
43
+ "Run a system-wide impact check — name callbacks, state transitions, interfaces, schemas, CLI/config/API contracts, persistence, or event boundaries that this slice can affect. Add RED coverage for each affected public contract or record why it is out of scope.",
44
+ "Set execution posture — record whether this slice is sequential, batch-safe, or blocked; when the existing git workflow permits small commits, checkpoint after RED, GREEN, and REFACTOR (or record why commits are deferred).",
45
+ "Use the mandatory `test-author` delegation for RED — after discovery and impact check, produce failing behavior tests and RED evidence only (no production edits). Set `CCLAW_ACTIVE_AGENT=tdd-red` when the harness supports phase labels.",
39
46
  "RED: Capture failure output — copy the exact failure output as RED evidence. Record in artifact.",
40
- "Dispatch `tdd-green` execution (or `test-author` in BUILD_GREEN_REFACTOR mode) — minimal implementation + full-suite GREEN. Set `CCLAW_ACTIVE_AGENT=tdd-green` when supported.",
47
+ "Continue the same `test-author` delegation intent for GREEN — minimal implementation plus full-suite GREEN evidence. Set `CCLAW_ACTIVE_AGENT=tdd-green` when the harness supports phase labels.",
41
48
  "GREEN: Run full suite — execute ALL tests, not just the ones you wrote. The full suite must be GREEN.",
42
49
  "GREEN: Verify no regressions — if any existing test breaks, fix the regression before proceeding.",
43
50
  "Run verification-before-completion discipline for the slice — capture a fresh test command, commit SHA, and explicit PASS/FAIL status before completion claims.",
44
- "REFACTOR: Dispatch `tdd-refactor` execution (or dedicated refactor mode) to improve code quality without behavior changes. Set `CCLAW_ACTIVE_AGENT=tdd-refactor` when supported.",
45
- "Record evidence — capture RED failure, GREEN output, and REFACTOR notes in the TDD artifact. When logging the `green` row via `/cc-ops tdd-log green`, attach the closed acceptance-criterion IDs in `acIds` so Ralph Loop status counts them.",
51
+ "REFACTOR: continue the `test-author` evidence cycle (or a dedicated refactor mode when available) to improve code quality without behavior changes. Set `CCLAW_ACTIVE_AGENT=tdd-refactor` when the harness supports phase labels.",
52
+ "Record evidence — capture test discovery, system-wide impact check, RED failure, GREEN output, and REFACTOR notes in the TDD artifact. When logging a `green` row, attach the closed acceptance-criterion IDs in `acIds` so Ralph Loop status counts them.",
46
53
  "Annotate traceability — link to plan task ID and spec criterion.",
47
54
  "Per-Slice Review (conditional) — if `.cclaw/config.yaml::sliceReview.enabled` is true and the slice meets any trigger (touchCount >= filesChangedThreshold, touchPaths match touchTriggers, or highRisk=true), append a `## Per-Slice Review` entry for this slice before moving on (see the dedicated section below).",
48
55
  "Repeat for each slice — return to step 1 for the next plan slice."
49
56
  ],
50
57
  interactionProtocol: [
51
58
  "Pick one planned slice at a time.",
52
- "Controller owns orchestration; execution runs through phase-specific delegation (`tdd-red` -> `tdd-green` -> `tdd-refactor`) or equivalent `test-author` modes.",
59
+ "Controller owns orchestration; one mandatory `test-author` delegation carries phase-specific RED -> GREEN -> REFACTOR evidence instead of spawning separate workers by default.",
60
+ "Before writing RED tests, discover relevant existing tests and commands so the new test extends the suite instead of fighting it.",
61
+ "Before implementation, perform a system-wide impact check across callbacks, state, interfaces, schemas, and external contracts touched by the slice.",
53
62
  "Write behavior-focused tests before changing implementation (RED).",
54
63
  "Capture and store failing output as RED evidence.",
55
64
  "Apply minimal change to satisfy RED tests (GREEN).",
56
65
  "Run full suite, not partial checks, for GREEN validation.",
57
66
  "Before declaring the slice complete, run a fresh verification check and record command + commit SHA + PASS/FAIL.",
58
67
  "Refactor without changing behavior and document rationale (REFACTOR).",
68
+ "Use incremental RED/GREEN/REFACTOR commits when the repository workflow and working tree make that appropriate; otherwise record the checkpoint boundaries in the artifact.",
59
69
  "Stop if regressions appear and fix before proceeding.",
60
70
  "If a test passes unexpectedly, investigate: does the behavior already exist, or is the test wrong?",
61
- "**Per-Slice Review checkpoint (conditional, opt-in).** When `.cclaw/config.yaml::sliceReview.enabled` is true, check every slice against the triggers before declaring it DONE. Triggers: `touchCount >= filesChangedThreshold`, any `touchPaths` match a `touchTriggers` glob, or the plan row declares `highRisk: true`. On a trigger, run two passes on the slice alone — (1) Spec-Compliance: trace RED/GREEN/REFACTOR evidence back to its plan task + spec criterion, noting edge cases the tests skip; (2) Quality: diff-scan for naming, error handling, dead code, simpler alternatives. Record both under `## Per-Slice Review` in `06-tdd.md`, naming the trigger that fired. Dispatch the `reviewer` subagent natively when available (log `fulfillmentMode: \"isolated\"`); otherwise fulfil via in-session role switch (`fulfillmentMode: \"role-switch\"`). Never fabricate an isolated pass from memory. Tracks outside `sliceReview.enforceOnTracks` still emit the section; doctor only escalates missed reviews on enforced tracks."
71
+ "**Per-Slice Review point (conditional, opt-in).** When `.cclaw/config.yaml::sliceReview.enabled` is true, check every slice against the triggers before declaring it DONE. Triggers: `touchCount >= filesChangedThreshold`, any `touchPaths` match a `touchTriggers` glob, or the plan row declares `highRisk: true`. On a trigger, run two passes on the slice alone — (1) Spec-Compliance: trace RED/GREEN/REFACTOR evidence back to its plan task + spec criterion, noting edge cases the tests skip; (2) Quality: diff-scan for naming, error handling, dead code, simpler alternatives. Record both under `## Per-Slice Review` in `06-tdd.md`, naming the trigger that fired. Dispatch the `reviewer` subagent natively when available (log `fulfillmentMode: \"isolated\"`); otherwise fulfil via in-session role switch (`fulfillmentMode: \"role-switch\"`). Never fabricate an isolated pass from memory. Tracks outside `sliceReview.enforceOnTracks` still emit the section; doctor only escalates missed reviews on enforced tracks."
62
72
  ],
63
73
  process: [
64
74
  "Select slice and map to acceptance criterion.",
65
- "Dispatch `tdd-red` (or `test-author` TEST_RED_ONLY mode) and produce failing test(s) for expected reason (RED).",
75
+ "Discover existing tests, fixtures, helpers, and exact test commands for the affected area.",
76
+ "Check system-wide impact across callbacks, state transitions, interfaces, schemas, and external contracts.",
77
+ "Record execution posture and checkpoint plan for RED/GREEN/REFACTOR commits or deferred commits.",
78
+ "Use `test-author` in RED intent and produce failing test(s) for the expected reason (RED).",
66
79
  "Run tests and capture failure output.",
67
- "Dispatch `tdd-green` (or `test-author` BUILD_GREEN_REFACTOR mode) and implement smallest change needed for GREEN.",
80
+ "Use `test-author` in GREEN intent and implement the smallest change needed for GREEN.",
68
81
  "Run full tests and build checks.",
69
82
  "Run a fresh verification-before-completion check and capture command + commit SHA + PASS/FAIL in guard evidence.",
70
- "Dispatch `tdd-refactor` pass preserving behavior.",
83
+ "Run the REFACTOR intent preserving behavior.",
71
84
  "Record RED, GREEN, and REFACTOR evidence in artifact.",
72
85
  "Annotate traceability to plan task and spec criterion; on `sliceReview` triggers, append a Per-Slice Review entry before closing the slice."
73
86
  ],
74
87
  requiredGates: [
88
+ { id: "tdd_test_discovery_complete", description: "Relevant existing tests, fixtures, helpers, and runnable commands were discovered before RED tests were written." },
89
+ { id: "tdd_impact_check_complete", description: "Callbacks, state transitions, interfaces, schemas, and contracts affected by the slice were checked before implementation." },
75
90
  { id: "tdd_red_test_written", description: "Failing tests exist before implementation changes." },
76
91
  { id: "tdd_green_full_suite", description: "Full relevant suite passes in GREEN state." },
77
92
  { id: "tdd_refactor_completed", description: "Refactor pass completed with behavior preservation verified." },
@@ -80,7 +95,10 @@ export const TDD = {
80
95
  { id: "tdd_docs_drift_check", description: "When public API/config/CLI surfaces change, docs drift is addressed via a completed doc-updater pass." }
81
96
  ],
82
97
  requiredEvidence: [
83
- "Artifact updated at `.cclaw/artifacts/06-tdd.md` with RED, GREEN, and REFACTOR sections.",
98
+ "Artifact updated at `.cclaw/artifacts/06-tdd.md` with Test Discovery, System-Wide Impact Check, RED, GREEN, and REFACTOR sections.",
99
+ "Relevant existing test files, helpers, fixtures, and exact commands identified before RED.",
100
+ "Callbacks, state transitions, interfaces, schemas, and contracts checked for impact before implementation.",
101
+ "Execution posture and RED/GREEN/REFACTOR checkpoint plan recorded, including commit boundaries when the repo workflow supports them.",
84
102
  "Failing command output captured (RED).",
85
103
  "Full test/build output recorded (GREEN).",
86
104
  "Fresh verification evidence recorded with command, commit SHA, and PASS/FAIL status before completion.",
@@ -90,14 +108,17 @@ export const TDD = {
90
108
  "Traceability to task identifier is documented."
91
109
  ],
92
110
  inputs: ["approved plan slice", "spec acceptance criterion", "test harness configuration", "coding standards and constraints"],
93
- requiredContext: ["plan artifact", "spec artifact", "existing test patterns"],
111
+ requiredContext: ["plan artifact", "spec artifact", "existing test patterns", "affected contracts and state boundaries"],
94
112
  blockers: [
113
+ "test discovery skipped before RED",
114
+ "system-wide impact check missing for callbacks/state/interfaces/contracts",
95
115
  "tests pass before behavior change (RED failure missing)",
96
116
  "full suite not green",
97
117
  "behavior changed during refactor",
98
118
  "no evidence recorded"
99
119
  ],
100
120
  exitCriteria: [
121
+ "test discovery and system-wide impact check are recorded",
101
122
  "RED evidence exists and is traceable",
102
123
  "GREEN evidence captured with full suite pass",
103
124
  "REFACTOR evidence captured",
@@ -120,6 +141,10 @@ export const TDD = {
120
141
  traceabilityRule: "Every RED test traces to a plan task. Every GREEN change traces to a RED test. Every plan task traces to a spec criterion. Design decisions inform test strategy. Evidence chain must be unbroken."
121
142
  },
122
143
  artifactValidation: [
144
+ { section: "Upstream Handoff", required: false, validationRule: "Summarizes plan/spec/design decisions, constraints, open questions, and explicit drift before RED work." },
145
+ { section: "Test Discovery", required: true, validationRule: "Before RED: lists existing tests, fixtures/helpers, exact commands, and the chosen local pattern to extend." },
146
+ { section: "System-Wide Impact Check", required: true, validationRule: "Before implementation: names affected callbacks, state transitions, interfaces, schemas, public APIs/config/CLI, persistence, or event contracts, with coverage or explicit out-of-scope notes." },
147
+ { section: "Execution Posture", required: false, validationRule: "Records sequential/batch/blocked posture and RED/GREEN/REFACTOR checkpoint plan, including incremental commit boundaries when consistent with the repository git workflow." },
123
148
  { section: "RED Evidence", required: true, validationRule: "Failing test output captured per slice." },
124
149
  { section: "Acceptance Mapping", required: false, validationRule: "Each RED test links to a plan task and spec criterion." },
125
150
  { section: "Failure Analysis", required: false, validationRule: "Failure reason matches expected missing behavior." },
@@ -139,6 +164,8 @@ export const TDD = {
139
164
  {
140
165
  title: "RED Evidence Audit",
141
166
  evaluationPoints: [
167
+ "Did every slice discover relevant existing tests, helpers, fixtures, and commands before adding RED coverage?",
168
+ "Does the system-wide impact check cover callbacks, state transitions, interfaces, schemas, and public contracts touched by the slice?",
142
169
  "Does every slice have a captured failing test output?",
143
170
  "Does each failure reason match the expected missing behavior (not a typo or config error)?",
144
171
  "Were tests written BEFORE any production code for that slice?",
@@ -152,6 +179,7 @@ export const TDD = {
152
179
  evaluationPoints: [
153
180
  "Does GREEN evidence show a FULL suite pass (not partial)?",
154
181
  "Is the GREEN implementation minimal — no features beyond what RED tests require?",
182
+ "Do checkpoint notes or commits keep RED, GREEN, and REFACTOR reviewable according to the repository git workflow?",
155
183
  "Does the REFACTOR step preserve all existing behavior (no new failures)?",
156
184
  "Are REFACTOR notes documented with rationale?",
157
185
  "Is traceability complete: every change links to plan task ID and spec criterion?"
@@ -203,53 +231,48 @@ export const TDD = {
203
231
  next: "review",
204
232
  batchExecutionAllowed: true
205
233
  };
206
- function quickTrackText(value) {
207
- return value
208
- .replace(/\btask from the plan\b/giu, "acceptance criterion from the spec")
209
- .replace(/\bplan task ID\b/giu, "acceptance criterion ID")
210
- .replace(/\bplan task\b/giu, "acceptance criterion")
211
- .replace(/\bplan row\b/giu, "acceptance row")
212
- .replace(/\bplan slice\b/giu, "acceptance slice")
213
- .replace(/\bplan artifact\b/giu, "spec artifact")
214
- .replace(/\btraceable to plan slice\b/giu, "traceable to acceptance criterion")
215
- .replace(/05-plan\.md/gu, "04-spec.md");
216
- }
217
- function tddQuickTrackVariant() {
234
+ function tddStageVariantForTrack(track) {
235
+ const renderContext = trackRenderContext(track);
236
+ if (renderContext.usesPlanTerminology) {
237
+ return TDD;
238
+ }
218
239
  return {
219
240
  ...TDD,
220
- // Quick track keeps the same stage intent but rewrites plan-centric language to spec-centric language.
221
- skillDescription: quickTrackText(TDD.skillDescription),
241
+ skillDescription: renderTrackTerminology(TDD.skillDescription, renderContext),
222
242
  philosophy: {
223
243
  ...TDD.philosophy,
224
- hardGate: quickTrackText(TDD.philosophy.hardGate)
244
+ hardGate: renderTrackTerminology(TDD.philosophy.hardGate, renderContext)
225
245
  },
226
246
  executionModel: {
227
247
  ...TDD.executionModel,
228
- checklist: TDD.executionModel.checklist.map(quickTrackText),
229
- interactionProtocol: TDD.executionModel.interactionProtocol.map(quickTrackText),
230
- process: TDD.executionModel.process.map(quickTrackText),
248
+ checklist: TDD.executionModel.checklist.map((value) => renderTrackTerminology(value, renderContext)),
249
+ interactionProtocol: TDD.executionModel.interactionProtocol
250
+ .map((value) => renderTrackTerminology(value, renderContext)),
251
+ process: TDD.executionModel.process.map((value) => renderTrackTerminology(value, renderContext)),
231
252
  requiredGates: TDD.executionModel.requiredGates
232
253
  .filter((gate) => gate.id !== "tdd_traceable_to_plan")
233
254
  .map((gate) => ({
234
255
  ...gate,
235
- description: quickTrackText(gate.description)
256
+ description: renderTrackTerminology(gate.description, renderContext)
236
257
  })),
237
- requiredEvidence: TDD.executionModel.requiredEvidence.map(quickTrackText),
238
- inputs: TDD.executionModel.inputs.map(quickTrackText),
239
- requiredContext: ["spec artifact", "existing test patterns"]
258
+ requiredEvidence: TDD.executionModel.requiredEvidence
259
+ .map((value) => renderTrackTerminology(value, renderContext)),
260
+ inputs: TDD.executionModel.inputs.map((value) => renderTrackTerminology(value, renderContext)),
261
+ requiredContext: [renderContext.upstreamArtifactLabel, "existing test patterns", "affected contracts and state boundaries"]
240
262
  },
241
263
  reviewLens: {
242
264
  ...TDD.reviewLens,
243
265
  reviewSections: TDD.reviewLens.reviewSections.map((section) => ({
244
266
  ...section,
245
- evaluationPoints: section.evaluationPoints.map(quickTrackText)
267
+ evaluationPoints: section.evaluationPoints
268
+ .map((point) => renderTrackTerminology(point, renderContext))
246
269
  }))
247
270
  },
248
271
  artifactRules: {
249
272
  ...TDD.artifactRules,
250
273
  crossStageTrace: {
251
274
  ...TDD.artifactRules.crossStageTrace,
252
- readsFrom: [".cclaw/artifacts/04-spec.md"],
275
+ readsFrom: [renderContext.upstreamArtifactPath],
253
276
  traceabilityRule: "Every RED test traces to an acceptance criterion. Every GREEN change traces to a RED test. Evidence chain must be unbroken."
254
277
  },
255
278
  artifactValidation: TDD.artifactRules.artifactValidation.map((row) => {
@@ -268,15 +291,12 @@ function tddQuickTrackVariant() {
268
291
  }
269
292
  return {
270
293
  ...row,
271
- validationRule: quickTrackText(row.validationRule)
294
+ validationRule: renderTrackTerminology(row.validationRule, renderContext)
272
295
  };
273
296
  })
274
297
  }
275
298
  };
276
299
  }
277
300
  export function tddStageForTrack(track) {
278
- if (track === "quick") {
279
- return tddQuickTrackVariant();
280
- }
281
- return TDD;
301
+ return tddStageVariantForTrack(track);
282
302
  }
@@ -1,5 +1,4 @@
1
1
  import { RUNTIME_ROOT } from "../constants.js";
2
- import { FLOW_MAP_REL_PATH } from "./flow-map.js";
3
2
  const START_SKILL_FOLDER = "flow-start";
4
3
  const START_SKILL_NAME = "flow-start";
5
4
  function flowStatePath() {
@@ -79,17 +78,18 @@ This is the **recommended way to start** working with cclaw. Use \`/cc-next\` fo
79
78
  - **standard** (full 8 stages — default fallback) — anything that introduces a new capability with architecture uncertainty, touches many modules, or has unclear scope.
80
79
  Triggers: \`new feature\`, \`refactor\`, \`migration\`, \`platform\`, \`architecture\`, \`schema\`, \`integrate\`, \`workflow\`, \`onboarding\`, or any prompt that does not match quick/medium confidently.
81
80
  - When triggers conflict, prefer **standard** over **medium**, and **medium** over **quick**.
82
- 8. Present the recommendation as a single decision with explicit options:
81
+ 8. Present one compact **Start framing** summary: class, recommended track, stack, origin docs, seed recalls, and the recommended next action. Ask a single confirmation question only when there is a destructive reset, a real contradiction, or ambiguous software/non-software classification.
82
+ 9. Present the recommendation as a single decision with explicit options:
83
83
  > \`Recommended track: <quick|medium|standard>\` because \`<one-line reason citing matched triggers>\`.
84
84
  > Override? (A) keep \`<recommended>\` (B) switch track (C) cancel.
85
85
  If the harness's native ask tool is available (\`AskUserQuestion\` / \`AskQuestion\` / \`question\` / \`request_user_input\`), send exactly ONE question; on schema error, fall back to a plain-text lettered list.
86
- 9. Persist the chosen track to \`${flowPath}\` (\`track\` field). Compute \`skippedStages\` from the track and write that too. Use the **first stage of the chosen track** as \`currentStage\` (quick → \`spec\`, medium/standard → \`brainstorm\`, trivial fast-path → \`design\` or \`spec\` per Phase 0).
87
- 10. Write the prompt to \`.cclaw/artifacts/00-idea.md\` with the following header lines: \`Class:\` (from Phase 0), \`Track:\` (chosen track + matched heuristic), \`Stack:\` (from Phase 2 detection, or \`unknown\`), and a \`Discovered context\` section if Phase 1/seed recall found references.
88
- 11. Load the **first-stage skill for the chosen track** and its command file:
89
- - quick → \`.cclaw/skills/specification-authoring/SKILL.md\` + \`.cclaw/commands/spec.md\`
90
- - medium/standard → \`.cclaw/skills/brainstorming/SKILL.md\` + \`.cclaw/commands/brainstorm.md\`
86
+ 10. Persist the chosen track to \`${flowPath}\` (\`track\` field). Compute \`skippedStages\` from the track and write that too. Use the **first stage of the chosen track** as \`currentStage\` (quick → \`spec\`, medium/standard → \`brainstorm\`, trivial fast-path → \`design\` or \`spec\` per Phase 0).
87
+ 11. Write the prompt to \`.cclaw/artifacts/00-idea.md\` with the following header lines: \`Class:\` (from Phase 0), \`Track:\` (chosen track + matched heuristic), \`Stack:\` (from Phase 2 detection, or \`unknown\`), and a \`Discovered context\` section if Phase 1/seed recall found references.
88
+ 12. Load the **first-stage skill for the chosen track** and its command file:
89
+ - quick → \`.cclaw/skills/specification-authoring/SKILL.md\`
90
+ - medium/standard → \`.cclaw/skills/brainstorming/SKILL.md\`
91
91
  - trivial fast-path → design or spec skill per Phase 0 decision.
92
- 12. Execute that stage with the prompt + Phase 1/Phase 2 + seed context as initial input.
92
+ 13. Execute that stage with the prompt + Phase 1/Phase 2 + seed context as initial input.
93
93
 
94
94
  ### Reclassification on discovery
95
95
 
@@ -124,9 +124,7 @@ Validate envelopes with:
124
124
 
125
125
  ## Surface reference
126
126
 
127
- For the 1-page overview of cclaw (stages, routers, Ralph Loop, state
128
- files) load \`${FLOW_MAP_REL_PATH}\` — useful when a fresh session
129
- needs orientation before \`/cc <prompt>\` runs.
127
+ Use the start skill plus \`.cclaw/state/flow-state.json\` for orientation before \`/cc <prompt>\` runs.
130
128
  `;
131
129
  }
132
130
  /**
@@ -165,7 +163,7 @@ Do **not** silently discard an existing flow when the user provides a prompt. If
165
163
  - Inform: "You have an active flow at stage **{currentStage}** with {N} completed stages. Starting a new tracked flow will reset progress."
166
164
  - Ask: "Continue with reset? (A) Yes, start fresh (B) No, resume current flow"
167
165
  - If (B) → switch to Path B behavior.
168
- 7. **Classify the idea** using the heuristic below and present a single track recommendation. Wait for explicit confirmation or override before mutating any state.
166
+ 7. **Classify the idea** using the heuristic below and present one compact Start framing summary (class, track, stack, origin docs, seed recalls, next action). Wait for explicit confirmation or override before mutating any state only when reset/conflict/ambiguity makes it necessary.
169
167
  - If \`${RUNTIME_ROOT}/config.yaml\` defines \`trackHeuristics\`, apply those vocabulary hints (\`fallback\`, \`tracks.<id>.{triggers,veto}\`) on top of built-in defaults. Evaluation order is fixed: \`standard -> medium -> quick\`. (Honest note: this is advisory prose; the LLM applies it, not a Node-level router.)
170
168
 
171
169
  **Track heuristic** (lowercase substring match against the user prompt):
@@ -1,9 +1,4 @@
1
1
  /**
2
- * Command contract for /cc-view status — a read-only snapshot command.
3
- * Does not mutate state. Always safe to run.
2
+ * Body for /cc-view status — read-only status snapshot embedded in flow-view.
4
3
  */
5
- export declare function statusCommandContract(): string;
6
- /**
7
- * Skill body for /cc-view status — read-only status snapshot.
8
- */
9
- export declare function statusCommandSkillMarkdown(): string;
4
+ export declare function statusSubcommandMarkdown(): string;
@@ -1,6 +1,4 @@
1
1
  import { RUNTIME_ROOT } from "../constants.js";
2
- const STATUS_SKILL_FOLDER = "flow-status";
3
- const STATUS_SKILL_NAME = "flow-status";
4
2
  function flowStatePath() {
5
3
  return `${RUNTIME_ROOT}/state/flow-state.json`;
6
4
  }
@@ -10,134 +8,16 @@ function delegationLogPath() {
10
8
  function knowledgePath() {
11
9
  return `${RUNTIME_ROOT}/knowledge.jsonl`;
12
10
  }
13
- function contextModePath() {
14
- return `${RUNTIME_ROOT}/state/context-mode.json`;
15
- }
16
- function checkpointPath() {
17
- return `${RUNTIME_ROOT}/state/checkpoint.json`;
18
- }
19
- function stageActivityPath() {
20
- return `${RUNTIME_ROOT}/state/stage-activity.jsonl`;
21
- }
22
- function snapshotPath() {
23
- return `${RUNTIME_ROOT}/state/flow-state.snapshot.json`;
24
- }
25
- function harnessGapsPath() {
26
- return `${RUNTIME_ROOT}/state/harness-gaps.json`;
27
- }
28
11
  function retroArtifactPath() {
29
12
  return `${RUNTIME_ROOT}/artifacts/09-retro.md`;
30
13
  }
31
14
  /**
32
- * Command contract for /cc-view status — a read-only snapshot command.
33
- * Does not mutate state. Always safe to run.
34
- */
35
- export function statusCommandContract() {
36
- const flowPath = flowStatePath();
37
- const delegationPath = delegationLogPath();
38
- return `# /cc-view status
39
-
40
- ## Purpose
41
-
42
- **Read-only visual snapshot of the cclaw run.** Shows progress bar, current stage,
43
- gate coverage, delegation status with fulfillmentMode, closeout substate after
44
- ship, harness parity fallback, stale markers, and top knowledge highlights.
45
-
46
- This command **never mutates state**. Use it at session start to orient, or at any
47
- time to answer "where are we?" without advancing the flow.
48
-
49
- ## HARD-GATE
50
-
51
- - **Do not** use \`/cc-view status\` output to infer gate completion for decisions — cite
52
- artifact evidence via \`/cc-next\` when advancing.
53
- - **Do not** mutate \`${flowPath}\` or delegation log from this command.
54
- - **Do not** rewrite \`${snapshotPath()}\` from this command (use \`/cc-view diff\`).
55
-
56
- ## Algorithm
57
-
58
- 1. Read **\`${flowPath}\`** — capture \`track\`, \`currentStage\`, \`completedStages\`,
59
- \`skippedStages\`, \`staleStages\`, per-stage gate catalog, and **\`closeout\`**
60
- (shipSubstate + retro/compound flags).
61
- 2. Read **\`${delegationPath}\`** — for each mandatory agent of the current stage,
62
- capture \`status\`, \`fulfillmentMode\`, and whether \`evidenceRefs\` are present.
63
- 3. Read **\`${contextModePath()}\`** — surface \`activeMode\` (default if missing).
64
- 4. Compute **time in current stage** from the most recent stage-entry signal:
65
- - Prefer \`${checkpointPath()}\`'s \`timestamp\` when its \`stage\` matches \`currentStage\`.
66
- - Otherwise scan \`${stageActivityPath()}\` from the end for the first entry whose \`stage\` matches \`currentStage\` and use its \`ts\`.
67
- - Compute the duration as \`now - signalTimestamp\` and render compactly: \`<X>m\`, \`<X>h<Y>m\`, or \`<X>d<Y>h\`.
68
- - If no signal exists, render \`(unknown)\`.
69
- 5. Optionally read **\`${snapshotPath()}\`** to compute gate delta versus prior baseline:
70
- - If missing or invalid, render \`delta: (baseline unavailable; run /cc-view diff)\`.
71
- 6. Read **\`${harnessGapsPath()}\`** (schemaVersion 2). For every installed harness
72
- capture \`tier\`, \`subagentFallback\`, and \`playbookPath\` for the harness row.
73
- 7. Read the top of **\`${knowledgePath()}\`** — surface up to 3 most recent entries
74
- (by trailing timestamp or source marker).
75
- 8. Detect **closeout artifacts**: check whether \`${retroArtifactPath()}\` exists on
76
- disk and annotate the closeout row accordingly.
77
- 9. Emit the visual status block described below. Do **not** load any stage skill.
78
-
79
- ## Visual markers
80
-
81
- Default UTF markers: \`✓\` passed, \`▶\` current, \`○\` pending, \`⊘\` skipped, \`⏸\` stale, \`✗\` blocked.
82
- ASCII fallback (no UTF locale): \`[x]\`, \`[>]\`, \`[ ]\`, \`[-]\`, \`[=]\`, \`[!]\`.
83
-
84
- Delegation markers: \`✓\` completed, \`◎\` completed-no-evidence (role-switch
85
- harness; **blocks stage**), \`○\` scheduled/pending, \`⊘\` waived, \`✗\` failed.
86
-
87
- ## Status Block Format
88
-
89
- \`\`\`
90
- cclaw status
91
- flow: <track> · run=<runId> · feature=<feature-id>
92
- stage: <stage> (<N>/<total>) · time <Xd|XhYm|Xm|unknown> · mode <activeMode>
93
- bar: [✓ brainstorm] [✓ scope] [▶ design] [○ spec] [○ plan] [○ tdd] [○ review] [○ ship]
94
- gates: now <passed>/<required> · blocked <count> · delta <summary or baseline-unavailable>
95
- delegations (<expectedMode>):
96
- - planner ✓ completed mode=<isolated|generic-dispatch|role-switch>
97
- - reviewer ○ pending
98
- - test-author ◎ missing-evidence (role-switch; add evidenceRefs)
99
- closeout: <shipSubstate> · retro=<drafted|accepted|skipped|—> · compound=<N promoted|skipped|—>
100
- harness: <id>=<tier>/<fallback>, ... · playbooks: <M>/<N>
101
- stale: <list or none>
102
- knowledge:
103
- - <latest entry summary>
104
- - <second entry summary>
105
- - <third entry summary>
106
- next: /cc-next · /cc-view tree · /cc-view diff
107
- \`\`\`
108
-
109
- - Omit the \`closeout:\` row when \`currentStage !== "ship"\` and \`shipSubstate === "idle"\`.
110
- - Omit \`delegations\` line when the current stage has zero mandatory delegations.
111
- - Omit \`harness\` line only when \`${harnessGapsPath()}\` is missing or invalid
112
- (render \`harness: (report unavailable; run cclaw upgrade)\`).
113
-
114
- ## Anti-patterns
115
-
116
- - Inventing gate status without reading \`${flowPath}\`.
117
- - Reporting delegations as satisfied when the log says \`pending\`.
118
- - Treating a \`completed\` role-switch delegation without \`evidenceRefs\` as green
119
- — it must surface as \`◎ missing-evidence\`.
120
- - Advancing the stage from \`/cc-view status\` — progression belongs to \`/cc-next\`.
121
- - Hiding the closeout substate after ship; retro/compound/archive progress must
122
- be visible so \`/cc-next\` resumes at the right step.
123
-
124
- ## Primary skill
125
-
126
- **${RUNTIME_ROOT}/skills/${STATUS_SKILL_FOLDER}/SKILL.md**
127
- `;
128
- }
129
- /**
130
- * Skill body for /cc-view status — read-only status snapshot.
15
+ * Body for /cc-view status — read-only status snapshot embedded in flow-view.
131
16
  */
132
- export function statusCommandSkillMarkdown() {
17
+ export function statusSubcommandMarkdown() {
133
18
  const flowPath = flowStatePath();
134
19
  const delegationPath = delegationLogPath();
135
- return `---
136
- name: ${STATUS_SKILL_NAME}
137
- description: "Read-only visual snapshot of the cclaw flow with progress bar, gate delta, delegations (fulfillmentMode + evidence), closeout substate, and harness parity row."
138
- ---
139
-
140
- # /cc-view status — Flow Status Snapshot
20
+ return `# /cc-view status — Flow Status Snapshot
141
21
 
142
22
  ## Overview
143
23
 
@@ -145,38 +25,29 @@ description: "Read-only visual snapshot of the cclaw flow with progress bar, gat
145
25
  advancing or mutating anything. Safe to run at any point. The snapshot reflects:
146
26
 
147
27
  - progress across stages with per-stage markers,
148
- - gate coverage and delta vs. baseline,
28
+ - gate coverage,
149
29
  - mandatory delegations with **fulfillmentMode** (isolated / generic-dispatch /
150
- role-switch / harness-waiver) and evidence gate,
30
+ role-switch) plus explicit waived status and evidence gate,
151
31
  - **closeout substate** after ship (retro → compound → archive),
152
32
  - **harness parity row** (tier + fallback) for the active harness set.
153
33
 
154
34
  ## HARD-GATE
155
35
 
156
36
  Do **not** mutate \`${flowPath}\` or \`${delegationPath}\` from this skill. This is
157
- a read-only command. Do **not** update \`${snapshotPath()}\` here.
37
+ a read-only command.
158
38
 
159
39
  ## Algorithm
160
40
 
161
41
  1. Read \`${flowPath}\`. If missing → report **BLOCKED: flow state absent** and suggest \`cclaw init\`.
162
42
  2. Read \`${delegationPath}\`. Missing → treat all mandatory delegations as pending.
163
- 3. Read \`${contextModePath()}\` for \`activeMode\`. Missing render \`activeMode = default\`.
164
- 4. Compute **time in stage**:
165
- - Prefer \`${checkpointPath()}\` when \`stage === currentStage\` and \`timestamp\` parses as ISO 8601.
166
- - Else scan \`${stageActivityPath()}\` from tail for the most recent entry whose \`stage === currentStage\`; use its \`ts\`.
167
- - Render \`<X>d<Y>h\`, \`<X>h<Y>m\`, \`<X>m\`, or \`(unknown)\`.
168
- 5. Try reading \`${snapshotPath()}\` for gate delta:
169
- - If available, compare current stage \`passed\` / \`blocked\` sets against baseline.
170
- - If unavailable, render \`delta: (baseline unavailable; run /cc-view diff)\`.
171
- 6. Read \`${harnessGapsPath()}\`:
172
- - If \`schemaVersion === 2\`, for each entry render \`<harness>=<tier>/<subagentFallback>\`.
173
- - Count existing \`playbookPath\` files on disk to print \`playbooks: <M>/<N>\`.
174
- - If the file is missing or has an older schema, render
175
- \`harness: (report unavailable; run cclaw upgrade)\`.
176
- 7. Read \`${RUNTIME_ROOT}/knowledge.jsonl\`. If missing or empty → knowledge highlights are \`(none recorded)\`. Parse each line as JSON and surface its \`trigger\`/\`action\`.
177
- 8. For each gate in \`stageGateCatalog[currentStage].required\`:
43
+ 3. Render **time in stage** as \`(unknown)\` unless visible conversation or
44
+ artifact handoff context gives a timestamp.
45
+ 4. Summarize current-stage gate counts from \`passed\`, \`blocked\`, and required gate metadata.
46
+ 5. Derive harness \`<tier>/<fallback>\` rows from cclaw capability metadata.
47
+ 6. Read \`${RUNTIME_ROOT}/knowledge.jsonl\`. If missing or empty → knowledge highlights are \`(none recorded)\`. Parse each line as JSON and surface its \`trigger\`/\`action\`.
48
+ 7. For each gate in \`stageGateCatalog[currentStage].required\`:
178
49
  - Satisfied if present in \`passed\` and absent from \`blocked\`.
179
- 9. For each mandatory delegation of the current stage, evaluate:
50
+ 8. For each mandatory delegation of the current stage, evaluate:
180
51
  - \`✓ completed\` when \`status === "completed"\` and (harness is not role-switch
181
52
  **or** \`evidenceRefs.length >= 1\`).
182
53
  - \`◎ missing-evidence\` when \`status === "completed"\`, harness declares
@@ -184,22 +55,22 @@ a read-only command. Do **not** update \`${snapshotPath()}\` here.
184
55
  - \`○ <status>\` for \`scheduled\` / pending.
185
56
  - \`⊘ waived\` when \`status === "waived"\`.
186
57
  - \`✗ failed\` when \`status === "failed"\`.
187
- 10. Compute **closeout row** when \`currentStage === "ship"\` or
58
+ 9. Compute **closeout row** when \`currentStage === "ship"\` or
188
59
  \`closeout.shipSubstate !== "idle"\`:
189
60
  - \`shipSubstate\` verbatim,
190
61
  - \`retro=drafted|accepted|skipped|—\` derived from \`closeout.retroDraftedAt\`,
191
62
  \`closeout.retroAcceptedAt\`, \`closeout.retroSkipped\`,
192
63
  - \`compound=<N promoted>|skipped|—\` from
193
64
  \`closeout.compoundPromoted\` / \`closeout.compoundSkipped\`.
194
- 11. Build and print the visual status block:
65
+ 10. Build and print the visual status block:
195
66
  - stage header
196
67
  - one-line progress bar with per-stage markers
197
- - gate summary + delta
68
+ - gate summary
198
69
  - delegation rows (per mandatory agent)
199
70
  - closeout row (when active)
200
71
  - harness row
201
72
  - stale stage row
202
- 12. Suggest the next action:
73
+ 11. Suggest the next action:
203
74
  - If current stage has unmet gates → \`/cc-next\` to resume.
204
75
  - If closeout substate is non-idle → \`/cc-next\` to continue the chain.
205
76
  - If current stage is complete → \`/cc-next\` to advance (or report "Flow complete" if terminal).
@@ -207,6 +78,8 @@ a read-only command. Do **not** update \`${snapshotPath()}\` here.
207
78
  ## Output Guidelines
208
79
 
209
80
  - Keep output compact (≤ 40 lines) — status, not narrative.
81
+ - Start with the same operator rows as \`/cc-next\` when possible:
82
+ \`Stage\`, \`Gates\`, \`Delegations\`, \`Blockers\`, \`Next\`.
210
83
  - Report counts, not full artifact contents.
211
84
  - If any data source is missing or corrupt, say so explicitly rather than guessing.
212
85
  - Include \`/cc-view tree\` for deep structure and \`/cc-view diff\` for before/after map in the final line.
@@ -1,8 +1,3 @@
1
- /**
2
- * Markdown content generators for Cclaw’s subagent orchestration skills and enhanced
3
- * specialist payloads. Cclaw materializes static instructions — this module does not
4
- * execute orchestration logic at install time beyond string assembly.
5
- */
6
1
  export declare function subagentDrivenDevSkill(): string;
7
2
  export declare function parallelAgentsSkill(): string;
8
3
  /**