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,159 +0,0 @@
|
|
|
1
|
-
import { decisionProtocolInstruction } from "../decision-protocol.js";
|
|
2
|
-
// ---------------------------------------------------------------------------
|
|
3
|
-
// SHIP — reference: superpowers finishing-a-development-branch + gstack /ship
|
|
4
|
-
// ---------------------------------------------------------------------------
|
|
5
|
-
export const SHIP = {
|
|
6
|
-
schemaShape: "v2",
|
|
7
|
-
stage: "ship",
|
|
8
|
-
complexityTier: "standard",
|
|
9
|
-
skillFolder: "ship",
|
|
10
|
-
skillName: "ship",
|
|
11
|
-
skillDescription: "Release handoff stage with preflight checks, rollback readiness, and explicit finalization mode for both git and non-git workflows.",
|
|
12
|
-
philosophy: {
|
|
13
|
-
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. If no VCS is available, use FINALIZE_NO_VCS explicitly instead of inventing git steps.",
|
|
14
|
-
ironLaw: "NO MERGE WITHOUT GREEN CI, A WRITTEN ROLLBACK, AND EXACTLY ONE SELECTED FINALIZATION MODE.",
|
|
15
|
-
purpose: "Prepare a safe release handoff with clear rollback and branch finalization decision.",
|
|
16
|
-
whenToUse: [
|
|
17
|
-
"After review passes with APPROVED or APPROVED_WITH_CONCERNS verdict",
|
|
18
|
-
"Before creating PR/merge/final branch action",
|
|
19
|
-
"When release notes and rollback plan are required",
|
|
20
|
-
"When shipping from non-git environments (docs bundles, script drops, detached artifacts)"
|
|
21
|
-
],
|
|
22
|
-
whenNotToUse: [
|
|
23
|
-
"Review verdict is BLOCKED or unresolved critical findings remain",
|
|
24
|
-
"Preflight checks cannot run and no approved exception exists",
|
|
25
|
-
"The request is still design/spec/implementation work, not release handoff"
|
|
26
|
-
],
|
|
27
|
-
commonRationalizations: [
|
|
28
|
-
"Shipping without rollback strategy",
|
|
29
|
-
"Implicit finalization decision",
|
|
30
|
-
"Bypassing preflight due to urgency",
|
|
31
|
-
"Selecting multiple finalization modes",
|
|
32
|
-
"Shipping with BLOCKED review verdict",
|
|
33
|
-
"No rollback trigger/steps",
|
|
34
|
-
"More than one finalization mode implied",
|
|
35
|
-
"No explicit preflight result",
|
|
36
|
-
"Review verdict not referenced",
|
|
37
|
-
"Finalization not executed, only planned",
|
|
38
|
-
"Selecting git-dependent finalization mode when `.git` is unavailable"
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
executionModel: {
|
|
42
|
-
checklist: [
|
|
43
|
-
"Validate upstream gates — verify review verdict is APPROVED or APPROVED_WITH_CONCERNS. If BLOCKED, stop immediately.",
|
|
44
|
-
"Run preflight checks — tests pass, build succeeds, linter clean, type-check clean, no uncommitted changes. Every check must produce fresh output in this message.",
|
|
45
|
-
"Merge-base detection (git only) — identify the correct base branch. Run `git merge-base HEAD <base>`. If the base has diverged significantly, flag for rebase-first.",
|
|
46
|
-
"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.",
|
|
47
|
-
"Generate release notes — summarize what changed, why, and what it affects. Reference spec criteria. Include: breaking changes, new dependencies, migration steps if any.",
|
|
48
|
-
"Assemble acceptance traceability matrix — for each spec AC-N, list mapped slice IDs and at least one managed commit proving closure.",
|
|
49
|
-
"Write rollback plan — trigger conditions (what tells you it is broken), rollback steps (exact commands/git operations), and verification (how to confirm rollback worked).",
|
|
50
|
-
"Load utility skills — `verification-before-completion` for fresh evidence and `finishing-a-development-branch` for finalization workflow.",
|
|
51
|
-
"Monitoring checklist — what should be watched after deploy? Error rates, latency, key business metrics. If no monitoring exists, flag it as a risk.",
|
|
52
|
-
"Detect repository mode — if `.git/` is absent or inaccessible, lock finalization choices to FINALIZE_NO_VCS only and document manual handoff + rollback.",
|
|
53
|
-
"Victory Detector — valid review verdict, fresh preflight, rollback trigger/steps, exactly one finalization enum, and execution target are present; if any field is stale or missing, keep status BLOCKED and iterate.",
|
|
54
|
-
"Select finalization mode — exactly ONE enum: (A) FINALIZE_MERGE_LOCAL, (B) FINALIZE_OPEN_PR, (C) FINALIZE_KEEP_BRANCH, (D) FINALIZE_DISCARD_BRANCH, (E) FINALIZE_NO_VCS. For discard: list what will be deleted, require typed confirmation.",
|
|
55
|
-
"Execute finalization — perform the selected action. For merge: verify clean merge. For PR: include structured body (summary, test plan, rollback). For discard: verify deletion. For NO_VCS: record handoff target, artifact bundle path, and manual rollback owner.",
|
|
56
|
-
"Branch cleanup — after merge/discard, remove only branches or temporary files the user explicitly approved. Skip for FINALIZE_NO_VCS."
|
|
57
|
-
],
|
|
58
|
-
interactionProtocol: [
|
|
59
|
-
"Run preflight checks before any release action.",
|
|
60
|
-
"Document release notes and rollback plan explicitly.",
|
|
61
|
-
decisionProtocolInstruction("finalization mode", "present modes as labeled options (A/B/C/D/E) with consequences, and mark one as (recommended)", "recommend the mode that best addresses release blast-radius, rollback readiness, observability, and stakeholder communication — ties go to the most reversible option"),
|
|
62
|
-
"Do not proceed if critical blockers remain from review.",
|
|
63
|
-
"**STOP.** Present finalization options and wait for user selection before executing any finalization action.",
|
|
64
|
-
"Behavior anchor: see the shared `## Behavior anchor` block in this skill — the bad/good pair anchors that `Preflight Results` cite fresh command output, exit codes, and the commit SHA from this turn."
|
|
65
|
-
],
|
|
66
|
-
process: [
|
|
67
|
-
"Validate review and test gates.",
|
|
68
|
-
"Run preflight: build, test, lint, uncommitted-changes check.",
|
|
69
|
-
"Generate release notes and rollback procedure.",
|
|
70
|
-
"Choose one finalization enum: FINALIZE_MERGE_LOCAL, FINALIZE_OPEN_PR, FINALIZE_KEEP_BRANCH, FINALIZE_DISCARD_BRANCH, or FINALIZE_NO_VCS.",
|
|
71
|
-
"Execute finalization action.",
|
|
72
|
-
"Write ship artifact with decision, rationale, and execution result."
|
|
73
|
-
],
|
|
74
|
-
requiredGates: [
|
|
75
|
-
{ id: "ship_review_verdict_valid", description: "Review verdict is APPROVED or APPROVED_WITH_CONCERNS." },
|
|
76
|
-
{ id: "ship_preflight_passed", description: "Preflight checks passed or exceptions documented and approved." },
|
|
77
|
-
{ id: "ship_rollback_plan_ready", description: "Rollback trigger, steps, and verification are documented." },
|
|
78
|
-
{ id: "ship_all_acceptance_criteria_have_commits", description: "Every spec AC-N has at least one `Closes: AC-N` slice mapping and a managed slice commit in the active run." },
|
|
79
|
-
{ id: "ship_finalization_executed", description: "Selected finalization action was executed and verified." }
|
|
80
|
-
],
|
|
81
|
-
requiredEvidence: [
|
|
82
|
-
"Artifact written to `.cclaw/artifacts/08-ship.md`.",
|
|
83
|
-
"Release notes section is complete.",
|
|
84
|
-
"Traceability Matrix maps each spec AC-N to slice IDs and managed commit evidence.",
|
|
85
|
-
"Rollback section includes trigger conditions, steps, and verification.",
|
|
86
|
-
"Finalization section shows exactly one selected enum token.",
|
|
87
|
-
"Victory Detector result documented: review verdict valid, preflight fresh, rollback ready, finalization enum selected, and execution result present."
|
|
88
|
-
],
|
|
89
|
-
inputs: ["review verdict", "test/build outputs", "release context"],
|
|
90
|
-
requiredContext: ["review artifact", "changelog scope", "deployment constraints"],
|
|
91
|
-
blockers: [
|
|
92
|
-
"review verdict is BLOCKED",
|
|
93
|
-
"critical review blockers remain",
|
|
94
|
-
"rollback plan missing",
|
|
95
|
-
"finalization mode not selected"
|
|
96
|
-
],
|
|
97
|
-
exitCriteria: [
|
|
98
|
-
"preflight completed",
|
|
99
|
-
"rollback and release notes complete",
|
|
100
|
-
"finalization action explicitly chosen and executed"
|
|
101
|
-
],
|
|
102
|
-
platformNotes: [
|
|
103
|
-
"Release commands (`npm publish`, `git tag -s`, `gh release create`, `cargo publish`, `goreleaser`) behave the same across OSes, but signing keys differ: macOS Keychain, Windows credential store, Linux GPG agent. Verify the signing flow on the actual release machine before running the real publish.",
|
|
104
|
-
"Version tags must be pure ASCII and lowercase after an optional `v` prefix (`v1.2.3`, `v1.2.3-rc.1`). Avoid Unicode dashes and non-breaking spaces that sneak in via copy-paste from docs.",
|
|
105
|
-
"When the rollback plan references timestamps (CI run windows, DB snapshot IDs), pin them to UTC ISO-8601 so the plan reads identically across CI runners in different regions.",
|
|
106
|
-
"`gh release create` requires a repo-level `GH_TOKEN`/`GITHUB_TOKEN`; document whether it is sourced from the shell env, `.env`, or the OS keychain so another operator on a different OS can reproduce the release."
|
|
107
|
-
]
|
|
108
|
-
},
|
|
109
|
-
artifactRules: {
|
|
110
|
-
artifactFile: "08-ship.md",
|
|
111
|
-
completionStatus: ["SHIPPED", "SHIPPED_WITH_EXCEPTIONS", "BLOCKED"],
|
|
112
|
-
crossStageTrace: {
|
|
113
|
-
readsFrom: [".cclaw/artifacts/07-review.md", ".cclaw/artifacts/06-tdd.md", ".cclaw/artifacts/05-plan.md", ".cclaw/artifacts/04-spec.md"],
|
|
114
|
-
writesTo: [".cclaw/artifacts/08-ship.md"],
|
|
115
|
-
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."
|
|
116
|
-
},
|
|
117
|
-
artifactValidation: [
|
|
118
|
-
{ section: "Upstream Handoff", required: false, validationRule: "Summarizes review/tdd decisions, constraints, open questions, and explicit drift before finalization." },
|
|
119
|
-
{ section: "Preflight Results", required: true, validationRule: "Build, test, lint, type-check results captured with fresh output. Exceptions documented if any." },
|
|
120
|
-
{ section: "Release Notes", required: true, validationRule: "What changed, why, impact. References spec criteria. Breaking changes flagged." },
|
|
121
|
-
{ section: "Traceability Matrix", required: true, validationRule: "One row per spec AC-N with mapped slice IDs (`S-<id>`), managed commit evidence (`^S-<id>/` subject), and coverage status." },
|
|
122
|
-
{ section: "Rollback Plan", required: true, validationRule: "Trigger conditions, rollback steps (exact commands), verification steps." },
|
|
123
|
-
{ section: "Monitoring", required: false, validationRule: "If applicable: what metrics/logs to watch post-deploy. Risk note if no monitoring." },
|
|
124
|
-
{ section: "Finalization", required: true, validationRule: "Exactly one finalization enum token selected (FINALIZE_MERGE_LOCAL | FINALIZE_OPEN_PR | FINALIZE_KEEP_BRANCH | FINALIZE_DISCARD_BRANCH | FINALIZE_NO_VCS). Execution result documented. Worktree cleaned if applicable." },
|
|
125
|
-
{ section: "Completion Status", required: false, validationRule: "If present: exactly one of SHIPPED, SHIPPED_WITH_EXCEPTIONS, BLOCKED. Exceptions documented when applicable. BLOCKED is required when the Victory Detector has stale or missing evidence." },
|
|
126
|
-
{ section: "Compound Step", required: false, validationRule: "Optional retrospective: include overlap assessment before appending duplicate knowledge; distinguish bug-track fixes/tests from knowledge-track process/project guidance; or include an explicit 'No compound insight this run.' line." }
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
reviewLens: {
|
|
130
|
-
outputs: ["release package handoff", "rollback plan", "final branch decision"],
|
|
131
|
-
reviewSections: [
|
|
132
|
-
{
|
|
133
|
-
title: "Preflight Verification",
|
|
134
|
-
evaluationPoints: [
|
|
135
|
-
"Test suite: full run, all pass, output captured",
|
|
136
|
-
"Build: clean build, exit code 0",
|
|
137
|
-
"Lint/format: no violations",
|
|
138
|
-
"Type-check: no errors",
|
|
139
|
-
"Working tree: no uncommitted changes"
|
|
140
|
-
],
|
|
141
|
-
stopGate: true
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
title: "Release Readiness",
|
|
145
|
-
evaluationPoints: [
|
|
146
|
-
"Release notes are accurate and reference spec criteria",
|
|
147
|
-
"Breaking changes are documented with migration steps",
|
|
148
|
-
"Rollback plan has trigger, steps, and verification",
|
|
149
|
-
"If applicable: monitoring/alerting is in place for the change"
|
|
150
|
-
],
|
|
151
|
-
stopGate: true
|
|
152
|
-
}
|
|
153
|
-
]
|
|
154
|
-
},
|
|
155
|
-
// `done` exits the stage pipeline. Archive semantics are handled by the
|
|
156
|
-
// closeout substate machine (`idle` -> ... -> `archived`) in flow-state under
|
|
157
|
-
// ${closeoutSubstateInline()}.
|
|
158
|
-
next: "done",
|
|
159
|
-
};
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
// ---------------------------------------------------------------------------
|
|
2
|
-
// SPEC
|
|
3
|
-
// ---------------------------------------------------------------------------
|
|
4
|
-
export const SPEC = {
|
|
5
|
-
schemaShape: "v2",
|
|
6
|
-
stage: "spec",
|
|
7
|
-
complexityTier: "standard",
|
|
8
|
-
skillFolder: "spec",
|
|
9
|
-
skillName: "spec",
|
|
10
|
-
skillDescription: "Specification stage. Produce measurable, testable requirements without ambiguity.",
|
|
11
|
-
philosophy: {
|
|
12
|
-
hardGate: "Do NOT plan tasks or write implementation code. This stage produces a specification document only. Every requirement must be expressed in observable, testable terms.",
|
|
13
|
-
ironLaw: "EVERY ACCEPTANCE CRITERION MUST BE OBSERVABLE AND TESTABLE — OR IT DOES NOT EXIST.",
|
|
14
|
-
purpose: "Create a testable specification aligned with approved design and constraints.",
|
|
15
|
-
whenToUse: [
|
|
16
|
-
"After design lock",
|
|
17
|
-
"Before planning and implementation",
|
|
18
|
-
"When acceptance criteria must be measurable"
|
|
19
|
-
],
|
|
20
|
-
whenNotToUse: [
|
|
21
|
-
"Design decisions are still unresolved or disputed",
|
|
22
|
-
"The task is implementation-only cleanup with unchanged behavior",
|
|
23
|
-
"You still need to challenge scope rather than author requirements"
|
|
24
|
-
],
|
|
25
|
-
commonRationalizations: [
|
|
26
|
-
"High-level goals without measurable outcomes",
|
|
27
|
-
"Implicit assumptions",
|
|
28
|
-
"Proceeding to plan before approval",
|
|
29
|
-
"Using vague adjectives (fast, intuitive, robust) without thresholds",
|
|
30
|
-
"No explicit assumptions section",
|
|
31
|
-
"No approval record",
|
|
32
|
-
"No testability mapping",
|
|
33
|
-
"Assumptions not surfaced before sign-off",
|
|
34
|
-
"Edge cases missing or deferred"
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
executionModel: {
|
|
38
|
-
checklist: [
|
|
39
|
-
"Read upstream — standard track loads design + scope; medium loads brainstorm/spec handoff; quick loads `00-idea.md` plus any reproduction context. Cross-reference only artifacts that exist on the active track.",
|
|
40
|
-
"Define measurable acceptance criteria — each criterion must be observable and falsifiable. No vague adjectives.",
|
|
41
|
-
"Capture edge cases — for each criterion, define at least one boundary condition and one error condition.",
|
|
42
|
-
"**Constraints carry-forward (do NOT re-author).** Scope OWNS external/regulatory/system/integration constraints in `## Scope Contract > Constraints`. Cite them in `## Constraints and Assumptions > Constraints` (or mark `See scope: <ref>`). Add a constraint here only when spec-stage analysis surfaced a NEW one not present in scope. Spec OWNS testable assumptions (next bullet). Only non-critical preference/default assumptions may continue; STOP on uncertainty about scope, architecture, security, data loss, public API, migration, auth/pricing, or required user approval.",
|
|
43
|
-
"**Assumptions Before Finalization (spec-only owner).** Spec OWNS testable assumptions: list each with source/confidence, validation path, and accepted/rejected/open disposition in `## Assumptions Before Finalization`. Do NOT duplicate scope's constraints here as assumptions.",
|
|
44
|
-
"Build the Acceptance Mapping contract — for each AC, map upstream design decision, observable evidence, verification method, and likely test level. If any column is unclear, rewrite the criterion.",
|
|
45
|
-
"Run Spec Self-Review — explicitly verify placeholder/consistency/scope/ambiguity checks before approval.",
|
|
46
|
-
"Present acceptance criteria to the user in 3-5-item batches, pausing for explicit ACK between batches (see Interaction Protocol).",
|
|
47
|
-
"Write spec artifact and request user approval — wait for explicit confirmation before proceeding."
|
|
48
|
-
],
|
|
49
|
-
interactionProtocol: [
|
|
50
|
-
"Express each requirement in observable terms.",
|
|
51
|
-
"Resolve ambiguity before moving to plan. Challenge vague language.",
|
|
52
|
-
"Capture assumptions explicitly, not implicitly.",
|
|
53
|
-
"Before final spec approval, present the assumptions section as its own checkpoint so the user can accept, revise, or mark an assumption unknown.",
|
|
54
|
-
"**Chunk acceptance criteria for review.** When presenting the spec to the user for sign-off, deliver acceptance criteria in batches of 3-5 and **pause for explicit ACK** (via Decision Protocol) before sending the next batch. Do not dump the full criteria wall in one message — small batches surface objections earlier and keep the sign-off meaningful. Full spec writeup still lands in `04-spec.md`, but the conversation itself must be digestible.",
|
|
55
|
-
"Require user confirmation on the written spec. **STOP.** Do NOT proceed to plan until user approves.",
|
|
56
|
-
"For each criterion, ask: what exact evidence proves this passed? If the evidence or verification command/manual step is vague, rewrite.",
|
|
57
|
-
"When encountering ambiguity, classify it before acting: (A) ask user for missing info, (B) enumerate non-critical interpretations and pick one with justification, (C) propose hypothesis with validation path. Do NOT silently resolve ambiguity. STOP on scope, architecture, security, data loss, public API, migration, auth/pricing, or user-approval uncertainty.",
|
|
58
|
-
"Investigation discipline: follow the shared `## Investigation Discipline` block — derive ACs from cited upstream paths/refs (`02-scope.md#R-2`, `03-design.md#DD-1`) instead of pasting their bodies into delegation prompts.",
|
|
59
|
-
"Behavior anchor: see the shared `## Behavior anchor` block in this skill — the bad/good pair anchors how each `Acceptance Criteria` row must carry an observable predicate plus the evidence path."
|
|
60
|
-
],
|
|
61
|
-
process: [
|
|
62
|
-
"Define measurable acceptance criteria.",
|
|
63
|
-
"Capture constraints, assumptions, and edge cases.",
|
|
64
|
-
"Review assumptions before finalization: source/confidence, validation path, and accepted/rejected/open disposition.",
|
|
65
|
-
"Annotate parallel-slice metadata on each acceptance criterion: `parallelSafe` (true|false) and `touchSurface` (repo-relative paths/modules expected to change) so downstream plan units and TDD lanes stay conflict-aware.",
|
|
66
|
-
"Confirm every verification method is concrete enough for plan/TDD to use later.",
|
|
67
|
-
"Present acceptance criteria to the user in 3-5-item batches, pausing for explicit ACK between batches (see Interaction Protocol).",
|
|
68
|
-
"Write spec artifact and request approval."
|
|
69
|
-
],
|
|
70
|
-
requiredGates: [
|
|
71
|
-
{ id: "spec_ac_ids_present", description: "Acceptance Criteria rows include stable `AC-N` identifiers." },
|
|
72
|
-
{ id: "spec_acceptance_measurable", description: "Acceptance criteria are measurable and observable." },
|
|
73
|
-
{ id: "spec_testability_confirmed", description: "Each criterion has a described test method." },
|
|
74
|
-
{ id: "spec_assumptions_surfaced", description: "Assumptions were explicitly reviewed with source/confidence, validation path, and disposition before approval." },
|
|
75
|
-
{ id: "spec_self_review_complete", description: "Spec Self-Review covers placeholder, consistency, scope, and ambiguity checks before approval." },
|
|
76
|
-
{ id: "spec_user_approved", description: "User approved the final written spec." }
|
|
77
|
-
],
|
|
78
|
-
requiredEvidence: [
|
|
79
|
-
"Artifact written to `.cclaw/artifacts/04-spec.md`.",
|
|
80
|
-
"Each acceptance criterion maps to upstream design decision, observable evidence, verification method, and likely test level.",
|
|
81
|
-
"Edge cases documented per criterion.",
|
|
82
|
-
"Assumptions Before Finalization section records source/confidence, validation path, and accepted/rejected/open disposition.",
|
|
83
|
-
"Spec Self-Review section covers placeholder, consistency, scope, and ambiguity checks with any patches noted.",
|
|
84
|
-
"Approval marker captured in artifact.",
|
|
85
|
-
"For quick bug-fix specs, reproduction contract records symptom, repro steps, expected RED test, and acceptance criterion."
|
|
86
|
-
],
|
|
87
|
-
inputs: ["design artifact", "business constraints", "quality requirements"],
|
|
88
|
-
requiredContext: [
|
|
89
|
-
"design lock baseline",
|
|
90
|
-
"regulatory or system boundaries",
|
|
91
|
-
"integration constraints"
|
|
92
|
-
],
|
|
93
|
-
blockers: [
|
|
94
|
-
"non-measurable criteria",
|
|
95
|
-
"constraints missing",
|
|
96
|
-
"assumptions not surfaced before approval",
|
|
97
|
-
"open ambiguities remain"
|
|
98
|
-
],
|
|
99
|
-
exitCriteria: [
|
|
100
|
-
"spec approved by user",
|
|
101
|
-
"required gates marked satisfied",
|
|
102
|
-
"plan-ready acceptance mapping exists",
|
|
103
|
-
"assumptions reviewed before finalization",
|
|
104
|
-
"testability confirmed for all criteria"
|
|
105
|
-
],
|
|
106
|
-
platformNotes: [
|
|
107
|
-
"Acceptance criteria that reference CLI commands must name the executable portably (`node`, `npm`, `pytest`) and avoid OS-specific shell features (`&&` is safe, `||` differs subtly between cmd.exe and POSIX — prefer explicit multi-step descriptions).",
|
|
108
|
-
"When a criterion specifies file-content expectations, use `LF` as the canonical newline and state any CRLF-on-Windows tolerance explicitly (most git-managed repos normalize via `.gitattributes`; the criterion should not implicitly depend on autocrlf).",
|
|
109
|
-
"Timezone-sensitive criteria (timestamps, retention windows) must pin UTC or note the source of truth — clocks differ across CI runners (GitHub macOS vs Linux image vs Windows image)."
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
artifactRules: {
|
|
113
|
-
artifactFile: "04-spec.md",
|
|
114
|
-
completionStatus: ["DONE", "DONE_WITH_CONCERNS", "BLOCKED"],
|
|
115
|
-
crossStageTrace: {
|
|
116
|
-
readsFrom: [".cclaw/artifacts/03-design-<slug>.md", ".cclaw/artifacts/02-scope-<slug>.md"],
|
|
117
|
-
writesTo: [".cclaw/artifacts/04-spec.md"],
|
|
118
|
-
traceabilityRule: "Every acceptance criterion must trace to a design decision. Every downstream plan task must trace to a spec criterion."
|
|
119
|
-
},
|
|
120
|
-
artifactValidation: [
|
|
121
|
-
{ section: "Upstream Handoff", required: false, validationRule: "Summarizes scope/design decisions, constraints, open questions, and explicit drift before acceptance criteria." },
|
|
122
|
-
{ section: "Acceptance Criteria", required: true, validationRule: "Each criterion is observable, measurable, and falsifiable. Standard track should include Requirement Ref and Design Decision Ref columns; quick track may instead link each AC to the reproduction contract or bug slice. AC IDs (AC-1, AC-2…) are stable across revisions — dropped ACs stay with Priority `DROPPED`. each AC declares `parallelSafe` (true|false) and `touchSurface` (paths/modules) for parallel slice planning." },
|
|
123
|
-
{ section: "Quick Reproduction Contract", required: false, validationRule: "Quick bug-fix specs own the reproduction contract: symptom, repro steps, expected RED test behavior, and acceptance criterion." },
|
|
124
|
-
{ section: "Edge Cases", required: true, validationRule: "At least one boundary and one error condition per criterion." },
|
|
125
|
-
{ section: "Constraints and Assumptions", required: false, validationRule: "Constraints are CARRIED FORWARD from scope's `## Scope Contract > Constraints` (cite with `See scope: <ref>` or copy with attribution). New spec-stage constraints (rare) get a citation to the spec-stage Q&A row that surfaced them. Assumptions are owned by `## Assumptions Before Finalization` — do NOT duplicate them here. Section may be `- See scope: 02-scope.md#constraints.` for the common case." },
|
|
126
|
-
{ section: "Assumptions Before Finalization", required: true, validationRule: "Each assumption has source/confidence, validation path, and accepted/rejected/open disposition before the Approval section is finalized." },
|
|
127
|
-
{ section: "Acceptance Mapping", required: true, validationRule: "Each criterion maps to upstream design decision, observable evidence, verification method, likely test level (unit/integration/e2e/manual), and command or manual steps when known." },
|
|
128
|
-
{ section: "Non-Functional Requirements", required: false, validationRule: "If present: performance thresholds, security constraints, scalability limits, reliability targets with measurable values." },
|
|
129
|
-
{ section: "Interface Contracts", required: false, validationRule: "If present: for each module boundary list produces (outputs) and consumes (inputs) with data types." },
|
|
130
|
-
{ section: "Synthesis Sources", required: false, validationRule: "If present: cite at least one upstream/context source with what it supplied and confidence." },
|
|
131
|
-
{ section: "Behavior Contract", required: false, validationRule: "If present: list >=3 behaviors in user-story or Given/When/Then shape (or `- None.` for single-step specs)." },
|
|
132
|
-
{ section: "Architecture Modules", required: false, validationRule: "If present: module responsibilities only (no code fences or function/class signatures); keep module count within a single coherent subsystem." },
|
|
133
|
-
{ section: "Spec Self-Review", required: true, validationRule: "Must explicitly cover placeholder, consistency, scope, and ambiguity checks plus applied patches/remaining concerns." },
|
|
134
|
-
{ section: "Approval", required: true, validationRule: "Explicit user approval marker present." }
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
|
-
reviewLens: {
|
|
138
|
-
outputs: [
|
|
139
|
-
"measurable specification",
|
|
140
|
-
"acceptance-to-testability map",
|
|
141
|
-
"approved spec artifact"
|
|
142
|
-
],
|
|
143
|
-
reviewSections: [
|
|
144
|
-
{
|
|
145
|
-
title: "Acceptance Criteria Audit",
|
|
146
|
-
evaluationPoints: [
|
|
147
|
-
"Is every criterion observable (can you point to evidence of pass/fail)?",
|
|
148
|
-
"Is every criterion measurable (numeric threshold or boolean outcome)?",
|
|
149
|
-
"Is every criterion falsifiable (can you describe what failure looks like)?",
|
|
150
|
-
"Does every criterion trace to a design decision (Design Decision Ref)?",
|
|
151
|
-
"Are there any vague adjectives (fast, intuitive, robust) without thresholds?"
|
|
152
|
-
],
|
|
153
|
-
stopGate: true
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
title: "Testability Audit",
|
|
157
|
-
evaluationPoints: [
|
|
158
|
-
"Does every criterion have a concrete row in Acceptance Mapping?",
|
|
159
|
-
"Does every test specify a verification approach (unit, integration, e2e, manual)?",
|
|
160
|
-
"Does every verification method include a runnable command or concrete manual steps when known?",
|
|
161
|
-
"Were assumptions surfaced before finalization with source/confidence, validation path, and disposition?",
|
|
162
|
-
"Are edge cases (boundary + error) defined for every criterion?",
|
|
163
|
-
"Are commands specific enough to run later (not vague `run tests` wording)?"
|
|
164
|
-
],
|
|
165
|
-
stopGate: true
|
|
166
|
-
}
|
|
167
|
-
]
|
|
168
|
-
},
|
|
169
|
-
next: "plan",
|
|
170
|
-
};
|