cclaw-cli 0.51.30 → 0.55.2
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 +22 -16
- package/dist/artifact-linter/brainstorm.d.ts +2 -0
- package/dist/artifact-linter/brainstorm.js +245 -0
- package/dist/artifact-linter/design.d.ts +2 -0
- package/dist/artifact-linter/design.js +323 -0
- package/dist/artifact-linter/plan.d.ts +2 -0
- package/dist/artifact-linter/plan.js +162 -0
- package/dist/artifact-linter/review-army.d.ts +24 -0
- package/dist/artifact-linter/review-army.js +365 -0
- package/dist/artifact-linter/review.d.ts +2 -0
- package/dist/artifact-linter/review.js +65 -0
- package/dist/artifact-linter/scope.d.ts +2 -0
- package/dist/artifact-linter/scope.js +115 -0
- package/dist/artifact-linter/shared.d.ts +246 -0
- package/dist/artifact-linter/shared.js +1488 -0
- package/dist/artifact-linter/ship.d.ts +2 -0
- package/dist/artifact-linter/ship.js +46 -0
- package/dist/artifact-linter/spec.d.ts +2 -0
- package/dist/artifact-linter/spec.js +108 -0
- package/dist/artifact-linter/tdd.d.ts +2 -0
- package/dist/artifact-linter/tdd.js +124 -0
- package/dist/artifact-linter.d.ts +4 -76
- package/dist/artifact-linter.js +56 -2949
- package/dist/cli.d.ts +1 -6
- package/dist/cli.js +4 -159
- package/dist/codex-feature-flag.d.ts +1 -1
- package/dist/codex-feature-flag.js +1 -1
- package/dist/config.d.ts +3 -2
- package/dist/config.js +67 -3
- package/dist/constants.d.ts +1 -7
- package/dist/constants.js +9 -15
- package/dist/content/cancel-command.js +2 -2
- package/dist/content/closeout-guidance.js +10 -7
- package/dist/content/core-agents.d.ts +18 -0
- package/dist/content/core-agents.js +46 -2
- package/dist/content/decision-protocol.d.ts +1 -1
- package/dist/content/decision-protocol.js +1 -1
- package/dist/content/examples.js +6 -6
- package/dist/content/harness-doc.js +20 -2
- package/dist/content/hook-inline-snippets.d.ts +17 -4
- package/dist/content/hook-inline-snippets.js +218 -5
- package/dist/content/hook-manifest.d.ts +2 -2
- package/dist/content/hook-manifest.js +2 -2
- package/dist/content/hooks.d.ts +1 -0
- package/dist/content/hooks.js +32 -137
- package/dist/content/idea-command.d.ts +8 -0
- package/dist/content/{ideate-command.js → idea-command.js} +57 -50
- package/dist/content/idea-frames.d.ts +31 -0
- package/dist/content/{ideate-frames.js → idea-frames.js} +9 -9
- package/dist/content/idea-ranking.d.ts +25 -0
- package/dist/content/{ideate-ranking.js → idea-ranking.js} +5 -5
- package/dist/content/iron-laws.d.ts +0 -1
- package/dist/content/iron-laws.js +31 -16
- package/dist/content/learnings.js +1 -1
- package/dist/content/meta-skill.js +7 -7
- package/dist/content/node-hooks.d.ts +10 -0
- package/dist/content/node-hooks.js +43 -9
- package/dist/content/opencode-plugin.js +3 -3
- package/dist/content/skills.js +19 -7
- package/dist/content/stage-schema.js +44 -2
- package/dist/content/stages/_lint-metadata/index.js +26 -2
- package/dist/content/stages/brainstorm.js +13 -7
- package/dist/content/stages/design.js +16 -11
- package/dist/content/stages/plan.js +7 -4
- package/dist/content/stages/review.js +4 -4
- package/dist/content/stages/schema-types.d.ts +1 -1
- package/dist/content/stages/scope.js +15 -12
- package/dist/content/stages/ship.js +2 -2
- package/dist/content/stages/spec.js +9 -3
- package/dist/content/stages/tdd.js +14 -4
- package/dist/content/start-command.js +11 -10
- package/dist/content/status-command.js +3 -3
- package/dist/content/subagents.js +60 -6
- package/dist/content/templates.d.ts +1 -1
- package/dist/content/templates.js +102 -150
- package/dist/content/tree-command.js +2 -2
- package/dist/content/utility-skills.d.ts +2 -2
- package/dist/content/utility-skills.js +2 -2
- package/dist/content/view-command.js +4 -2
- package/dist/delegation.d.ts +2 -0
- package/dist/delegation.js +2 -1
- package/dist/early-loop.d.ts +66 -0
- package/dist/early-loop.js +275 -0
- package/dist/gate-evidence.d.ts +8 -0
- package/dist/gate-evidence.js +141 -5
- package/dist/harness-adapters.d.ts +2 -2
- package/dist/harness-adapters.js +47 -18
- package/dist/install.js +153 -29
- package/dist/internal/advance-stage/advance.d.ts +50 -0
- package/dist/internal/advance-stage/advance.js +480 -0
- package/dist/internal/advance-stage/cancel-run.d.ts +8 -0
- package/dist/internal/advance-stage/cancel-run.js +19 -0
- package/dist/internal/advance-stage/flow-state-coercion.d.ts +3 -0
- package/dist/internal/advance-stage/flow-state-coercion.js +81 -0
- package/dist/internal/advance-stage/helpers.d.ts +14 -0
- package/dist/internal/advance-stage/helpers.js +145 -0
- package/dist/internal/advance-stage/hook.d.ts +8 -0
- package/dist/internal/advance-stage/hook.js +40 -0
- package/dist/internal/advance-stage/parsers.d.ts +54 -0
- package/dist/internal/advance-stage/parsers.js +307 -0
- package/dist/internal/advance-stage/review-loop.d.ts +7 -0
- package/dist/internal/advance-stage/review-loop.js +170 -0
- package/dist/internal/advance-stage/rewind.d.ts +14 -0
- package/dist/internal/advance-stage/rewind.js +108 -0
- package/dist/internal/advance-stage/start-flow.d.ts +11 -0
- package/dist/internal/advance-stage/start-flow.js +136 -0
- package/dist/internal/advance-stage/verify.d.ts +29 -0
- package/dist/internal/advance-stage/verify.js +225 -0
- package/dist/internal/advance-stage.js +21 -1470
- package/dist/internal/compound-readiness.d.ts +1 -1
- package/dist/internal/compound-readiness.js +2 -2
- package/dist/internal/early-loop-status.d.ts +7 -0
- package/dist/internal/early-loop-status.js +90 -0
- package/dist/internal/runtime-integrity.d.ts +7 -0
- package/dist/internal/runtime-integrity.js +288 -0
- package/dist/internal/tdd-red-evidence.js +1 -1
- package/dist/knowledge-store.d.ts +3 -8
- package/dist/knowledge-store.js +16 -29
- package/dist/managed-resources.js +24 -2
- package/dist/policy.js +4 -6
- package/dist/run-archive.d.ts +1 -1
- package/dist/run-archive.js +12 -12
- package/dist/run-persistence.js +111 -11
- package/dist/tdd-cycle.d.ts +3 -3
- package/dist/tdd-cycle.js +1 -1
- package/dist/types.d.ts +18 -10
- package/package.json +1 -1
- package/dist/content/ideate-command.d.ts +0 -8
- package/dist/content/ideate-frames.d.ts +0 -31
- package/dist/content/ideate-ranking.d.ts +0 -25
- package/dist/content/next-command.d.ts +0 -20
- package/dist/content/next-command.js +0 -298
- package/dist/content/seed-shelf.d.ts +0 -36
- package/dist/content/seed-shelf.js +0 -301
- package/dist/content/stage-common-guidance.d.ts +0 -1
- package/dist/content/stage-common-guidance.js +0 -106
- package/dist/doctor-registry.d.ts +0 -10
- package/dist/doctor-registry.js +0 -186
- package/dist/doctor.d.ts +0 -17
- package/dist/doctor.js +0 -2201
- package/dist/internal/hook-manifest.d.ts +0 -16
- package/dist/internal/hook-manifest.js +0 -77
|
@@ -9,6 +9,7 @@ const SUBAGENT_AGENT_NAMES = [
|
|
|
9
9
|
"researcher",
|
|
10
10
|
"architect",
|
|
11
11
|
"spec-validator",
|
|
12
|
+
"spec-document-reviewer",
|
|
12
13
|
"slice-implementer",
|
|
13
14
|
"performance-reviewer",
|
|
14
15
|
"compatibility-reviewer",
|
|
@@ -16,6 +17,7 @@ const SUBAGENT_AGENT_NAMES = [
|
|
|
16
17
|
"release-reviewer",
|
|
17
18
|
"planner",
|
|
18
19
|
"product-manager",
|
|
20
|
+
"product-strategist",
|
|
19
21
|
"critic",
|
|
20
22
|
"reviewer",
|
|
21
23
|
"security-reviewer",
|
|
@@ -94,10 +96,10 @@ can enforce phase-appropriate write boundaries. Use separate workers only when t
|
|
|
94
96
|
|
|
95
97
|
| Harness | Fallback | Delegation tool | Structured ask | Capability source |
|
|
96
98
|
|---|---|---|---|---|
|
|
97
|
-
| Claude | \`native\` | Task (named subagent_type) | AskUserQuestion | \`npx cclaw-cli
|
|
98
|
-
| Cursor | \`generic-dispatch\` | Task (generic subagent_type: explore/generalPurpose/…) | AskQuestion | \`npx cclaw-cli
|
|
99
|
-
| OpenCode | \`native\` | generated \`.opencode/agents/<agent>.md\` subagents via Task / \`@agent\` mention | \`question\` (permission-gated; \`permission.question: "allow"\`) | \`npx cclaw-cli
|
|
100
|
-
| Codex | \`native\` | generated \`.codex/agents/<agent>.toml\` custom agents via native parallel subagent spawning | \`request_user_input\` (experimental; Plan / Collaboration mode) | \`npx cclaw-cli
|
|
99
|
+
| Claude | \`native\` | Task (named subagent_type) | AskUserQuestion | \`npx cclaw-cli sync\` |
|
|
100
|
+
| Cursor | \`generic-dispatch\` | Task (generic subagent_type: explore/generalPurpose/…) | AskQuestion | \`npx cclaw-cli sync\` |
|
|
101
|
+
| OpenCode | \`native\` | generated \`.opencode/agents/<agent>.md\` subagents via Task / \`@agent\` mention | \`question\` (permission-gated; \`permission.question: "allow"\`) | \`npx cclaw-cli sync\` |
|
|
102
|
+
| Codex | \`native\` | generated \`.codex/agents/<agent>.toml\` custom agents via native parallel subagent spawning | \`request_user_input\` (experimental; Plan / Collaboration mode) | \`npx cclaw-cli sync\` |
|
|
101
103
|
|
|
102
104
|
**Dispatch rules driven by \`subagentFallback\`:**
|
|
103
105
|
|
|
@@ -144,9 +146,9 @@ Concrete per-stage rules so the controller does not have to guess which tier fit
|
|
|
144
146
|
| Stage | Deep slot | Balanced slot(s) | Fast fan-out | Trigger to escalate |
|
|
145
147
|
|---|---|---|---|---|
|
|
146
148
|
| brainstorm | planner (only if ambiguity spans >1 module) | product-manager / critic when product value or premise is uncertain | run in-thread research playbooks | promote to \`balanced\` critic if the do-nothing path may beat the idea |
|
|
147
|
-
| scope | planner (always) | product-manager / critic when mode changes
|
|
149
|
+
| scope | planner (always) | product-manager / product-strategist / critic when mode changes value, trajectory, or boundaries | run \`research/git-history.md\` in-thread when churn is high | promote to \`balanced\` critic if scope mode is disputed |
|
|
148
150
|
| design | planner (always) | critic, security-reviewer, test-author when alternatives/trust/testability apply | run \`research/framework-docs-lookup.md\` + \`research/best-practices-lookup.md\` in-thread | escalate one specialist to \`deep\` only if a failure mode is Critical-severity |
|
|
149
|
-
| spec | — |
|
|
151
|
+
| spec | — | spec-validator / spec-document-reviewer / reviewer (for long or high-risk specs) | — | escalate to \`deep\` only for spec ↔ design contradictions |
|
|
150
152
|
| plan | planner (solo, always) | — | — | never fan out at plan stage; one owner for dependency graph |
|
|
151
153
|
| tdd | — | ${formatAgentList(stageSummary("tdd").primaryAgents)} (per slice, carrying RED/GREEN/REFACTOR evidence) · reviewer (slice-local only when sliceReview triggers) | doc-updater (API surface changes) | escalate to \`deep\` only when a RED test cannot be expressed (design leak) |
|
|
152
154
|
| review | — | ${formatAgentList(stageSummary("review").mandatoryAgents)} (both mandatory) | doc-updater for release-note drift checks | escalate a \`balanced\` reviewer to \`deep\` only when two reviewers disagree on severity |
|
|
@@ -642,6 +644,30 @@ Required output:
|
|
|
642
644
|
- TESTABILITY_MAP: concrete test level and command/manual evidence per AC
|
|
643
645
|
${MARKDOWN_CODE_FENCE}
|
|
644
646
|
|
|
647
|
+
`;
|
|
648
|
+
}
|
|
649
|
+
function specDocumentReviewerEnhancedBody() {
|
|
650
|
+
return `
|
|
651
|
+
|
|
652
|
+
## Task Tool Delegation
|
|
653
|
+
|
|
654
|
+
Use this payload for final spec-document quality checks before plan handoff:
|
|
655
|
+
|
|
656
|
+
${MARKDOWN_CODE_FENCE}
|
|
657
|
+
You are a spec-document-reviewer subagent.
|
|
658
|
+
|
|
659
|
+
SPEC_ARTIFACT: {04-spec excerpt or full body}
|
|
660
|
+
UPSTREAM_CONTEXT: {scope/design refs used by the spec}
|
|
661
|
+
|
|
662
|
+
Required output:
|
|
663
|
+
- DOCUMENT_VERDICT: PASS | PASS_WITH_GAPS | FAIL | BLOCKED
|
|
664
|
+
- COMPLETENESS_CHECK: missing required sections or weakly populated rows
|
|
665
|
+
- CONSISTENCY_CHECK: contradictions across ACs, assumptions, mapping, and approval
|
|
666
|
+
- CLARITY_CHECK: ambiguity/placeholders/two-way wording to rewrite
|
|
667
|
+
- SCOPE_FIT_CHECK: whether the artifact still maps to one coherent subsystem/plan slice
|
|
668
|
+
- PATCH_RECOMMENDATIONS: minimal edits to make the spec plan-ready
|
|
669
|
+
${MARKDOWN_CODE_FENCE}
|
|
670
|
+
|
|
645
671
|
`;
|
|
646
672
|
}
|
|
647
673
|
function sliceImplementerEnhancedBody() {
|
|
@@ -808,6 +834,30 @@ Required output:
|
|
|
808
834
|
- SCOPE_HANDOFF: one recommendation for hold/selective/expand/reduce
|
|
809
835
|
${MARKDOWN_CODE_FENCE}
|
|
810
836
|
|
|
837
|
+
`;
|
|
838
|
+
}
|
|
839
|
+
function productStrategistEnhancedBody() {
|
|
840
|
+
return `
|
|
841
|
+
|
|
842
|
+
## Task Tool Delegation
|
|
843
|
+
|
|
844
|
+
Use this payload for expansion-mode scope strategy checks:
|
|
845
|
+
|
|
846
|
+
${MARKDOWN_CODE_FENCE}
|
|
847
|
+
You are a product-strategist subagent.
|
|
848
|
+
|
|
849
|
+
SCOPE_MODE: {SCOPE EXPANSION|SELECTIVE EXPANSION}
|
|
850
|
+
DECISION_CONTEXT: {scope contract excerpt + constraints + approved brainstorm direction}
|
|
851
|
+
DEPTH: {standard|deep}
|
|
852
|
+
|
|
853
|
+
Required output:
|
|
854
|
+
- VISION_DELTA: 10x trajectory vs hold-scope baseline
|
|
855
|
+
- EXPANSION_PROPOSALS: 2-3 concrete proposals with add/defer/skip recommendation
|
|
856
|
+
- UPSIDE_AND_RISK: strategic upside, reversibility, and principal downside per proposal
|
|
857
|
+
- TRAJECTORY_FIT: whether current architecture trajectory can absorb accepted expansions
|
|
858
|
+
- FINAL_RECOMMENDATION: smallest high-leverage expansion set to lock now
|
|
859
|
+
${MARKDOWN_CODE_FENCE}
|
|
860
|
+
|
|
811
861
|
`;
|
|
812
862
|
}
|
|
813
863
|
function criticEnhancedBody() {
|
|
@@ -971,6 +1021,8 @@ export function enhancedAgentBody(agentName) {
|
|
|
971
1021
|
return architectEnhancedBody();
|
|
972
1022
|
case "spec-validator":
|
|
973
1023
|
return specValidatorEnhancedBody();
|
|
1024
|
+
case "spec-document-reviewer":
|
|
1025
|
+
return specDocumentReviewerEnhancedBody();
|
|
974
1026
|
case "slice-implementer":
|
|
975
1027
|
return sliceImplementerEnhancedBody();
|
|
976
1028
|
case "performance-reviewer":
|
|
@@ -985,6 +1037,8 @@ export function enhancedAgentBody(agentName) {
|
|
|
985
1037
|
return plannerEnhancedBody();
|
|
986
1038
|
case "product-manager":
|
|
987
1039
|
return productManagerEnhancedBody();
|
|
1040
|
+
case "product-strategist":
|
|
1041
|
+
return productStrategistEnhancedBody();
|
|
988
1042
|
case "critic":
|
|
989
1043
|
return criticEnhancedBody();
|
|
990
1044
|
case "reviewer":
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const ARTIFACT_TEMPLATES: Record<string, string>;
|
|
2
2
|
export declare const RULEBOOK_MARKDOWN = "# Cclaw Rulebook\n\n## MUST_ALWAYS\n- Follow flow order: brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship\n- Require explicit user confirmation after plan before TDD\n- Keep evidence artifacts in `.cclaw/artifacts/`\n- Enforce RED before GREEN in TDD\n- Run two-layer review (spec_compliance and code_quality) before ship\n- Validate all inputs before processing \u2014 never trust external data without sanitization\n- Prefer immutable data patterns and pure functions where the language supports them\n- Follow existing repo conventions, patterns, and directory structure \u2014 match the codebase\n- Verify claims with fresh evidence: \"tests pass\" requires running tests in this message\n- Use conventional commits: `type(scope): description` (feat, fix, refactor, test, docs, chore)\n\n## MUST_NEVER\n- Skip RED phase and jump directly to GREEN in TDD\n- Ship with critical review findings\n- Start implementation during /brainstorm\n- Modify generated cclaw files manually when CLI can regenerate them\n- Commit `.cclaw/` or generated shim files\n- Expose secrets, tokens, API keys, or absolute system paths in agent output\n- Duplicate existing functionality without explicit justification \u2014 search before building\n- Bypass security checks, linting hooks, or type checking to \"move faster\"\n- Claim success (\"Done,\" \"All good,\" \"Tests pass\") without running verification in this message\n- Make changes outside the blast radius of the current task without user consent\n\n## DELEGATION\nWhen a task requires specialist knowledge (security audit, performance profiling, database review),\ndelegate to a specialized agent or skill if the harness supports it. The primary agent should:\n1. Identify the specialist domain\n2. Provide focused context (relevant files, the specific concern)\n3. Evaluate the specialist output before acting on it \u2014 do not blindly apply recommendations\n";
|
|
3
|
-
export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick track) |\n| bugfix with repro | `/cc <idea>` and enforce RED-first in tdd |\n| pure question / non-software | direct answer (no stage flow) |\n\n## Command Surface\n\n- `/cc` = entry and resume.\n- `/cc` = only progression path.\n- Knowledge capture and recall use the `learnings` skill when requested.\n\n## Verification Discipline\n\n- No completion claim without fresh command evidence in this turn.\n- Do not mark gates passed from memory.\n- Keep evidence in `.cclaw/artifacts/`; archive via `
|
|
3
|
+
export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick track) |\n| bugfix with repro | `/cc <idea>` and enforce RED-first in tdd |\n| pure question / non-software | direct answer (no stage flow) |\n\n## Command Surface\n\n- `/cc` = entry and resume.\n- `/cc` = only progression path.\n- Knowledge capture and recall use the `learnings` skill when requested.\n\n## Verification Discipline\n\n- No completion claim without fresh command evidence in this turn.\n- Do not mark gates passed from memory.\n- Keep evidence in `.cclaw/artifacts/`; archive through closeout via `/cc` or cancel early via `node .cclaw/hooks/cancel-run.mjs`.\n\n## Delegation And Approvals\n\n- Machine-only checks in design/plan/tdd/review/ship should auto-dispatch when tooling supports it.\n- Ask for user input only at explicit approval gates (scope mode, plan approval, challenge resolution, ship finalization).\n- If harness capabilities are partial, record waiver reasons in delegation logs.\n\n## Routing Source Of Truth\n\n- Primary router: `.cclaw/skills/using-cclaw/SKILL.md`.\n- Stage behavior: current stage skill plus `.cclaw/state/flow-state.json`.\n- Preamble budget: keep role/status announcements brief and avoid repeating\n them unless the stage or role changes.\n";
|
|
4
4
|
export declare function buildRulesJson(): Record<string, unknown>;
|
|
@@ -56,26 +56,6 @@ export const ARTIFACT_TEMPLATES = {
|
|
|
56
56
|
- **Direct path?** (yes/no + one-line justification)
|
|
57
57
|
- **What if we do nothing?** (concrete consequence, not "nothing happens")
|
|
58
58
|
|
|
59
|
-
## Forcing Questions
|
|
60
|
-
> Minimum 3 questions; each answer MUST contain at least one *specific* token: a concrete name, a role, a number, a repo-relative path, an external link, or a verbatim quote. Vague answers fail the linter.
|
|
61
|
-
|
|
62
|
-
| # | Forcing question | Specific answer | Decision impact | Q\\<n\\> decision |
|
|
63
|
-
|---|---|---|---|---|
|
|
64
|
-
| 1 | | | | decision: |
|
|
65
|
-
| 2 | | | | decision: |
|
|
66
|
-
| 3 | | | | decision: |
|
|
67
|
-
|
|
68
|
-
## Premise List
|
|
69
|
-
> ≥2 premises. Each premise must be in the form \`P<n>: <statement> — agreed | disagreed | revised\`. \`revised\` rows must include the revised statement on the next line.
|
|
70
|
-
|
|
71
|
-
- P1: <statement> — agreed | disagreed | revised
|
|
72
|
-
- P2: <statement> — agreed | disagreed | revised
|
|
73
|
-
|
|
74
|
-
## Anti-Sycophancy Stamp
|
|
75
|
-
- **Forbidden response openers acknowledged:** yes (no "you're absolutely right", "great point", "absolutely!", etc.)
|
|
76
|
-
- **Posture commitment:** push back with reasoning when premises feel weak; do not perform agreement.
|
|
77
|
-
- **Evidence-that-would-change-the-recommendation:** (one line per premise, or \`- None.\`)
|
|
78
|
-
|
|
79
59
|
## How Might We
|
|
80
60
|
- *How might we …?* — one line naming the user, the desired outcome, and the binding constraint.
|
|
81
61
|
|
|
@@ -151,6 +131,11 @@ RECOMMENDATION: <approach letter — one-line rationale, traced to forcing-quest
|
|
|
151
131
|
- **Approval:** pending
|
|
152
132
|
- **Next-stage handoff:** On standard track, hand this to \`scope\`; on medium track, hand this directly to \`spec\`. Include upstream decisions used, drift, confidence, unresolved questions, risk hints, and non-goals.
|
|
153
133
|
|
|
134
|
+
## Embedded Grill
|
|
135
|
+
| Question | Recommended answer | Disposition (accept/refine/reject) |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| | | |
|
|
138
|
+
|
|
154
139
|
## Not Doing
|
|
155
140
|
- (3-5 things this brainstorm is *not* committing to — distinct from \`Deferred\`. These will not appear in scope unless the user explicitly opts in.)
|
|
156
141
|
|
|
@@ -175,6 +160,24 @@ ${SEED_SHELF_SECTION}
|
|
|
175
160
|
- **Assumptions:**
|
|
176
161
|
- **Open questions (or "None"):**
|
|
177
162
|
|
|
163
|
+
## Victory Detector
|
|
164
|
+
- Loop status file: \`.cclaw/state/early-loop.json\`
|
|
165
|
+
- Iteration: <n>/<maxIterations>
|
|
166
|
+
- Open concerns: <count>
|
|
167
|
+
- Convergence guard: clear | tripped
|
|
168
|
+
- Decision: iterate | ready_for_advance | escalate_for_human_override
|
|
169
|
+
|
|
170
|
+
## Critic Pass
|
|
171
|
+
After each producer iteration append one JSON line to \`.cclaw/state/early-loop-log.jsonl\`:
|
|
172
|
+
|
|
173
|
+
${MARKDOWN_CODE_FENCE}json
|
|
174
|
+
{"ts":"<ISO-8601>","runId":"<run-id>","stage":"brainstorm","iteration":1,"concerns":[{"id":"C-1","severity":"important","locator":"Approaches > Row 2","summary":"<specific concern>"}],"resolvedConcernIds":[]}
|
|
175
|
+
${MARKDOWN_CODE_FENCE}
|
|
176
|
+
|
|
177
|
+
- \`concerns\` lists unresolved concerns after this pass.
|
|
178
|
+
- Keep concern IDs stable across iterations so convergence checks stay meaningful.
|
|
179
|
+
- Include \`resolvedConcernIds\` when a previously open concern is explicitly closed.
|
|
180
|
+
|
|
178
181
|
## Learnings
|
|
179
182
|
- None this stage.
|
|
180
183
|
`,
|
|
@@ -211,13 +214,6 @@ ${SEED_SHELF_SECTION}
|
|
|
211
214
|
| Existing-code leverage? | | |
|
|
212
215
|
| Reversibility cost? | | |
|
|
213
216
|
|
|
214
|
-
## Dream State Mapping
|
|
215
|
-
- Deep/optional only; omit for compact scope.
|
|
216
|
-
- CURRENT STATE:
|
|
217
|
-
- THIS PLAN:
|
|
218
|
-
- 12-MONTH IDEAL:
|
|
219
|
-
- Alignment verdict:
|
|
220
|
-
|
|
221
217
|
## Implementation Alternatives
|
|
222
218
|
| Option | Summary | Effort (S/M/L/XL) | Risk (Low/Med/High) | Pros | Cons | Reuses |
|
|
223
219
|
|---|---|---|---|---|---|---|
|
|
@@ -227,27 +223,6 @@ ${SEED_SHELF_SECTION}
|
|
|
227
223
|
|
|
228
224
|
RECOMMENDATION: <option letter — one-line rationale tying back to premise challenge and existing-code leverage>
|
|
229
225
|
|
|
230
|
-
## Failure Modes Registry
|
|
231
|
-
> Universal failure-mode shape — applies to CLI, library, infra, web, batch jobs.
|
|
232
|
-
|
|
233
|
-
| Codepath | Failure mode | Rescued? (yes/no) | Test? (unit/integration/e2e) | User sees? (message/silent/N/A) | Logged? (level/none) | Q\\<n\\> decision |
|
|
234
|
-
|---|---|---|---|---|---|---|
|
|
235
|
-
| | | | | | | decision: |
|
|
236
|
-
|
|
237
|
-
## Reversibility Rating
|
|
238
|
-
- Score (1-5, 1 = one-way door / unrecoverable, 5 = trivially reversible):
|
|
239
|
-
- Justification (cite a specific artifact/file or migration step):
|
|
240
|
-
- Rollback plan reference:
|
|
241
|
-
|
|
242
|
-
## Temporal Interrogation
|
|
243
|
-
- Deep/optional only; omit for compact scope.
|
|
244
|
-
| Time slice | Likely decision pressure | Lock now or defer? | Reason |
|
|
245
|
-
|---|---|---|---|
|
|
246
|
-
| HOUR 1 (foundations) | | | |
|
|
247
|
-
| HOUR 2-3 (core logic) | | | |
|
|
248
|
-
| HOUR 4-5 (integration) | | | |
|
|
249
|
-
| HOUR 6+ (polish/tests) | | | |
|
|
250
|
-
|
|
251
226
|
## Scope Contract
|
|
252
227
|
- **Selected mode:** HOLD SCOPE | SELECTIVE EXPANSION | SCOPE EXPANSION | SCOPE REDUCTION
|
|
253
228
|
- **In scope:**
|
|
@@ -300,7 +275,7 @@ RECOMMENDATION: <option letter — one-line rationale tying back to premise chal
|
|
|
300
275
|
| | | | |
|
|
301
276
|
|
|
302
277
|
## Reference Pull
|
|
303
|
-
- Optional evidence from
|
|
278
|
+
- Optional evidence from \`<repo-relative references dir>\`; list accepted/rejected ideas or \`Not needed - compact scope\`.
|
|
304
279
|
|
|
305
280
|
## Ambitious Alternatives
|
|
306
281
|
- Optional for SCOPE EXPANSION/SELECTIVE; list larger alternatives and disposition.
|
|
@@ -381,6 +356,24 @@ ${SEED_SHELF_SECTION}
|
|
|
381
356
|
- Explicitly excluded:
|
|
382
357
|
- Next-stage handoff: identify whether the next stage is \`design\` (standard track) or \`spec\` (medium track), and list the exact artifacts/decisions it must carry forward.
|
|
383
358
|
|
|
359
|
+
## Victory Detector
|
|
360
|
+
- Loop status file: \`.cclaw/state/early-loop.json\`
|
|
361
|
+
- Iteration: <n>/<maxIterations>
|
|
362
|
+
- Open concerns: <count>
|
|
363
|
+
- Convergence guard: clear | tripped
|
|
364
|
+
- Decision: iterate | ready_for_advance | escalate_for_human_override
|
|
365
|
+
|
|
366
|
+
## Critic Pass
|
|
367
|
+
After each producer iteration append one JSON line to \`.cclaw/state/early-loop-log.jsonl\`:
|
|
368
|
+
|
|
369
|
+
${MARKDOWN_CODE_FENCE}json
|
|
370
|
+
{"ts":"<ISO-8601>","runId":"<run-id>","stage":"scope","iteration":1,"concerns":[{"id":"C-1","severity":"important","locator":"Scope Contract > In Scope","summary":"<specific concern>"}],"resolvedConcernIds":[]}
|
|
371
|
+
${MARKDOWN_CODE_FENCE}
|
|
372
|
+
|
|
373
|
+
- \`concerns\` lists unresolved concerns after this pass.
|
|
374
|
+
- Keep concern IDs stable across iterations so convergence checks stay meaningful.
|
|
375
|
+
- Include \`resolvedConcernIds\` when a previously open concern is explicitly closed.
|
|
376
|
+
|
|
384
377
|
## Learnings
|
|
385
378
|
- None this stage.
|
|
386
379
|
`,
|
|
@@ -492,31 +485,17 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
492
485
|
(failure detection -> rescue action -> user-visible outcome)
|
|
493
486
|
${MARKDOWN_CODE_FENCE}
|
|
494
487
|
|
|
495
|
-
##
|
|
496
|
-
- Deep add-on
|
|
488
|
+
## Deep Diagram Add-on
|
|
489
|
+
- Deep add-on only.
|
|
490
|
+
- type: state-machine | rollback | deployment-sequence | none
|
|
491
|
+
- Choose exactly one marker below when type is not \`none\`.
|
|
497
492
|
|
|
498
493
|
<!-- diagram: state-machine -->
|
|
499
|
-
|
|
500
|
-
${MARKDOWN_CODE_FENCE}
|
|
501
|
-
(state transitions for the critical flow lifecycle)
|
|
502
|
-
${MARKDOWN_CODE_FENCE}
|
|
503
|
-
|
|
504
|
-
## Rollback Flowchart
|
|
505
|
-
- Deep add-on; omit for compact design.
|
|
506
|
-
|
|
507
494
|
<!-- diagram: rollback-flowchart -->
|
|
508
|
-
|
|
509
|
-
${MARKDOWN_CODE_FENCE}
|
|
510
|
-
(trigger -> rollback actions -> verification)
|
|
511
|
-
${MARKDOWN_CODE_FENCE}
|
|
512
|
-
|
|
513
|
-
## Deployment Sequence Diagram
|
|
514
|
-
- Deep add-on; omit for compact design.
|
|
515
|
-
|
|
516
495
|
<!-- diagram: deployment-sequence -->
|
|
517
496
|
|
|
518
497
|
${MARKDOWN_CODE_FENCE}
|
|
519
|
-
(
|
|
498
|
+
(deep add-on diagram: state lifecycle OR rollback flow OR deployment sequence)
|
|
520
499
|
${MARKDOWN_CODE_FENCE}
|
|
521
500
|
|
|
522
501
|
## Stale Diagram Audit
|
|
@@ -571,32 +550,6 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
571
550
|
|---|---|---|---|
|
|
572
551
|
| | | | covered/gap |
|
|
573
552
|
|
|
574
|
-
## ASCII Coverage Diagram
|
|
575
|
-
|
|
576
|
-
<!-- diagram: ascii-coverage -->
|
|
577
|
-
|
|
578
|
-
${MARKDOWN_CODE_FENCE}
|
|
579
|
-
entry-point
|
|
580
|
-
├── happy path [★★★]
|
|
581
|
-
├── empty input [★★]
|
|
582
|
-
├── error path [★]
|
|
583
|
-
├── concurrency edge [GAP]
|
|
584
|
-
├── slow-network edge [→E2E]
|
|
585
|
-
└── perf regression [→EVAL]
|
|
586
|
-
${MARKDOWN_CODE_FENCE}
|
|
587
|
-
|
|
588
|
-
> Required marker tokens (at least one each present where applicable): \`[★★★]\` / \`[★★]\` / \`[★]\` / \`[GAP]\` / \`[→E2E]\` / \`[→EVAL]\`. The diagram is the single source of truth for coverage; gaps must be traced into Plan or Spec.
|
|
589
|
-
|
|
590
|
-
## Regression Iron Rule
|
|
591
|
-
- Iron rule acknowledged: yes — any diff that changes existing behavior gets a regression test added to the plan, no exceptions.
|
|
592
|
-
- Detected behavior changes (or \`- None.\`):
|
|
593
|
-
- Regression test handoff (Plan task ID or \`- None.\`):
|
|
594
|
-
|
|
595
|
-
## Calibrated Findings
|
|
596
|
-
> Format: \`[P1|P2|P3] (confidence: <n>/10) <repo-relative-path>[:<line>] — <one-line description>\`. Findings with confidence \`< 7\` are suppressed unless severity is \`P1\`.
|
|
597
|
-
|
|
598
|
-
- (or \`- None this stage.\`)
|
|
599
|
-
|
|
600
553
|
## Performance Budget
|
|
601
554
|
| Critical path | Metric | Target | Measurement method |
|
|
602
555
|
|---|---|---|---|
|
|
@@ -629,6 +582,9 @@ ${MARKDOWN_CODE_FENCE}
|
|
|
629
582
|
- Test/performance expectations:
|
|
630
583
|
- Unresolved questions (or \`None\`):
|
|
631
584
|
|
|
585
|
+
## Long-Term Trajectory
|
|
586
|
+
- (1-3 lines: what comes after this ships, and whether this architecture can absorb that path without major rework. For tactical changes use \`None - tactical change only\`.)
|
|
587
|
+
|
|
632
588
|
## Outside Voice Findings
|
|
633
589
|
| ID | Dimension | Finding | Disposition | Rationale |
|
|
634
590
|
|---|---|---|---|---|
|
|
@@ -689,8 +645,23 @@ ${SEED_SHELF_SECTION}
|
|
|
689
645
|
|
|
690
646
|
**Decisions made:** 0 | **Unresolved:** 0
|
|
691
647
|
|
|
692
|
-
##
|
|
693
|
-
|
|
648
|
+
## Victory Detector
|
|
649
|
+
- Loop status file: \`.cclaw/state/early-loop.json\`
|
|
650
|
+
- Iteration: <n>/<maxIterations>
|
|
651
|
+
- Open concerns: <count>
|
|
652
|
+
- Convergence guard: clear | tripped
|
|
653
|
+
- Decision: iterate | ready_for_advance | escalate_for_human_override
|
|
654
|
+
|
|
655
|
+
## Critic Pass
|
|
656
|
+
After each producer iteration append one JSON line to \`.cclaw/state/early-loop-log.jsonl\`:
|
|
657
|
+
|
|
658
|
+
${MARKDOWN_CODE_FENCE}json
|
|
659
|
+
{"ts":"<ISO-8601>","runId":"<run-id>","stage":"design","iteration":1,"concerns":[{"id":"C-1","severity":"important","locator":"Engineering Lock > Row 1","summary":"<specific concern>"}],"resolvedConcernIds":[]}
|
|
660
|
+
${MARKDOWN_CODE_FENCE}
|
|
661
|
+
|
|
662
|
+
- \`concerns\` lists unresolved concerns after this pass.
|
|
663
|
+
- Keep concern IDs stable across iterations so convergence checks stay meaningful.
|
|
664
|
+
- Include \`resolvedConcernIds\` when a previously open concern is explicitly closed.
|
|
694
665
|
|
|
695
666
|
## Learnings
|
|
696
667
|
- None this stage.
|
|
@@ -773,12 +744,6 @@ For meaningful design work, replace the Learnings sentinel with 1-3 JSON learnin
|
|
|
773
744
|
|---|---|---|
|
|
774
745
|
| | | |
|
|
775
746
|
|
|
776
|
-
## Testing Strategy
|
|
777
|
-
- Behaviors covered (not implementation):
|
|
778
|
-
- Integration vs. unit split (and why):
|
|
779
|
-
- Real services vs. doubles (and why):
|
|
780
|
-
- Coverage gaps with rationale (or \`- None.\`):
|
|
781
|
-
|
|
782
747
|
## Spec Self-Review
|
|
783
748
|
> Inline pass; fix in place. If a check fails, do not move on without recording the fix.
|
|
784
749
|
|
|
@@ -791,13 +756,6 @@ For meaningful design work, replace the Learnings sentinel with 1-3 JSON learnin
|
|
|
791
756
|
- Remaining concerns:
|
|
792
757
|
- None
|
|
793
758
|
|
|
794
|
-
## Reviewer Concerns (convergence guard)
|
|
795
|
-
> Populate ONLY if the spec review loop did not converge after 3 iterations. Each row links a concern to the unresolved review pass.
|
|
796
|
-
|
|
797
|
-
| ID | Concern | Reviewer / source | Disposition (open/accept/defer) | Rationale |
|
|
798
|
-
|---|---|---|---|---|
|
|
799
|
-
| | | | | |
|
|
800
|
-
|
|
801
759
|
## Approval
|
|
802
760
|
- Approved by:
|
|
803
761
|
- Date:
|
|
@@ -906,23 +864,16 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
906
864
|
- [ ] Step 4: run test, observe GREEN
|
|
907
865
|
- [ ] Step 5: refactor + commit
|
|
908
866
|
|
|
909
|
-
##
|
|
910
|
-
>
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
\`\`\`
|
|
867
|
+
## Calibrated Findings
|
|
868
|
+
> Recommended for high-risk or multi-batch plans. Use one line per finding, or \`None this stage\`.
|
|
869
|
+
>
|
|
870
|
+
> Canonical format:
|
|
871
|
+
> \`- [P1|P2|P3] (confidence: <n>/10) <path>[:<line>] — <description>\`
|
|
915
872
|
|
|
916
|
-
##
|
|
917
|
-
-
|
|
918
|
-
-
|
|
919
|
-
-
|
|
920
|
-
- [ ] No silent scope reduction
|
|
921
|
-
- [ ] Confidence per unit recorded (1-10)
|
|
922
|
-
- Patches applied:
|
|
923
|
-
- None
|
|
924
|
-
- Remaining concerns:
|
|
925
|
-
- None
|
|
873
|
+
## Regression Iron Rule
|
|
874
|
+
- Iron rule acknowledged: yes
|
|
875
|
+
- Critical regression guardrail:
|
|
876
|
+
- Required pre-merge proof:
|
|
926
877
|
|
|
927
878
|
## Execution Handoff
|
|
928
879
|
- **Posture chosen:** Subagent-Driven (recommended) | Inline executor
|
|
@@ -930,13 +881,13 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
930
881
|
- **Subagent recipe (if Subagent-Driven):** \`<harness>\` -> \`<dispatch surface>\` -> \`<agent-definition path>\` (substitute neutral placeholders; full recipes in \`docs/harnesses.md\`)
|
|
931
882
|
- **Inline recipe (if Inline executor):** TDD loop unit-by-unit with batch checkpoints
|
|
932
883
|
|
|
933
|
-
##
|
|
934
|
-
-
|
|
935
|
-
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
- Scanned phrases: \`v1\`, \`for now\`, \`later\`, \`temporary\`, \`placeholder\`, \`mock for now\`, \`hardcoded for now\`, \`will improve later\`.
|
|
939
|
-
- Hits: 0 (required when Locked Decisions section is non-empty; use LD#hash anchors).
|
|
884
|
+
## Plan Quality Scan
|
|
885
|
+
- Placeholder scan:
|
|
886
|
+
- Scanned tokens: \`TODO\`, \`TBD\`, \`FIXME\`, \`<fill-in>\`, \`<your-*-here>\`, \`xxx\`, bare ellipsis in task rows.
|
|
887
|
+
- Hits: 0 (required for WAIT_FOR_CONFIRM to resolve).
|
|
888
|
+
- Scope reduction language scan:
|
|
889
|
+
- Scanned phrases: \`v1\`, \`for now\`, \`later\`, \`temporary\`, \`placeholder\`, \`mock for now\`, \`hardcoded for now\`, \`will improve later\`.
|
|
890
|
+
- Hits: 0 (required when Locked Decisions section is non-empty; use LD#hash anchors).
|
|
940
891
|
|
|
941
892
|
## WAIT_FOR_CONFIRM
|
|
942
893
|
- Status: pending
|
|
@@ -1028,18 +979,27 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
1028
979
|
|---|---|---|---|
|
|
1029
980
|
| S-1 | | | |
|
|
1030
981
|
|
|
1031
|
-
## Anti-Rationalization Checks
|
|
1032
|
-
- [ ] No "test passes immediately" — each new test was watched failing first
|
|
1033
|
-
- [ ] No "code before test" reuse from a prior session
|
|
1034
|
-
- [ ] No "tests after" backfill instead of RED-first
|
|
1035
|
-
- [ ] No "spirit not ritual" overrides
|
|
1036
|
-
- Notes (or \`- None this stage.\`):
|
|
1037
|
-
|
|
1038
982
|
## Verification Ladder
|
|
1039
983
|
| Slice | Tier reached | Evidence |
|
|
1040
984
|
|---|---|---|
|
|
1041
985
|
| S-1 | | |
|
|
1042
986
|
|
|
987
|
+
## TDD Blocker Taxonomy
|
|
988
|
+
> Fill only when blocked. Choose one canonical class and capture the resume contract.
|
|
989
|
+
>
|
|
990
|
+
> Allowed classes: \`NO_SOURCE_CONTEXT\`, \`NO_TEST_SURFACE\`, \`NO_IMPLEMENTABLE_SLICE\`, \`RED_NOT_EXPRESSIBLE\`, \`NO_VCS_MODE\`.
|
|
991
|
+
|
|
992
|
+
| Slice | Class | blockedBecause | missingInputs | recommendedRoute | nextCommand | resumeCriteria |
|
|
993
|
+
|---|---|---|---|---|---|---|
|
|
994
|
+
| S-1 | | | | | | |
|
|
995
|
+
|
|
996
|
+
## Per-Slice Review
|
|
997
|
+
> Only required when \`.cclaw/config.yaml::sliceReview.enabled\` triggers this slice; otherwise record \`not triggered\`.
|
|
998
|
+
|
|
999
|
+
| Slice | Trigger fired | Spec-Compliance pass | Quality pass | Fulfillment mode (isolated/role-switch/not triggered) |
|
|
1000
|
+
|---|---|---|---|---|
|
|
1001
|
+
| S-1 | | | | |
|
|
1002
|
+
|
|
1043
1003
|
## Coverage Targets
|
|
1044
1004
|
| Code type | Target | Current | Command |
|
|
1045
1005
|
|---|---|---|---|
|
|
@@ -1059,9 +1019,6 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
1059
1019
|
|---|---|---|---|---|
|
|
1060
1020
|
| S-1 | | | | |
|
|
1061
1021
|
|
|
1062
|
-
## Learning Capture Hint
|
|
1063
|
-
For meaningful TDD work, replace the Learnings sentinel with 1-3 JSON learning bullets, for example: \`- {"type":"pattern","trigger":"when a regression only fails after state rewind","action":"keep the RED fixture and add a cycle-log assertion before GREEN","confidence":"medium","domain":"testing","stage":"tdd"}\`
|
|
1064
|
-
|
|
1065
1022
|
## Learnings
|
|
1066
1023
|
- None this stage.
|
|
1067
1024
|
`,
|
|
@@ -1076,15 +1033,13 @@ For meaningful TDD work, replace the Learnings sentinel with 1-3 JSON learning b
|
|
|
1076
1033
|
- Open questions:
|
|
1077
1034
|
- Drift from upstream (or \`None\`):
|
|
1078
1035
|
|
|
1079
|
-
## Self-Review
|
|
1036
|
+
## Pre-Critic Self-Review
|
|
1080
1037
|
- [ ] Build/lint/type-check/tests passed locally
|
|
1081
1038
|
- [ ] Diff matches spec/plan (no scope creep)
|
|
1082
1039
|
- [ ] Leftover prints / commented code / unused imports removed
|
|
1083
1040
|
- [ ] Deletion test: each new module justifies its existence
|
|
1084
1041
|
- Evidence (commands + result):
|
|
1085
1042
|
- Patches applied (or \`- None.\`):
|
|
1086
|
-
|
|
1087
|
-
## Frame the Review Request
|
|
1088
1043
|
- **Goal:**
|
|
1089
1044
|
- **Approach:**
|
|
1090
1045
|
- **Risk areas:**
|
|
@@ -1176,7 +1131,7 @@ For meaningful TDD work, replace the Learnings sentinel with 1-3 JSON learning b
|
|
|
1176
1131
|
- Overall: complete | concerns | blocked
|
|
1177
1132
|
|
|
1178
1133
|
## Trace Matrix Check
|
|
1179
|
-
- Command: \`cclaw internal trace-matrix\` when the active track enforces it; otherwise record direct AC/reproduction-slice coverage.
|
|
1134
|
+
- Command: \`npx cclaw-cli internal trace-matrix\` when the active track enforces it; otherwise record direct AC/reproduction-slice coverage.
|
|
1180
1135
|
- Orphaned criteria: 0
|
|
1181
1136
|
- Orphaned source items: 0 or \`N/A - direct spec/reproduction coverage\`
|
|
1182
1137
|
- Orphaned tests: 0
|
|
@@ -1201,9 +1156,6 @@ For meaningful TDD work, replace the Learnings sentinel with 1-3 JSON learning b
|
|
|
1201
1156
|
## Final Verdict
|
|
1202
1157
|
- APPROVED | APPROVED_WITH_CONCERNS | BLOCKED
|
|
1203
1158
|
|
|
1204
|
-
## Learning Capture Hint
|
|
1205
|
-
For meaningful review work, replace the Learnings sentinel with 1-3 JSON learning bullets, for example: \`- {"type":"lesson","trigger":"when security sweep finds no issues but touches trust boundaries","action":"record NO_SECURITY_IMPACT with inspected surfaces and rationale","confidence":"medium","domain":"security","stage":"review"}\`
|
|
1206
|
-
|
|
1207
1159
|
## Learnings
|
|
1208
1160
|
- None this stage.
|
|
1209
1161
|
`,
|
|
@@ -1438,7 +1390,7 @@ Track-specific skips are allowed only when \`flow-state.track\` + \`skippedStage
|
|
|
1438
1390
|
|
|
1439
1391
|
- No completion claim without fresh command evidence in this turn.
|
|
1440
1392
|
- Do not mark gates passed from memory.
|
|
1441
|
-
- Keep evidence in \`.cclaw/artifacts/\`; archive via \`
|
|
1393
|
+
- Keep evidence in \`.cclaw/artifacts/\`; archive through closeout via \`/cc\` or cancel early via \`node .cclaw/hooks/cancel-run.mjs\`.
|
|
1442
1394
|
|
|
1443
1395
|
## Delegation And Approvals
|
|
1444
1396
|
|
|
@@ -31,7 +31,7 @@ Do not modify state in this command. It is a pure read/render operation.
|
|
|
31
31
|
\`fulfillmentMode\` / \`evidenceRefs\`.
|
|
32
32
|
3. Inspect \`${artifactsPath()}\` for per-stage artifact presence and stale copies,
|
|
33
33
|
and for the retro artifact \`09-retro.md\`.
|
|
34
|
-
4. Use \`npx cclaw-cli
|
|
34
|
+
4. Use \`npx cclaw-cli sync\` for harness capability status when needed.
|
|
35
35
|
5. Render one compact tree:
|
|
36
36
|
- stage marker: passed/current/pending/skipped/stale,
|
|
37
37
|
- gates summary,
|
|
@@ -47,7 +47,7 @@ Do not modify state in this command. It is a pure read/render operation.
|
|
|
47
47
|
then \`next\`; the transient \`archived\` substate surfaces only if the
|
|
48
48
|
archive step failed mid-run.
|
|
49
49
|
7. Append a \`harnesses:\` branch. For each installed harness derive the tier
|
|
50
|
-
and fallback from cclaw capability metadata; use \`npx cclaw-cli
|
|
50
|
+
and fallback from cclaw capability metadata; use \`npx cclaw-cli sync\`
|
|
51
51
|
for remediation details when needed.
|
|
52
52
|
8. If rewind records exist in \`${rewindLogPath()}\`, include latest rewind note in footer.
|
|
53
53
|
|
|
@@ -18,13 +18,13 @@ export declare const LANGUAGE_RULE_PACK_FILES: {
|
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Folder (relative to runtime root) that holds every enabled language rule
|
|
21
|
-
* pack. A single folder keeps discovery trivial for hooks and for `
|
|
21
|
+
* pack. A single folder keeps discovery trivial for hooks and for `sync`.
|
|
22
22
|
*/
|
|
23
23
|
export declare const LANGUAGE_RULE_PACK_DIR: readonly ["rules", "lang"];
|
|
24
24
|
export declare const LANGUAGE_RULE_PACK_GENERATORS: Record<string, () => string>;
|
|
25
25
|
/**
|
|
26
26
|
* Legacy per-language folders under `.cclaw/skills/` used in v0.7.0. Listed
|
|
27
|
-
* here so `cclaw sync` and `
|
|
27
|
+
* here so `cclaw sync` and `sync` can surface drift and the installer can
|
|
28
28
|
* clean them up after the move to `.cclaw/rules/lang/`.
|
|
29
29
|
*/
|
|
30
30
|
export declare const LEGACY_LANGUAGE_RULE_PACK_FOLDERS: readonly ["language-typescript", "language-python", "language-go"];
|
|
@@ -211,7 +211,7 @@ export const LANGUAGE_RULE_PACK_FILES = {
|
|
|
211
211
|
};
|
|
212
212
|
/**
|
|
213
213
|
* Folder (relative to runtime root) that holds every enabled language rule
|
|
214
|
-
* pack. A single folder keeps discovery trivial for hooks and for `
|
|
214
|
+
* pack. A single folder keeps discovery trivial for hooks and for `sync`.
|
|
215
215
|
*/
|
|
216
216
|
export const LANGUAGE_RULE_PACK_DIR = ["rules", "lang"];
|
|
217
217
|
export const LANGUAGE_RULE_PACK_GENERATORS = {
|
|
@@ -221,7 +221,7 @@ export const LANGUAGE_RULE_PACK_GENERATORS = {
|
|
|
221
221
|
};
|
|
222
222
|
/**
|
|
223
223
|
* Legacy per-language folders under `.cclaw/skills/` used in v0.7.0. Listed
|
|
224
|
-
* here so `cclaw sync` and `
|
|
224
|
+
* here so `cclaw sync` and `sync` can surface drift and the installer can
|
|
225
225
|
* clean them up after the move to `.cclaw/rules/lang/`.
|
|
226
226
|
*/
|
|
227
227
|
export const LEGACY_LANGUAGE_RULE_PACK_FOLDERS = [
|
|
@@ -32,8 +32,10 @@ ${conversationLanguagePolicyMarkdown()}
|
|
|
32
32
|
- \`diff\` -> use the **Diff Subcommand** section in \`${RUNTIME_ROOT}/skills/${VIEW_SKILL_FOLDER}/SKILL.md\`
|
|
33
33
|
3. Unknown subcommand -> print supported values and stop.
|
|
34
34
|
|
|
35
|
-
## Headless mode
|
|
35
|
+
## Headless mode (CI/automation only)
|
|
36
36
|
|
|
37
|
+
Headless envelopes are a machine-mode exception for CI/automation orchestration.
|
|
38
|
+
In normal interactive runs, respond with concise read-only prose instead.
|
|
37
39
|
For machine orchestration, emit one JSON envelope:
|
|
38
40
|
|
|
39
41
|
\`\`\`json
|
|
@@ -43,7 +45,7 @@ For machine orchestration, emit one JSON envelope:
|
|
|
43
45
|
Use the parsed/defaulted subcommand in both \`payload.command\` and \`payload.subcommand\`; do not collapse \`tree\` or \`diff\` responses to \`status\`.
|
|
44
46
|
|
|
45
47
|
Validate envelopes with:
|
|
46
|
-
\`cclaw internal envelope-validate --stdin\`
|
|
48
|
+
\`npx cclaw-cli internal envelope-validate --stdin\`
|
|
47
49
|
|
|
48
50
|
## Primary skill
|
|
49
51
|
|
package/dist/delegation.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface DelegationTokenUsage {
|
|
|
34
34
|
output: number;
|
|
35
35
|
model: string;
|
|
36
36
|
}
|
|
37
|
+
export type DelegationWaiverAcceptedBy = "user-flag";
|
|
37
38
|
export type DelegationEntry = {
|
|
38
39
|
stage: string;
|
|
39
40
|
agent: string;
|
|
@@ -56,6 +57,7 @@ export type DelegationEntry = {
|
|
|
56
57
|
*/
|
|
57
58
|
taskId?: string;
|
|
58
59
|
waiverReason?: string;
|
|
60
|
+
acceptedBy?: DelegationWaiverAcceptedBy;
|
|
59
61
|
ts?: string;
|
|
60
62
|
/**
|
|
61
63
|
* Run id the entry belongs to. Older ledgers written before 0.5.17 may omit this;
|
package/dist/delegation.js
CHANGED
|
@@ -198,6 +198,7 @@ function isDelegationEntry(value) {
|
|
|
198
198
|
(o.endTs === undefined || typeof o.endTs === "string") &&
|
|
199
199
|
(o.taskId === undefined || typeof o.taskId === "string") &&
|
|
200
200
|
(o.waiverReason === undefined || typeof o.waiverReason === "string") &&
|
|
201
|
+
(o.acceptedBy === undefined || o.acceptedBy === "user-flag") &&
|
|
201
202
|
waiverOk &&
|
|
202
203
|
(o.runId === undefined || typeof o.runId === "string") &&
|
|
203
204
|
(o.fulfillmentMode === undefined ||
|
|
@@ -269,7 +270,7 @@ function parseLedger(raw, runId) {
|
|
|
269
270
|
// and entry, the entry has no fulfillmentMode, and there is no
|
|
270
271
|
// dispatch-surface or dispatch-id evidence on the row. We honor
|
|
271
272
|
// that by tagging fulfillmentMode = "legacy-inferred" so callers
|
|
272
|
-
// (stage-complete,
|
|
273
|
+
// (stage-complete, sync/runtime checks) can require an explicit `--rerecord`
|
|
273
274
|
// before the row counts as proof-era.
|
|
274
275
|
const ledgerHasNoVersion = ledgerSchemaVersion === undefined || ledgerSchemaVersion === 1;
|
|
275
276
|
const entryHasNoVersion = item.schemaVersion === undefined || item.schemaVersion === 1;
|