cclaw-cli 0.51.21 → 0.51.22
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/dist/config.d.ts +8 -1
- package/dist/config.js +9 -6
- package/dist/content/hook-manifest.d.ts +2 -4
- package/dist/content/hook-manifest.js +4 -3
- package/dist/content/meta-skill.js +7 -9
- package/dist/content/next-command.js +2 -2
- package/dist/content/node-hooks.js +13 -3
- package/dist/content/review-loop.js +15 -5
- package/dist/content/review-prompts.js +1 -1
- package/dist/content/skills.js +3 -2
- package/dist/content/stage-schema.js +1 -0
- package/dist/content/stages/brainstorm.js +3 -3
- package/dist/content/stages/design.js +18 -17
- package/dist/content/stages/plan.js +2 -1
- package/dist/content/stages/review.js +10 -10
- package/dist/content/stages/scope.js +13 -13
- package/dist/content/stages/spec.js +7 -5
- package/dist/content/stages/tdd.js +2 -2
- package/dist/content/start-command.d.ts +4 -3
- package/dist/content/start-command.js +21 -17
- package/dist/content/templates.d.ts +1 -1
- package/dist/content/templates.js +48 -28
- package/dist/content/view-command.js +3 -1
- package/dist/delegation.js +28 -8
- package/dist/doctor.js +147 -21
- package/dist/gate-evidence.js +19 -7
- package/dist/harness-adapters.js +1 -5
- package/dist/install.js +87 -24
- package/dist/internal/advance-stage.js +90 -11
- package/dist/knowledge-store.d.ts +4 -1
- package/dist/knowledge-store.js +24 -14
- package/dist/retro-gate.d.ts +1 -0
- package/dist/retro-gate.js +9 -9
- package/dist/run-archive.js +19 -1
- package/dist/run-persistence.js +6 -2
- package/dist/tdd-cycle.js +6 -3
- package/package.json +1 -1
|
@@ -45,13 +45,13 @@ export const SCOPE = {
|
|
|
45
45
|
},
|
|
46
46
|
executionModel: {
|
|
47
47
|
checklist: [
|
|
48
|
-
"**
|
|
48
|
+
"**Scope contract first** — read brainstorm, name the job-to-be-done, draft the explicit in-scope/out-of-scope/deferred contract, select one mode, and write the rationale. This is the default path; use dream/10-star/temporal/deep strategy sections only when risk, novelty, or user ambition justifies them.",
|
|
49
49
|
"**Premise and leverage check** — answer in the artifact: *Right problem? Direct path? What if nothing? Where can we leverage existing code? What is the reversibility cost?* Take a position; do not hedge.",
|
|
50
|
-
"**
|
|
50
|
+
"**Conditional 10-star boundary** — for deep/high-risk/product-strategy work, show what would make the product meaningfully better, then explicitly choose what ships now, what is deferred, and what is excluded without vague `later/for now` placeholders. Skip this for straightforward repair work and record `not needed: compact scope`.",
|
|
51
51
|
"**Pick one of four gstack modes with the user** — SCOPE EXPANSION, SELECTIVE EXPANSION, HOLD SCOPE, or SCOPE REDUCTION. Recommend one, state why and what signal would change it, then STOP for the user's mode/scope approval before writing the final artifact.",
|
|
52
|
-
"**Run mode-specific analysis** —
|
|
52
|
+
"**Run mode-specific analysis only to needed depth** — ordinary path is a selected-mode row plus rationale tied to the scope contract. For deep/high-risk work, expand the analysis to match the chosen mode: SCOPE EXPANSION enumerates 10x opportunities + delight features; SELECTIVE EXPANSION lists baseline + cherry-picked additions; HOLD SCOPE proves rigor on the current slice; SCOPE REDUCTION names the smallest useful wedge.",
|
|
53
53
|
"**Compare implementation alternatives** — include minimum viable, product-grade, and ideal architecture options with effort (S/M/L/XL), risk (Low/Med/High), pros, cons, and reuses. Recommend one and tie it to mode.",
|
|
54
|
-
"**Run outside voice before final approval** — for simple/low-risk scope, record one concise adversarial self-check row; for complex/high-risk/configured scope, iterate until threshold. Record the loop summary in `##
|
|
54
|
+
"**Run outside voice before final approval** — for simple/low-risk scope, record one concise adversarial self-check row; for complex/high-risk/configured scope, iterate until threshold. Record the loop summary in `## Scope Outside Voice Loop`, but do not treat it as user approval.",
|
|
55
55
|
"**Ask only one decision-changing question** — if the user rejects the contract but is unsure, offer 3-4 concrete scope moves instead of open-ended interrogation.",
|
|
56
56
|
"**Write the scope contract after approval** — include in-scope/out-of-scope, discretion areas, deferred items, locked decisions, error/rescue notes, completion dashboard, scope summary (with canonical mode token + next-stage handoff), and explicit approval evidence."
|
|
57
57
|
],
|
|
@@ -61,18 +61,18 @@ export const SCOPE = {
|
|
|
61
61
|
"For simple web-app flows, default to HOLD SCOPE or SELECTIVE EXPANSION, show the exact in/out/deferred contract as a proposal, and STOP for one explicit approval before writing the final scope artifact or completing the stage.",
|
|
62
62
|
"Challenge premise first, take a firm position, and name one concrete condition that would change it.",
|
|
63
63
|
"Push back on weak framing: vague scope needs a specific user/problem, platform vision needs a narrow wedge, social proof needs behavioral evidence.",
|
|
64
|
-
"Resolve one structural scope issue at a time;
|
|
64
|
+
"Resolve one structural scope issue at a time. Only non-critical preference/default assumptions may continue; STOP on uncertainty about scope boundary, architecture commitment, security, data loss, public API, migration, auth/pricing, or required user approval.",
|
|
65
65
|
"If the user says no but cannot name the change, offer concrete moves: keep scope, add one obvious adjacent capability, reduce to wedge, or re-open stack/product direction.",
|
|
66
|
-
`Before final approval, record outside-voice findings and a \`##
|
|
66
|
+
`Before final approval, record outside-voice findings and a \`## Scope Outside Voice Loop\` table using ${reviewLoopPolicySummary("scope")}`,
|
|
67
67
|
"**STOP.** Wait for explicit user approval of the scope mode and scope contract before writing final approval language or advancing.",
|
|
68
68
|
"**STOP BEFORE ADVANCE.** Mandatory delegation `planner` must be completed or explicitly waived. If no isolated planner is available, use `--waive-delegation=planner --waiver-reason=\"role-switch scope self-review completed\"`. Then close with `node .cclaw/hooks/stage-complete.mjs scope --passed=scope_mode_selected,scope_contract_written,scope_user_approved --evidence-json '{\"scope_mode_selected\":\"<user-approved mode + rationale>\",\"scope_contract_written\":\"<artifact path + sections>\",\"scope_user_approved\":\"<explicit user approval quote or summary>\"}'`. `scope_user_approved` must cite the user's approval; review-loop evidence alone is not approval."
|
|
69
69
|
],
|
|
70
70
|
process: [
|
|
71
71
|
"Run configured pre-scope audit only when enabled.",
|
|
72
|
-
"Run the
|
|
72
|
+
"Run the scope pass scaled to risk: default to job-to-be-done plus explicit scope contract; add premise challenge, 10-star upside, smallest useful wedge, and change conditions only for deep/high-risk scope.",
|
|
73
73
|
"Compare minimum viable, product-grade, and ideal architecture scope alternatives with explicit reuse/effort/risk.",
|
|
74
74
|
"Recommend a scope mode with explicit rationale, then ask for user opt-in before treating it as selected.",
|
|
75
|
-
"Run outside voice / adversarial self-check before final approval and record a valid `##
|
|
75
|
+
"Run outside voice / adversarial self-check before final approval and record a valid `## Scope Outside Voice Loop` table.",
|
|
76
76
|
"Write explicit scope contract, discretion areas, deferred items, error/rescue registry, and D-XX locked decisions.",
|
|
77
77
|
"Produce scope summary, completion dashboard, and exact next-stage handoff before asking final approval."
|
|
78
78
|
],
|
|
@@ -90,7 +90,7 @@ export const SCOPE = {
|
|
|
90
90
|
"Locked Decisions section lists stable LD#hash anchors for non-negotiable boundaries.",
|
|
91
91
|
"Premise challenge findings documented.",
|
|
92
92
|
"Outside Voice findings and dispositions are recorded (accept/reject/defer with rationale) before final approval.",
|
|
93
|
-
`
|
|
93
|
+
`Scope outside-voice loop summary includes a table with columns Iteration, Quality Score, Findings, plus Stop reason, Target score, and Max iterations. This is outside-voice evidence only; it does not satisfy user approval. ${reviewLoopPolicySummary("scope")}`,
|
|
94
94
|
reviewLoopSecondOpinionSummary("scope"),
|
|
95
95
|
"Deferred items list with one-line rationale for each.",
|
|
96
96
|
"When an upside deferred idea is parked, a seed file is created under `.cclaw/seeds/` and referenced in the artifact.",
|
|
@@ -146,17 +146,17 @@ export const SCOPE = {
|
|
|
146
146
|
{ section: "Locked Decisions (LD#hash)", required: false, validationRule: "List of stable locked decisions with unique `LD#<sha8>` anchors. Each anchor is derived from the normalized Decision cell and is referenced downstream for cross-stage traceability." },
|
|
147
147
|
{ section: "Implementation Alternatives", required: false, validationRule: "2-3 options with Name, Summary, Effort, Risk, Pros, Cons, and Reuses. Must include minimal viable and ideal architecture options." },
|
|
148
148
|
{ section: "Scope Mode", required: true, validationRule: "Must state selected mode and rationale with default heuristic justification." },
|
|
149
|
-
{ section: "Mode-Specific Analysis", required: false, validationRule: "Deep/complex scope only: document the analysis matching the selected mode.
|
|
149
|
+
{ section: "Mode-Specific Analysis", required: false, validationRule: "Default path: one selected-mode row with rationale. Deep/complex scope only: document the expanded analysis matching the selected mode." },
|
|
150
150
|
{ section: "In Scope / Out of Scope", required: true, validationRule: "Two separate explicit lists. Canonical form is one `## In Scope / Out of Scope` section with `### In Scope` and `### Out of Scope`; legacy split `## In Scope` and `## Out of Scope` headings are accepted. Out-of-scope must not be empty." },
|
|
151
151
|
{ section: "Discretion Areas", required: false, validationRule: "Explicit list of implementer decision zones, or 'None' if scope is fully locked." },
|
|
152
152
|
{ section: "Deferred Items", required: false, validationRule: "Each item has one-line rationale. If empty, state 'None' explicitly." },
|
|
153
153
|
{ section: "Error & Rescue Registry", required: false, validationRule: "Each scoped capability has: failure mode, detection method, fallback decision." },
|
|
154
154
|
{ section: "Outside Voice Findings", required: false, validationRule: "Must list external/adversarial findings and disposition (accept/reject/defer) with rationale." },
|
|
155
|
-
{ section: "
|
|
155
|
+
{ section: "Scope Outside Voice Loop", required: false, validationRule: `Must record iterations, quality score per iteration, stop reason, and unresolved concerns. Enforce ${reviewLoopPolicySummary("scope")}` },
|
|
156
156
|
{ section: "Completion Dashboard", required: true, validationRule: "Lists per-review-section status, count of critical/open gaps, resolved decisions, and unresolved decisions (or 'None')." },
|
|
157
157
|
{ section: "Scope Summary", required: true, validationRule: "Compact recap of the locked scope. Must name the selected mode using one of the canonical tokens (`SCOPE EXPANSION`, `SELECTIVE EXPANSION`, `HOLD SCOPE`, `SCOPE REDUCTION`) and record the track-aware next-stage handoff (`design` for standard, `spec` for medium); the linter checks structure, not English wording." },
|
|
158
|
-
{ section: "Dream State Mapping", required: false, validationRule: "
|
|
159
|
-
{ section: "Temporal Interrogation", required: false, validationRule: "
|
|
158
|
+
{ section: "Dream State Mapping", required: false, validationRule: "Deep/optional only: CURRENT STATE, THIS PLAN, 12-MONTH IDEAL, and alignment verdict. Omit for compact scope." },
|
|
159
|
+
{ section: "Temporal Interrogation", required: false, validationRule: "Deep/optional only: timeline simulation table with decision pressures and lock-now vs defer verdicts. Omit for compact scope." }
|
|
160
160
|
]
|
|
161
161
|
},
|
|
162
162
|
reviewLens: {
|
|
@@ -36,10 +36,10 @@ export const SPEC = {
|
|
|
36
36
|
},
|
|
37
37
|
executionModel: {
|
|
38
38
|
checklist: [
|
|
39
|
-
"Read upstream —
|
|
39
|
+
"Read upstream — standard track loads design + scope; medium loads brainstorm/spec handoff; quick loads `00-idea.md` plus any reproduction context. Cross-reference only artifacts that exist on the active track.",
|
|
40
40
|
"Define measurable acceptance criteria — each criterion must be observable and falsifiable. No vague adjectives.",
|
|
41
41
|
"Capture edge cases — for each criterion, define at least one boundary condition and one error condition.",
|
|
42
|
-
"Document constraints and assumptions — regulatory, system, integration, and performance boundaries.
|
|
42
|
+
"Document constraints and assumptions — regulatory, system, integration, and performance boundaries. Only non-critical preference/default assumptions may continue; STOP on uncertainty about scope, architecture, security, data loss, public API, migration, auth/pricing, or required user approval.",
|
|
43
43
|
"Surface assumptions before finalization — list each assumption with source/confidence, validation path, and whether it is accepted, rejected, or still open.",
|
|
44
44
|
"Build the Acceptance Mapping contract — for each AC, map upstream design decision, observable evidence, verification method, and likely test level. If any column is unclear, rewrite the criterion.",
|
|
45
45
|
"Present acceptance criteria to the user in 3-5-item batches, pausing for explicit ACK between batches (see Interaction Protocol).",
|
|
@@ -53,7 +53,7 @@ export const SPEC = {
|
|
|
53
53
|
"**Chunk acceptance criteria for review.** When presenting the spec to the user for sign-off, deliver acceptance criteria in batches of 3-5 and **pause for explicit ACK** (via Decision Protocol) before sending the next batch. Do not dump the full criteria wall in one message — small batches surface objections earlier and keep the sign-off meaningful. Full spec writeup still lands in `04-spec.md`, but the conversation itself must be digestible.",
|
|
54
54
|
"Require user confirmation on the written spec. **STOP.** Do NOT proceed to plan until user approves.",
|
|
55
55
|
"For each criterion, ask: what exact evidence proves this passed? If the evidence or verification command/manual step is vague, rewrite.",
|
|
56
|
-
"When encountering ambiguity, classify it before acting: (A) ask user for missing info, (B) enumerate interpretations and pick one with justification, (C) propose hypothesis with validation path. Do NOT silently resolve ambiguity."
|
|
56
|
+
"When encountering ambiguity, classify it before acting: (A) ask user for missing info, (B) enumerate non-critical interpretations and pick one with justification, (C) propose hypothesis with validation path. Do NOT silently resolve ambiguity. STOP on scope, architecture, security, data loss, public API, migration, auth/pricing, or user-approval uncertainty."
|
|
57
57
|
],
|
|
58
58
|
process: [
|
|
59
59
|
"Define measurable acceptance criteria.",
|
|
@@ -75,7 +75,8 @@ export const SPEC = {
|
|
|
75
75
|
"Each acceptance criterion maps to upstream design decision, observable evidence, verification method, and likely test level.",
|
|
76
76
|
"Edge cases documented per criterion.",
|
|
77
77
|
"Assumptions Before Finalization section records source/confidence, validation path, and accepted/rejected/open disposition.",
|
|
78
|
-
"Approval marker captured in artifact."
|
|
78
|
+
"Approval marker captured in artifact.",
|
|
79
|
+
"For quick bug-fix specs, reproduction contract records symptom, repro steps, expected RED test, and acceptance criterion."
|
|
79
80
|
],
|
|
80
81
|
inputs: ["design artifact", "business constraints", "quality requirements"],
|
|
81
82
|
requiredContext: [
|
|
@@ -112,7 +113,8 @@ export const SPEC = {
|
|
|
112
113
|
},
|
|
113
114
|
artifactValidation: [
|
|
114
115
|
{ section: "Upstream Handoff", required: false, validationRule: "Summarizes scope/design decisions, constraints, open questions, and explicit drift before acceptance criteria." },
|
|
115
|
-
{ section: "Acceptance Criteria", required: true, validationRule: "Each criterion is observable, measurable, and falsifiable.
|
|
116
|
+
{ section: "Acceptance Criteria", required: true, validationRule: "Each criterion is observable, measurable, and falsifiable. Standard track should include Requirement Ref and Design Decision Ref columns; quick track may instead link each AC to the reproduction contract or bug slice. AC IDs (AC-1, AC-2…) are stable across revisions — dropped ACs stay with Priority `DROPPED`." },
|
|
117
|
+
{ section: "Quick Reproduction Contract", required: false, validationRule: "Quick bug-fix specs own the reproduction contract: symptom, repro steps, expected RED test behavior, and acceptance criterion." },
|
|
116
118
|
{ section: "Edge Cases", required: true, validationRule: "At least one boundary and one error condition per criterion." },
|
|
117
119
|
{ section: "Constraints and Assumptions", required: false, validationRule: "All implicit assumptions surfaced. Constraints have sources." },
|
|
118
120
|
{ section: "Assumptions Before Finalization", required: true, validationRule: "Each assumption has source/confidence, validation path, and accepted/rejected/open disposition before the Approval section is finalized." },
|
|
@@ -50,7 +50,7 @@ export const TDD = {
|
|
|
50
50
|
"Run verification-before-completion discipline for the slice — capture a fresh test command, commit SHA, and explicit PASS/FAIL status before completion claims.",
|
|
51
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
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.",
|
|
53
|
-
"Annotate traceability — link to plan task ID
|
|
53
|
+
"Annotate traceability — link to the active track's source: plan task ID + spec criterion on standard/medium, or spec acceptance item / bug reproduction slice on quick.",
|
|
54
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).",
|
|
55
55
|
"Repeat for each slice — return to step 1 for the next plan slice."
|
|
56
56
|
],
|
|
@@ -286,7 +286,7 @@ function tddStageVariantForTrack(track) {
|
|
|
286
286
|
if (row.section === "Traceability") {
|
|
287
287
|
return {
|
|
288
288
|
...row,
|
|
289
|
-
validationRule: "
|
|
289
|
+
validationRule: "Spec acceptance item IDs and, for bug fixes, reproduction slice IDs are linked to RED/GREEN evidence. No plan artifact is required on quick."
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
return {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Command contract for /cc — the unified entry point.
|
|
3
|
-
* No args → behaves like /cc-next
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* No args → reads existing flow state and behaves like /cc-next only when a
|
|
4
|
+
* tracked flow already exists; missing state/fresh placeholder state blocks with
|
|
5
|
+
* init/start guidance. With prompt → classifies the idea, selects a track, and
|
|
6
|
+
* starts the first stage of that track (brainstorm for medium/standard, spec for quick).
|
|
6
7
|
*/
|
|
7
8
|
export declare function startCommandContract(): string;
|
|
8
9
|
/**
|
|
@@ -7,9 +7,10 @@ function flowStatePath() {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Command contract for /cc — the unified entry point.
|
|
10
|
-
* No args → behaves like /cc-next
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* No args → reads existing flow state and behaves like /cc-next only when a
|
|
11
|
+
* tracked flow already exists; missing state/fresh placeholder state blocks with
|
|
12
|
+
* init/start guidance. With prompt → classifies the idea, selects a track, and
|
|
13
|
+
* starts the first stage of that track (brainstorm for medium/standard, spec for quick).
|
|
13
14
|
*/
|
|
14
15
|
export function startCommandContract() {
|
|
15
16
|
const flowPath = flowStatePath();
|
|
@@ -19,7 +20,7 @@ export function startCommandContract() {
|
|
|
19
20
|
|
|
20
21
|
**The unified entry point for the cclaw flow.**
|
|
21
22
|
|
|
22
|
-
- \`/cc\` (no arguments) →
|
|
23
|
+
- \`/cc\` (no arguments) → reads existing flow state and resumes/progresses it through \`/cc-next\`. If flow state is missing or still a fresh init placeholder, stop and guide the user to run \`/cc <prompt>\` or \`cclaw init\`; do not silently create a brainstorm run.
|
|
23
24
|
- \`/cc <prompt>\` (with an idea/description) → saves the prompt as idea context and starts the first stage of the resolved track.
|
|
24
25
|
|
|
25
26
|
This is the **recommended way to start** working with cclaw. Use \`/cc-next\` for subsequent stage progression.
|
|
@@ -41,8 +42,8 @@ ${conversationLanguagePolicyMarkdown()}
|
|
|
41
42
|
|---|---|---|
|
|
42
43
|
| **non-software** | legal text / docs / marketing copy / meeting notes / therapy-style conversation | Respond directly, do NOT open a stage, do NOT mutate flow state. |
|
|
43
44
|
| **pure-question** | "how does X work?", "explain Y", "what are the trade-offs of Z?" | Answer directly, do NOT open a stage. |
|
|
44
|
-
| **trivial** | typo, one-liner, rename, config tweak, copy change, version bump with zero behavior change | Fast-path:
|
|
45
|
-
| **software — bug fix with repro** | regression / hotfix / named symptom + repro steps | Fast-path: set track to \`quick\`,
|
|
45
|
+
| **trivial** | typo, one-liner, rename, config tweak, copy change, version bump with zero behavior change | Fast-path: set track to \`quick\`, seed \`00-idea.md\`, and enter \`spec\`. Runtime quick never starts at design. |
|
|
46
|
+
| **software — bug fix with repro** | regression / hotfix / named symptom + repro steps | Fast-path: set track to \`quick\`, enter \`spec\`, and capture a reproduction contract first. TDD later writes the RED reproduction test from that contract. |
|
|
46
47
|
| **software — medium** | additive feature following existing architecture | medium track (\`brainstorm → spec → plan → tdd → review → ship\`). |
|
|
47
48
|
| **software — standard** | feature, refactor, migration, integration, architecture change | Full 8-stage flow starting at \`brainstorm\`. |
|
|
48
49
|
|
|
@@ -92,7 +93,7 @@ ${conversationLanguagePolicyMarkdown()}
|
|
|
92
93
|
12. Load the **first-stage skill for the chosen track** and its command file:
|
|
93
94
|
- quick → \`.cclaw/skills/specification-authoring/SKILL.md\`
|
|
94
95
|
- medium/standard → \`.cclaw/skills/brainstorming/SKILL.md\`
|
|
95
|
-
- trivial fast-path → spec skill per Phase 0 decision.
|
|
96
|
+
- trivial fast-path → quick track spec skill per Phase 0 decision.
|
|
96
97
|
13. Execute that stage with the prompt + Phase 1/Phase 2 + seed context as initial input.
|
|
97
98
|
|
|
98
99
|
### Reclassification on discovery
|
|
@@ -107,8 +108,9 @@ If during any stage the agent discovers evidence that contradicts the initial Ph
|
|
|
107
108
|
### Without prompt (\`/cc\`)
|
|
108
109
|
|
|
109
110
|
1. Read \`${flowPath}\`.
|
|
110
|
-
2. If flow state is missing → run \`cclaw init\`
|
|
111
|
-
3.
|
|
111
|
+
2. If flow state is missing → guide the user to run \`cclaw init\` and stop.
|
|
112
|
+
3. If flow state is only a fresh init placeholder (\`completedStages: []\`, all \`passed\` arrays empty, and no \`00-idea.md\`) → stop and ask for \`/cc <prompt>\` to start a tracked run. Do not create a brainstorm state implicitly.
|
|
113
|
+
4. Otherwise behave exactly like \`/cc-next\`: check current stage gates, resume if incomplete, advance if complete.
|
|
112
114
|
|
|
113
115
|
## Headless mode
|
|
114
116
|
|
|
@@ -116,7 +118,7 @@ When called by another skill or subagent in machine mode, emit exactly one
|
|
|
116
118
|
JSON envelope (no prose) and stop:
|
|
117
119
|
|
|
118
120
|
\`\`\`json
|
|
119
|
-
{"version":"1","kind":"stage-output","stage":"
|
|
121
|
+
{"version":"1","kind":"stage-output","stage":"<currentStage>","payload":{"command":"/cc","track":"<track>","action":"start_or_resume"},"emittedAt":"<ISO-8601>"}
|
|
120
122
|
\`\`\`
|
|
121
123
|
|
|
122
124
|
Validate envelopes with:
|
|
@@ -147,7 +149,7 @@ description: "Unified entry point for the cclaw flow. No args = resume/next. Wit
|
|
|
147
149
|
|
|
148
150
|
\`/cc\` is the **starting command** for cclaw. It intelligently routes:
|
|
149
151
|
|
|
150
|
-
- **No arguments** → acts as \`/cc-next\`
|
|
152
|
+
- **No arguments** → acts as \`/cc-next\` only for an existing tracked flow; missing/fresh placeholder state blocks with start guidance
|
|
151
153
|
- **With a prompt** → classifies the task, picks a track (quick/medium/standard), and starts the **first stage of that track** (not always brainstorm — e.g. the \`quick\` track starts at \`spec\`)
|
|
152
154
|
|
|
153
155
|
## HARD-GATE
|
|
@@ -159,7 +161,7 @@ ${conversationLanguagePolicyMarkdown()}
|
|
|
159
161
|
|
|
160
162
|
### Path A: \`/cc <prompt>\`
|
|
161
163
|
|
|
162
|
-
1. **Task classification (Phase 0).** Decide whether the prompt is \`software-standard\`, \`software-trivial\`, \`software-bugfix\`, \`pure-question\`, or \`non-software\`. Non-software and pure-question exit immediately — answer directly, do not open a stage.
|
|
164
|
+
1. **Task classification (Phase 0).** Decide whether the prompt is \`software-standard\`, \`software-trivial\`, \`software-bugfix\`, \`pure-question\`, or \`non-software\`. Non-software and pure-question exit immediately — answer directly, do not open a stage. Bugfixes with a clear repro still start on quick \`spec\`: capture the reproduction contract first, then TDD writes the RED reproduction test from that contract.
|
|
163
165
|
2. **Seed shelf recall (Phase 0.5).** Scan \`${RUNTIME_ROOT}/seeds/SEED-*.md\` and match \`trigger_when\` tokens against the prompt text. Surface up to 3 matching seeds with file/title/action and ask whether to apply or ignore. When applied, add them to \`00-idea.md\` under \`Discovered context\`.
|
|
164
166
|
3. **Origin-document discovery (Phase 1).** Scan for \`docs/prd/**\`, \`docs/rfcs/**\`, \`docs/adr/**\`, \`docs/design/**\`, \`specs/**\`, root-level \`PRD.md\` / \`SPEC.md\` / \`DESIGN.md\` / \`REQUIREMENTS.md\`. Summarize any hits in \`00-idea.md\` under \`Discovered context\`. Surface conflicts with the prompt before routing.
|
|
165
167
|
4. **Stack detection (Phase 2).** Inspect \`package.json\` engines, \`pyproject.toml\`, \`go.mod\`, \`Cargo.toml\`, \`pom.xml\`, \`build.gradle*\`, \`Dockerfile\`, \`docker-compose*.yml\`, and CI configs. Record stack + versions on the \`Stack:\` line. Do not invent stack details.
|
|
@@ -191,13 +193,15 @@ If mid-stage evidence contradicts the initial Class/Track decision (the "trivial
|
|
|
191
193
|
|
|
192
194
|
### Path B: \`/cc\` (no arguments)
|
|
193
195
|
|
|
194
|
-
Delegate
|
|
196
|
+
Delegate to \`/cc-next\` behavior only when a tracked flow exists:
|
|
195
197
|
|
|
196
198
|
1. Read \`${flowPath}\`.
|
|
197
|
-
2.
|
|
198
|
-
3. If
|
|
199
|
-
4.
|
|
200
|
-
5. If
|
|
199
|
+
2. If missing, guide the user to run \`cclaw init\` and stop.
|
|
200
|
+
3. If it is only a fresh init placeholder (\`completedStages: []\`, no passed gates, and no \`${RUNTIME_ROOT}/artifacts/00-idea.md\`), stop and ask for \`/cc <prompt>\` to start a tracked run. Do not silently create a brainstorm run.
|
|
201
|
+
4. Check gates for \`currentStage\`.
|
|
202
|
+
5. If incomplete → load current stage skill and execute.
|
|
203
|
+
6. If complete → advance to next stage and execute.
|
|
204
|
+
7. If flow is done → report completion.
|
|
201
205
|
|
|
202
206
|
## When to use \`/cc\` vs \`/cc-next\`
|
|
203
207
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const ARTIFACT_TEMPLATES: Record<string, string>;
|
|
2
2
|
export declare const RULEBOOK_MARKDOWN = "# Cclaw Rulebook\n\n## MUST_ALWAYS\n- Follow flow order: brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship\n- Require explicit user confirmation after plan before TDD\n- Keep evidence artifacts in `.cclaw/artifacts/`\n- Enforce RED before GREEN in TDD\n- Run two-layer review (spec_compliance and code_quality) before ship\n- Validate all inputs before processing \u2014 never trust external data without sanitization\n- Prefer immutable data patterns and pure functions where the language supports them\n- Follow existing repo conventions, patterns, and directory structure \u2014 match the codebase\n- Verify claims with fresh evidence: \"tests pass\" requires running tests in this message\n- Use conventional commits: `type(scope): description` (feat, fix, refactor, test, docs, chore)\n\n## MUST_NEVER\n- Skip RED phase and jump directly to GREEN in TDD\n- Ship with critical review findings\n- Start implementation during /brainstorm\n- Modify generated cclaw files manually when CLI can regenerate them\n- Commit `.cclaw/` or generated shim files\n- Expose secrets, tokens, API keys, or absolute system paths in agent output\n- Duplicate existing functionality without explicit justification \u2014 search before building\n- Bypass security checks, linting hooks, or type checking to \"move faster\"\n- Claim success (\"Done,\" \"All good,\" \"Tests pass\") without running verification in this message\n- Make changes outside the blast radius of the current task without user consent\n\n## DELEGATION\nWhen a task requires specialist knowledge (security audit, performance profiling, database review),\ndelegate to a specialized agent or skill if the harness supports it. The primary agent should:\n1. Identify the specialist domain\n2. Provide focused context (relevant files, the specific concern)\n3. Evaluate the specialist output before acting on it \u2014 do not blindly apply recommendations\n";
|
|
3
|
-
export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc-next`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick
|
|
3
|
+
export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc-next`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick track) |\n| bugfix with repro | `/cc <idea>` and enforce RED-first in tdd |\n| pure question / non-software | direct answer (no stage flow) |\n\n## Command Surface\n\n- `/cc` = entry and resume.\n- `/cc-next` = only progression path.\n- Knowledge capture and recall use the `learnings` skill when requested.\n\n## Verification Discipline\n\n- No completion claim without fresh command evidence in this turn.\n- Do not mark gates passed from memory.\n- Keep evidence in `.cclaw/artifacts/`; archive via `npx cclaw-cli archive`.\n\n## Delegation And Approvals\n\n- Machine-only checks in design/plan/tdd/review/ship should auto-dispatch when tooling supports it.\n- Ask for user input only at explicit approval gates (scope mode, plan approval, challenge resolution, ship finalization).\n- If harness capabilities are partial, record waiver reasons in delegation logs.\n\n## Routing Source Of Truth\n\n- Primary router: `.cclaw/skills/using-cclaw/SKILL.md`.\n- Stage behavior: current stage skill plus `.cclaw/state/flow-state.json`.\n- Preamble budget: keep role/status announcements brief and avoid repeating\n them unless the stage or role changes.\n";
|
|
4
4
|
export declare function buildRulesJson(): Record<string, unknown>;
|
|
@@ -143,6 +143,7 @@ ${SEED_SHELF_SECTION}
|
|
|
143
143
|
| Reversibility cost? | | |
|
|
144
144
|
|
|
145
145
|
## Dream State Mapping
|
|
146
|
+
- Deep/optional only; omit for compact scope.
|
|
146
147
|
- CURRENT STATE:
|
|
147
148
|
- THIS PLAN:
|
|
148
149
|
- 12-MONTH IDEAL:
|
|
@@ -156,6 +157,7 @@ ${SEED_SHELF_SECTION}
|
|
|
156
157
|
| C (optional) | | | | | | |
|
|
157
158
|
|
|
158
159
|
## Temporal Interrogation
|
|
160
|
+
- Deep/optional only; omit for compact scope.
|
|
159
161
|
| Time slice | Likely decision pressure | Lock now or defer? | Reason |
|
|
160
162
|
|---|---|---|---|
|
|
161
163
|
| HOUR 1 (foundations) | | | |
|
|
@@ -170,12 +172,11 @@ ${SEED_SHELF_SECTION}
|
|
|
170
172
|
- [ ] SCOPE REDUCTION — strip to the smallest useful wedge when risk/blast radius is too high.
|
|
171
173
|
|
|
172
174
|
## Mode-Specific Analysis
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- (SCOPE REDUCTION: ruthless cuts, follow-up split)
|
|
175
|
+
| Selected mode | Rationale | Depth |
|
|
176
|
+
|---|---|---|
|
|
177
|
+
| | | default / deep |
|
|
178
|
+
|
|
179
|
+
> Default path: one selected-mode row plus rationale. Deep/high-risk scope may expand below with mode-specific analysis.
|
|
179
180
|
|
|
180
181
|
## Requirements (stable IDs)
|
|
181
182
|
| ID | Requirement (observable outcome) | Priority | Source (origin doc / prompt line) |
|
|
@@ -224,7 +225,7 @@ ${SEED_SHELF_SECTION}
|
|
|
224
225
|
|---|---|---|---|---|
|
|
225
226
|
| F-1 | premise_fit | | accept/reject/defer | |
|
|
226
227
|
|
|
227
|
-
##
|
|
228
|
+
## Scope Outside Voice Loop
|
|
228
229
|
| Iteration | Quality Score | Findings | Stop decision |
|
|
229
230
|
|---|---|---|---|
|
|
230
231
|
| 1 | 0.00 | 0 | continue/stop |
|
|
@@ -288,8 +289,13 @@ ${SEED_SHELF_SECTION}
|
|
|
288
289
|
|
|
289
290
|
# Design Artifact
|
|
290
291
|
|
|
292
|
+
## Compact-First Scaffold
|
|
293
|
+
- Default to the compact design spine unless risk requires Standard/Deep add-ons.
|
|
294
|
+
- Compact required spine: Codebase Investigation, Architecture Boundaries, Architecture Diagram, Data Flow, Failure Mode Table, Test Strategy, and Completion Dashboard.
|
|
295
|
+
- Mark optional Standard/Deep sections as \`Omitted - compact design\` when they do not apply; do not expand the scaffold just to fill empty tables.
|
|
296
|
+
|
|
291
297
|
## Upstream Handoff
|
|
292
|
-
- Source artifacts: \`02-scope-<slug>.md\`, \`02a-research.md\` when present
|
|
298
|
+
- Source artifacts: \`02-scope-<slug>.md\`, \`02a-research.md\` only when present for deep/high-risk research
|
|
293
299
|
- Decisions carried forward:
|
|
294
300
|
- Constraints carried forward:
|
|
295
301
|
- Open questions:
|
|
@@ -308,12 +314,11 @@ ${SEED_SHELF_SECTION}
|
|
|
308
314
|
| Layer 3 | | |
|
|
309
315
|
|
|
310
316
|
## Research Fleet Synthesis
|
|
311
|
-
| Lens | Key findings | Design impact | Evidence |
|
|
317
|
+
| Lens actually run | Key findings | Design impact | Evidence |
|
|
312
318
|
|---|---|---|---|
|
|
313
|
-
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
| pitfalls-researcher | | | |
|
|
319
|
+
| compact inline synthesis | | | |
|
|
320
|
+
|
|
321
|
+
> Default path: compact inline synthesis here. Deep/high-risk work may also write \`.cclaw/artifacts/02a-research.md\`.
|
|
317
322
|
|
|
318
323
|
## Architecture Boundaries
|
|
319
324
|
| Component | Responsibility | Requirement Refs (R#) | Decision Refs (LD#hash) | Owner |
|
|
@@ -329,12 +334,14 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
329
334
|
${MARKDOWN_CODE_FENCE}
|
|
330
335
|
|
|
331
336
|
## Data-Flow Shadow Paths
|
|
337
|
+
- Standard/Deep add-on; omit when compact design does not need a shadow path.
|
|
332
338
|
<!-- diagram: data-flow-shadow-paths -->
|
|
333
339
|
| Path | Trigger | Fallback/Degrade behavior |
|
|
334
340
|
|---|---|---|
|
|
335
341
|
| | | |
|
|
336
342
|
|
|
337
343
|
## Error Flow Diagram
|
|
344
|
+
- Standard/Deep add-on; omit when the Failure Mode Table is sufficient.
|
|
338
345
|
|
|
339
346
|
<!-- diagram: error-flow -->
|
|
340
347
|
|
|
@@ -343,6 +350,7 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
343
350
|
${MARKDOWN_CODE_FENCE}
|
|
344
351
|
|
|
345
352
|
## State Machine Diagram
|
|
353
|
+
- Deep add-on; omit for compact design.
|
|
346
354
|
|
|
347
355
|
<!-- diagram: state-machine -->
|
|
348
356
|
|
|
@@ -351,6 +359,7 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
351
359
|
${MARKDOWN_CODE_FENCE}
|
|
352
360
|
|
|
353
361
|
## Rollback Flowchart
|
|
362
|
+
- Deep add-on; omit for compact design.
|
|
354
363
|
|
|
355
364
|
<!-- diagram: rollback-flowchart -->
|
|
356
365
|
|
|
@@ -359,6 +368,7 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
359
368
|
${MARKDOWN_CODE_FENCE}
|
|
360
369
|
|
|
361
370
|
## Deployment Sequence Diagram
|
|
371
|
+
- Deep add-on; omit for compact design.
|
|
362
372
|
|
|
363
373
|
<!-- diagram: deployment-sequence -->
|
|
364
374
|
|
|
@@ -426,7 +436,7 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
426
436
|
|---|---|---|---|---|
|
|
427
437
|
| F-1 | architecture_fit | | accept/reject/defer | |
|
|
428
438
|
|
|
429
|
-
##
|
|
439
|
+
## Design Outside Voice Loop
|
|
430
440
|
| Iteration | Quality Score | Findings | Stop decision |
|
|
431
441
|
|---|---|---|---|
|
|
432
442
|
| 1 | 0.00 | 0 | continue/stop |
|
|
@@ -439,6 +449,7 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
439
449
|
-
|
|
440
450
|
|
|
441
451
|
## Parallelization Strategy
|
|
452
|
+
- Standard/Deep add-on when multi-module; omit for compact sequential work.
|
|
442
453
|
- Parallel lanes:
|
|
443
454
|
- Conflict risks:
|
|
444
455
|
|
|
@@ -448,11 +459,13 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
448
459
|
| | | |
|
|
449
460
|
|
|
450
461
|
## Interface Contracts
|
|
462
|
+
- Standard/Deep add-on when module boundaries or APIs change; omit for compact local changes.
|
|
451
463
|
| Module | Produces | Consumes |
|
|
452
464
|
|---|---|---|
|
|
453
465
|
| | | |
|
|
454
466
|
|
|
455
467
|
## Unresolved Decisions
|
|
468
|
+
- Standard/Deep add-on; use \`None\` for compact design with no unresolved decisions.
|
|
456
469
|
| Decision | Missing info | Owner | Default |
|
|
457
470
|
|---|---|---|---|
|
|
458
471
|
| | | | |
|
|
@@ -481,7 +494,7 @@ ${SEED_SHELF_SECTION}
|
|
|
481
494
|
# Specification Artifact
|
|
482
495
|
|
|
483
496
|
## Upstream Handoff
|
|
484
|
-
- Source artifacts: \`02-scope-<slug>.md
|
|
497
|
+
- Source artifacts: standard uses \`02-scope-<slug>.md\` + \`03-design-<slug>.md\`; medium uses \`01-brainstorm-<slug>.md\` when present; quick uses \`00-idea.md\` plus reproduction context.
|
|
485
498
|
- Decisions carried forward:
|
|
486
499
|
- Constraints carried forward:
|
|
487
500
|
- Open questions:
|
|
@@ -492,9 +505,14 @@ ${SEED_SHELF_SECTION}
|
|
|
492
505
|
|---|---|---|---|
|
|
493
506
|
| AC-1 | R1 | | |
|
|
494
507
|
|
|
495
|
-
>
|
|
496
|
-
|
|
497
|
-
|
|
508
|
+
> Standard ACs reference at least one \`R#\` from \`02-scope.md\`. Quick-track ACs may instead put \`Quick Reproduction Contract\` / bug-slice refs in the Requirement Ref column and \`N/A\` for Design Decision Ref. ACs are stable (never renumber): dropped ACs stay with Priority \`DROPPED\`; new ones append with the next free \`AC-#\`.
|
|
509
|
+
|
|
510
|
+
## Quick Reproduction Contract
|
|
511
|
+
> Required for quick bug-fix specs; use \`N/A\` for non-bugfix or standard/medium tracks. TDD turns this contract into the RED reproduction test.
|
|
512
|
+
|
|
513
|
+
| Bug slice | Symptom | Repro steps | Expected RED test behavior | Linked acceptance criterion |
|
|
514
|
+
|---|---|---|---|---|
|
|
515
|
+
| QS-1 | | | | AC-1 |
|
|
498
516
|
|
|
499
517
|
## Edge Cases
|
|
500
518
|
| Criterion ID | Boundary case | Error case |
|
|
@@ -627,7 +645,7 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
627
645
|
# TDD Artifact
|
|
628
646
|
|
|
629
647
|
## Upstream Handoff
|
|
630
|
-
- Source artifacts: \`04-spec.md
|
|
648
|
+
- Source artifacts: \`04-spec.md\`; \`05-plan.md\` when present. Quick track uses spec acceptance items / bug reproduction slices instead of nonexistent plan tasks.
|
|
631
649
|
- Decisions carried forward:
|
|
632
650
|
- Constraints carried forward:
|
|
633
651
|
- Open questions:
|
|
@@ -654,9 +672,11 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
654
672
|
| S-1 | | | |
|
|
655
673
|
|
|
656
674
|
## Acceptance Mapping
|
|
657
|
-
| Slice | Plan task ID | Spec criterion ID |
|
|
675
|
+
| Slice | Plan task ID or quick source | Spec criterion ID |
|
|
658
676
|
|---|---|---|
|
|
659
|
-
| S-1 | T-1 | AC-1 |
|
|
677
|
+
| S-1 | T-1 / QS-1 | AC-1 |
|
|
678
|
+
|
|
679
|
+
> On quick track, map to the \`Quick Reproduction Contract\` bug slice or spec acceptance item. Do not invent a plan task just to satisfy this table.
|
|
660
680
|
|
|
661
681
|
## Failure Analysis
|
|
662
682
|
| Slice | Expected missing behavior | Actual failure reason |
|
|
@@ -709,7 +729,7 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
709
729
|
# Review Artifact
|
|
710
730
|
|
|
711
731
|
## Upstream Handoff
|
|
712
|
-
- Source artifacts: \`04-spec.md\`, \`
|
|
732
|
+
- Source artifacts: \`04-spec.md\`, \`06-tdd.md\`; \`05-plan.md\` only when present. Quick track reviews spec acceptance items / bug reproduction slices without requiring plan-task coverage.
|
|
713
733
|
- Decisions carried forward:
|
|
714
734
|
- Constraints carried forward:
|
|
715
735
|
- Open questions:
|
|
@@ -723,7 +743,7 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
723
743
|
## Layer 2 Findings
|
|
724
744
|
| ID | Severity | Category | Description | Status |
|
|
725
745
|
|---|---|---|---|---|
|
|
726
|
-
| R-1 | Critical/Important/Suggestion | correctness/security/performance/architecture | | open/resolved |
|
|
746
|
+
| R-1 | Critical/Important/Suggestion | correctness/security/performance/architecture/external-safety | | open/resolved |
|
|
727
747
|
- NO_CHANGE_ATTESTATION: <required when Category=security has no entries; explain why no security-relevant changes were detected>
|
|
728
748
|
|
|
729
749
|
## Incoming Feedback Queue
|
|
@@ -746,15 +766,15 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
746
766
|
|
|
747
767
|
## Completeness Snapshot
|
|
748
768
|
- AC coverage: <N>/<M> (<percent>%)
|
|
749
|
-
- Task coverage (tasks backed by ≥1 test slice): <N>/<M>
|
|
750
|
-
- Slice coverage (slices linked to ≥1 AC): <N>/<M>
|
|
769
|
+
- Task coverage (tasks backed by ≥1 test slice): <N>/<M> or \`N/A - quick track has no plan artifact\`
|
|
770
|
+
- Slice coverage (slices linked to ≥1 AC or bug reproduction slice): <N>/<M>
|
|
751
771
|
- Adversarial review: not triggered | pass | fail
|
|
752
772
|
- Overall: complete | concerns | blocked
|
|
753
773
|
|
|
754
774
|
## Trace Matrix Check
|
|
755
|
-
- Command: \`cclaw internal trace-matrix\`
|
|
775
|
+
- Command: \`cclaw internal trace-matrix\` when plan artifacts exist or the active track enforces it; quick track may record direct AC/reproduction-slice coverage instead.
|
|
756
776
|
- Orphaned criteria: 0
|
|
757
|
-
- Orphaned tasks: 0
|
|
777
|
+
- Orphaned tasks: 0 or \`N/A - quick track\`
|
|
758
778
|
- Orphaned tests: 0
|
|
759
779
|
- Evidence ref:
|
|
760
780
|
|
|
@@ -955,7 +975,7 @@ Track-specific skips are allowed only when \`flow-state.track\` + \`skippedStage
|
|
|
955
975
|
| Class | Route |
|
|
956
976
|
|---|---|
|
|
957
977
|
| non-trivial software work | \`/cc <idea>\` |
|
|
958
|
-
| trivial software fix | \`/cc <idea>\` (quick
|
|
978
|
+
| trivial software fix | \`/cc <idea>\` (quick track) |
|
|
959
979
|
| bugfix with repro | \`/cc <idea>\` and enforce RED-first in tdd |
|
|
960
980
|
| pure question / non-software | direct answer (no stage flow) |
|
|
961
981
|
|
|
@@ -37,9 +37,11 @@ ${conversationLanguagePolicyMarkdown()}
|
|
|
37
37
|
For machine orchestration, emit one JSON envelope:
|
|
38
38
|
|
|
39
39
|
\`\`\`json
|
|
40
|
-
{"version":"1","kind":"stage-output","stage":"non-flow","payload":{"command":"/cc-view","subcommand":"status","summary":"<short>"},"emittedAt":"<ISO-8601>"}
|
|
40
|
+
{"version":"1","kind":"stage-output","stage":"non-flow","payload":{"command":"/cc-view <status|tree|diff>","subcommand":"<status|tree|diff>","summary":"<short>"},"emittedAt":"<ISO-8601>"}
|
|
41
41
|
\`\`\`
|
|
42
42
|
|
|
43
|
+
Use the parsed/defaulted subcommand in both \`payload.command\` and \`payload.subcommand\`; do not collapse \`tree\` or \`diff\` responses to \`status\`.
|
|
44
|
+
|
|
43
45
|
Validate envelopes with:
|
|
44
46
|
\`cclaw internal envelope-validate --stdin\`
|
|
45
47
|
|