cclaw-cli 7.7.1 → 8.1.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/README.md +211 -134
- package/dist/artifact-frontmatter.d.ts +51 -0
- package/dist/artifact-frontmatter.js +131 -0
- package/dist/artifact-paths.d.ts +7 -27
- package/dist/artifact-paths.js +20 -249
- package/dist/cancel.d.ts +16 -0
- package/dist/cancel.js +66 -0
- package/dist/cli.d.ts +2 -27
- package/dist/cli.js +107 -511
- package/dist/compound.d.ts +26 -0
- package/dist/compound.js +96 -0
- package/dist/config.d.ts +14 -51
- package/dist/config.js +23 -359
- package/dist/constants.d.ts +11 -18
- package/dist/constants.js +19 -106
- package/dist/content/antipatterns.d.ts +1 -0
- package/dist/content/antipatterns.js +109 -0
- package/dist/content/artifact-templates.d.ts +10 -0
- package/dist/content/artifact-templates.js +550 -0
- package/dist/content/cancel-command.d.ts +2 -2
- package/dist/content/cancel-command.js +25 -17
- package/dist/content/core-agents.d.ts +9 -233
- package/dist/content/core-agents.js +39 -768
- package/dist/content/decision-protocol.d.ts +1 -12
- package/dist/content/decision-protocol.js +27 -20
- package/dist/content/examples.d.ts +8 -42
- package/dist/content/examples.js +293 -425
- package/dist/content/idea-command.d.ts +2 -0
- package/dist/content/idea-command.js +38 -0
- package/dist/content/iron-laws.d.ts +4 -138
- package/dist/content/iron-laws.js +18 -197
- package/dist/content/meta-skill.d.ts +1 -3
- package/dist/content/meta-skill.js +57 -134
- package/dist/content/node-hooks.d.ts +12 -8
- package/dist/content/node-hooks.js +188 -838
- package/dist/content/recovery.d.ts +8 -0
- package/dist/content/recovery.js +179 -0
- package/dist/content/reference-patterns.d.ts +4 -13
- package/dist/content/reference-patterns.js +260 -389
- package/dist/content/research-playbooks.d.ts +8 -8
- package/dist/content/research-playbooks.js +108 -121
- package/dist/content/review-loop.d.ts +6 -192
- package/dist/content/review-loop.js +29 -731
- package/dist/content/skills.d.ts +8 -38
- package/dist/content/skills.js +681 -732
- package/dist/content/specialist-prompts/architect.d.ts +1 -0
- package/dist/content/specialist-prompts/architect.js +225 -0
- package/dist/content/specialist-prompts/brainstormer.d.ts +1 -0
- package/dist/content/specialist-prompts/brainstormer.js +168 -0
- package/dist/content/specialist-prompts/index.d.ts +2 -0
- package/dist/content/specialist-prompts/index.js +14 -0
- package/dist/content/specialist-prompts/planner.d.ts +1 -0
- package/dist/content/specialist-prompts/planner.js +182 -0
- package/dist/content/specialist-prompts/reviewer.d.ts +1 -0
- package/dist/content/specialist-prompts/reviewer.js +193 -0
- package/dist/content/specialist-prompts/security-reviewer.d.ts +1 -0
- package/dist/content/specialist-prompts/security-reviewer.js +133 -0
- package/dist/content/specialist-prompts/slice-builder.d.ts +1 -0
- package/dist/content/specialist-prompts/slice-builder.js +232 -0
- package/dist/content/stage-playbooks.d.ts +8 -0
- package/dist/content/stage-playbooks.js +404 -0
- package/dist/content/start-command.d.ts +2 -12
- package/dist/content/start-command.js +221 -207
- package/dist/flow-state.d.ts +21 -178
- package/dist/flow-state.js +67 -170
- package/dist/fs-utils.d.ts +6 -26
- package/dist/fs-utils.js +29 -162
- package/dist/gitignore.d.ts +2 -1
- package/dist/gitignore.js +51 -34
- package/dist/harness-detect.d.ts +10 -0
- package/dist/harness-detect.js +29 -0
- package/dist/harness-prompt.d.ts +26 -0
- package/dist/harness-prompt.js +142 -0
- package/dist/install.d.ts +35 -15
- package/dist/install.js +238 -1347
- package/dist/knowledge-store.d.ts +19 -163
- package/dist/knowledge-store.js +56 -590
- package/dist/logger.d.ts +8 -3
- package/dist/logger.js +13 -4
- package/dist/orchestrator-routing.d.ts +29 -0
- package/dist/orchestrator-routing.js +156 -0
- package/dist/run-persistence.d.ts +7 -118
- package/dist/run-persistence.js +29 -845
- package/dist/runtime/run-hook.entry.d.ts +1 -3
- package/dist/runtime/run-hook.entry.js +19 -4
- package/dist/runtime/run-hook.mjs +13 -1024
- package/dist/types.d.ts +25 -261
- package/dist/types.js +8 -36
- package/package.json +6 -3
- package/dist/artifact-linter/brainstorm.d.ts +0 -2
- package/dist/artifact-linter/brainstorm.js +0 -353
- package/dist/artifact-linter/design.d.ts +0 -18
- package/dist/artifact-linter/design.js +0 -444
- package/dist/artifact-linter/findings-dedup.d.ts +0 -56
- package/dist/artifact-linter/findings-dedup.js +0 -232
- package/dist/artifact-linter/plan.d.ts +0 -2
- package/dist/artifact-linter/plan.js +0 -826
- package/dist/artifact-linter/review-army.d.ts +0 -49
- package/dist/artifact-linter/review-army.js +0 -520
- package/dist/artifact-linter/review.d.ts +0 -2
- package/dist/artifact-linter/review.js +0 -113
- package/dist/artifact-linter/scope.d.ts +0 -2
- package/dist/artifact-linter/scope.js +0 -158
- package/dist/artifact-linter/shared.d.ts +0 -637
- package/dist/artifact-linter/shared.js +0 -2163
- package/dist/artifact-linter/ship.d.ts +0 -2
- package/dist/artifact-linter/ship.js +0 -250
- package/dist/artifact-linter/spec.d.ts +0 -2
- package/dist/artifact-linter/spec.js +0 -176
- package/dist/artifact-linter/tdd.d.ts +0 -118
- package/dist/artifact-linter/tdd.js +0 -1404
- package/dist/artifact-linter.d.ts +0 -15
- package/dist/artifact-linter.js +0 -517
- package/dist/codex-feature-flag.d.ts +0 -58
- package/dist/codex-feature-flag.js +0 -193
- package/dist/content/closeout-guidance.d.ts +0 -14
- package/dist/content/closeout-guidance.js +0 -44
- package/dist/content/diff-command.d.ts +0 -1
- package/dist/content/diff-command.js +0 -43
- package/dist/content/harness-doc.d.ts +0 -1
- package/dist/content/harness-doc.js +0 -65
- package/dist/content/hook-events.d.ts +0 -9
- package/dist/content/hook-events.js +0 -23
- package/dist/content/hook-manifest.d.ts +0 -81
- package/dist/content/hook-manifest.js +0 -156
- package/dist/content/hooks.d.ts +0 -11
- package/dist/content/hooks.js +0 -1972
- package/dist/content/idea.d.ts +0 -60
- package/dist/content/idea.js +0 -416
- package/dist/content/language-policy.d.ts +0 -2
- package/dist/content/language-policy.js +0 -13
- package/dist/content/learnings.d.ts +0 -6
- package/dist/content/learnings.js +0 -141
- package/dist/content/observe.d.ts +0 -19
- package/dist/content/observe.js +0 -86
- package/dist/content/opencode-plugin.d.ts +0 -1
- package/dist/content/opencode-plugin.js +0 -635
- package/dist/content/review-prompts.d.ts +0 -1
- package/dist/content/review-prompts.js +0 -104
- package/dist/content/runtime-shared-snippets.d.ts +0 -8
- package/dist/content/runtime-shared-snippets.js +0 -80
- package/dist/content/session-hooks.d.ts +0 -7
- package/dist/content/session-hooks.js +0 -107
- package/dist/content/skills-elicitation.d.ts +0 -1
- package/dist/content/skills-elicitation.js +0 -167
- package/dist/content/stage-command.d.ts +0 -2
- package/dist/content/stage-command.js +0 -17
- package/dist/content/stage-schema.d.ts +0 -117
- package/dist/content/stage-schema.js +0 -955
- package/dist/content/stages/_lint-metadata/index.d.ts +0 -2
- package/dist/content/stages/_lint-metadata/index.js +0 -97
- package/dist/content/stages/brainstorm.d.ts +0 -2
- package/dist/content/stages/brainstorm.js +0 -184
- package/dist/content/stages/design.d.ts +0 -2
- package/dist/content/stages/design.js +0 -288
- package/dist/content/stages/index.d.ts +0 -8
- package/dist/content/stages/index.js +0 -11
- package/dist/content/stages/plan.d.ts +0 -2
- package/dist/content/stages/plan.js +0 -191
- package/dist/content/stages/review.d.ts +0 -2
- package/dist/content/stages/review.js +0 -240
- package/dist/content/stages/schema-types.d.ts +0 -203
- package/dist/content/stages/schema-types.js +0 -1
- package/dist/content/stages/scope.d.ts +0 -2
- package/dist/content/stages/scope.js +0 -254
- package/dist/content/stages/ship.d.ts +0 -2
- package/dist/content/stages/ship.js +0 -159
- package/dist/content/stages/spec.d.ts +0 -2
- package/dist/content/stages/spec.js +0 -170
- package/dist/content/stages/tdd.d.ts +0 -4
- package/dist/content/stages/tdd.js +0 -273
- package/dist/content/state-contracts.d.ts +0 -1
- package/dist/content/state-contracts.js +0 -63
- package/dist/content/status-command.d.ts +0 -4
- package/dist/content/status-command.js +0 -109
- package/dist/content/subagent-context-skills.d.ts +0 -4
- package/dist/content/subagent-context-skills.js +0 -279
- package/dist/content/subagents.d.ts +0 -3
- package/dist/content/subagents.js +0 -997
- package/dist/content/templates.d.ts +0 -26
- package/dist/content/templates.js +0 -1692
- package/dist/content/track-render-context.d.ts +0 -18
- package/dist/content/track-render-context.js +0 -53
- package/dist/content/tree-command.d.ts +0 -1
- package/dist/content/tree-command.js +0 -64
- package/dist/content/utility-skills.d.ts +0 -30
- package/dist/content/utility-skills.js +0 -160
- package/dist/content/view-command.d.ts +0 -2
- package/dist/content/view-command.js +0 -92
- package/dist/delegation.d.ts +0 -649
- package/dist/delegation.js +0 -1539
- package/dist/early-loop.d.ts +0 -70
- package/dist/early-loop.js +0 -302
- package/dist/execution-topology.d.ts +0 -44
- package/dist/execution-topology.js +0 -95
- package/dist/gate-evidence.d.ts +0 -85
- package/dist/gate-evidence.js +0 -631
- package/dist/harness-adapters.d.ts +0 -151
- package/dist/harness-adapters.js +0 -756
- package/dist/harness-selection.d.ts +0 -31
- package/dist/harness-selection.js +0 -214
- package/dist/hook-schema.d.ts +0 -6
- package/dist/hook-schema.js +0 -114
- package/dist/hook-schemas/claude-hooks.v1.json +0 -10
- package/dist/hook-schemas/codex-hooks.v1.json +0 -10
- package/dist/hook-schemas/cursor-hooks.v1.json +0 -13
- package/dist/init-detect.d.ts +0 -2
- package/dist/init-detect.js +0 -50
- package/dist/internal/advance-stage/advance.d.ts +0 -89
- package/dist/internal/advance-stage/advance.js +0 -655
- package/dist/internal/advance-stage/cancel-run.d.ts +0 -8
- package/dist/internal/advance-stage/cancel-run.js +0 -19
- package/dist/internal/advance-stage/flow-state-coercion.d.ts +0 -3
- package/dist/internal/advance-stage/flow-state-coercion.js +0 -81
- package/dist/internal/advance-stage/helpers.d.ts +0 -14
- package/dist/internal/advance-stage/helpers.js +0 -145
- package/dist/internal/advance-stage/hook.d.ts +0 -8
- package/dist/internal/advance-stage/hook.js +0 -40
- package/dist/internal/advance-stage/parsers.d.ts +0 -72
- package/dist/internal/advance-stage/parsers.js +0 -357
- package/dist/internal/advance-stage/proactive-delegation-trace.d.ts +0 -24
- package/dist/internal/advance-stage/proactive-delegation-trace.js +0 -56
- package/dist/internal/advance-stage/review-loop.d.ts +0 -16
- package/dist/internal/advance-stage/review-loop.js +0 -199
- package/dist/internal/advance-stage/rewind.d.ts +0 -14
- package/dist/internal/advance-stage/rewind.js +0 -108
- package/dist/internal/advance-stage/start-flow.d.ts +0 -13
- package/dist/internal/advance-stage/start-flow.js +0 -241
- package/dist/internal/advance-stage/verify.d.ts +0 -21
- package/dist/internal/advance-stage/verify.js +0 -185
- package/dist/internal/advance-stage.d.ts +0 -7
- package/dist/internal/advance-stage.js +0 -138
- package/dist/internal/cohesion-contract-stub.d.ts +0 -24
- package/dist/internal/cohesion-contract-stub.js +0 -148
- package/dist/internal/compound-readiness.d.ts +0 -23
- package/dist/internal/compound-readiness.js +0 -102
- package/dist/internal/detect-public-api-changes.d.ts +0 -5
- package/dist/internal/detect-public-api-changes.js +0 -45
- package/dist/internal/detect-supply-chain-changes.d.ts +0 -6
- package/dist/internal/detect-supply-chain-changes.js +0 -138
- package/dist/internal/early-loop-status.d.ts +0 -7
- package/dist/internal/early-loop-status.js +0 -93
- package/dist/internal/envelope-validate.d.ts +0 -7
- package/dist/internal/envelope-validate.js +0 -66
- package/dist/internal/flow-state-repair.d.ts +0 -20
- package/dist/internal/flow-state-repair.js +0 -104
- package/dist/internal/plan-split-waves.d.ts +0 -190
- package/dist/internal/plan-split-waves.js +0 -764
- package/dist/internal/runtime-integrity.d.ts +0 -7
- package/dist/internal/runtime-integrity.js +0 -268
- package/dist/internal/slice-commit.d.ts +0 -7
- package/dist/internal/slice-commit.js +0 -619
- package/dist/internal/tdd-loop-status.d.ts +0 -14
- package/dist/internal/tdd-loop-status.js +0 -68
- package/dist/internal/tdd-red-evidence.d.ts +0 -7
- package/dist/internal/tdd-red-evidence.js +0 -153
- package/dist/internal/waiver-grant.d.ts +0 -62
- package/dist/internal/waiver-grant.js +0 -294
- package/dist/internal/wave-status.d.ts +0 -74
- package/dist/internal/wave-status.js +0 -506
- package/dist/managed-resources.d.ts +0 -53
- package/dist/managed-resources.js +0 -313
- package/dist/policy.d.ts +0 -10
- package/dist/policy.js +0 -167
- package/dist/retro-gate.d.ts +0 -9
- package/dist/retro-gate.js +0 -47
- package/dist/run-archive.d.ts +0 -61
- package/dist/run-archive.js +0 -391
- package/dist/runs.d.ts +0 -2
- package/dist/runs.js +0 -2
- package/dist/stack-detection.d.ts +0 -116
- package/dist/stack-detection.js +0 -489
- package/dist/streaming/event-stream.d.ts +0 -31
- package/dist/streaming/event-stream.js +0 -114
- package/dist/tdd-cycle.d.ts +0 -107
- package/dist/tdd-cycle.js +0 -289
- package/dist/tdd-verification-evidence.d.ts +0 -17
- package/dist/tdd-verification-evidence.js +0 -122
- package/dist/track-heuristics.d.ts +0 -27
- package/dist/track-heuristics.js +0 -154
- package/dist/util/slice-id.d.ts +0 -58
- package/dist/util/slice-id.js +0 -89
- package/dist/worktree-manager.d.ts +0 -20
- package/dist/worktree-manager.js +0 -108
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { BRAINSTORM } from "./brainstorm.js";
|
|
2
|
-
export { SCOPE } from "./scope.js";
|
|
3
|
-
export { DESIGN } from "./design.js";
|
|
4
|
-
export { SPEC } from "./spec.js";
|
|
5
|
-
export { PLAN } from "./plan.js";
|
|
6
|
-
export { TDD } from "./tdd.js";
|
|
7
|
-
export { REVIEW } from "./review.js";
|
|
8
|
-
export { SHIP } from "./ship.js";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Barrel for per-stage StageSchemaInput constants. Keep this file lean — it
|
|
2
|
-
// should be a pure re-export surface so stage-schema.ts can import all stages
|
|
3
|
-
// via a single `import { ... } from "./stages/index.js"`.
|
|
4
|
-
export { BRAINSTORM } from "./brainstorm.js";
|
|
5
|
-
export { SCOPE } from "./scope.js";
|
|
6
|
-
export { DESIGN } from "./design.js";
|
|
7
|
-
export { SPEC } from "./spec.js";
|
|
8
|
-
export { PLAN } from "./plan.js";
|
|
9
|
-
export { TDD } from "./tdd.js";
|
|
10
|
-
export { REVIEW } from "./review.js";
|
|
11
|
-
export { SHIP } from "./ship.js";
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
// ---------------------------------------------------------------------------
|
|
2
|
-
// PLAN
|
|
3
|
-
// ---------------------------------------------------------------------------
|
|
4
|
-
export const PLAN = {
|
|
5
|
-
schemaShape: "v2",
|
|
6
|
-
stage: "plan",
|
|
7
|
-
complexityTier: "standard",
|
|
8
|
-
skillFolder: "plan",
|
|
9
|
-
skillName: "plan",
|
|
10
|
-
skillDescription: "Execution planning stage with strict confirmation gate before implementation.",
|
|
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 IMPLEMENTATION UNIT IS FEATURE-ATOMIC, WITH INTERNAL 2–5 MINUTE TDD STEPS — STRICT MICRO-SLICES ARE RESERVED FOR HIGH-RISK WORK.",
|
|
14
|
-
purpose: "Create feature-atomic implementation units with dependencies, internal TDD steps, and explicit confirmation before execution.",
|
|
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
|
-
"No execution posture for sequencing, risk, and checkpoint cadence",
|
|
35
|
-
"Tasks exceed one coherent outcome",
|
|
36
|
-
"No acceptance mapping",
|
|
37
|
-
"Locked decisions are missing or not mapped",
|
|
38
|
-
"Scope-reduction language appears without explicit approved defer decision"
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
executionModel: {
|
|
42
|
-
checklist: [
|
|
43
|
-
"Read upstream — load spec, design, and scope artifacts. Cross-reference acceptance criteria.",
|
|
44
|
-
"Build dependency graph — identify task ordering, parallel opportunities, and blocking dependencies.",
|
|
45
|
-
"Group tasks into dependency batches — batch N+1 cannot start until batch N has verification evidence.",
|
|
46
|
-
"Slice into implementation units — each unit is feature-atomic and testable end-to-end, with internal 2-5 minute RED/GREEN/REFACTOR steps. Use `strict-micro` only for high-risk or explicitly requested micro-slice execution.",
|
|
47
|
-
"Task Contract — every unit has one coherent outcome, AC mapping, exact verification command/manual step, and expected evidence snippet or pass condition. Internal steps may be `T-NNN` rows, but they are not automatically separate schedulable agents in balanced/fast mode.",
|
|
48
|
-
"Annotate slice-review metadata — task rows may carry `touchCount` (rough number of files expected to change), `touchPaths` (glob hints, e.g. `migrations/**`, `src/auth/**`), and optional `highRisk: true` to force a review pass. These fields feed the TDD stage's Per-Slice Review point.",
|
|
49
|
-
"For every `### Implementation Unit U-<n>`, declare parallel metadata bullets: `id`, `dependsOn` (unit ids or `none`), `claimedPaths` (repo-relative), `parallelizable` (true|false), `riskTier` (low|standard|high), optional `lane` — used for conflict-aware wave plans and schedulers.",
|
|
50
|
-
"Map scope Locked Decisions — every D-XX ID from scope is referenced by at least one plan task (or explicitly marked deferred with reason).",
|
|
51
|
-
"Run anti-placeholder + anti-scope-reduction scans — block `TODO/TBD/...` and phrasing like `v1`, `for now`, `later` for locked boundaries.",
|
|
52
|
-
"Define validation points — mark where progress must be checked before continuing, with concrete command and expected evidence.",
|
|
53
|
-
"Define execution topology — record `execution.topology` (`auto|inline|single-builder|parallel-builders|strict-micro`), `execution.strictness` (`fast|balanced|strict`), `execution.maxBuilders`, `plan.sliceGranularity`, `plan.microTaskPolicy`, stop conditions, and RED/GREEN/REFACTOR checkpoint/commit expectations. Default posture is `auto` + `balanced`: choose the cheapest safe route, not the most parallel one.",
|
|
54
|
-
"**Author the FULL Parallel Execution Plan.** Inside the `<!-- parallel-exec-managed-start -->` block, enumerate all waves W-01..W-N covering every feature-atomic `U-*` implementation unit/slice. Legacy strict-micro plans may cover each non-deferred `T-NNN` task instead. Each row carries `unit|sliceId | dependsOn | claimedPaths | parallelizable | riskTier | lane`. Do not leave `we'll author waves later`, `next batch only`, or open-ended Backlog handwaves. This fulfills the `plan_parallel_exec_full_coverage` gate. The TDD stage downstream is a pure consumer of these waves — if the plan does not author them, TDD cannot fan out that work.",
|
|
55
|
-
"After authoring/refreshing the managed parallel-exec block, render a Mermaid `flowchart` or `gantt` covering waves (`W-*`) and unit/slice dependencies (`U-*`/`S-*`) so topology and fan-in boundaries are visually auditable.",
|
|
56
|
-
"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`."
|
|
57
|
-
],
|
|
58
|
-
interactionProtocol: [
|
|
59
|
-
"Plan in read-only mode relative to implementation.",
|
|
60
|
-
"Split work into feature-atomic vertical units; place 2-5 minute TDD steps inside each unit.",
|
|
61
|
-
"Publish explicit dependency batches with entry and exit checks for each batch.",
|
|
62
|
-
"Expose execution posture: sequential vs batch/parallel, stop conditions, and checkpoint cadence for the TDD handoff.",
|
|
63
|
-
"Keep same-wave `claimedPaths` disjoint; if overlap exists, split waves or serialize explicitly before handoff.",
|
|
64
|
-
"Attach exact verification command/manual step and expected evidence to every task.",
|
|
65
|
-
"Preserve locked scope boundaries: no silent scope reduction language in task rows.",
|
|
66
|
-
"Enforce WAIT_FOR_CONFIRM: present the plan summary with options (A) Approve / (B) Revise / (C) Reject.",
|
|
67
|
-
"**STOP.** Do NOT proceed until user explicitly approves.",
|
|
68
|
-
"**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`.",
|
|
69
|
-
"Investigation discipline: follow the shared `## Investigation Discipline` block — when defining `Implementation Units`, list cited paths in the `Files` and `Patterns to follow` rows instead of pasting code into chat or delegations.",
|
|
70
|
-
"Behavior anchor: see the shared `## Behavior anchor` block in this skill — the bad/good pair anchors how `Execution Posture` may only claim parallel-safe with disjoint units and a cited interface contract."
|
|
71
|
-
],
|
|
72
|
-
process: [
|
|
73
|
-
"Build dependency graph and ordered slices.",
|
|
74
|
-
"Group slices into execution batches and define gate criteria per batch.",
|
|
75
|
-
"Define each task with acceptance mapping, verification command/manual step, and expected evidence/pass condition.",
|
|
76
|
-
"Trace every locked decision (D-XX) to plan tasks or explicit defer rationale.",
|
|
77
|
-
"Record validation points, blockers, and execution posture.",
|
|
78
|
-
"For high-risk/multi-batch plans, add a calibrated findings pass and explicit regression iron-rule acknowledgement.",
|
|
79
|
-
"Write plan artifact and pause at WAIT_FOR_CONFIRM."
|
|
80
|
-
],
|
|
81
|
-
requiredGates: [
|
|
82
|
-
{ id: "plan_tasks_sliced_2_5_min", description: "Implementation units are feature-atomic and contain internal 2-5 minute TDD steps; strict micro-slices are explicit." },
|
|
83
|
-
{ id: "plan_dependency_batches_defined", description: "Tasks are grouped into executable batches with gate checks and execution posture." },
|
|
84
|
-
{ id: "plan_acceptance_mapped", description: "Each task maps to a spec acceptance criterion." },
|
|
85
|
-
{ id: "plan_execution_posture_recorded", description: "Execution topology/posture is recorded before implementation handoff." },
|
|
86
|
-
{ id: "plan_parallel_exec_full_coverage", description: "Every U-* implementation unit/slice (or every T-NNN task in explicit strict-micro plans) is assigned inside the `<!-- parallel-exec-managed-start -->` block; TDD cannot fan out work that the plan never authored as waves." },
|
|
87
|
-
{ id: "plan_wave_paths_disjoint", description: "Within each authored wave, slice `claimedPaths` remain disjoint so `wave-fanout` can dispatch safely without overlap conflicts." },
|
|
88
|
-
{ id: "plan_module_introducing_slice_wires_root", description: "When a slice introduces a new module file, the stack-adapter's wiring aggregator (Rust `lib.rs`, Python `__init__.py`, Node-TS barrel when present) must appear in the same slice's claim or a transitive predecessor's claim so RED can be expressed." },
|
|
89
|
-
{ id: "plan_wait_for_confirm", description: "Execution blocked until explicit user confirmation." }
|
|
90
|
-
],
|
|
91
|
-
requiredEvidence: [
|
|
92
|
-
"Artifact written to `.cclaw/artifacts/05-plan.md`.",
|
|
93
|
-
"Implementation units include acceptance mapping, internal 2-5 minute TDD steps, exact verification command/manual step, and expected evidence/pass condition.",
|
|
94
|
-
"Locked decision coverage table present with D-XX trace links.",
|
|
95
|
-
"Dependency graph documented.",
|
|
96
|
-
"Dependency batches documented with batch-by-batch verification gates.",
|
|
97
|
-
"Execution posture documented with sequencing, stop conditions, and TDD checkpoint expectations.",
|
|
98
|
-
"WAIT_FOR_CONFIRM status recorded."
|
|
99
|
-
],
|
|
100
|
-
inputs: ["approved spec", "codebase context", "delivery constraints"],
|
|
101
|
-
requiredContext: [
|
|
102
|
-
"spec acceptance criteria",
|
|
103
|
-
"current architecture",
|
|
104
|
-
"known technical debt and dependencies"
|
|
105
|
-
],
|
|
106
|
-
blockers: [
|
|
107
|
-
"tasks too broad",
|
|
108
|
-
"dependency uncertainty unresolved",
|
|
109
|
-
"batch boundaries are unclear",
|
|
110
|
-
"execution posture is missing or contradicts dependency batches",
|
|
111
|
-
"locked decisions from scope are not mapped to tasks",
|
|
112
|
-
"no explicit confirmation"
|
|
113
|
-
],
|
|
114
|
-
exitCriteria: [
|
|
115
|
-
"plan quality gates complete",
|
|
116
|
-
"WAIT_FOR_CONFIRM present and unresolved until user approves",
|
|
117
|
-
"artifact ready for TDD execution",
|
|
118
|
-
"execution posture ready for TDD handoff",
|
|
119
|
-
"acceptance mapping complete"
|
|
120
|
-
],
|
|
121
|
-
platformNotes: [
|
|
122
|
-
"Per-task verification commands must be runnable on Windows PowerShell, macOS bash/zsh, and Linux bash. Prefer `npm run <script>` / `pnpm <script>` / `pytest -k <name>` over raw shell one-liners so the command portability is handled by the script runner.",
|
|
123
|
-
"If a task command needs globbing, wrap the glob in single quotes on POSIX and escape as needed on PowerShell (`'src/**/*.ts'` vs `\"src/**/*.ts\"`). Note the quoting variant when the task is expected to run in mixed-OS CI.",
|
|
124
|
-
"Environment variables referenced from tasks must be named in uppercase with underscores (`CCLAW_PROJECT_ROOT`) and set via a cross-shell wrapper (e.g. `cross-env` for Node tasks) — do not inline `KEY=value cmd` style that fails in PowerShell/cmd.exe."
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
artifactRules: {
|
|
128
|
-
artifactFile: "05-plan.md",
|
|
129
|
-
completionStatus: ["DONE", "DONE_WITH_CONCERNS", "BLOCKED"],
|
|
130
|
-
crossStageTrace: {
|
|
131
|
-
readsFrom: [".cclaw/artifacts/04-spec.md", ".cclaw/artifacts/03-design-<slug>.md", ".cclaw/artifacts/02-scope-<slug>.md"],
|
|
132
|
-
writesTo: [".cclaw/artifacts/05-plan.md"],
|
|
133
|
-
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."
|
|
134
|
-
},
|
|
135
|
-
artifactValidation: [
|
|
136
|
-
{ section: "Upstream Handoff", required: false, validationRule: "Summarizes spec/design/scope decisions, constraints, open questions, and explicit drift before task breakdown." },
|
|
137
|
-
{ section: "Dependency Graph", required: false, validationRule: "Ordering and parallel opportunities explicit. No circular dependencies." },
|
|
138
|
-
{ section: "Dependency Batches", required: true, validationRule: "Every task belongs to a batch. Each batch has an exit gate and dependency statement." },
|
|
139
|
-
{ section: "Task List", required: true, validationRule: "Task rows may describe internal 2-5 minute TDD steps. In balanced/fast mode, the schedulable unit is the feature-atomic Implementation Unit, not every T-NNN row. Strict-micro plans may still use one T-NNN per slice." },
|
|
140
|
-
{ section: "Acceptance Mapping", required: true, validationRule: "Every spec criterion is covered by at least one task." },
|
|
141
|
-
{ section: "Execution Posture", required: true, validationRule: "States `execution.topology` (`auto|inline|single-builder|parallel-builders|strict-micro`), `execution.strictness`, `execution.maxBuilders`, `plan.sliceGranularity`, `plan.microTaskPolicy`, stop conditions, risk triggers, and RED/GREEN/REFACTOR checkpoint or commit expectations for TDD when consistent with the repo workflow." },
|
|
142
|
-
{ 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." },
|
|
143
|
-
{ section: "Risk Assessment", required: false, validationRule: "If present: per-task or per-batch risk identification with likelihood, impact, and mitigation strategy." },
|
|
144
|
-
{ 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." },
|
|
145
|
-
{ section: "Implementation Units", required: false, validationRule: "Each `### Implementation Unit U-<n>` includes Goal, Files, Approach, Test scenarios, Verification, internal 2-5 minute TDD steps, plus bullets (`id`, `dependsOn`, `claimedPaths`, `parallelizable`, `riskTier`, optional `lane`)." },
|
|
146
|
-
{ section: "Calibrated Findings", required: false, validationRule: "If present: either `None this stage` or one or more lines in `[P1|P2|P3] (confidence: <n>/10) <path>[:<line>] — <description>` format." },
|
|
147
|
-
{ section: "Regression Iron Rule", required: false, validationRule: "If present: includes `Iron rule acknowledged: yes`." },
|
|
148
|
-
{ section: "WAIT_FOR_CONFIRM", required: true, validationRule: "Explicit marker present. Status: pending until user approves." },
|
|
149
|
-
{ section: "Plan Quality Scan", required: false, validationRule: "If present: includes a placeholder scan (`TODO`/`TBD`/`FIXME`/`<fill-in>`/`<your-*-here>`/`xxx`/bare ellipsis) and a scope-reduction language scan (`v1`, `for now`, `later`, `temporary`, `placeholder`) with zero hits in task rows when locked decisions exist." }
|
|
150
|
-
]
|
|
151
|
-
},
|
|
152
|
-
reviewLens: {
|
|
153
|
-
outputs: ["task graph", "dependency batch plan", "ordered plan", "explicit confirmation gate"],
|
|
154
|
-
reviewSections: [
|
|
155
|
-
{
|
|
156
|
-
title: "Task Decomposition Audit",
|
|
157
|
-
evaluationPoints: [
|
|
158
|
-
"Does every task target a single coherent area (vertical slice)?",
|
|
159
|
-
"Is each implementation unit feature-atomic, with internal steps that fit 2-5 minutes each?",
|
|
160
|
-
"Does every task have an acceptance criterion link, exact verification command/manual step, and expected evidence/pass condition?",
|
|
161
|
-
"Are there tasks that touch multiple unrelated areas?",
|
|
162
|
-
"Would a new engineer understand and start each task within two minutes?"
|
|
163
|
-
],
|
|
164
|
-
stopGate: true
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
title: "Batch Completeness Audit",
|
|
168
|
-
evaluationPoints: [
|
|
169
|
-
"Does every task belong to exactly one batch?",
|
|
170
|
-
"Does each batch have a verification gate?",
|
|
171
|
-
"Are batch dependencies explicit and acyclic?",
|
|
172
|
-
"Is the acceptance mapping complete — every spec criterion covered?",
|
|
173
|
-
"Are there hidden dependencies between tasks in different batches?",
|
|
174
|
-
"Does the Execution Posture match the dependency graph and stop risky parallelism?"
|
|
175
|
-
],
|
|
176
|
-
stopGate: true
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
title: "Five-Minute Budget + No-Placeholders Audit",
|
|
180
|
-
evaluationPoints: [
|
|
181
|
-
"Does every internal TDD step carry a bounded 2-to-5-minute estimate or checkbox-level step? Whole units may be larger when feature-atomic.",
|
|
182
|
-
"Are all file paths, test commands, verification commands, and expected evidence copy-pasteable/specific as written — no `TODO`, `TBD`, `FIXME`, `<fill-in>`, `<your-*-here>`, `xxx`, bare `run tests`, or ellipsis standing in for omitted args?",
|
|
183
|
-
"Does every acceptance-criterion reference resolve to a real R# / AC-### in the spec (not a blank link)?",
|
|
184
|
-
"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?"
|
|
185
|
-
],
|
|
186
|
-
stopGate: true
|
|
187
|
-
}
|
|
188
|
-
]
|
|
189
|
-
},
|
|
190
|
-
next: "tdd",
|
|
191
|
-
};
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import { decisionProtocolInstruction, STRUCTURED_ASK_TOOL_LIST_REVIEW, structuredAskSingleChoiceInstruction } from "../decision-protocol.js";
|
|
2
|
-
// ---------------------------------------------------------------------------
|
|
3
|
-
// REVIEW — reference: superpowers code-review + gstack /review
|
|
4
|
-
// ---------------------------------------------------------------------------
|
|
5
|
-
export const REVIEW = {
|
|
6
|
-
schemaShape: "v2",
|
|
7
|
-
stage: "review",
|
|
8
|
-
complexityTier: "standard",
|
|
9
|
-
skillFolder: "review",
|
|
10
|
-
skillName: "review",
|
|
11
|
-
skillDescription: "Two-layer review stage: spec compliance first, then code quality and production readiness. Section-by-section with severity discipline.",
|
|
12
|
-
philosophy: {
|
|
13
|
-
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.",
|
|
14
|
-
ironLaw: "NO SHIP VERDICT UNTIL BOTH REVIEW LAYERS COMPLETE AND EVERY CRITICAL IS RESOLVED OR EXPLICITLY ACCEPTED.",
|
|
15
|
-
purpose: "Validate that implementation matches spec and meets quality/security/performance bar through structured two-layer review.",
|
|
16
|
-
whenToUse: [
|
|
17
|
-
"After TDD stage completes",
|
|
18
|
-
"Before any ship action",
|
|
19
|
-
"When release risk must be assessed explicitly"
|
|
20
|
-
],
|
|
21
|
-
whenNotToUse: [
|
|
22
|
-
"There is no implementation diff to review",
|
|
23
|
-
"TDD stage evidence is missing or stale"
|
|
24
|
-
],
|
|
25
|
-
commonRationalizations: [
|
|
26
|
-
"Single generic review without layered structure",
|
|
27
|
-
"No severity classification",
|
|
28
|
-
"Shipping with open criticals",
|
|
29
|
-
"Batching multiple findings into one report without individual resolution",
|
|
30
|
-
"Skipping Layer 2 sections because Layer 1 passed"
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
executionModel: {
|
|
34
|
-
checklist: [
|
|
35
|
-
"**MANDATE — controller never authors review findings.** The controller orchestrates; `reviewer` and `security-reviewer` are mandatory delegated workers that produce the actual findings, lens coverage, and verdict input. **Dispatch them in parallel as harness Task subagents in a single controller message** — one Task per lens. Do NOT type `## Layer 1 Findings`, `## Layer 2 Findings`, `## Lens Coverage`, or `## Final Verdict` content into `07-review.md` yourself as a substitute for delegating. The controller's only writes to the review artifact are: structural scaffolding (section headings if the template did not pre-render them) and the reconciled multi-specialist verdict block AFTER all reviewer Tasks return.",
|
|
36
|
-
"**Boundary with TDD (do NOT re-classify slice findings).** `tdd.Per-Slice Review` OWNS severity-classified findings WITHIN a single slice (correctness, edge cases, regression for that slice). `review` OWNS whole-diff Layer 1 (spec compliance) plus Layer 2 (cross-slice integration findings, security sweep, dependency/version audit, observability). When the same finding ID appears in both `06-tdd.md > Per-Slice Review` and `07-review.md` / `07-review-army.json`, the severity/disposition MUST match — the cross-artifact-duplication linter blocks otherwise.",
|
|
37
|
-
"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.",
|
|
38
|
-
"Change-Size Check — ~100 lines = normal. ~300 lines = consider splitting. ~1000+ lines = strongly recommend stacked PRs. Flag large diffs to the user.",
|
|
39
|
-
"Risk-Based Second Opinion — compute changed-line count, files-touched count, and trust-boundary movement. Dispatch an adversarial reviewer only when trust boundaries changed, Critical/Important ambiguity remains, or the diff is both large and high-risk; otherwise record `not triggered`.",
|
|
40
|
-
"Load upstream evidence — read TDD artifact (RED + GREEN + REFACTOR + per-slice reviews), spec, design (architecture lens carry-forward), and the active track's upstream source items.",
|
|
41
|
-
"Confirm spec acceptance criteria and reproduction slices are covered directly in the review artifact evidence.",
|
|
42
|
-
"Layer 1: Spec Compliance — check every acceptance criterion against implementation. Verdict: pass/fail per criterion.",
|
|
43
|
-
"Review Evidence Scope — record base/head, files inspected, changed-file coverage, diagnostics run, dependency/version audit when relevant, and any files intentionally not inspected with explicit reason.",
|
|
44
|
-
"**Layer 2: Cross-slice integration findings — only findings that span >1 slice OR are not surfaced by per-slice tdd reviews.** Carry-forward: cite tdd per-slice review IDs already accepted; do not re-classify them. New categories owned by review Layer 2: cross-slice correctness, dependency/version audit, security sweep, observability gaps, external-safety. **Performance and architecture findings come from the design lens (cite `03-design-<slug>.md` Performance Budget / Architecture Decision Record); they are NOT re-derived in review.** Every finding uses file:line; if impossible, include an explicit no-line reason.",
|
|
45
|
-
"Security sweep — mandatory dedicated security-reviewer pass across diff + touched modules. A zero-finding pass must include `NO_CHANGE_ATTESTATION` or `NO_SECURITY_IMPACT` with rationale and inspected surfaces.",
|
|
46
|
-
"Incoming Feedback Intake — when human reviewer comments, bot findings, or CI annotations exist, keep a per-comment disposition queue and mirror outcomes into `07-review.md` + `07-review-army.json` before final verdict.",
|
|
47
|
-
"Structured Review reconciliation — normalize findings into `07-review-army.json`, dedup by fingerprint, and mark multi-specialist confirmations when multiple lenses agree.",
|
|
48
|
-
"Meta-Review — Were tests/diagnostics actually run? Do test names match what they test? Are there real assertions? Is the dependency/version surface unchanged or audited?",
|
|
49
|
-
"Classify findings — Critical (blocks ship), Important (should fix), Suggestion (optional improvement).",
|
|
50
|
-
"Victory Detector — before verdict, confirm Layer 1, Layer 2, security sweep, structured findings, acceptance/reproduction coverage evidence, and unresolved-critical status are complete; otherwise iterate findings or route back to TDD.",
|
|
51
|
-
"Produce verdict — APPROVED, APPROVED_WITH_CONCERNS, or BLOCKED.",
|
|
52
|
-
"If verdict is BLOCKED, emit remediation route token `ROUTE_BACK_TO_TDD`, include the managed command `npx cclaw-cli internal rewind tdd \"review_blocked_by_critical <finding-ids>\"`, list the critical finding IDs and required TDD evidence to repair, and satisfy the special transition guard `review_verdict_blocked` instead of `review_criticals_resolved`. After TDD rework, clear the stale marker with `npx cclaw-cli internal rewind --ack tdd` before `/cc`."
|
|
53
|
-
],
|
|
54
|
-
interactionProtocol: [
|
|
55
|
-
"Run Layer 1 (spec compliance) completely before starting Layer 2.",
|
|
56
|
-
"In each review section, present findings ONE AT A TIME. Do NOT batch.",
|
|
57
|
-
"Classify every finding as Critical, Important, or Suggestion.",
|
|
58
|
-
decisionProtocolInstruction("each Critical finding", "present resolution options (A/B/C) with trade-offs, and mark one as (recommended)", "recommend the option that fully closes the finding with no carry-over risk and the smallest blast radius", STRUCTURED_ASK_TOOL_LIST_REVIEW),
|
|
59
|
-
"Resolve all critical blockers before ship. If verdict is BLOCKED, do not pass `review_criticals_resolved`; pass only the remediation route gate `review_verdict_blocked` when routing back to TDD.",
|
|
60
|
-
"When verdict is BLOCKED, do not end with a passive stop: explicitly route remediation to TDD via `ROUTE_BACK_TO_TDD`, point to `npx cclaw-cli internal rewind tdd` with the blocking IDs, and tell the operator to ack the stale TDD marker only after rework is complete.",
|
|
61
|
-
structuredAskSingleChoiceInstruction("final verdict", "verdict (APPROVED / APPROVED_WITH_CONCERNS / BLOCKED)"),
|
|
62
|
-
"**STOP.** Do NOT proceed to ship until the user provides an explicit verdict.",
|
|
63
|
-
"Investigation discipline: follow the shared `## Investigation Discipline` block — `Changed-File Coverage` and Layer 2 findings cite `path:line`; delegate `reviewer`/`security-reviewer` with paths and refs, never with pasted file contents.",
|
|
64
|
-
"Behavior anchor: see the shared `## Behavior anchor` block in this skill — the bad/good pair anchors that `Layer 2 Findings` surface defects, not drive-by refactors."
|
|
65
|
-
],
|
|
66
|
-
process: [
|
|
67
|
-
"Layer 1: check acceptance criteria and requirement coverage.",
|
|
68
|
-
"Layer 2: record integrated findings tagged correctness/security/performance/architecture/external-safety.",
|
|
69
|
-
"Security-reviewer: run mandatory security sweep or no-change attestation.",
|
|
70
|
-
"Reconcile structured findings into `.cclaw/artifacts/07-review-army.json` (dedup + confidence + conflict notes + source tags from spec/correctness/security/performance/architecture/external-safety passes).",
|
|
71
|
-
"Classify and prioritize all findings.",
|
|
72
|
-
"Write review report artifact with explicit verdict.",
|
|
73
|
-
"If verdict is BLOCKED, include the remediation route token `ROUTE_BACK_TO_TDD`, the managed rewind command payload, and the follow-up ack command after TDD rework."
|
|
74
|
-
],
|
|
75
|
-
requiredGates: [
|
|
76
|
-
{ id: "review_layer1_spec_compliance", description: "Spec compliance check completed with per-criterion verdict." },
|
|
77
|
-
{ id: "review_layer2_security", description: "Security review completed." },
|
|
78
|
-
{ id: "review_layer_coverage_complete", description: "Layer coverage map in 07-review-army.json confirms spec/correctness/security/performance/architecture/external-safety tags were considered." },
|
|
79
|
-
{ id: "review_criticals_resolved", description: "Normal APPROVED or APPROVED_WITH_CONCERNS path only: no unresolved critical blockers remain. BLOCKED routes use review_verdict_blocked instead." },
|
|
80
|
-
{ id: "review_army_json_valid", description: "07-review-army.json passes schema validation (validateReviewArmy)." }
|
|
81
|
-
],
|
|
82
|
-
requiredEvidence: [
|
|
83
|
-
"Artifact written to `.cclaw/artifacts/07-review.md`.",
|
|
84
|
-
"Artifact written to `.cclaw/artifacts/07-review-army.json`.",
|
|
85
|
-
"Acceptance/reproduction coverage evidence recorded in the review artifact (AC and source-item/slice coverage snapshot).",
|
|
86
|
-
"Layer 1 verdict captured with per-criterion pass/fail.",
|
|
87
|
-
"Review Evidence Scope lists files inspected, changed-file coverage, diagnostics run, and omitted files with explicit reason.",
|
|
88
|
-
"Layer 2 cross-slice findings recorded for: cross-slice correctness, security sweep, dependency/version audit, observability, external-safety. Performance/architecture come from design lens carry-forward (`03-design-<slug>.md`) — do NOT re-derive them.",
|
|
89
|
-
"Per-slice tdd review findings cited (not re-classified): each `06-tdd.md > Per-Slice Review` ID accepted in review must keep matching severity/disposition (cross-artifact-duplication linter enforces this).",
|
|
90
|
-
"Every finding cites `file:line`, or an explicit no-line reason is recorded.",
|
|
91
|
-
"No-finding attestation is explicit when no issues are found.",
|
|
92
|
-
"Dependency/version audit is recorded when manifests, lockfiles, generated clients, CI, runtime config, or external APIs are relevant.",
|
|
93
|
-
"Severity log includes critical/important/suggestion buckets.",
|
|
94
|
-
"Victory Detector recorded: Layer 1, Layer 2, security sweep, structured findings, acceptance/reproduction coverage evidence, and unresolved-critical status are complete, or BLOCKED route is explicit.",
|
|
95
|
-
"Explicit final verdict: APPROVED, APPROVED_WITH_CONCERNS, or BLOCKED.",
|
|
96
|
-
"Fresh verification command discovery recorded before ship handoff, with command and result captured in review evidence.",
|
|
97
|
-
"If BLOCKED: include explicit remediation route (`ROUTE_BACK_TO_TDD`) with blocking finding IDs, managed rewind command, and post-rework ack instruction."
|
|
98
|
-
],
|
|
99
|
-
inputs: ["implementation diff", "upstream artifacts", "test/build evidence"],
|
|
100
|
-
requiredContext: ["spec criteria", "tdd artifact", "rulebook constraints"],
|
|
101
|
-
blockers: [
|
|
102
|
-
"layer 1 failed",
|
|
103
|
-
"critical findings unresolved",
|
|
104
|
-
"missing regression evidence"
|
|
105
|
-
],
|
|
106
|
-
exitCriteria: [
|
|
107
|
-
"both layers completed",
|
|
108
|
-
"all review sections evaluated",
|
|
109
|
-
"critical blockers resolved for APPROVED paths, or BLOCKED routes through review_verdict_blocked",
|
|
110
|
-
"ship readiness or remediation route explicitly stated"
|
|
111
|
-
],
|
|
112
|
-
platformNotes: [
|
|
113
|
-
"When citing file locations in findings, use repo-relative forward-slash paths with a line number (`src/foo/bar.ts:42`). Avoid IDE-generated hyperlinks that embed absolute machine-specific paths.",
|
|
114
|
-
"Line-range or diff-range references must match `git diff --unified=0` output format so reviewers on any OS can reproduce the range locally without GUI tooling.",
|
|
115
|
-
"Commands in remediation suggestions must be portable (`npm run lint`, `pytest -x path/to/test`) — if a platform-specific command is required, tag the note explicitly (`# PowerShell only`, `# macOS only`)."
|
|
116
|
-
]
|
|
117
|
-
},
|
|
118
|
-
artifactRules: {
|
|
119
|
-
artifactFile: "07-review.md",
|
|
120
|
-
completionStatus: ["APPROVED", "APPROVED_WITH_CONCERNS", "BLOCKED"],
|
|
121
|
-
crossStageTrace: {
|
|
122
|
-
readsFrom: [".cclaw/artifacts/06-tdd.md", ".cclaw/artifacts/04-spec.md", ".cclaw/artifacts/05-plan.md"],
|
|
123
|
-
writesTo: [".cclaw/artifacts/07-review.md", ".cclaw/artifacts/07-review-army.json"],
|
|
124
|
-
traceabilityRule: "Review verdict must reference specific spec criteria and TDD evidence. Downstream ship stage must reference review verdict."
|
|
125
|
-
},
|
|
126
|
-
artifactValidation: [
|
|
127
|
-
{ section: "Upstream Handoff", required: false, validationRule: "Summarizes spec/plan/tdd decisions, constraints, open questions, and explicit drift before review verdicts." },
|
|
128
|
-
{ section: "Review Evidence Scope", required: true, validationRule: "Base/head, files inspected, changed-file coverage, diagnostics run, omitted files with reason, and reviewer/security-reviewer delegation evidence." },
|
|
129
|
-
{ section: "Changed-File Coverage", required: true, validationRule: "Each changed file is covered, intentionally omitted with no-impact reason, or linked to a broader inspected module." },
|
|
130
|
-
{ section: "Layer 1 Verdict", required: true, validationRule: "Per-criterion pass/fail with references." },
|
|
131
|
-
{ section: "Layer 2 Findings", required: false, validationRule: "Each finding has severity, category, file:line or explicit no-line reason, description, and resolution status. Owned categories are cross-slice correctness, security, dependency/version, observability, and external-safety. Performance and architecture findings appear here only as carry-forward citations to `03-design-<slug>.md` (Performance Budget, ADR) — they are NOT re-derived. If there are no findings, include a no-finding attestation." },
|
|
132
|
-
{ section: "Lens Coverage", required: true, validationRule: "Reviewer must report inline lens outcomes: Performance/Compatibility/Observability as `NO_IMPACT` or `FOUND_<n>`, plus `Security: routed to security-reviewer`." },
|
|
133
|
-
{ section: "Security Sweep Attestation", required: false, validationRule: "Dedicated security-reviewer result: findings or `NO_CHANGE_ATTESTATION` / `NO_SECURITY_IMPACT` with inspected surfaces and rationale." },
|
|
134
|
-
{ section: "Dependency & Version Audit", required: false, validationRule: "Required when manifests, lockfiles, generated clients, CI, runtime config, or external APIs changed; otherwise record no-impact rationale." },
|
|
135
|
-
{ section: "Review Findings Contract", required: true, validationRule: "Structured findings in 07-review-army.json include id/severity/confidence/fingerprint/reportedBy/status and source tags from {spec, correctness, security, performance, architecture, external-safety} with dedup reconciliation summary." },
|
|
136
|
-
{ section: "Review Readiness Snapshot", required: false, validationRule: "Optional compact summary: completed checks, delegation-log status, staleness signal, open critical blockers, ship recommendation, and Victory Detector pass/fail." },
|
|
137
|
-
{ section: "Completeness Snapshot", required: false, validationRule: "Optional compact coverage summary for AC coverage, source item coverage, test-slice coverage, and adversarial-review status when triggered." },
|
|
138
|
-
{ section: "Incoming Feedback Queue", required: false, validationRule: "When external review feedback exists, include a queue summary with per-item disposition (resolved / accepted-risk / rejected-with-evidence) and evidence refs." },
|
|
139
|
-
{ section: "Coverage Check", required: false, validationRule: "Records AC/source-item/slice coverage status with explicit no-orphan rationale and evidence references." },
|
|
140
|
-
{ section: "Blocked Route", required: false, validationRule: "When Final Verdict is BLOCKED: includes `ROUTE_BACK_TO_TDD`, rewind target `tdd`, and blocked finding IDs." },
|
|
141
|
-
{ section: "Severity Summary", required: true, validationRule: "Per-severity count lines for critical, important, and suggestion buckets." },
|
|
142
|
-
{ section: "Final Verdict", required: true, validationRule: "Exactly one of: APPROVED, APPROVED_WITH_CONCERNS, BLOCKED." }
|
|
143
|
-
]
|
|
144
|
-
},
|
|
145
|
-
reviewLens: {
|
|
146
|
-
outputs: ["review verdict", "severity-indexed findings", "reconciled structured findings", "ship readiness decision"],
|
|
147
|
-
reviewSections: [
|
|
148
|
-
{
|
|
149
|
-
title: "Layer 1: Spec Compliance",
|
|
150
|
-
evaluationPoints: [
|
|
151
|
-
"For each acceptance criterion: does the implementation satisfy it?",
|
|
152
|
-
"Are there spec requirements with no corresponding implementation?",
|
|
153
|
-
"Are there implementations with no corresponding spec requirement (scope creep)?",
|
|
154
|
-
"Is every edge case from the spec handled?"
|
|
155
|
-
],
|
|
156
|
-
stopGate: true
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
title: "Layer 2: Cross-slice Integration Findings",
|
|
160
|
-
evaluationPoints: [
|
|
161
|
-
"Cross-slice correctness: logic errors and boundary violations that span >1 slice",
|
|
162
|
-
"Race conditions and concurrency issues across slice boundaries",
|
|
163
|
-
"Null/undefined handling in shared paths",
|
|
164
|
-
"Error propagation and recovery across module seams (single-slice findings stay in tdd Per-Slice Review)"
|
|
165
|
-
],
|
|
166
|
-
stopGate: true
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
title: "Security Sweep",
|
|
170
|
-
evaluationPoints: [
|
|
171
|
-
"Input validation completeness",
|
|
172
|
-
"Authorization boundary enforcement",
|
|
173
|
-
"Secrets exposure risk",
|
|
174
|
-
"Injection vector assessment"
|
|
175
|
-
],
|
|
176
|
-
stopGate: true
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
title: "Performance Lens: Carry-forward from Design",
|
|
180
|
-
evaluationPoints: [
|
|
181
|
-
"Cite `03-design-<slug>.md > Performance Budget` per critical path",
|
|
182
|
-
"Surface DRIFT only when implementation diff measurably violates a budgeted threshold; do NOT re-derive performance findings from scratch",
|
|
183
|
-
"Hot path / N+1 / caching observations belong here only when they cross slice boundaries and were not flagged by tdd Per-Slice Review"
|
|
184
|
-
],
|
|
185
|
-
stopGate: false
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
title: "Architecture Lens: Carry-forward from Design",
|
|
189
|
-
evaluationPoints: [
|
|
190
|
-
"Cite `03-design-<slug>.md > Architecture Decision Record (ADR)` and `Engineering Lock`",
|
|
191
|
-
"Surface DRIFT only when the implementation departs from the locked architecture; do NOT re-derive boundary/coupling/interface analysis from scratch",
|
|
192
|
-
"Cross-slice architectural drift findings use `file:line` plus the violated ADR ID"
|
|
193
|
-
],
|
|
194
|
-
stopGate: false
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
title: "Specialist Lens: External Safety Checklist",
|
|
198
|
-
evaluationPoints: [
|
|
199
|
-
"SQL/database: parameterized queries, no raw string interpolation, migration safety",
|
|
200
|
-
"Concurrency: race conditions in shared state, lock ordering, timeout handling",
|
|
201
|
-
"Secrets: no hardcoded tokens, no secrets in logs, env vars for sensitive config",
|
|
202
|
-
"Enum/constant completeness: grep for sibling values OUTSIDE the diff — are all cases handled?",
|
|
203
|
-
"Trust boundaries: if LLM/AI output is used, is it validated before acting on it?"
|
|
204
|
-
],
|
|
205
|
-
stopGate: true
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
title: "Specialist Lens: Data & Migration Safety",
|
|
209
|
-
evaluationPoints: [
|
|
210
|
-
"Schema/data migrations are reversible and include backfill/rollback strategy",
|
|
211
|
-
"Idempotency expectations are explicit for retryable flows",
|
|
212
|
-
"Data-loss scenarios (truncate/overwrite/drop) are guarded by checks or dry-runs",
|
|
213
|
-
"Boundary contracts (API/schema/event payload) maintain backward compatibility or are versioned"
|
|
214
|
-
],
|
|
215
|
-
stopGate: false
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
title: "Specialist Lens: Developer Experience",
|
|
219
|
-
evaluationPoints: [
|
|
220
|
-
"New behavior includes discoverable docs/usage notes where needed",
|
|
221
|
-
"Error messages are actionable for on-call and local debugging",
|
|
222
|
-
"Default configuration remains safe and unsurprising",
|
|
223
|
-
"Change footprint stays minimal and avoids hidden coupling"
|
|
224
|
-
],
|
|
225
|
-
stopGate: false
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
title: "Meta-Review: Verify the Verification",
|
|
229
|
-
evaluationPoints: [
|
|
230
|
-
"Were tests actually run (not just assumed to pass)?",
|
|
231
|
-
"Do the test names match what they actually test?",
|
|
232
|
-
"Is there test coverage for the specific changes in this diff?",
|
|
233
|
-
"Are there assertions, or do tests just run without checking results?"
|
|
234
|
-
],
|
|
235
|
-
stopGate: false
|
|
236
|
-
}
|
|
237
|
-
]
|
|
238
|
-
},
|
|
239
|
-
next: "ship",
|
|
240
|
-
};
|