cclaw-cli 0.48.29 → 0.48.30

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.
@@ -2,153 +2,163 @@
2
2
  // PLAN
3
3
  // ---------------------------------------------------------------------------
4
4
  export const PLAN = {
5
+ schemaShape: "v2",
5
6
  stage: "plan",
7
+ complexityTier: "standard",
6
8
  skillFolder: "planning-and-task-breakdown",
7
9
  skillName: "planning-and-task-breakdown",
8
10
  skillDescription: "Execution planning stage with strict confirmation gate before implementation.",
9
- hardGate: "Do NOT write code or tests. Planning only. This stage produces a task graph and execution order. WAIT_FOR_CONFIRM before any handoff to implementation.",
10
- ironLaw: "EVERY TASK IS 2–5 MINUTES, FULLY SPELLED OUT, AND CARRIES A STABLE ID NO PLACEHOLDERS, NO ‘ETC.’.",
11
- purpose: "Create small executable tasks with dependencies and pause for explicit user confirmation.",
12
- whenToUse: [
13
- "After spec approval",
14
- "Before writing tests or implementation",
15
- "When delivery path and dependency order are needed"
16
- ],
17
- whenNotToUse: [
18
- "Specification is unapproved or lacks measurable acceptance criteria",
19
- "Execution is already in TDD stage with active slice evidence",
20
- "The request is only release packaging with no task decomposition needed"
21
- ],
22
- checklist: [
23
- "Read upstream — load spec, design, and scope artifacts. Cross-reference acceptance criteria.",
24
- "Build dependency graph identify task ordering, parallel opportunities, and blocking dependencies.",
25
- "Group tasks into dependency batches — batch N+1 cannot start until batch N has verification evidence.",
26
- "Slice into vertical tasks — each task targets 2-5 minutes, produces one testable outcome, and touches one coherent area.",
27
- "Attach verification every task has an acceptance criterion mapping and a concrete verification command.",
28
- "Annotate slice-review metadata if `.cclaw/config.yaml::sliceReview.enabled` is true, every task row additionally carries `touchCount` (rough number of files expected to change) and `touchPaths` (glob hints, e.g. `migrations/**`, `src/auth/**`). A task may set `highRisk: true` to force a review pass regardless of thresholds. These fields feed the TDD stage's Per-Slice Review checkpoint; when `sliceReview` is disabled they are optional.",
29
- "Map scope Locked Decisions — every D-XX from scope is referenced by at least one plan task (or explicitly marked deferred with reason).",
30
- "Run anti-placeholder + anti-scope-reduction scans — block `TODO/TBD/...` and phrasing like `v1`, `for now`, `later` for locked boundaries.",
31
- "Define checkpoints mark points where progress should be validated before continuing.",
32
- "WAIT_FOR_CONFIRM write plan artifact and explicitly pause. **STOP.** Do NOT proceed until user confirms. Then close the stage with `node .cclaw/hooks/stage-complete.mjs plan` and tell user to run `/cc-next`."
33
- ],
34
- interactionProtocol: [
35
- "Plan in read-only mode relative to implementation.",
36
- "Split work into small vertical slices (target 2-5 minute tasks).",
37
- "Publish explicit dependency batches with entry and exit checks for each batch.",
38
- "Attach verification step to every task.",
39
- "Preserve locked scope boundaries: no silent scope reduction language in task rows.",
40
- "Enforce WAIT_FOR_CONFIRM: present the plan summary with options (A) Approve / (B) Revise / (C) Reject.",
41
- "**STOP.** Do NOT proceed until user explicitly approves.",
42
- "**STOP BEFORE ADVANCE.** Mandatory delegation `planner` must be marked completed or explicitly waived in `.cclaw/state/delegation-log.json`. Then close the stage via `node .cclaw/hooks/stage-complete.mjs plan` and tell the user to run `/cc-next`."
43
- ],
44
- process: [
45
- "Build dependency graph and ordered slices.",
46
- "Group slices into execution batches and define gate criteria per batch.",
47
- "Define each task with acceptance mapping and verification commands.",
48
- "Trace every locked decision (D-XX) to plan tasks or explicit defer rationale.",
49
- "Record checkpoints and blockers.",
50
- "Write plan artifact and pause at WAIT_FOR_CONFIRM."
51
- ],
52
- requiredGates: [
53
- { id: "plan_tasks_sliced_2_5_min", description: "Tasks are small, executable slices." },
54
- { id: "plan_dependency_batches_defined", description: "Tasks are grouped into executable batches with gate checks." },
55
- { id: "plan_acceptance_mapped", description: "Each task maps to a spec acceptance criterion." },
56
- { id: "plan_wait_for_confirm", description: "Execution blocked until explicit user confirmation." }
57
- ],
58
- requiredEvidence: [
59
- "Artifact written to `.cclaw/artifacts/05-plan.md`.",
60
- "Task list includes acceptance mapping.",
61
- "Locked decision coverage table present with D-XX trace links.",
62
- "Dependency graph documented.",
63
- "Dependency batches documented with batch-by-batch verification gates.",
64
- "WAIT_FOR_CONFIRM status recorded."
65
- ],
66
- inputs: ["approved spec", "codebase context", "delivery constraints"],
67
- requiredContext: [
68
- "spec acceptance criteria",
69
- "current architecture",
70
- "known technical debt and dependencies"
71
- ],
72
- outputs: ["task graph", "dependency batch plan", "ordered plan", "explicit confirmation checkpoint"],
73
- blockers: [
74
- "tasks too broad",
75
- "dependency uncertainty unresolved",
76
- "batch boundaries are unclear",
77
- "locked decisions from scope are not mapped to tasks",
78
- "no explicit confirmation"
79
- ],
80
- exitCriteria: [
81
- "plan quality gates complete",
82
- "WAIT_FOR_CONFIRM present and unresolved until user approves",
83
- "artifact ready for TDD execution",
84
- "acceptance mapping complete"
85
- ],
86
- commonRationalizations: [
87
- "Horizontal decomposition without end-to-end slices",
88
- "Tasks without verification steps",
89
- "Starting execution before approval",
90
- "Tasks that touch multiple unrelated areas",
91
- "Using placeholder tokens or scope-reduction phrases (`v1`, `for now`, `later`) in task definitions",
92
- "No dependency graph",
93
- "No WAIT_FOR_CONFIRM marker",
94
- "No explicit dependency batches",
95
- "Tasks exceed one coherent outcome",
96
- "No acceptance mapping",
97
- "Locked decisions are missing or not mapped",
98
- "Scope-reduction language appears without explicit approved defer decision"
99
- ],
100
- artifactFile: "05-plan.md",
101
- next: "tdd",
102
- reviewSections: [
103
- {
104
- title: "Task Decomposition Audit",
105
- evaluationPoints: [
106
- "Does every task target a single coherent area (vertical slice)?",
107
- "Can each task be completed in 2-5 minutes?",
108
- "Does every task have an acceptance criterion link and verification command?",
109
- "Are there tasks that touch multiple unrelated areas?",
110
- "Would a new engineer understand and start each task within two minutes?"
111
- ],
112
- stopGate: true
113
- },
114
- {
115
- title: "Batch Completeness Audit",
116
- evaluationPoints: [
117
- "Does every task belong to exactly one batch?",
118
- "Does each batch have a verification gate?",
119
- "Are batch dependencies explicit and acyclic?",
120
- "Is the acceptance mapping complete — every spec criterion covered?",
121
- "Are there hidden dependencies between tasks in different batches?"
122
- ],
123
- stopGate: true
11
+ philosophy: {
12
+ hardGate: "Do NOT write code or tests. Planning only. This stage produces a task graph and execution order. WAIT_FOR_CONFIRM before any handoff to implementation.",
13
+ ironLaw: "EVERY TASK IS 2–5 MINUTES, FULLY SPELLED OUT, AND CARRIES A STABLE ID — NO PLACEHOLDERS, NO ‘ETC.’.",
14
+ purpose: "Create small executable tasks with dependencies and pause for explicit user confirmation.",
15
+ whenToUse: [
16
+ "After spec approval",
17
+ "Before writing tests or implementation",
18
+ "When delivery path and dependency order are needed"
19
+ ],
20
+ whenNotToUse: [
21
+ "Specification is unapproved or lacks measurable acceptance criteria",
22
+ "Execution is already in TDD stage with active slice evidence",
23
+ "The request is only release packaging with no task decomposition needed"
24
+ ],
25
+ commonRationalizations: [
26
+ "Horizontal decomposition without end-to-end slices",
27
+ "Tasks without verification steps",
28
+ "Starting execution before approval",
29
+ "Tasks that touch multiple unrelated areas",
30
+ "Using placeholder tokens or scope-reduction phrases (`v1`, `for now`, `later`) in task definitions",
31
+ "No dependency graph",
32
+ "No WAIT_FOR_CONFIRM marker",
33
+ "No explicit dependency batches",
34
+ "Tasks exceed one coherent outcome",
35
+ "No acceptance mapping",
36
+ "Locked decisions are missing or not mapped",
37
+ "Scope-reduction language appears without explicit approved defer decision"
38
+ ]
39
+ },
40
+ executionModel: {
41
+ checklist: [
42
+ "Read upstream load spec, design, and scope artifacts. Cross-reference acceptance criteria.",
43
+ "Build dependency graph identify task ordering, parallel opportunities, and blocking dependencies.",
44
+ "Group tasks into dependency batches batch N+1 cannot start until batch N has verification evidence.",
45
+ "Slice into vertical tasks — each task targets 2-5 minutes, produces one testable outcome, and touches one coherent area.",
46
+ "Attach verification — every task has an acceptance criterion mapping and a concrete verification command.",
47
+ "Annotate slice-review metadata — if `.cclaw/config.yaml::sliceReview.enabled` is true, every task row additionally carries `touchCount` (rough number of files expected to change) and `touchPaths` (glob hints, e.g. `migrations/**`, `src/auth/**`). A task may set `highRisk: true` to force a review pass regardless of thresholds. These fields feed the TDD stage's Per-Slice Review checkpoint; when `sliceReview` is disabled they are optional.",
48
+ "Map scope Locked Decisions every D-XX from scope is referenced by at least one plan task (or explicitly marked deferred with reason).",
49
+ "Run anti-placeholder + anti-scope-reduction scans block `TODO/TBD/...` and phrasing like `v1`, `for now`, `later` for locked boundaries.",
50
+ "Define checkpoints mark points where progress should be validated before continuing.",
51
+ "WAIT_FOR_CONFIRM write plan artifact and explicitly pause. **STOP.** Do NOT proceed until user confirms. Then close the stage with `node .cclaw/hooks/stage-complete.mjs plan` and tell user to run `/cc-next`."
52
+ ],
53
+ interactionProtocol: [
54
+ "Plan in read-only mode relative to implementation.",
55
+ "Split work into small vertical slices (target 2-5 minute tasks).",
56
+ "Publish explicit dependency batches with entry and exit checks for each batch.",
57
+ "Attach verification step to every task.",
58
+ "Preserve locked scope boundaries: no silent scope reduction language in task rows.",
59
+ "Enforce WAIT_FOR_CONFIRM: present the plan summary with options (A) Approve / (B) Revise / (C) Reject.",
60
+ "**STOP.** Do NOT proceed until user explicitly approves.",
61
+ "**STOP BEFORE ADVANCE.** Mandatory delegation `planner` must be marked completed or explicitly waived in `.cclaw/state/delegation-log.json`. Then close the stage via `node .cclaw/hooks/stage-complete.mjs plan` and tell the user to run `/cc-next`."
62
+ ],
63
+ process: [
64
+ "Build dependency graph and ordered slices.",
65
+ "Group slices into execution batches and define gate criteria per batch.",
66
+ "Define each task with acceptance mapping and verification commands.",
67
+ "Trace every locked decision (D-XX) to plan tasks or explicit defer rationale.",
68
+ "Record checkpoints and blockers.",
69
+ "Write plan artifact and pause at WAIT_FOR_CONFIRM."
70
+ ],
71
+ requiredGates: [
72
+ { id: "plan_tasks_sliced_2_5_min", description: "Tasks are small, executable slices." },
73
+ { id: "plan_dependency_batches_defined", description: "Tasks are grouped into executable batches with gate checks." },
74
+ { id: "plan_acceptance_mapped", description: "Each task maps to a spec acceptance criterion." },
75
+ { id: "plan_wait_for_confirm", description: "Execution blocked until explicit user confirmation." }
76
+ ],
77
+ requiredEvidence: [
78
+ "Artifact written to `.cclaw/artifacts/05-plan.md`.",
79
+ "Task list includes acceptance mapping.",
80
+ "Locked decision coverage table present with D-XX trace links.",
81
+ "Dependency graph documented.",
82
+ "Dependency batches documented with batch-by-batch verification gates.",
83
+ "WAIT_FOR_CONFIRM status recorded."
84
+ ],
85
+ inputs: ["approved spec", "codebase context", "delivery constraints"],
86
+ requiredContext: [
87
+ "spec acceptance criteria",
88
+ "current architecture",
89
+ "known technical debt and dependencies"
90
+ ],
91
+ blockers: [
92
+ "tasks too broad",
93
+ "dependency uncertainty unresolved",
94
+ "batch boundaries are unclear",
95
+ "locked decisions from scope are not mapped to tasks",
96
+ "no explicit confirmation"
97
+ ],
98
+ exitCriteria: [
99
+ "plan quality gates complete",
100
+ "WAIT_FOR_CONFIRM present and unresolved until user approves",
101
+ "artifact ready for TDD execution",
102
+ "acceptance mapping complete"
103
+ ]
104
+ },
105
+ artifactRules: {
106
+ artifactFile: "05-plan.md",
107
+ completionStatus: ["DONE", "DONE_WITH_CONCERNS", "BLOCKED"],
108
+ crossStageTrace: {
109
+ readsFrom: [".cclaw/artifacts/04-spec.md", ".cclaw/artifacts/03-design-<slug>.md", ".cclaw/artifacts/02-scope-<slug>.md"],
110
+ writesTo: [".cclaw/artifacts/05-plan.md"],
111
+ traceabilityRule: "Every task must trace to a spec acceptance criterion. Every locked scope decision (D-XX) must trace to at least one plan task or explicit defer rationale. Every downstream RED test must trace to a plan task."
124
112
  },
125
- {
126
- title: "Five-Minute Budget + No-Placeholders Audit",
127
- evaluationPoints: [
128
- "Does every task carry an explicit minutes estimate (e.g. `[~3m]`) and does every estimate fit the 2-to-5-minute budget? Estimates >5 minutes must be split.",
129
- "Are all file paths, test commands, and verification commands copy-pasteable as written no `TODO`, `TBD`, `FIXME`, `<fill-in>`, `<your-*-here>`, `xxx`, or ellipsis standing in for omitted args?",
130
- "Does every acceptance-criterion reference resolve to a real R# / AC-### in the spec (not a blank link)?",
131
- "If an estimate is genuinely uncertain (first-time integration, unfamiliar library), is the uncertainty named explicitly and scheduled as a spike task in batch 0, rather than hidden behind a large estimate?"
132
- ],
133
- stopGate: true
134
- }
135
- ],
136
- completionStatus: ["DONE", "DONE_WITH_CONCERNS", "BLOCKED"],
137
- crossStageTrace: {
138
- readsFrom: [".cclaw/artifacts/04-spec.md", ".cclaw/artifacts/03-design-<slug>.md", ".cclaw/artifacts/02-scope-<slug>.md"],
139
- writesTo: [".cclaw/artifacts/05-plan.md"],
140
- traceabilityRule: "Every task must trace to a spec acceptance criterion. Every locked scope decision (D-XX) must trace to at least one plan task or explicit defer rationale. Every downstream RED test must trace to a plan task."
113
+ artifactValidation: [
114
+ { section: "Dependency Graph", required: false, validationRule: "Ordering and parallel opportunities explicit. No circular dependencies." },
115
+ { section: "Dependency Batches", required: true, validationRule: "Every task belongs to a batch. Each batch has an exit gate and dependency statement." },
116
+ { section: "Task List", required: true, validationRule: "Each task row includes ID, description, acceptance criterion, verification command, and effort estimate (S/M/L). Every task must also carry a minutes estimate within the 2-5 minute budget. When the sliceReview feature is enabled in the cclaw config, each task row additionally declares touchCount, touchPaths, and an optional highRisk flag so the TDD stage can decide whether a Per-Slice Review pass is required." },
117
+ { section: "Acceptance Mapping", required: true, validationRule: "Every spec criterion is covered by at least one task." },
118
+ { section: "Locked Decision Coverage", required: false, validationRule: "Every locked decision ID (D-XX) from scope is listed with linked task IDs or explicit defer rationale." },
119
+ { section: "Risk Assessment", required: false, validationRule: "If present: per-task or per-batch risk identification with likelihood, impact, and mitigation strategy." },
120
+ { section: "Boundary Map", required: false, validationRule: "If present: per-batch or per-task interface contracts listing what each task produces (exports) and consumes (imports) from other tasks." },
121
+ { section: "WAIT_FOR_CONFIRM", required: true, validationRule: "Explicit marker present. Status: pending until user approves." },
122
+ { section: "No-Placeholder Scan", required: false, validationRule: "Confirmation that a text scan for `TODO`, `TBD`, `FIXME`, `<fill-in>`, `<your-*-here>`, `xxx`, or bare ellipses has zero hits in the task list. A placeholder is a deferred decision masquerading as a plan." },
123
+ { section: "No Scope Reduction Language Scan", required: false, validationRule: "Confirmation that scope-reduction phrases (`v1`, `for now`, `later`, `temporary`, `placeholder`) are absent from task rows when locked decisions exist." }
124
+ ]
125
+ },
126
+ reviewLens: {
127
+ outputs: ["task graph", "dependency batch plan", "ordered plan", "explicit confirmation checkpoint"],
128
+ reviewSections: [
129
+ {
130
+ title: "Task Decomposition Audit",
131
+ evaluationPoints: [
132
+ "Does every task target a single coherent area (vertical slice)?",
133
+ "Can each task be completed in 2-5 minutes?",
134
+ "Does every task have an acceptance criterion link and verification command?",
135
+ "Are there tasks that touch multiple unrelated areas?",
136
+ "Would a new engineer understand and start each task within two minutes?"
137
+ ],
138
+ stopGate: true
139
+ },
140
+ {
141
+ title: "Batch Completeness Audit",
142
+ evaluationPoints: [
143
+ "Does every task belong to exactly one batch?",
144
+ "Does each batch have a verification gate?",
145
+ "Are batch dependencies explicit and acyclic?",
146
+ "Is the acceptance mapping complete — every spec criterion covered?",
147
+ "Are there hidden dependencies between tasks in different batches?"
148
+ ],
149
+ stopGate: true
150
+ },
151
+ {
152
+ title: "Five-Minute Budget + No-Placeholders Audit",
153
+ evaluationPoints: [
154
+ "Does every task carry an explicit minutes estimate (e.g. `[~3m]`) and does every estimate fit the 2-to-5-minute budget? Estimates >5 minutes must be split.",
155
+ "Are all file paths, test commands, and verification commands copy-pasteable as written — no `TODO`, `TBD`, `FIXME`, `<fill-in>`, `<your-*-here>`, `xxx`, or ellipsis standing in for omitted args?",
156
+ "Does every acceptance-criterion reference resolve to a real R# / AC-### in the spec (not a blank link)?",
157
+ "If an estimate is genuinely uncertain (first-time integration, unfamiliar library), is the uncertainty named explicitly and scheduled as a spike task in batch 0, rather than hidden behind a large estimate?"
158
+ ],
159
+ stopGate: true
160
+ }
161
+ ]
141
162
  },
142
- artifactValidation: [
143
- { section: "Dependency Graph", required: false, validationRule: "Ordering and parallel opportunities explicit. No circular dependencies." },
144
- { section: "Dependency Batches", required: true, validationRule: "Every task belongs to a batch. Each batch has an exit gate and dependency statement." },
145
- { section: "Task List", required: true, validationRule: "Each task row includes ID, description, acceptance criterion, verification command, and effort estimate (S/M/L). Every task must also carry a minutes estimate within the 2-5 minute budget. When the sliceReview feature is enabled in the cclaw config, each task row additionally declares touchCount, touchPaths, and an optional highRisk flag so the TDD stage can decide whether a Per-Slice Review pass is required." },
146
- { section: "Acceptance Mapping", required: true, validationRule: "Every spec criterion is covered by at least one task." },
147
- { section: "Locked Decision Coverage", required: false, validationRule: "Every locked decision ID (D-XX) from scope is listed with linked task IDs or explicit defer rationale." },
148
- { section: "Risk Assessment", required: false, validationRule: "If present: per-task or per-batch risk identification with likelihood, impact, and mitigation strategy." },
149
- { section: "Boundary Map", required: false, validationRule: "If present: per-batch or per-task interface contracts listing what each task produces (exports) and consumes (imports) from other tasks." },
150
- { section: "WAIT_FOR_CONFIRM", required: true, validationRule: "Explicit marker present. Status: pending until user approves." },
151
- { section: "No-Placeholder Scan", required: false, validationRule: "Confirmation that a text scan for `TODO`, `TBD`, `FIXME`, `<fill-in>`, `<your-*-here>`, `xxx`, or bare ellipses has zero hits in the task list. A placeholder is a deferred decision masquerading as a plan." },
152
- { section: "No Scope Reduction Language Scan", required: false, validationRule: "Confirmation that scope-reduction phrases (`v1`, `for now`, `later`, `temporary`, `placeholder`) are absent from task rows when locked decisions exist." }
153
- ]
163
+ next: "tdd",
154
164
  };