cclaw-cli 0.51.30 → 1.0.0
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 +24 -18
- package/dist/artifact-linter/brainstorm.d.ts +2 -0
- package/dist/artifact-linter/brainstorm.js +289 -0
- package/dist/artifact-linter/design.d.ts +2 -0
- package/dist/artifact-linter/design.js +354 -0
- package/dist/artifact-linter/plan.d.ts +2 -0
- package/dist/artifact-linter/plan.js +183 -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 +99 -0
- package/dist/artifact-linter/scope.d.ts +2 -0
- package/dist/artifact-linter/scope.js +125 -0
- package/dist/artifact-linter/shared.d.ts +247 -0
- package/dist/artifact-linter/shared.js +1517 -0
- package/dist/artifact-linter/ship.d.ts +2 -0
- package/dist/artifact-linter/ship.js +82 -0
- package/dist/artifact-linter/spec.d.ts +2 -0
- package/dist/artifact-linter/spec.js +130 -0
- package/dist/artifact-linter/tdd.d.ts +2 -0
- package/dist/artifact-linter/tdd.js +198 -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 +10 -15
- package/dist/content/cancel-command.js +2 -2
- package/dist/content/closeout-guidance.d.ts +1 -1
- package/dist/content/closeout-guidance.js +15 -13
- package/dist/content/core-agents.d.ts +46 -29
- package/dist/content/core-agents.js +216 -82
- package/dist/content/decision-protocol.d.ts +1 -1
- package/dist/content/decision-protocol.js +1 -1
- package/dist/content/diff-command.js +1 -1
- package/dist/content/examples.d.ts +0 -3
- package/dist/content/examples.js +197 -752
- package/dist/content/harness-doc.js +20 -2
- 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.d.ts +60 -0
- package/dist/content/idea.js +404 -0
- package/dist/content/iron-laws.d.ts +0 -1
- package/dist/content/iron-laws.js +31 -16
- package/dist/content/learnings.d.ts +2 -4
- package/dist/content/learnings.js +11 -27
- package/dist/content/meta-skill.js +7 -7
- package/dist/content/node-hooks.d.ts +10 -0
- package/dist/content/node-hooks.js +163 -95
- package/dist/content/opencode-plugin.js +15 -29
- package/dist/content/reference-patterns.js +2 -2
- package/dist/content/runtime-shared-snippets.d.ts +8 -0
- package/dist/content/runtime-shared-snippets.js +80 -0
- package/dist/content/session-hooks.js +1 -1
- package/dist/content/skills.d.ts +1 -0
- package/dist/content/skills.js +69 -7
- package/dist/content/stage-schema.js +147 -61
- 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 +12 -12
- package/dist/content/stages/schema-types.d.ts +2 -2
- package/dist/content/stages/scope.js +15 -12
- package/dist/content/stages/ship.js +3 -3
- 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 +5 -5
- package/dist/content/subagent-context-skills.js +156 -1
- package/dist/content/subagents.d.ts +0 -5
- package/dist/content/subagents.js +65 -81
- package/dist/content/templates.d.ts +1 -1
- package/dist/content/templates.js +187 -154
- package/dist/content/tree-command.js +2 -2
- package/dist/content/utility-skills.d.ts +2 -2
- package/dist/content/utility-skills.js +28 -99
- 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/flow-state.d.ts +5 -6
- package/dist/flow-state.js +4 -6
- package/dist/gate-evidence.d.ts +0 -23
- package/dist/gate-evidence.js +111 -153
- package/dist/harness-adapters.d.ts +2 -2
- package/dist/harness-adapters.js +48 -19
- package/dist/install.js +190 -32
- package/dist/internal/advance-stage/advance.d.ts +50 -0
- package/dist/internal/advance-stage/advance.js +479 -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 +161 -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 +5 -28
- package/dist/knowledge-store.js +57 -84
- package/dist/managed-resources.js +24 -2
- package/dist/policy.js +7 -9
- package/dist/retro-gate.js +8 -90
- package/dist/run-archive.d.ts +1 -1
- package/dist/run-archive.js +13 -16
- package/dist/run-persistence.js +20 -15
- package/dist/runtime/run-hook.entry.d.ts +3 -0
- package/dist/runtime/run-hook.entry.js +5 -0
- package/dist/runtime/run-hook.mjs +9477 -0
- 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 +4 -2
- package/dist/content/hook-inline-snippets.d.ts +0 -83
- package/dist/content/hook-inline-snippets.js +0 -302
- package/dist/content/ideate-command.d.ts +0 -8
- package/dist/content/ideate-command.js +0 -315
- package/dist/content/ideate-frames.d.ts +0 -31
- package/dist/content/ideate-frames.js +0 -140
- package/dist/content/ideate-ranking.d.ts +0 -25
- package/dist/content/ideate-ranking.js +0 -65
- 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
- package/dist/trace-matrix.d.ts +0 -27
- package/dist/trace-matrix.js +0 -226
|
@@ -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,11 +1019,78 @@ Execution rule: complete and verify each batch before starting the next batch.
|
|
|
1059
1019
|
|---|---|---|---|---|
|
|
1060
1020
|
| S-1 | | | | |
|
|
1061
1021
|
|
|
1062
|
-
##
|
|
1063
|
-
|
|
1022
|
+
## Learnings
|
|
1023
|
+
- None this stage.
|
|
1024
|
+
`,
|
|
1025
|
+
"cohesion-contract.md": `${artifactFrontmatter("tdd")}
|
|
1026
|
+
|
|
1027
|
+
# Cohesion Contract — <wave / stage / topic>
|
|
1028
|
+
|
|
1029
|
+
## Shared Types & Interfaces
|
|
1030
|
+
| Symbol | Path | Signature | Owner slice |
|
|
1031
|
+
|---|---|---|---|
|
|
1032
|
+
| | | | |
|
|
1033
|
+
|
|
1034
|
+
## Naming Conventions
|
|
1035
|
+
-
|
|
1036
|
+
|
|
1037
|
+
## Invariants
|
|
1038
|
+
-
|
|
1039
|
+
|
|
1040
|
+
## Integration Touchpoints
|
|
1041
|
+
| From slice | To slice | Surface | Integration test name |
|
|
1042
|
+
|---|---|---|---|
|
|
1043
|
+
| | | | |
|
|
1044
|
+
|
|
1045
|
+
## Behavior Specifications per Slice
|
|
1046
|
+
### Slice <n>: <description>
|
|
1047
|
+
- test: <name>
|
|
1048
|
+
assert: <one-line assertion>
|
|
1049
|
+
surface: <public interface>
|
|
1050
|
+
|
|
1051
|
+
## Status
|
|
1052
|
+
| Slice | Implemented | Tests pass | Cohesion verified |
|
|
1053
|
+
|---|---|---|---|
|
|
1054
|
+
| S-1 | no | no | no |
|
|
1064
1055
|
|
|
1065
1056
|
## Learnings
|
|
1066
1057
|
- None this stage.
|
|
1058
|
+
`,
|
|
1059
|
+
"cohesion-contract.json": `{
|
|
1060
|
+
"version": 1,
|
|
1061
|
+
"sharedTypes": [
|
|
1062
|
+
{
|
|
1063
|
+
"symbol": "",
|
|
1064
|
+
"path": "",
|
|
1065
|
+
"signature": "",
|
|
1066
|
+
"ownerSlice": ""
|
|
1067
|
+
}
|
|
1068
|
+
],
|
|
1069
|
+
"touchpoints": [
|
|
1070
|
+
{
|
|
1071
|
+
"fromSlice": "",
|
|
1072
|
+
"toSlice": "",
|
|
1073
|
+
"surface": "",
|
|
1074
|
+
"integrationTestName": ""
|
|
1075
|
+
}
|
|
1076
|
+
],
|
|
1077
|
+
"slices": [
|
|
1078
|
+
{
|
|
1079
|
+
"sliceId": "S-1",
|
|
1080
|
+
"description": "",
|
|
1081
|
+
"test": "",
|
|
1082
|
+
"assert": "",
|
|
1083
|
+
"surface": "",
|
|
1084
|
+
"implemented": false,
|
|
1085
|
+
"testsPass": false,
|
|
1086
|
+
"cohesionVerified": false
|
|
1087
|
+
}
|
|
1088
|
+
],
|
|
1089
|
+
"status": {
|
|
1090
|
+
"overall": "pending",
|
|
1091
|
+
"notes": ""
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1067
1094
|
`,
|
|
1068
1095
|
"07-review.md": `${artifactFrontmatter("review")}
|
|
1069
1096
|
|
|
@@ -1076,15 +1103,13 @@ For meaningful TDD work, replace the Learnings sentinel with 1-3 JSON learning b
|
|
|
1076
1103
|
- Open questions:
|
|
1077
1104
|
- Drift from upstream (or \`None\`):
|
|
1078
1105
|
|
|
1079
|
-
## Self-Review
|
|
1106
|
+
## Pre-Critic Self-Review
|
|
1080
1107
|
- [ ] Build/lint/type-check/tests passed locally
|
|
1081
1108
|
- [ ] Diff matches spec/plan (no scope creep)
|
|
1082
1109
|
- [ ] Leftover prints / commented code / unused imports removed
|
|
1083
1110
|
- [ ] Deletion test: each new module justifies its existence
|
|
1084
1111
|
- Evidence (commands + result):
|
|
1085
1112
|
- Patches applied (or \`- None.\`):
|
|
1086
|
-
|
|
1087
|
-
## Frame the Review Request
|
|
1088
1113
|
- **Goal:**
|
|
1089
1114
|
- **Approach:**
|
|
1090
1115
|
- **Risk areas:**
|
|
@@ -1139,6 +1164,12 @@ For meaningful TDD work, replace the Learnings sentinel with 1-3 JSON learning b
|
|
|
1139
1164
|
| R-1 | Critical/Important/Suggestion | correctness/security/performance/architecture/external-safety | path:line | | open/resolved |
|
|
1140
1165
|
- NO_FINDINGS_ATTESTATION: <required when no findings are reported; cite inspected coverage>
|
|
1141
1166
|
|
|
1167
|
+
## Lens Coverage
|
|
1168
|
+
- Performance: NO_IMPACT | FOUND_<n>
|
|
1169
|
+
- Compatibility: NO_IMPACT | FOUND_<n>
|
|
1170
|
+
- Observability: NO_IMPACT | FOUND_<n>
|
|
1171
|
+
- Security: routed to security-reviewer (always separate)
|
|
1172
|
+
|
|
1142
1173
|
## Security Sweep Attestation
|
|
1143
1174
|
- Result: findings | NO_CHANGE_ATTESTATION | NO_SECURITY_IMPACT
|
|
1144
1175
|
- Inspected surfaces:
|
|
@@ -1160,7 +1191,7 @@ For meaningful TDD work, replace the Learnings sentinel with 1-3 JSON learning b
|
|
|
1160
1191
|
|
|
1161
1192
|
## Review Readiness Snapshot
|
|
1162
1193
|
|
|
1163
|
-
- Victory Detector: pass | fail (Layer 1, Layer 2, security sweep, structured findings,
|
|
1194
|
+
- Victory Detector: pass | fail (Layer 1, Layer 2, security sweep, structured findings, acceptance/reproduction coverage evidence, unresolved-critical status)
|
|
1164
1195
|
- Completed checks: Layer 1, Layer 2 tags, security sweep, schema validation
|
|
1165
1196
|
- Delegation log: \`.cclaw/state/delegation-log.json\` required/completed/waived/pending
|
|
1166
1197
|
- Staleness signal: commit at last review pass vs current commit
|
|
@@ -1175,11 +1206,10 @@ For meaningful TDD work, replace the Learnings sentinel with 1-3 JSON learning b
|
|
|
1175
1206
|
- Adversarial review: not triggered | pass | fail
|
|
1176
1207
|
- Overall: complete | concerns | blocked
|
|
1177
1208
|
|
|
1178
|
-
##
|
|
1179
|
-
-
|
|
1180
|
-
- Orphaned
|
|
1181
|
-
- Orphaned
|
|
1182
|
-
- Orphaned tests: 0
|
|
1209
|
+
## Coverage Check
|
|
1210
|
+
- AC/source-item/slice coverage rationale:
|
|
1211
|
+
- Orphaned source items: none | explain gap
|
|
1212
|
+
- Orphaned tests: none | explain gap
|
|
1183
1213
|
- Evidence ref:
|
|
1184
1214
|
|
|
1185
1215
|
## Verification Command Discovery
|
|
@@ -1201,9 +1231,6 @@ For meaningful TDD work, replace the Learnings sentinel with 1-3 JSON learning b
|
|
|
1201
1231
|
## Final Verdict
|
|
1202
1232
|
- APPROVED | APPROVED_WITH_CONCERNS | BLOCKED
|
|
1203
1233
|
|
|
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
1234
|
## Learnings
|
|
1208
1235
|
- None this stage.
|
|
1209
1236
|
`,
|
|
@@ -1257,6 +1284,12 @@ For meaningful review work, replace the Learnings sentinel with 1-3 JSON learnin
|
|
|
1257
1284
|
- Type-check:
|
|
1258
1285
|
- Working tree clean:
|
|
1259
1286
|
|
|
1287
|
+
## Architect Cross-Stage Verification
|
|
1288
|
+
- Skill: architect-cross-stage-verification
|
|
1289
|
+
- Result: CROSS_STAGE_VERIFIED | DRIFT_DETECTED | BLOCKED
|
|
1290
|
+
- Evidence refs:
|
|
1291
|
+
- Drift summary:
|
|
1292
|
+
|
|
1260
1293
|
## Base Branch Determination
|
|
1261
1294
|
- Command run: \`git merge-base HEAD main || git merge-base HEAD master\`
|
|
1262
1295
|
- Base branch:
|
|
@@ -1438,7 +1471,7 @@ Track-specific skips are allowed only when \`flow-state.track\` + \`skippedStage
|
|
|
1438
1471
|
|
|
1439
1472
|
- No completion claim without fresh command evidence in this turn.
|
|
1440
1473
|
- Do not mark gates passed from memory.
|
|
1441
|
-
- Keep evidence in \`.cclaw/artifacts/\`; archive via \`
|
|
1474
|
+
- Keep evidence in \`.cclaw/artifacts/\`; archive through closeout via \`/cc\` or cancel early via \`node .cclaw/hooks/cancel-run.mjs\`.
|
|
1442
1475
|
|
|
1443
1476
|
## Delegation And Approvals
|
|
1444
1477
|
|
|
@@ -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"];
|