cclaw-cli 0.15.0 → 0.15.1
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/content/stage-schema.d.ts +2 -92
- package/dist/content/stage-schema.js +7 -1341
- package/dist/content/stages/brainstorm.d.ts +2 -0
- package/dist/content/stages/brainstorm.js +136 -0
- package/dist/content/stages/design.d.ts +2 -0
- package/dist/content/stages/design.js +215 -0
- package/dist/content/stages/index.d.ts +8 -0
- package/dist/content/stages/index.js +11 -0
- package/dist/content/stages/plan.d.ts +2 -0
- package/dist/content/stages/plan.js +146 -0
- package/dist/content/stages/review.d.ts +2 -0
- package/dist/content/stages/review.js +197 -0
- package/dist/content/stages/schema-types.d.ts +94 -0
- package/dist/content/stages/schema-types.js +1 -0
- package/dist/content/stages/scope.d.ts +2 -0
- package/dist/content/stages/scope.js +188 -0
- package/dist/content/stages/ship.d.ts +2 -0
- package/dist/content/stages/ship.js +142 -0
- package/dist/content/stages/spec.d.ts +2 -0
- package/dist/content/stages/spec.js +136 -0
- package/dist/content/stages/tdd.d.ts +2 -0
- package/dist/content/stages/tdd.js +184 -0
- package/package.json +1 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// REVIEW — reference: superpowers code-review + gstack /review
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
export const REVIEW = {
|
|
5
|
+
stage: "review",
|
|
6
|
+
skillFolder: "two-layer-review",
|
|
7
|
+
skillName: "two-layer-review",
|
|
8
|
+
skillDescription: "Two-layer review stage: spec compliance first, then code quality and production readiness. Section-by-section with severity discipline.",
|
|
9
|
+
hardGate: "Do NOT ship, merge, or release until both review layers complete with an explicit verdict. No exceptions for urgency. Critical blockers MUST be resolved before handoff.",
|
|
10
|
+
ironLaw: "NO SHIP VERDICT UNTIL BOTH REVIEW LAYERS COMPLETE AND EVERY CRITICAL IS RESOLVED OR EXPLICITLY ACCEPTED.",
|
|
11
|
+
purpose: "Validate that implementation matches spec and meets quality/security/performance bar through structured two-layer review.",
|
|
12
|
+
whenToUse: [
|
|
13
|
+
"After TDD stage completes",
|
|
14
|
+
"Before any ship action",
|
|
15
|
+
"When release risk must be assessed explicitly"
|
|
16
|
+
],
|
|
17
|
+
whenNotToUse: [
|
|
18
|
+
"There is no implementation diff to review",
|
|
19
|
+
"TDD stage evidence is missing or stale",
|
|
20
|
+
"The goal is direct release execution without layered quality checks"
|
|
21
|
+
],
|
|
22
|
+
checklist: [
|
|
23
|
+
"Diff Scope — Run `git diff` against base branch. If no diff, exit early with APPROVED (no changes to review). Scope the review to changed files unless blast-radius analysis requires wider inspection.",
|
|
24
|
+
"Change-Size Check — ~100 lines = normal. ~300 lines = consider splitting. ~1000+ lines = strongly recommend stacked PRs. Flag large diffs to the user.",
|
|
25
|
+
"Adversarial Trigger Check — compute changed-line count (`git diff --shortstat <base>..HEAD`), files-touched count, and whether trust boundaries changed (auth/secrets/external inputs/permissions). If `lines > 100` OR `files > 10` OR `trust boundary changed`, **dispatch a SECOND reviewer agent with the `adversarial-review` skill loaded** and reconcile its findings into the review army (treat the conditional dispatch as mandatory whenever the trigger holds; record the trigger that fired in the dashboard).",
|
|
26
|
+
"Load upstream evidence — read TDD artifact (RED + GREEN + REFACTOR), spec, and plan. Verify evidence chain is unbroken.",
|
|
27
|
+
"Layer 1: Spec Compliance — check every acceptance criterion against implementation. Verdict: pass/fail per criterion.",
|
|
28
|
+
"Layer 2a: Correctness — logic errors, race conditions, boundary violations, null handling.",
|
|
29
|
+
"Layer 2b: Security — input validation, auth boundaries, secrets exposure, injection vectors. **Mandatory:** also load and execute the `.cclaw/skills/security-audit/SKILL.md` utility skill (proactive pattern sweep across diff + touched modules, not just the diff itself) and merge findings into the review army. The Layer 2 security pass is not complete until the audit sweep records a finding count (0 acceptable) with file:line evidence for every Critical.",
|
|
30
|
+
"Layer 2c: Performance — N+1 queries, memory leaks, missing caching, hot paths.",
|
|
31
|
+
"Layer 2d: Architecture Fit — does the implementation match the locked design? Coupling, cohesion, interface contracts.",
|
|
32
|
+
"Layer 2e: External Safety — SQL safety, concurrency, secrets in logs, enum completeness (grep outside diff), LLM trust boundaries.",
|
|
33
|
+
"Review Army reconciliation — normalize findings into structured records, dedup by fingerprint, and mark multi-specialist confirmations.",
|
|
34
|
+
"Meta-Review — Were tests actually run? Do test names match what they test? Are there real assertions?",
|
|
35
|
+
"Classify findings — Critical (blocks ship), Important (should fix), Suggestion (optional improvement).",
|
|
36
|
+
"Produce verdict — APPROVED, APPROVED_WITH_CONCERNS, or BLOCKED."
|
|
37
|
+
],
|
|
38
|
+
interactionProtocol: [
|
|
39
|
+
"Run Layer 1 (spec compliance) completely before starting Layer 2.",
|
|
40
|
+
"In each review section, present findings ONE AT A TIME. Do NOT batch.",
|
|
41
|
+
"Classify every finding as Critical, Important, or Suggestion.",
|
|
42
|
+
"For each Critical finding: use the Decision Protocol — present resolution options (A/B/C) with trade-offs, and mark one as (recommended). Do NOT use a numeric Completeness rubric; recommend the option that fully closes the finding with no carry-over risk and the smallest blast radius. If AskQuestion/AskUserQuestion is available, send exactly ONE question per call, validate fields against runtime schema, and on schema error immediately fall back to plain-text question instead of retrying guessed payloads.",
|
|
43
|
+
"Resolve all critical blockers before ship.",
|
|
44
|
+
"For final verdict: use AskQuestion/AskUserQuestion only if runtime schema is confirmed; otherwise collect verdict with a plain-text single-choice prompt (APPROVED / APPROVED_WITH_CONCERNS / BLOCKED).",
|
|
45
|
+
"**STOP.** Do NOT proceed to ship until the user provides an explicit verdict."
|
|
46
|
+
],
|
|
47
|
+
process: [
|
|
48
|
+
"Layer 1: check acceptance criteria and requirement coverage.",
|
|
49
|
+
"Layer 2a: check correctness — logic, races, boundaries, null handling.",
|
|
50
|
+
"Layer 2b: check security — validation, auth, secrets, injection.",
|
|
51
|
+
"Layer 2c: check performance — queries, memory, caching, hot paths.",
|
|
52
|
+
"Layer 2d: check architecture fit — design compliance, coupling, interfaces.",
|
|
53
|
+
"Reconcile multi-agent findings into `.cclaw/artifacts/07-review-army.json` (dedup + confidence + conflict notes).",
|
|
54
|
+
"Classify and prioritize all findings.",
|
|
55
|
+
"Write review report artifact with explicit verdict."
|
|
56
|
+
],
|
|
57
|
+
requiredGates: [
|
|
58
|
+
{ id: "review_layer1_spec_compliance", description: "Spec compliance check completed with per-criterion verdict." },
|
|
59
|
+
{ id: "review_layer2_correctness", description: "Correctness review completed." },
|
|
60
|
+
{ id: "review_layer2_security", description: "Security review completed." },
|
|
61
|
+
{ id: "review_layer2_performance", description: "Performance review completed." },
|
|
62
|
+
{ id: "review_layer2_architecture", description: "Architecture fit review completed." },
|
|
63
|
+
{ id: "review_severity_classified", description: "All findings are severity-tagged." },
|
|
64
|
+
{ id: "review_criticals_resolved", description: "No unresolved critical blockers remain." },
|
|
65
|
+
{ id: "review_army_json_valid", description: "07-review-army.json passes schema validation (validateReviewArmy)." },
|
|
66
|
+
{ id: "review_completeness_scored", description: "Completeness score is computed and recorded (AC coverage, task coverage, slice coverage, adversarial pass)." },
|
|
67
|
+
{ id: "review_security_audit_swept", description: "The security-audit utility skill was run against the diff scope and the modules it touches. Finding count (0 if clean) recorded in the review army with file:line evidence for every Critical." }
|
|
68
|
+
],
|
|
69
|
+
requiredEvidence: [
|
|
70
|
+
"Artifact written to `.cclaw/artifacts/07-review.md`.",
|
|
71
|
+
"Artifact written to `.cclaw/artifacts/07-review-army.json`.",
|
|
72
|
+
"Layer 1 verdict captured with per-criterion pass/fail.",
|
|
73
|
+
"Layer 2 sections completed with findings.",
|
|
74
|
+
"Severity log includes critical/important/suggestion buckets.",
|
|
75
|
+
"Explicit final verdict: APPROVED, APPROVED_WITH_CONCERNS, or BLOCKED."
|
|
76
|
+
],
|
|
77
|
+
inputs: ["implementation diff", "spec and plan artifacts", "test/build evidence"],
|
|
78
|
+
requiredContext: ["spec criteria", "tdd artifact", "rulebook constraints"],
|
|
79
|
+
outputs: ["review verdict", "severity-indexed findings", "reconciled review-army findings", "ship readiness decision"],
|
|
80
|
+
blockers: [
|
|
81
|
+
"layer 1 failed",
|
|
82
|
+
"critical findings unresolved",
|
|
83
|
+
"missing regression evidence"
|
|
84
|
+
],
|
|
85
|
+
exitCriteria: [
|
|
86
|
+
"both layers completed",
|
|
87
|
+
"all review sections evaluated",
|
|
88
|
+
"critical blockers resolved",
|
|
89
|
+
"ship readiness explicitly stated"
|
|
90
|
+
],
|
|
91
|
+
antiPatterns: [
|
|
92
|
+
"Single generic review without layered structure",
|
|
93
|
+
"No severity classification",
|
|
94
|
+
"Shipping with open criticals",
|
|
95
|
+
"Batching multiple findings into one report without individual resolution",
|
|
96
|
+
"Skipping Layer 2 sections because Layer 1 passed"
|
|
97
|
+
],
|
|
98
|
+
redFlags: [
|
|
99
|
+
"No separate Layer 1/Layer 2 outcomes",
|
|
100
|
+
"No structured review-army reconciliation artifact",
|
|
101
|
+
"No critical bucket",
|
|
102
|
+
"No explicit ready/not-ready verdict",
|
|
103
|
+
"Review sections skipped or abbreviated",
|
|
104
|
+
"Findings not classified by severity"
|
|
105
|
+
],
|
|
106
|
+
policyNeedles: ["Layer 1", "Layer 2", "Critical", "Review Army", "Ready to Ship", "One issue at a time"],
|
|
107
|
+
artifactFile: "07-review.md",
|
|
108
|
+
next: "ship",
|
|
109
|
+
reviewSections: [
|
|
110
|
+
{
|
|
111
|
+
title: "Layer 1: Spec Compliance",
|
|
112
|
+
evaluationPoints: [
|
|
113
|
+
"For each acceptance criterion: does the implementation satisfy it?",
|
|
114
|
+
"Are there spec requirements with no corresponding implementation?",
|
|
115
|
+
"Are there implementations with no corresponding spec requirement (scope creep)?",
|
|
116
|
+
"Is every edge case from the spec handled?"
|
|
117
|
+
],
|
|
118
|
+
stopGate: true
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
title: "Layer 2a: Correctness",
|
|
122
|
+
evaluationPoints: [
|
|
123
|
+
"Logic errors and boundary violations",
|
|
124
|
+
"Race conditions and concurrency issues",
|
|
125
|
+
"Null/undefined handling",
|
|
126
|
+
"Error propagation and recovery paths"
|
|
127
|
+
],
|
|
128
|
+
stopGate: true
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
title: "Layer 2b: Security",
|
|
132
|
+
evaluationPoints: [
|
|
133
|
+
"Input validation completeness",
|
|
134
|
+
"Authorization boundary enforcement",
|
|
135
|
+
"Secrets exposure risk",
|
|
136
|
+
"Injection vector assessment"
|
|
137
|
+
],
|
|
138
|
+
stopGate: true
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
title: "Layer 2c: Performance",
|
|
142
|
+
evaluationPoints: [
|
|
143
|
+
"N+1 query patterns",
|
|
144
|
+
"Memory leak potential",
|
|
145
|
+
"Missing caching opportunities",
|
|
146
|
+
"Hot path complexity analysis"
|
|
147
|
+
],
|
|
148
|
+
stopGate: true
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
title: "Layer 2d: Architecture Fit",
|
|
152
|
+
evaluationPoints: [
|
|
153
|
+
"Does implementation match the locked design?",
|
|
154
|
+
"Coupling and cohesion assessment",
|
|
155
|
+
"Interface contract compliance",
|
|
156
|
+
"Unintended architectural drift"
|
|
157
|
+
],
|
|
158
|
+
stopGate: true
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
title: "Layer 2e: External Safety Checklist",
|
|
162
|
+
evaluationPoints: [
|
|
163
|
+
"SQL/database: parameterized queries, no raw string interpolation, migration safety",
|
|
164
|
+
"Concurrency: race conditions in shared state, lock ordering, timeout handling",
|
|
165
|
+
"Secrets: no hardcoded tokens, no secrets in logs, env vars for sensitive config",
|
|
166
|
+
"Enum/constant completeness: grep for sibling values OUTSIDE the diff — are all cases handled?",
|
|
167
|
+
"Trust boundaries: if LLM/AI output is used, is it validated before acting on it?"
|
|
168
|
+
],
|
|
169
|
+
stopGate: true
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
title: "Meta-Review: Verify the Verification",
|
|
173
|
+
evaluationPoints: [
|
|
174
|
+
"Were tests actually run (not just assumed to pass)?",
|
|
175
|
+
"Do the test names match what they actually test?",
|
|
176
|
+
"Is there test coverage for the specific changes in this diff?",
|
|
177
|
+
"Are there assertions, or do tests just run without checking results?"
|
|
178
|
+
],
|
|
179
|
+
stopGate: false
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
completionStatus: ["APPROVED", "APPROVED_WITH_CONCERNS", "BLOCKED"],
|
|
183
|
+
crossStageTrace: {
|
|
184
|
+
readsFrom: [".cclaw/artifacts/06-tdd.md", ".cclaw/artifacts/04-spec.md", ".cclaw/artifacts/05-plan.md"],
|
|
185
|
+
writesTo: [".cclaw/artifacts/07-review.md", ".cclaw/artifacts/07-review-army.json"],
|
|
186
|
+
traceabilityRule: "Review verdict must reference specific spec criteria and TDD evidence. Downstream ship stage must reference review verdict."
|
|
187
|
+
},
|
|
188
|
+
artifactValidation: [
|
|
189
|
+
{ section: "Layer 1 Verdict", required: true, validationRule: "Per-criterion pass/fail with references." },
|
|
190
|
+
{ section: "Layer 2 Findings", required: true, validationRule: "Each finding has severity, description, and resolution status." },
|
|
191
|
+
{ section: "Review Army Contract", required: true, validationRule: "Structured findings include id/severity/confidence/fingerprint/reportedBy/status with dedup reconciliation summary." },
|
|
192
|
+
{ section: "Review Readiness Dashboard", required: true, validationRule: "Includes a per-pass table (Layer 1 / Layer 2 / Adversarial / Schema) with a 'Completed at' column, a Delegation log snapshot block (path .cclaw/state/delegation-log.json with required/completed/waived/pending), a Staleness signal block (commit at last review pass and current commit), and a Headline with open critical blockers + ship recommendation. At minimum, the section text must contain the substrings 'Completed at', 'delegation-log.json', 'commit at last review pass', and 'Ship recommendation'." },
|
|
193
|
+
{ section: "Completeness Score", required: true, validationRule: "Records AC coverage, task coverage, test-slice coverage, and adversarial-review pass status as numeric or boolean values. At minimum, a line like 'AC coverage: N/M' or 'AC coverage: 100%'." },
|
|
194
|
+
{ section: "Severity Summary", required: true, validationRule: "Per-severity count lines for critical, important, and suggestion buckets." },
|
|
195
|
+
{ section: "Final Verdict", required: true, validationRule: "Exactly one of: APPROVED, APPROVED_WITH_CONCERNS, BLOCKED." }
|
|
196
|
+
]
|
|
197
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { FlowStage } from "../../types.js";
|
|
2
|
+
export interface StageGate {
|
|
3
|
+
id: string;
|
|
4
|
+
description: string;
|
|
5
|
+
tier?: "required" | "recommended" | "conditional";
|
|
6
|
+
/** Used when tier=conditional. Predicate syntax mirrors conditional delegation rules. */
|
|
7
|
+
condition?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ReviewSection {
|
|
10
|
+
title: string;
|
|
11
|
+
evaluationPoints: string[];
|
|
12
|
+
stopGate: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface CrossStageTrace {
|
|
15
|
+
readsFrom: string[];
|
|
16
|
+
writesTo: string[];
|
|
17
|
+
traceabilityRule: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ArtifactValidation {
|
|
20
|
+
section: string;
|
|
21
|
+
required: boolean;
|
|
22
|
+
tier?: "required" | "recommended" | "conditional";
|
|
23
|
+
/** Optional predicate for conditional validations. */
|
|
24
|
+
condition?: string;
|
|
25
|
+
validationRule: string;
|
|
26
|
+
}
|
|
27
|
+
export interface StageAutoSubagentDispatch {
|
|
28
|
+
agent: "planner" | "reviewer" | "security-reviewer" | "test-author" | "doc-updater";
|
|
29
|
+
/**
|
|
30
|
+
* - `mandatory` — must be dispatched (or explicitly waived) before stage transition.
|
|
31
|
+
* - `proactive` — should be dispatched automatically when context matches `when`.
|
|
32
|
+
* - `conditional` — dispatched only when `condition` evaluates true at runtime; counted as
|
|
33
|
+
* mandatory **only when the condition holds**.
|
|
34
|
+
*/
|
|
35
|
+
mode: "mandatory" | "proactive" | "conditional";
|
|
36
|
+
when: string;
|
|
37
|
+
purpose: string;
|
|
38
|
+
requiresUserGate: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Optional machine-friendly trigger expression for `conditional` rows.
|
|
41
|
+
* Supported predicates: `diff_lines_gt:<N>`, `files_touched_gt:<N>`,
|
|
42
|
+
* `trust_boundary_changed`, `release_blast_radius_high`.
|
|
43
|
+
* Multiple predicates joined by `||` mean ANY trigger satisfies the condition.
|
|
44
|
+
*/
|
|
45
|
+
condition?: string;
|
|
46
|
+
/** Optional skill folder the dispatched agent should load as additional context. */
|
|
47
|
+
skill?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface StageSchema {
|
|
50
|
+
stage: FlowStage;
|
|
51
|
+
skillFolder: string;
|
|
52
|
+
skillName: string;
|
|
53
|
+
skillDescription: string;
|
|
54
|
+
hardGate: string;
|
|
55
|
+
/**
|
|
56
|
+
* One-line "Iron Law" punchcard — the single rule that, if broken,
|
|
57
|
+
* invalidates the stage outright. Rendered in ALL-CAPS wrapped in
|
|
58
|
+
* <EXTREMELY-IMPORTANT> XML markers at the very top of the skill body.
|
|
59
|
+
* Reference: Superpowers (obra) "NO PRODUCTION CODE WITHOUT A FAILING
|
|
60
|
+
* TEST FIRST".
|
|
61
|
+
*/
|
|
62
|
+
ironLaw: string;
|
|
63
|
+
purpose: string;
|
|
64
|
+
whenToUse: string[];
|
|
65
|
+
whenNotToUse: string[];
|
|
66
|
+
interactionProtocol: string[];
|
|
67
|
+
process: string[];
|
|
68
|
+
requiredGates: StageGate[];
|
|
69
|
+
requiredEvidence: string[];
|
|
70
|
+
inputs: string[];
|
|
71
|
+
requiredContext: string[];
|
|
72
|
+
/** In-thread research procedures for this stage (`.cclaw/skills/research/*.md`). */
|
|
73
|
+
researchPlaybooks?: string[];
|
|
74
|
+
outputs: string[];
|
|
75
|
+
blockers: string[];
|
|
76
|
+
exitCriteria: string[];
|
|
77
|
+
antiPatterns: string[];
|
|
78
|
+
redFlags: string[];
|
|
79
|
+
policyNeedles: string[];
|
|
80
|
+
artifactFile: string;
|
|
81
|
+
next: FlowStage | "done";
|
|
82
|
+
checklist: string[];
|
|
83
|
+
reviewSections: ReviewSection[];
|
|
84
|
+
completionStatus: string[];
|
|
85
|
+
crossStageTrace: CrossStageTrace;
|
|
86
|
+
artifactValidation: ArtifactValidation[];
|
|
87
|
+
/** When true, stage skill includes wave auto-execute guidance (tdd). */
|
|
88
|
+
waveExecutionAllowed?: boolean;
|
|
89
|
+
/** Sections that remain required even when the trivial-change escape hatch is active (design only). */
|
|
90
|
+
trivialOverrideSections?: string[];
|
|
91
|
+
/** Agent names that MUST be dispatched (or waived) before stage transition — derived from mandatory auto-subagent rows. */
|
|
92
|
+
mandatoryDelegations: string[];
|
|
93
|
+
}
|
|
94
|
+
export type StageSchemaInput = Omit<StageSchema, "mandatoryDelegations">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// SCOPE — reference: gstack CEO review
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
export const SCOPE = {
|
|
5
|
+
stage: "scope",
|
|
6
|
+
skillFolder: "scope-shaping",
|
|
7
|
+
skillName: "scope-shaping",
|
|
8
|
+
skillDescription: "Strategic scope stage. Challenge premise and lock explicit in-scope/out-of-scope boundaries using CEO-level thinking.",
|
|
9
|
+
hardGate: "Do NOT begin architecture, design, or code. This stage produces scope decisions only. Do not silently add or remove scope — every change is an explicit user opt-in.",
|
|
10
|
+
ironLaw: "EVERY SCOPE CHANGE IS AN EXPLICIT USER OPT-IN — NEVER A SILENT ENLARGEMENT OR TRIM.",
|
|
11
|
+
purpose: "Decide the right scope before technical lock-in using explicit mode selection and rigorous premise challenge.",
|
|
12
|
+
whenToUse: [
|
|
13
|
+
"After brainstorm approval",
|
|
14
|
+
"Before architecture/design lock-in",
|
|
15
|
+
"When ambition vs feasibility trade-off is unclear"
|
|
16
|
+
],
|
|
17
|
+
whenNotToUse: [
|
|
18
|
+
"Brainstorm has not been approved yet",
|
|
19
|
+
"Scope boundaries are already locked and user requested no scope changes",
|
|
20
|
+
"The work is a pure implementation or debugging pass within existing scope"
|
|
21
|
+
],
|
|
22
|
+
checklist: [
|
|
23
|
+
"**Assess complexity** — Read the brainstorm artifact. If project is simple (single component, clear architecture, personal/prototype), run light-touch scope: mode selection, 3-5 key in/out boundaries, deferred items. Skip Dream State Mapping and Temporal Interrogation. If project is complex (multi-component, team delivery, production), run the full checklist.",
|
|
24
|
+
"**Prime Directives** — Zero silent failures. For each in-scope capability, name concrete failure modes, the exact error surface, and trace all four data-flow paths (happy, nil, empty, upstream error). Include interaction edge cases (double-click, navigate-away, stale state), observability commitments, and explicit deferred-item logging.",
|
|
25
|
+
"**Premise Challenge** — Is this the right problem? What if we do nothing? What are we optimizing for?",
|
|
26
|
+
"**Existing Code Leverage** — Search for existing solutions before deciding to build new.",
|
|
27
|
+
"**Dream State Mapping** — (complex projects only) describe the ideal state 12 months out using `CURRENT STATE -> THIS PLAN -> 12-MONTH IDEAL`, then verify this scope moves toward that target.",
|
|
28
|
+
"**Implementation Alternatives** — Produce 2-3 distinct approaches. For each: Name, Summary, Effort (S/M/L/XL), Risk (Low/Med/High), 2-3 Pros, 2-3 Cons, and explicit Reuses. One option must be minimal viable, one must be ideal architecture.",
|
|
29
|
+
"**Temporal Interrogation** — (complex projects only) simulate implementation timeline: HOUR 1 foundations, HOUR 2-3 core logic, HOUR 4-5 integration surprises, HOUR 6+ polish/tests. Decide what must be locked now vs safely deferred.",
|
|
30
|
+
"**Mode Selection** — Present expand/selective/hold/reduce with recommendation and default heuristic: greenfield -> expand, feature enhancement -> selective, bugfix/hotfix/refactor -> hold, broad blast radius (>15 files or multi-team impact) -> reduce.",
|
|
31
|
+
"**Mode-Specific Analysis** — After mode is selected, run the matching analysis: EXPAND (10x and delight opportunities), SELECTIVE (hold-scope rigor then cherry-picked expansions), HOLD (minimum-change-set hardening), REDUCE (ruthless cuts and follow-up split).",
|
|
32
|
+
"**Error and Rescue Registry** — For each capability: what breaks, how detected, what fallback."
|
|
33
|
+
],
|
|
34
|
+
interactionProtocol: [
|
|
35
|
+
"For scope mode selection: use the Decision Protocol — present expand/selective/hold/reduce as labeled options with trade-offs and mark one as (recommended). Do NOT use a numeric Completeness rubric; recommend the option that best covers the prime-directive failure modes, four data-flow paths, observability, and deferred handling for the in-scope set with the smallest blast radius. Base your recommendation on default heuristics: greenfield -> expand, enhancement -> selective, bugfix/hotfix/refactor -> hold, broad blast radius -> reduce. If AskQuestion/AskUserQuestion is available, send exactly ONE question per call, validate fields against runtime schema, and on schema error immediately fall back to plain-text question instead of retrying guessed payloads.",
|
|
36
|
+
"Walk through the scope checklist interactively. Each checklist item that surfaces a decision should be presented to the user as a question, not as a monologue. Do not dump all items at once.",
|
|
37
|
+
"Challenge premise and verify the problem framing before anything else.",
|
|
38
|
+
"Take a position on every scope decision. Avoid hedging phrases like 'this could work' or 'there are many ways'; state your recommendation and one concrete condition that would change it.",
|
|
39
|
+
"Use pushback patterns when framing is weak: vague scope -> force a specific user/problem, platform vision -> force a narrowest viable wedge, social proof -> demand behavioral evidence.",
|
|
40
|
+
"Present one structural scope issue at a time for decision. Do NOT batch. Use structured options for each scope boundary question.",
|
|
41
|
+
"Record explicit in-scope and out-of-scope contract.",
|
|
42
|
+
"Once the user accepts or rejects a recommendation, commit fully. Do not re-argue.",
|
|
43
|
+
"Produce a clean scope summary after all issues are resolved.",
|
|
44
|
+
"**STOP.** Wait for explicit user approval of scope contract before advancing to design."
|
|
45
|
+
],
|
|
46
|
+
process: [
|
|
47
|
+
"Run premise challenge and existing-solution leverage check.",
|
|
48
|
+
"Produce 2-3 scope alternatives in a structured format (Name, Summary, Effort, Risk, Pros, Cons, Reuses) with minimum viable and ideal architecture options included.",
|
|
49
|
+
"Choose scope mode with user approval.",
|
|
50
|
+
"Run mode-specific analysis that matches the selected scope mode.",
|
|
51
|
+
"Walk through scope review sections one at a time.",
|
|
52
|
+
"Write explicit scope contract, discretion areas, and deferred items.",
|
|
53
|
+
"Produce scope summary plus completion dashboard (checklist findings, number of resolved decisions, unresolved items or `None`)."
|
|
54
|
+
],
|
|
55
|
+
requiredGates: [
|
|
56
|
+
{ id: "scope_premise_challenged", description: "Problem framing and assumptions were challenged." },
|
|
57
|
+
{ id: "scope_alternatives_produced", description: "At least 2 implementation alternatives were evaluated with explicit effort/risk and reuse fields." },
|
|
58
|
+
{ id: "scope_mode_selected", description: "One scope mode was explicitly selected." },
|
|
59
|
+
{ id: "scope_contract_written", description: "In-scope/out-of-scope contract is documented." },
|
|
60
|
+
{ id: "scope_discretion_documented", description: "Discretion areas are documented (or explicitly marked as none)." },
|
|
61
|
+
{ id: "scope_user_approved", description: "User approved the final scope direction." }
|
|
62
|
+
],
|
|
63
|
+
requiredEvidence: [
|
|
64
|
+
"Artifact written to `.cclaw/artifacts/02-scope.md`.",
|
|
65
|
+
"In-scope and out-of-scope lists are explicit.",
|
|
66
|
+
"Discretion areas are explicit (or marked as `None`).",
|
|
67
|
+
"Selected mode and rationale are documented.",
|
|
68
|
+
"Premise challenge findings documented.",
|
|
69
|
+
"Deferred items list with one-line rationale for each.",
|
|
70
|
+
"Completion dashboard lists checklist findings, decision count, and unresolved items (or `None`)."
|
|
71
|
+
],
|
|
72
|
+
inputs: ["brainstorm artifact", "timeline constraints", "product priorities"],
|
|
73
|
+
requiredContext: [
|
|
74
|
+
"approved brainstorm direction",
|
|
75
|
+
"existing capabilities and reusable components",
|
|
76
|
+
"delivery deadlines and risk tolerance"
|
|
77
|
+
],
|
|
78
|
+
researchPlaybooks: [
|
|
79
|
+
"research/git-history.md"
|
|
80
|
+
],
|
|
81
|
+
outputs: ["scope mode decision", "scope contract", "discretion areas list", "deferred scope list", "scope summary", "scope completion dashboard"],
|
|
82
|
+
blockers: [
|
|
83
|
+
"scope mode not selected",
|
|
84
|
+
"in/out boundaries ambiguous",
|
|
85
|
+
"discretion areas undefined",
|
|
86
|
+
"critical premise disagreement unresolved"
|
|
87
|
+
],
|
|
88
|
+
exitCriteria: [
|
|
89
|
+
"scope contract approved by user",
|
|
90
|
+
"discretion areas recorded explicitly",
|
|
91
|
+
"required gates marked satisfied",
|
|
92
|
+
"deferred list recorded explicitly",
|
|
93
|
+
"completion dashboard produced",
|
|
94
|
+
"scope summary produced"
|
|
95
|
+
],
|
|
96
|
+
antiPatterns: [
|
|
97
|
+
"Scope silently expanded during discussion",
|
|
98
|
+
"No explicit out-of-scope section",
|
|
99
|
+
"Premise accepted without challenge",
|
|
100
|
+
"Sycophantic agreement without evidence-based pushback",
|
|
101
|
+
"Hedged recommendations that avoid taking a position",
|
|
102
|
+
"Batching multiple scope issues into one question",
|
|
103
|
+
"Re-arguing for smaller scope after user rejects reduction"
|
|
104
|
+
],
|
|
105
|
+
redFlags: [
|
|
106
|
+
"No selected mode in artifact",
|
|
107
|
+
"Mode selected without heuristic justification",
|
|
108
|
+
"No discretion section (or explicit `None`) in artifact",
|
|
109
|
+
"No deferred/not-in-scope section",
|
|
110
|
+
"No user approval marker",
|
|
111
|
+
"Premise challenge missing or superficial",
|
|
112
|
+
"No implementation alternatives evaluated"
|
|
113
|
+
],
|
|
114
|
+
policyNeedles: ["Scope mode", "In Scope", "Out of Scope", "Discretion Areas", "NOT in scope", "Premise Challenge"],
|
|
115
|
+
artifactFile: "02-scope.md",
|
|
116
|
+
next: "design",
|
|
117
|
+
reviewSections: [
|
|
118
|
+
{
|
|
119
|
+
title: "Scope Boundary Audit",
|
|
120
|
+
evaluationPoints: [
|
|
121
|
+
"Are all in-scope items justified by the problem statement?",
|
|
122
|
+
"Are any in-scope items actually solving a proxy problem instead of the real one?",
|
|
123
|
+
"Could any in-scope item be deferred without blocking the core objective?"
|
|
124
|
+
],
|
|
125
|
+
stopGate: true
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
title: "Deferred Items Review",
|
|
129
|
+
evaluationPoints: [
|
|
130
|
+
"Does each deferred item have a one-line rationale?",
|
|
131
|
+
"Are any deferred items actually blockers for the core scope?",
|
|
132
|
+
"Will deferring these items create technical debt that is expensive to unwind?"
|
|
133
|
+
],
|
|
134
|
+
stopGate: true
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
title: "Risk and Reversibility Check",
|
|
138
|
+
evaluationPoints: [
|
|
139
|
+
"For each major scope decision: is it reversible?",
|
|
140
|
+
"What is the blast radius if this decision is wrong?",
|
|
141
|
+
"Are there hidden dependencies between in-scope and out-of-scope items?"
|
|
142
|
+
],
|
|
143
|
+
stopGate: true
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
title: "Existing-Code Reuse Check",
|
|
147
|
+
evaluationPoints: [
|
|
148
|
+
"Has every sub-problem been mapped to existing code?",
|
|
149
|
+
"Is the plan rebuilding anything that already exists?",
|
|
150
|
+
"Are there integration opportunities that reduce new code?",
|
|
151
|
+
"Have you searched for built-in or library solutions before scoping custom work?"
|
|
152
|
+
],
|
|
153
|
+
stopGate: true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
title: "Error & Rescue Scope Check",
|
|
157
|
+
evaluationPoints: [
|
|
158
|
+
"For every new capability: what breaks if it fails?",
|
|
159
|
+
"Is failure detection in scope or deferred? If deferred, is that acceptable?",
|
|
160
|
+
"Are there rescue/fallback paths for critical user journeys?",
|
|
161
|
+
"Is observability (logging, metrics, alerts) explicitly in or out of scope?"
|
|
162
|
+
],
|
|
163
|
+
stopGate: true
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
completionStatus: ["DONE", "DONE_WITH_CONCERNS", "BLOCKED"],
|
|
167
|
+
crossStageTrace: {
|
|
168
|
+
readsFrom: [".cclaw/artifacts/01-brainstorm.md"],
|
|
169
|
+
writesTo: [".cclaw/artifacts/02-scope.md"],
|
|
170
|
+
traceabilityRule: "Every scope boundary must be traceable to a brainstorm decision. Every downstream design choice must stay within the scope contract."
|
|
171
|
+
},
|
|
172
|
+
artifactValidation: [
|
|
173
|
+
{ section: "Prime Directives", required: true, validationRule: "For each scoped capability: named failure modes, explicit error surface, four data-flow paths, interaction edge cases, observability expectations, and deferred-item handling." },
|
|
174
|
+
{ section: "Premise Challenge", required: true, validationRule: "Must contain explicit answers to: right problem? direct path? what if nothing?" },
|
|
175
|
+
{ section: "Requirements", required: true, validationRule: "Table of stable requirement IDs (R1, R2, R3…) one per row with observable outcome, priority, and source. IDs are assigned once and never renumbered across scope/design/spec/plan/review; dropped requirements stay with Priority `DROPPED`." },
|
|
176
|
+
{ section: "Implementation Alternatives", required: true, validationRule: "2-3 options with Name, Summary, Effort, Risk, Pros, Cons, and Reuses. Must include minimal viable and ideal architecture options." },
|
|
177
|
+
{ section: "Scope Mode", required: true, validationRule: "Must state selected mode and rationale with default heuristic justification." },
|
|
178
|
+
{ section: "Mode-Specific Analysis", required: true, validationRule: "Must document the analysis matching the selected scope mode: EXPAND (10x and delight opportunities), SELECTIVE (hold-scope baseline then cherry-picked expansions), HOLD (minimum-change-set hardening), REDUCE (ruthless cuts and follow-up split)." },
|
|
179
|
+
{ section: "In Scope / Out of Scope", required: true, validationRule: "Two separate explicit lists. Out-of-scope must not be empty." },
|
|
180
|
+
{ section: "Discretion Areas", required: true, validationRule: "Explicit list of implementer decision zones, or 'None' if scope is fully locked." },
|
|
181
|
+
{ section: "Deferred Items", required: true, validationRule: "Each item has one-line rationale. If empty, state 'None' explicitly." },
|
|
182
|
+
{ section: "Error & Rescue Registry", required: true, validationRule: "Each scoped capability has: failure mode, detection method, fallback decision." },
|
|
183
|
+
{ section: "Completion Dashboard", required: true, validationRule: "Lists checklist findings, count of resolved decisions, and unresolved decisions (or 'None')." },
|
|
184
|
+
{ section: "Scope Summary", required: true, validationRule: "Clean summary: mode, strongest challenges, recommended path, accepted scope, deferred, excluded." },
|
|
185
|
+
{ section: "Dream State Mapping", required: false, validationRule: "If present (complex projects): CURRENT STATE, THIS PLAN, 12-MONTH IDEAL, and alignment verdict." },
|
|
186
|
+
{ section: "Temporal Interrogation", required: false, validationRule: "If present (complex projects): timeline simulation table with decision pressures and lock-now vs defer verdicts." }
|
|
187
|
+
]
|
|
188
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// SHIP — reference: superpowers finishing-a-development-branch + gstack /ship
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
export const SHIP = {
|
|
5
|
+
stage: "ship",
|
|
6
|
+
skillFolder: "shipping-and-handoff",
|
|
7
|
+
skillName: "shipping-and-handoff",
|
|
8
|
+
skillDescription: "Release handoff stage with preflight checks, rollback readiness, and explicit finalization mode.",
|
|
9
|
+
hardGate: "Do NOT merge, push, or finalize without a passed preflight check, written rollback plan, and exactly one explicit finalization mode selected. No exceptions for urgency.",
|
|
10
|
+
ironLaw: "NO MERGE WITHOUT GREEN CI, A WRITTEN ROLLBACK, AND EXACTLY ONE SELECTED FINALIZATION MODE.",
|
|
11
|
+
purpose: "Prepare a safe release handoff with clear rollback and branch finalization decision.",
|
|
12
|
+
whenToUse: [
|
|
13
|
+
"After review passes with APPROVED or APPROVED_WITH_CONCERNS verdict",
|
|
14
|
+
"Before creating PR/merge/final branch action",
|
|
15
|
+
"When release notes and rollback plan are required"
|
|
16
|
+
],
|
|
17
|
+
whenNotToUse: [
|
|
18
|
+
"Review verdict is BLOCKED or unresolved critical findings remain",
|
|
19
|
+
"Preflight checks cannot run and no approved exception exists",
|
|
20
|
+
"The request is still design/spec/implementation work, not release handoff"
|
|
21
|
+
],
|
|
22
|
+
checklist: [
|
|
23
|
+
"Validate upstream gates — verify review verdict is APPROVED or APPROVED_WITH_CONCERNS. If BLOCKED, stop immediately.",
|
|
24
|
+
"Run preflight checks — tests pass, build succeeds, linter clean, type-check clean, no uncommitted changes. Every check must produce fresh output in this message.",
|
|
25
|
+
"Merge-base detection — identify the correct base branch. Run `git merge-base HEAD <base>`. If the base has diverged significantly, flag for rebase-first.",
|
|
26
|
+
"Re-run tests on merged result — if merging locally, run the full test suite AFTER the merge, not just before. Post-merge failures are common.",
|
|
27
|
+
"Generate release notes — summarize what changed, why, and what it affects. Reference spec criteria. Include: breaking changes, new dependencies, migration steps if any.",
|
|
28
|
+
"Write rollback plan — trigger conditions (what tells you it is broken), rollback steps (exact commands/git operations), and verification (how to confirm rollback worked).",
|
|
29
|
+
"Monitoring checklist — what should be watched after deploy? Error rates, latency, key business metrics. If no monitoring exists, flag it as a risk.",
|
|
30
|
+
"Select finalization mode — exactly ONE enum: (A) FINALIZE_MERGE_LOCAL, (B) FINALIZE_OPEN_PR, (C) FINALIZE_KEEP_BRANCH, (D) FINALIZE_DISCARD_BRANCH. For discard: list what will be deleted, require typed confirmation.",
|
|
31
|
+
"Execute finalization — perform the selected action. For merge: verify clean merge. For PR: include structured body (summary, test plan, rollback). For discard: verify deletion.",
|
|
32
|
+
"Worktree cleanup — if using git worktrees, clean up the worktree after merge/discard. Keep it only for 'keep branch' mode."
|
|
33
|
+
],
|
|
34
|
+
interactionProtocol: [
|
|
35
|
+
"Run preflight checks before any release action.",
|
|
36
|
+
"Document release notes and rollback plan explicitly.",
|
|
37
|
+
"For finalization mode: use the Decision Protocol — present modes as labeled options (A/B/C/D) with consequences, and mark one as (recommended). Do NOT use a numeric Completeness rubric; recommend the mode that best addresses release blast-radius, rollback readiness, observability, and stakeholder communication — ties go to the most reversible option. If AskQuestion/AskUserQuestion is available, send exactly ONE question per call, validate fields against runtime schema, and on schema error immediately fall back to plain-text question instead of retrying guessed payloads.",
|
|
38
|
+
"Do not proceed if critical blockers remain from review.",
|
|
39
|
+
"**STOP.** Present finalization options and wait for user selection before executing any finalization action."
|
|
40
|
+
],
|
|
41
|
+
process: [
|
|
42
|
+
"Validate review and test gates.",
|
|
43
|
+
"Run preflight: build, test, lint, uncommitted-changes check.",
|
|
44
|
+
"Generate release notes and rollback procedure.",
|
|
45
|
+
"Choose one finalization enum: FINALIZE_MERGE_LOCAL, FINALIZE_OPEN_PR, FINALIZE_KEEP_BRANCH, or FINALIZE_DISCARD_BRANCH.",
|
|
46
|
+
"Execute finalization action.",
|
|
47
|
+
"Write ship artifact with decision, rationale, and execution result."
|
|
48
|
+
],
|
|
49
|
+
requiredGates: [
|
|
50
|
+
{ id: "ship_review_verdict_valid", description: "Review verdict is APPROVED or APPROVED_WITH_CONCERNS." },
|
|
51
|
+
{ id: "ship_preflight_passed", description: "Preflight checks passed or exceptions documented and approved." },
|
|
52
|
+
{ id: "ship_release_notes_written", description: "Release notes are complete and accurate." },
|
|
53
|
+
{ id: "ship_rollback_plan_ready", description: "Rollback trigger, steps, and verification are documented." },
|
|
54
|
+
{ id: "ship_finalization_mode_selected", description: "Exactly one finalization action is selected." },
|
|
55
|
+
{ id: "ship_finalization_executed", description: "Selected finalization action was executed and verified." },
|
|
56
|
+
{ id: "ship_post_merge_tests", description: "Full test suite re-run on the merged result (not just the branch). Post-merge failures caught before release." }
|
|
57
|
+
],
|
|
58
|
+
requiredEvidence: [
|
|
59
|
+
"Artifact written to `.cclaw/artifacts/08-ship.md`.",
|
|
60
|
+
"Release notes section is complete.",
|
|
61
|
+
"Rollback section includes trigger conditions, steps, and verification.",
|
|
62
|
+
"Finalization section shows exactly one selected enum token.",
|
|
63
|
+
"Execution result documented."
|
|
64
|
+
],
|
|
65
|
+
inputs: ["review verdict", "test/build outputs", "release context"],
|
|
66
|
+
requiredContext: ["review artifact", "changelog scope", "deployment constraints"],
|
|
67
|
+
outputs: ["release package handoff", "rollback plan", "final branch decision"],
|
|
68
|
+
blockers: [
|
|
69
|
+
"review verdict is BLOCKED",
|
|
70
|
+
"critical review blockers remain",
|
|
71
|
+
"rollback plan missing",
|
|
72
|
+
"finalization mode not selected"
|
|
73
|
+
],
|
|
74
|
+
exitCriteria: [
|
|
75
|
+
"preflight completed",
|
|
76
|
+
"rollback and release notes complete",
|
|
77
|
+
"finalization action explicitly chosen and executed"
|
|
78
|
+
],
|
|
79
|
+
antiPatterns: [
|
|
80
|
+
"Shipping without rollback strategy",
|
|
81
|
+
"Implicit finalization decision",
|
|
82
|
+
"Bypassing preflight due to urgency",
|
|
83
|
+
"Selecting multiple finalization modes",
|
|
84
|
+
"Shipping with BLOCKED review verdict"
|
|
85
|
+
],
|
|
86
|
+
redFlags: [
|
|
87
|
+
"No rollback trigger/steps",
|
|
88
|
+
"More than one finalization mode implied",
|
|
89
|
+
"No explicit preflight result",
|
|
90
|
+
"Review verdict not referenced",
|
|
91
|
+
"Finalization not executed, only planned"
|
|
92
|
+
],
|
|
93
|
+
policyNeedles: [
|
|
94
|
+
"Pre-Ship Checks",
|
|
95
|
+
"Release Notes",
|
|
96
|
+
"Rollback Plan",
|
|
97
|
+
"FINALIZE_MERGE_LOCAL",
|
|
98
|
+
"FINALIZE_OPEN_PR",
|
|
99
|
+
"FINALIZE_KEEP_BRANCH",
|
|
100
|
+
"FINALIZE_DISCARD_BRANCH"
|
|
101
|
+
],
|
|
102
|
+
artifactFile: "08-ship.md",
|
|
103
|
+
next: "done",
|
|
104
|
+
reviewSections: [
|
|
105
|
+
{
|
|
106
|
+
title: "Preflight Verification",
|
|
107
|
+
evaluationPoints: [
|
|
108
|
+
"Test suite: full run, all pass, output captured",
|
|
109
|
+
"Build: clean build, exit code 0",
|
|
110
|
+
"Lint/format: no violations",
|
|
111
|
+
"Type-check: no errors",
|
|
112
|
+
"Working tree: no uncommitted changes"
|
|
113
|
+
],
|
|
114
|
+
stopGate: true
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
title: "Release Readiness",
|
|
118
|
+
evaluationPoints: [
|
|
119
|
+
"Release notes are accurate and reference spec criteria",
|
|
120
|
+
"Breaking changes are documented with migration steps",
|
|
121
|
+
"Rollback plan has trigger, steps, and verification",
|
|
122
|
+
"If applicable: monitoring/alerting is in place for the change"
|
|
123
|
+
],
|
|
124
|
+
stopGate: true
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
completionStatus: ["SHIPPED", "SHIPPED_WITH_EXCEPTIONS", "BLOCKED"],
|
|
128
|
+
crossStageTrace: {
|
|
129
|
+
readsFrom: [".cclaw/artifacts/07-review.md", ".cclaw/artifacts/06-tdd.md", ".cclaw/artifacts/05-plan.md", ".cclaw/artifacts/04-spec.md"],
|
|
130
|
+
writesTo: [".cclaw/artifacts/08-ship.md"],
|
|
131
|
+
traceabilityRule: "Ship artifact must reference review verdict and resolution status. Release notes must reference spec criteria. Rollback plan must reference specific changes that could fail."
|
|
132
|
+
},
|
|
133
|
+
artifactValidation: [
|
|
134
|
+
{ section: "Preflight Results", required: true, validationRule: "Build, test, lint, type-check results captured with fresh output. Exceptions documented if any." },
|
|
135
|
+
{ section: "Release Notes", required: true, validationRule: "What changed, why, impact. References spec criteria. Breaking changes flagged." },
|
|
136
|
+
{ section: "Rollback Plan", required: true, validationRule: "Trigger conditions, rollback steps (exact commands), verification steps." },
|
|
137
|
+
{ section: "Monitoring", required: false, validationRule: "If applicable: what metrics/logs to watch post-deploy. Risk note if no monitoring." },
|
|
138
|
+
{ section: "Finalization", required: true, validationRule: "Exactly one finalization enum token selected. Execution result documented. Worktree cleaned if applicable." },
|
|
139
|
+
{ section: "Completion Status", required: false, validationRule: "If present: exactly one of SHIPPED, SHIPPED_WITH_EXCEPTIONS, BLOCKED. Exceptions documented when applicable." },
|
|
140
|
+
{ section: "Compound Step", required: false, validationRule: "Optional retrospective: at least one bullet of the form 'Insight: ... | Action: append [compound] entry to .cclaw/knowledge.jsonl', or an explicit 'No compound insight this run.' line." }
|
|
141
|
+
]
|
|
142
|
+
};
|