cclaw-cli 6.10.0 → 6.12.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/dist/artifact-linter/shared.d.ts +7 -4
- package/dist/artifact-linter/shared.js +4 -4
- package/dist/artifact-linter/tdd.d.ts +67 -17
- package/dist/artifact-linter/tdd.js +663 -131
- package/dist/artifact-linter.js +46 -40
- package/dist/content/core-agents.d.ts +14 -0
- package/dist/content/core-agents.js +36 -1
- package/dist/content/examples.js +5 -5
- package/dist/content/hooks.js +68 -3
- package/dist/content/skills.d.ts +10 -0
- package/dist/content/skills.js +60 -2
- package/dist/content/stage-schema.js +13 -7
- package/dist/content/stages/schema-types.d.ts +1 -1
- package/dist/content/stages/tdd.js +21 -20
- package/dist/content/subagents.js +10 -9
- package/dist/content/templates.d.ts +6 -0
- package/dist/content/templates.js +38 -20
- package/dist/delegation.d.ts +27 -0
- package/dist/delegation.js +13 -1
- package/dist/flow-state.d.ts +15 -0
- package/dist/install.js +118 -0
- package/dist/internal/advance-stage.js +2 -6
- package/dist/run-persistence.js +13 -0
- package/package.json +1 -1
- package/dist/tdd-slices.d.ts +0 -90
- package/dist/tdd-slices.js +0 -375
|
@@ -412,11 +412,14 @@ export interface TddEvidencePointerOptions {
|
|
|
412
412
|
*/
|
|
413
413
|
pointerSatisfied?: boolean;
|
|
414
414
|
/**
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
415
|
+
* v6.11.0 (D5) — true when `delegation-events.jsonl` carries at least
|
|
416
|
+
* one slice-tagged event for the current run with the matching phase
|
|
417
|
+
* (`phase=red` for RED, `phase=green` for GREEN) and a non-empty
|
|
418
|
+
* `evidenceRefs` array. Phase events are the new source of truth in
|
|
419
|
+
* v6.11.0, so the markdown evidence block is auto-satisfied without
|
|
420
|
+
* requiring hand-pasted stdout content.
|
|
418
421
|
*/
|
|
419
|
-
|
|
422
|
+
phaseEventsSatisfied?: boolean;
|
|
420
423
|
}
|
|
421
424
|
/**
|
|
422
425
|
* Sync helper that scans for `Evidence:` lines in a section body and
|
|
@@ -1442,10 +1442,10 @@ export function extractEvidencePointers(sectionBody) {
|
|
|
1442
1442
|
return pointers;
|
|
1443
1443
|
}
|
|
1444
1444
|
export function validateTddRedEvidence(sectionBody, opts = {}) {
|
|
1445
|
-
if (opts.
|
|
1445
|
+
if (opts.phaseEventsSatisfied) {
|
|
1446
1446
|
return {
|
|
1447
1447
|
ok: true,
|
|
1448
|
-
details: "RED Evidence auto-satisfied:
|
|
1448
|
+
details: "RED Evidence auto-satisfied: delegation-events.jsonl carries a phase=red row with non-empty evidenceRefs for the active run."
|
|
1449
1449
|
};
|
|
1450
1450
|
}
|
|
1451
1451
|
if (opts.pointerSatisfied) {
|
|
@@ -1479,10 +1479,10 @@ export function validateTddRedEvidence(sectionBody, opts = {}) {
|
|
|
1479
1479
|
};
|
|
1480
1480
|
}
|
|
1481
1481
|
export function validateTddGreenEvidence(sectionBody, opts = {}) {
|
|
1482
|
-
if (opts.
|
|
1482
|
+
if (opts.phaseEventsSatisfied) {
|
|
1483
1483
|
return {
|
|
1484
1484
|
ok: true,
|
|
1485
|
-
details: "GREEN Evidence auto-satisfied:
|
|
1485
|
+
details: "GREEN Evidence auto-satisfied: delegation-events.jsonl carries a phase=green row with non-empty evidenceRefs for the active run."
|
|
1486
1486
|
};
|
|
1487
1487
|
}
|
|
1488
1488
|
if (opts.pointerSatisfied) {
|
|
@@ -1,33 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type StageLintContext } from "./shared.js";
|
|
1
|
+
import type { DelegationEntry } from "../delegation.js";
|
|
2
|
+
import { type LintFinding, type StageLintContext } from "./shared.js";
|
|
3
|
+
/**
|
|
4
|
+
* v6.11.0 — TDD stage linter.
|
|
5
|
+
*
|
|
6
|
+
* Source-of-truth ladder, in order of precedence:
|
|
7
|
+
*
|
|
8
|
+
* 1. **Phase events** in `delegation-events.jsonl` for the active run
|
|
9
|
+
* (`stage=tdd`, `sliceId=S-N`, `phase=red|green|refactor|refactor-deferred|doc`).
|
|
10
|
+
* When at least one slice carries any phase event, the linter
|
|
11
|
+
* auto-derives Watched-RED / Vertical Slice Cycle from the events
|
|
12
|
+
* and writes a rendered summary block between auto-render markers
|
|
13
|
+
* in `06-tdd.md`. Markdown table content is no longer required.
|
|
14
|
+
* 2. **Legacy markdown tables** (Watched-RED Proof + Vertical Slice
|
|
15
|
+
* Cycle) — used as a fallback when the events ledger has no slice
|
|
16
|
+
* phase rows for the active run. Existing v6.10 and earlier
|
|
17
|
+
* artifacts continue to validate via this path.
|
|
18
|
+
* 3. **Sharded slice files** under `<artifacts-dir>/tdd-slices/S-*.md`.
|
|
19
|
+
* Per-slice prose lives there. The main `06-tdd.md` is auto-indexed
|
|
20
|
+
* via `## Slices Index`.
|
|
21
|
+
*/
|
|
3
22
|
export declare function lintTddStage(ctx: StageLintContext): Promise<void>;
|
|
23
|
+
interface SliceFileInfo {
|
|
24
|
+
sliceId: string;
|
|
25
|
+
absPath: string;
|
|
26
|
+
}
|
|
4
27
|
interface ParsedSliceCycleResult {
|
|
5
28
|
ok: boolean;
|
|
6
29
|
details: string;
|
|
7
30
|
}
|
|
31
|
+
interface ExpandedSliceCycleResult extends ParsedSliceCycleResult {
|
|
32
|
+
findings: LintFinding[];
|
|
33
|
+
}
|
|
34
|
+
export declare function evaluateEventsWatchedRed(slices: Map<string, DelegationEntry[]>): ParsedSliceCycleResult;
|
|
35
|
+
export declare function evaluateEventsSliceCycle(slices: Map<string, DelegationEntry[]>): ExpandedSliceCycleResult;
|
|
36
|
+
interface DocCoverageResult {
|
|
37
|
+
missing: string[];
|
|
38
|
+
}
|
|
39
|
+
export declare function evaluateSliceDocumenterCoverage(slices: Map<string, DelegationEntry[]>): DocCoverageResult;
|
|
40
|
+
interface ImplementerCoverageResult {
|
|
41
|
+
missing: string[];
|
|
42
|
+
}
|
|
8
43
|
/**
|
|
9
|
-
* v6.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* and
|
|
44
|
+
* v6.12.0 Phase M — slice-implementer must own GREEN. For each slice
|
|
45
|
+
* that recorded a phase=red event with non-empty evidenceRefs, require a
|
|
46
|
+
* phase=green event whose `agent === "slice-implementer"`. Slices whose
|
|
47
|
+
* GREEN event came from a different agent (e.g. controller wrote GREEN
|
|
48
|
+
* itself and recorded a green row under another agent name) are flagged.
|
|
14
49
|
*/
|
|
15
|
-
export declare function
|
|
50
|
+
export declare function evaluateSliceImplementerCoverage(slices: Map<string, DelegationEntry[]>): ImplementerCoverageResult;
|
|
51
|
+
interface RedCheckpointResult {
|
|
52
|
+
ok: boolean;
|
|
53
|
+
details: string;
|
|
54
|
+
}
|
|
16
55
|
/**
|
|
17
|
-
* v6.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* the
|
|
56
|
+
* v6.12.0 Phase W — RED checkpoint enforcement. The wave protocol
|
|
57
|
+
* requires ALL Phase A REDs to land before ANY Phase B GREEN starts.
|
|
58
|
+
* The rule is enforced on a per-wave basis, where a wave is defined by
|
|
59
|
+
* `<artifacts-dir>/wave-plans/wave-NN.md` files (when present) listing
|
|
60
|
+
* slice ids. When no wave manifest exists, the linter falls back to a
|
|
61
|
+
* conservative implicit detection: a wave is a contiguous run of
|
|
62
|
+
* `phase=red` events with no other-phase events between them; the rule
|
|
63
|
+
* fires only when the implicit wave has 2+ members.
|
|
64
|
+
*
|
|
65
|
+
* @param waveMembers Optional explicit wave manifest. Map key is wave
|
|
66
|
+
* name (e.g. `"W-01"`); value is the set of slice ids in that wave.
|
|
25
67
|
*/
|
|
26
|
-
export declare function
|
|
68
|
+
export declare function evaluateRedCheckpoint(slices: Map<string, DelegationEntry[]>, waveMembers?: Map<string, Set<string>> | null): RedCheckpointResult;
|
|
27
69
|
export declare function parseVerticalSliceCycle(body: string): ParsedSliceCycleResult;
|
|
28
70
|
interface VerificationLadderResult {
|
|
29
71
|
ok: boolean;
|
|
30
72
|
details: string;
|
|
31
73
|
}
|
|
32
74
|
export declare function evaluateVerificationLadder(body: string | null): VerificationLadderResult;
|
|
75
|
+
interface RenderInput {
|
|
76
|
+
mainArtifactPath: string;
|
|
77
|
+
slicesByEvents: Map<string, DelegationEntry[]>;
|
|
78
|
+
sliceFiles: SliceFileInfo[];
|
|
79
|
+
renderSummary?: boolean;
|
|
80
|
+
renderIndex?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export declare function renderTddSliceSummary(input: RenderInput): Promise<void>;
|
|
33
83
|
export {};
|