cclaw-cli 6.10.0 → 6.11.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.
@@ -412,11 +412,14 @@ export interface TddEvidencePointerOptions {
412
412
  */
413
413
  pointerSatisfied?: boolean;
414
414
  /**
415
- * True when `06-tdd-slices.jsonl` contains a slice with the matching
416
- * output ref (`redOutputRef`/`greenOutputRef`); the markdown evidence
417
- * block is auto-satisfied because the sidecar is the source of truth.
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
- sidecarAutoSatisfy?: boolean;
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.sidecarAutoSatisfy) {
1445
+ if (opts.phaseEventsSatisfied) {
1446
1446
  return {
1447
1447
  ok: true,
1448
- details: "RED Evidence auto-satisfied: 06-tdd-slices.jsonl carries a redOutputRef for the matching slice."
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.sidecarAutoSatisfy) {
1482
+ if (opts.phaseEventsSatisfied) {
1483
1483
  return {
1484
1484
  ok: true,
1485
- details: "GREEN Evidence auto-satisfied: 06-tdd-slices.jsonl carries a greenOutputRef for the matching slice."
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,54 @@
1
- import { type TddSliceLedgerEntry } from "../tdd-slices.js";
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
  }
8
- /**
9
- * v6.10.0 (T2) — sidecar-aware Watched-RED check. Validates that every
10
- * slice currently recorded in `06-tdd-slices.jsonl` (folded latest-row
11
- * per `sliceId`) has the structural evidence the markdown table would
12
- * have required: RED observation timestamp, test file, test command,
13
- * and at least one claimed path.
14
- */
15
- export declare function evaluateSidecarWatchedRed(rawEntries: TddSliceLedgerEntry[]): ParsedSliceCycleResult;
16
- /**
17
- * v6.10.0 (T2) — sidecar-aware Vertical Slice Cycle check. Each slice
18
- * must have a row whose effective status (latest by sliceId) implies a
19
- * monotonic progression. Once a slice carries `greenAt`, the linter
20
- * requires `greenAt >= redObservedAt`. `refactor-deferred` requires a
21
- * non-empty `refactorRationale`. `refactor-done` requires a `refactorAt`
22
- * that is `>= greenAt`. Slices stuck at `red` are tolerated only when
23
- * the run is still in TDD; the linter surfaces them as advisory through
24
- * the watched-RED check above.
25
- */
26
- export declare function evaluateSidecarSliceCycle(rawEntries: TddSliceLedgerEntry[]): ParsedSliceCycleResult;
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;
27
40
  export declare function parseVerticalSliceCycle(body: string): ParsedSliceCycleResult;
28
41
  interface VerificationLadderResult {
29
42
  ok: boolean;
30
43
  details: string;
31
44
  }
32
45
  export declare function evaluateVerificationLadder(body: string | null): VerificationLadderResult;
46
+ interface RenderInput {
47
+ mainArtifactPath: string;
48
+ slicesByEvents: Map<string, DelegationEntry[]>;
49
+ sliceFiles: SliceFileInfo[];
50
+ renderSummary?: boolean;
51
+ renderIndex?: boolean;
52
+ }
53
+ export declare function renderTddSliceSummary(input: RenderInput): Promise<void>;
33
54
  export {};