@farmslot/protocol 0.29.0 → 0.30.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/CHANGELOG.md +19 -0
- package/dist/agents/roles.d.ts +7 -0
- package/dist/agents/roles.d.ts.map +1 -1
- package/dist/agents/roles.js +11 -0
- package/dist/agents/roles.js.map +1 -1
- package/dist/checklist-target.d.ts +36 -6
- package/dist/checklist-target.d.ts.map +1 -1
- package/dist/checklist-target.js +50 -5
- package/dist/checklist-target.js.map +1 -1
- package/dist/contracts/acceptance.d.ts +90 -0
- package/dist/contracts/acceptance.d.ts.map +1 -0
- package/dist/contracts/acceptance.js +177 -0
- package/dist/contracts/acceptance.js.map +1 -0
- package/dist/contracts/agents.d.ts +1 -1
- package/dist/contracts/agents.d.ts.map +1 -1
- package/dist/contracts/agents.js +4 -0
- package/dist/contracts/agents.js.map +1 -1
- package/dist/contracts/diff-view.d.ts +69 -0
- package/dist/contracts/diff-view.d.ts.map +1 -0
- package/dist/contracts/diff-view.js +137 -0
- package/dist/contracts/diff-view.js.map +1 -0
- package/dist/contracts/family.d.ts +12 -0
- package/dist/contracts/family.d.ts.map +1 -1
- package/dist/contracts/family.js.map +1 -1
- package/dist/contracts/glob.d.ts +32 -0
- package/dist/contracts/glob.d.ts.map +1 -0
- package/dist/contracts/glob.js +100 -0
- package/dist/contracts/glob.js.map +1 -0
- package/dist/contracts/index.d.ts +3 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +3 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/reviews.d.ts +1 -1
- package/dist/contracts/reviews.d.ts.map +1 -1
- package/dist/contracts/reviews.js +1 -1
- package/dist/contracts/reviews.js.map +1 -1
- package/dist/contracts/runs.d.ts +68 -1
- package/dist/contracts/runs.d.ts.map +1 -1
- package/dist/contracts/runs.js +31 -0
- package/dist/contracts/runs.js.map +1 -1
- package/dist/contracts/task.d.ts +27 -0
- package/dist/contracts/task.d.ts.map +1 -1
- package/dist/contracts/worker-terminal.d.ts +19 -0
- package/dist/contracts/worker-terminal.d.ts.map +1 -1
- package/dist/contracts/worker-terminal.js.map +1 -1
- package/dist/contracts/workspace.d.ts +3 -0
- package/dist/contracts/workspace.d.ts.map +1 -1
- package/dist/rpc/git.d.ts +5 -0
- package/dist/rpc/git.d.ts.map +1 -1
- package/dist/rpc/task.d.ts +18 -0
- package/dist/rpc/task.d.ts.map +1 -1
- package/dist/runs/review-retries.d.ts +4 -9
- package/dist/runs/review-retries.d.ts.map +1 -1
- package/dist/runs/review-retries.js +24 -16
- package/dist/runs/review-retries.js.map +1 -1
- package/dist/transport/events.d.ts +2 -0
- package/dist/transport/events.d.ts.map +1 -1
- package/dist/transport/signal.d.ts +38 -1
- package/dist/transport/signal.d.ts.map +1 -1
- package/dist/transport/signal.js +33 -0
- package/dist/transport/signal.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,25 @@ All notable changes to `@farmslot/protocol` are tracked here.
|
|
|
6
6
|
|
|
7
7
|
- Active-development baseline; add user-facing changes here before release or package publication.
|
|
8
8
|
|
|
9
|
+
## 0.30.0 - 2026-09-20
|
|
10
|
+
|
|
11
|
+
- `compileGlob` is the one glob-to-regex compiler for path filters, with `anchored` (git pathspec, root-anchored) and `segment` (gitignore-like) anchoring and a case-sensitivity option; diff-view test patterns use it, a pattern with character-class syntax is now rejected with a warning (and dropped from the effective list) instead of matching the brackets literally, and a double star not followed by a slash and not trailing is a plain star, as git and gitignore read it.
|
|
12
|
+
- Child checklist units (ADR-060): a parent checklist step can own one child checklist plus signal under `subtasks/`.
|
|
13
|
+
- `subtask` joins `AGENT_ROLES`. It is not a nested-loop role and never a session target: clients validate a requested role against the new `DISPATCHABLE_AGENT_ROLES`.
|
|
14
|
+
- `WorkerSignalParentLink` and `SubtaskSignal` describe a child signal and the parent step it hangs off.
|
|
15
|
+
- `subtaskPaths`, `SUBTASKS_DIR`, `SUBTASK_INDEX_FILE`, `SUBTASK_ID_PATTERN` and `SubtaskIndex` name the `subtasks/` layout.
|
|
16
|
+
- `isSettledSubtaskStatus` says when a child releases its parent step (`complete` or `done`; a `blocked` child keeps it), and `isWorkerSignalStatus` narrows an untyped signal status without a cast.
|
|
17
|
+
- `TaskStepProgress.subtask` carries the child projection, and `shouldAcceptTaskProgressUpdate` accepts a child update whose new `parentChecklist` matches the run's active checklist pair.
|
|
18
|
+
- `RunMetrics.subtasks` records each unit's parent step, source, status, step count and duration, and a gate summary's `checklist.subtasks` carries per-child step durations plus the unit's source, so child cost survives task-directory pruning and a retrospective names the skill or template, not only the id.
|
|
19
|
+
- Acceptance-criteria ledger (ADR-060): `AcceptanceStatusLedger` / `AcceptanceCriterionStatus` describe `artifacts/acceptance-status.json`, with `ACCEPTANCE_STATUS_ARTIFACT`, the `proven | weak | missing | untestable` and `state | visual | mixed` vocabularies, positional `AC-<N>` ids (`acceptanceCriterionId`), `validateAcceptanceStatusLedger`, `summarizeAcceptanceStatus` and `renderAcceptanceCoverage` (the coverage table workers hand-write today). `WorkerTerminalContractDocument.acceptance.allowWeak` lets a flow waive weak verdicts.
|
|
20
|
+
- Acceptance ledger surfaces: `TaskProgressResult.acceptanceStatus` and `acceptanceCriteria` carry the run's verdicts and its registered criteria on the progress read and broadcast, `ReadyGatePayload.acceptanceStatus` and `FamilyObservabilityRunSummary.acceptanceStatus` carry the ledger to the gate and the retrospective, and `acceptanceCriteriaView` pairs registered criteria with their verdicts (null while unjudged). `summarizeAcceptanceStatus` takes the registered criteria and reports `unrecorded`, so a count reads against how many criteria the run has rather than how many were judged.
|
|
21
|
+
- `WorkerTerminalAcceptanceRules.require` opts a project into ledger enforcement; it defaults to false so a template that writes no ledger is unaffected.
|
|
22
|
+
- Acceptance ledger review fixes: `renderAcceptanceCoverage` takes the registered criteria so a partial ledger cannot report `1/1 PROVEN` for a task with three criteria (a criterion with no verdict is a `NO VERDICT` row and the overall line names the count), `TaskProgressResult.acceptanceStatusError` and `ReadyGatePayload.acceptanceStatusError` carry a read failure so clients can say the ledger is unreadable instead of showing nothing, and `FamilyObservabilityRunSummary.acceptanceSummary` carries the tally so a retrospective needs no second read.
|
|
23
|
+
- Diff views classify changed files as `code` or `test`: `DEFAULT_TEST_FILE_PATTERNS`, `compileTestFileMatcher` (segment / directory / anchored glob rules, project patterns capped), `summarizeDiffKinds`, a `kind` on each `git.branchDiff` file, and `testFilePatterns` on the result.
|
|
24
|
+
- `isSettledBlockedRun` names a blocked run with no running step and no pending decision; the gateway and Command Center use it to offer archiving.
|
|
25
|
+
- Independent-review `retryCount` is the max of the persisted field and spent attempts so a wiped `0` cannot hide a spent loop. Exhaustion (and the dangerous bypass) stays visible when the package HEAD has moved since the last extra-review; `latestExhaustedIndependentReview` no longer takes a prepared-package argument. Pipeline progress labels include independent-review (`human-gate`) while an extra-review checklist is running.
|
|
26
|
+
- Doc comments: `checklistStepName` names `mark` among its consumers, and a checklist event `label` is documented as the step name. No code change.
|
|
27
|
+
|
|
9
28
|
## 0.29.0 - 2026-09-18
|
|
10
29
|
|
|
11
30
|
- Checklist and signal rules every client must agree on are now protocol exports instead of gateway-private code: `isTerminalWorkerSignal` / `isTerminalWorkerSignalStatus` (complete, failed, done, blocked; unknown is never terminal), `checklistStepName` (the bold lead of a row, numbering kept) and `checklistNumberingMismatches` (a generated checklist whose visible labels drift from `mark N` positions). Harness views that re-implemented these disagreed with the gateway on which signals are final and how a step is named.
|
package/dist/agents/roles.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { AGENT_ROLES, type AgentRole, type FlowType } from '../contracts/index.js';
|
|
2
2
|
export { AGENT_ROLES };
|
|
3
|
+
/**
|
|
4
|
+
* Roles a client may dispatch, attach, or open a session for. A child checklist
|
|
5
|
+
* unit (`subtask`) is observed through its files and never spawned (ADR-060),
|
|
6
|
+
* so it is not a session target — clients validate against this list, not the
|
|
7
|
+
* full role union.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DISPATCHABLE_AGENT_ROLES: ("primary" | "dev" | "fix-bug" | "review" | "self-review" | "self-review-fix" | "ci-fix")[];
|
|
3
10
|
export declare const AGENT_ROLE_LABELS: Record<AgentRole, string>;
|
|
4
11
|
export declare const AGENT_ROLE_SHORT_LABELS: Record<AgentRole, string>;
|
|
5
12
|
export declare const AGENT_ROLE_WINDOWS: Record<AgentRole, string | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/agents/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/agents/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,6FAEpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CASvD,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAS7D,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAS/D,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAGlE;AAKD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAStD,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAUjF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEpD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEtD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE3D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAE9D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CASrD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAazE;AAED,wBAAgB,oBAAoB,CAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,EACxB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAC7B,MAAM,GAAG,IAAI,CAEf"}
|
package/dist/agents/roles.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { AGENT_ROLES } from '../contracts/index.js';
|
|
2
2
|
export { AGENT_ROLES };
|
|
3
|
+
/**
|
|
4
|
+
* Roles a client may dispatch, attach, or open a session for. A child checklist
|
|
5
|
+
* unit (`subtask`) is observed through its files and never spawned (ADR-060),
|
|
6
|
+
* so it is not a session target — clients validate against this list, not the
|
|
7
|
+
* full role union.
|
|
8
|
+
*/
|
|
9
|
+
export const DISPATCHABLE_AGENT_ROLES = AGENT_ROLES.filter((role) => role !== 'subtask');
|
|
3
10
|
export const AGENT_ROLE_LABELS = {
|
|
4
11
|
primary: 'Primary',
|
|
5
12
|
dev: 'Dev',
|
|
@@ -8,6 +15,7 @@ export const AGENT_ROLE_LABELS = {
|
|
|
8
15
|
'self-review': 'Self-review',
|
|
9
16
|
'self-review-fix': 'Self-review fix',
|
|
10
17
|
'ci-fix': 'CI fix',
|
|
18
|
+
subtask: 'Sub-task',
|
|
11
19
|
};
|
|
12
20
|
export const AGENT_ROLE_SHORT_LABELS = {
|
|
13
21
|
primary: 'MAIN',
|
|
@@ -17,6 +25,7 @@ export const AGENT_ROLE_SHORT_LABELS = {
|
|
|
17
25
|
'self-review': 'S-REV',
|
|
18
26
|
'self-review-fix': 'S-FIX',
|
|
19
27
|
'ci-fix': 'CI',
|
|
28
|
+
subtask: 'SUB',
|
|
20
29
|
};
|
|
21
30
|
export const AGENT_ROLE_WINDOWS = {
|
|
22
31
|
primary: null,
|
|
@@ -26,6 +35,7 @@ export const AGENT_ROLE_WINDOWS = {
|
|
|
26
35
|
'self-review': 'self-review',
|
|
27
36
|
'self-review-fix': null, // runs in the primary worker's window, not a separate one
|
|
28
37
|
'ci-fix': 'ci-fix',
|
|
38
|
+
subtask: null, // a child unit is observed, never spawned — it owns no window
|
|
29
39
|
};
|
|
30
40
|
/** Stable session anchor used by orchestration flows without a role window. */
|
|
31
41
|
export const PRIMARY_WORKER_WINDOW = 'worker';
|
|
@@ -51,6 +61,7 @@ export const AGENT_ROLE_RANKS = {
|
|
|
51
61
|
'self-review': 10,
|
|
52
62
|
'self-review-fix': 20,
|
|
53
63
|
'ci-fix': 30,
|
|
64
|
+
subtask: 40,
|
|
54
65
|
};
|
|
55
66
|
export function primaryRoleForFlow(flowType) {
|
|
56
67
|
if (flowType === 'dev')
|
package/dist/agents/roles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/agents/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiC,MAAM,uBAAuB,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,MAAM,CAAC,MAAM,iBAAiB,GAA8B;IAC1D,OAAO,EAAE,SAAS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wB;IACnD,MAAM,SAAS,GAAG,QAAQ,EAAE,IAAI,EAAE,CAAC;IACnC,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACrF,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import type { AgentRole } from './contracts/index.js';
|
|
1
|
+
import type { AgentRole, SubtaskSource } from './contracts/index.js';
|
|
2
|
+
import type { WorkerSignalParentLink } from './transport/signal.js';
|
|
3
|
+
export type { SubtaskSource, SubtaskSourceKind } from './contracts/index.js';
|
|
2
4
|
export declare const CHECKLIST_TARGET_MANIFEST = "checklist-target.json";
|
|
3
5
|
export declare const TASK_PROGRESS_MARKDOWN = "TASK.md";
|
|
4
6
|
export declare const INTERACTIVE_CHECKLIST_MARKDOWN = "CHECKLIST.md";
|
|
5
7
|
export declare const WORKER_SIGNAL_FILE = "SIGNAL.json";
|
|
6
8
|
export declare const ROLE_SIGNAL_SUFFIX = "-SIGNAL.json";
|
|
9
|
+
/** Directory holding child checklist units and their signals (ADR-060). */
|
|
10
|
+
export declare const SUBTASKS_DIR = "subtasks";
|
|
11
|
+
/** `mark`-maintained registry of child units, the one file the gateway watches to discover them. */
|
|
12
|
+
export declare const SUBTASK_INDEX_FILE = "index.json";
|
|
13
|
+
/** A child unit id: a slug, unique for the life of one task directory. */
|
|
14
|
+
export declare const SUBTASK_ID_PATTERN: RegExp;
|
|
7
15
|
export declare const SELF_REVIEW_CHECKLIST = "SELF-REVIEW.md";
|
|
8
16
|
export declare const SELF_REVIEW_FIX_CHECKLIST = "SELF-REVIEW-FIX.md";
|
|
9
17
|
export declare const CI_FIX_CHECKLIST = "CI-FIX.md";
|
|
@@ -42,10 +50,9 @@ export declare function enumerateChecklistCheckboxes(markdown: string): Checklis
|
|
|
42
50
|
/**
|
|
43
51
|
* The name a step is shown under. A bold lead (`**1. Text** — long instructions`)
|
|
44
52
|
* is the name, numbering kept, instructions dropped; anything else is the raw
|
|
45
|
-
* label. The gateway task schema
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* changes every recorded event label and is a separate change.
|
|
53
|
+
* label. The gateway task schema, `mark` (SIGNAL.json `step` and event labels,
|
|
54
|
+
* through the CJS mirror in agent-runtime) and `mm-harness status --watch` all
|
|
55
|
+
* name a step through this.
|
|
49
56
|
*/
|
|
50
57
|
export declare function checklistStepName(rawLabel: string): string;
|
|
51
58
|
/**
|
|
@@ -70,6 +77,27 @@ export interface ChecklistTargetRegistry {
|
|
|
70
77
|
roles: Record<NestedLoopAgentRole, ChecklistTarget>;
|
|
71
78
|
}
|
|
72
79
|
export declare function signalFileForChecklist(checklistBasename: string, registry?: Pick<ChecklistTargetRegistry, 'workerTask' | 'interactiveChecklist' | 'workerSignal' | 'roleSignalSuffix'>): string;
|
|
80
|
+
/**
|
|
81
|
+
* Task-dir relative paths of a child unit's checklist and signal. The signal
|
|
82
|
+
* basename comes from {@link signalFileForChecklist}, so a child pair derives
|
|
83
|
+
* its names exactly as a role pair does; only the `subtasks/` prefix is new.
|
|
84
|
+
*/
|
|
85
|
+
export declare function subtaskPaths(id: string): ChecklistTarget;
|
|
86
|
+
/** One registered child unit. Provenance only — progress lives in the child signal. */
|
|
87
|
+
export interface SubtaskIndexUnit {
|
|
88
|
+
id: string;
|
|
89
|
+
parent: WorkerSignalParentLink;
|
|
90
|
+
/** Task-dir relative child checklist path. */
|
|
91
|
+
checklist: string;
|
|
92
|
+
/** Task-dir relative child signal path. */
|
|
93
|
+
signal: string;
|
|
94
|
+
source: SubtaskSource;
|
|
95
|
+
registeredAt: string;
|
|
96
|
+
}
|
|
97
|
+
export interface SubtaskIndex {
|
|
98
|
+
schemaVersion: 1;
|
|
99
|
+
units: SubtaskIndexUnit[];
|
|
100
|
+
}
|
|
73
101
|
export declare function targetForChecklistBasename(checklistBasename: string, registry?: Pick<ChecklistTargetRegistry, 'workerTask' | 'interactiveChecklist' | 'workerSignal' | 'roleSignalSuffix'>): ChecklistTarget;
|
|
74
102
|
export declare function terminalContractInputForChecklist(checklistBasename: string): string;
|
|
75
103
|
export declare const SELF_REVIEW_CHECKLIST_TARGET: ChecklistTarget;
|
|
@@ -88,8 +116,10 @@ export interface TaskProgressAcceptanceRun {
|
|
|
88
116
|
export interface TaskProgressAcceptanceUpdate {
|
|
89
117
|
contextId?: string | null;
|
|
90
118
|
role?: string | null;
|
|
119
|
+
/** Child units only: the parent checklist basename the unit hangs off. */
|
|
120
|
+
parentChecklist?: string | null;
|
|
91
121
|
}
|
|
92
122
|
export declare function shouldAcceptTaskProgressUpdate(run: TaskProgressAcceptanceRun | null, update: TaskProgressAcceptanceUpdate, registry?: ChecklistTargetRegistry): boolean;
|
|
93
|
-
export type PipelineProgressStep = 'monitor' | 'self-review' | 'ci-watch' | null;
|
|
123
|
+
export type PipelineProgressStep = 'monitor' | 'self-review' | 'ci-watch' | 'human-gate' | null;
|
|
94
124
|
export declare function nestedLoopProgressLabel(activeStep: PipelineProgressStep, activeTaskBasename: string | null | undefined, registry?: ChecklistTargetRegistry): string;
|
|
95
125
|
//# sourceMappingURL=checklist-target.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-target.d.ts","sourceRoot":"","sources":["../src/checklist-target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"checklist-target.d.ts","sourceRoot":"","sources":["../src/checklist-target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE7E,eAAO,MAAM,y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Q,GAAE,uBAA2D,GACpE,MAAM,CASR"}
|
package/dist/checklist-target.js
CHANGED
|
@@ -4,6 +4,12 @@ export const TASK_PROGRESS_MARKDOWN = 'TASK.md';
|
|
|
4
4
|
export const INTERACTIVE_CHECKLIST_MARKDOWN = 'CHECKLIST.md';
|
|
5
5
|
export const WORKER_SIGNAL_FILE = 'SIGNAL.json';
|
|
6
6
|
export const ROLE_SIGNAL_SUFFIX = '-SIGNAL.json';
|
|
7
|
+
/** Directory holding child checklist units and their signals (ADR-060). */
|
|
8
|
+
export const SUBTASKS_DIR = 'subtasks';
|
|
9
|
+
/** `mark`-maintained registry of child units, the one file the gateway watches to discover them. */
|
|
10
|
+
export const SUBTASK_INDEX_FILE = 'index.json';
|
|
11
|
+
/** A child unit id: a slug, unique for the life of one task directory. */
|
|
12
|
+
export const SUBTASK_ID_PATTERN = /^[a-z0-9-]+$/;
|
|
7
13
|
export const SELF_REVIEW_CHECKLIST = 'SELF-REVIEW.md';
|
|
8
14
|
export const SELF_REVIEW_FIX_CHECKLIST = 'SELF-REVIEW-FIX.md';
|
|
9
15
|
export const CI_FIX_CHECKLIST = 'CI-FIX.md';
|
|
@@ -90,10 +96,9 @@ export function enumerateChecklistCheckboxes(markdown) {
|
|
|
90
96
|
/**
|
|
91
97
|
* The name a step is shown under. A bold lead (`**1. Text** — long instructions`)
|
|
92
98
|
* is the name, numbering kept, instructions dropped; anything else is the raw
|
|
93
|
-
* label. The gateway task schema
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* changes every recorded event label and is a separate change.
|
|
99
|
+
* label. The gateway task schema, `mark` (SIGNAL.json `step` and event labels,
|
|
100
|
+
* through the CJS mirror in agent-runtime) and `mm-harness status --watch` all
|
|
101
|
+
* name a step through this.
|
|
97
102
|
*/
|
|
98
103
|
export function checklistStepName(rawLabel) {
|
|
99
104
|
return rawLabel.replace(/^\*\*(.+?)\*\*.*$/, '$1').trim();
|
|
@@ -132,6 +137,17 @@ export function signalFileForChecklist(checklistBasename, registry = SIGNAL_REGI
|
|
|
132
137
|
const base = checklistBasename.replace(/\.md$/i, '');
|
|
133
138
|
return `${base}${registry.roleSignalSuffix}`;
|
|
134
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Task-dir relative paths of a child unit's checklist and signal. The signal
|
|
142
|
+
* basename comes from {@link signalFileForChecklist}, so a child pair derives
|
|
143
|
+
* its names exactly as a role pair does; only the `subtasks/` prefix is new.
|
|
144
|
+
*/
|
|
145
|
+
export function subtaskPaths(id) {
|
|
146
|
+
return {
|
|
147
|
+
checklist: `${SUBTASKS_DIR}/${id}.md`,
|
|
148
|
+
signal: `${SUBTASKS_DIR}/${signalFileForChecklist(`${id}.md`)}`,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
135
151
|
export function targetForChecklistBasename(checklistBasename, registry = SIGNAL_REGISTRY_DEFAULTS) {
|
|
136
152
|
return {
|
|
137
153
|
checklist: checklistBasename,
|
|
@@ -183,7 +199,34 @@ export function taskDirRelPath(taskDir, basename) {
|
|
|
183
199
|
const normalized = String(taskDir).replace(/\/+$/, '');
|
|
184
200
|
return `${normalized}/${basename}`;
|
|
185
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* Basename of the checklist a progress update must belong to: the active role
|
|
204
|
+
* checklist when one is live, otherwise the run's own worker file.
|
|
205
|
+
*/
|
|
206
|
+
function activeChecklistBasename(run) {
|
|
207
|
+
const activeTaskFile = run?.activeTaskFile;
|
|
208
|
+
const effective = !activeTaskFile || activeTaskFile === run?.taskFile ? run?.taskFile : activeTaskFile;
|
|
209
|
+
return checklistBasenameFromTaskPath(effective);
|
|
210
|
+
}
|
|
186
211
|
export function shouldAcceptTaskProgressUpdate(run, update, registry = DEFAULT_CHECKLIST_TARGET_REGISTRY) {
|
|
212
|
+
// A child unit is not a role switch: its contextId is the child id, so the
|
|
213
|
+
// role comparison below can never match it. It is live exactly while its
|
|
214
|
+
// parent checklist is the active one — a child parented on a checklist whose
|
|
215
|
+
// terminal mark already landed is stale, like every other off-role update.
|
|
216
|
+
if (update.role === 'subtask') {
|
|
217
|
+
const parentChecklist = update.parentChecklist ?? null;
|
|
218
|
+
if (!parentChecklist)
|
|
219
|
+
return false;
|
|
220
|
+
const activeName = activeChecklistBasename(run);
|
|
221
|
+
// No task file at all: nothing to contradict the child's claim.
|
|
222
|
+
if (!activeName)
|
|
223
|
+
return true;
|
|
224
|
+
// Compare the pair, not the filename: the run's task file is `TASK.md`
|
|
225
|
+
// while the worker checklist a child hangs off is `CHECKLIST.md`, and both
|
|
226
|
+
// resolve to the same worker signal. A role checklist resolves to its own.
|
|
227
|
+
return (signalFileForChecklist(parentChecklist, registry) ===
|
|
228
|
+
signalFileForChecklist(activeName, registry));
|
|
229
|
+
}
|
|
187
230
|
const activeTaskFile = run?.activeTaskFile;
|
|
188
231
|
if (!activeTaskFile || activeTaskFile === run?.taskFile)
|
|
189
232
|
return true;
|
|
@@ -197,10 +240,12 @@ export function shouldAcceptTaskProgressUpdate(run, update, registry = DEFAULT_C
|
|
|
197
240
|
return contextId === expectedRole;
|
|
198
241
|
}
|
|
199
242
|
export function nestedLoopProgressLabel(activeStep, activeTaskBasename, registry = DEFAULT_CHECKLIST_TARGET_REGISTRY) {
|
|
200
|
-
if (activeStep === 'self-review') {
|
|
243
|
+
if (activeStep === 'self-review' || activeStep === 'human-gate') {
|
|
201
244
|
const role = agentRoleForChecklistBasename(activeTaskBasename ?? '', registry);
|
|
202
245
|
if (role === 'self-review-fix')
|
|
203
246
|
return 'Self-review Fix Progress';
|
|
247
|
+
if (activeStep === 'human-gate')
|
|
248
|
+
return 'Independent Review Progress';
|
|
204
249
|
return 'Self-review Progress';
|
|
205
250
|
}
|
|
206
251
|
if (activeStep === 'ci-watch')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-target.js","sourceRoot":"","sources":["../src/checklist-target.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;
|
|
1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,QAAQ;QAAE,OAAO,IAAI,CAAC;IACrE,MAAM,UAAU,GAAG,6BAA6B,CAAC,cAAc,CAAC,CAAC;IACjE,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC;IAC7B,MAAM,YAAY,GAAG,6BAA6B,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACzE,IAAI,CAAC,YAAY;QAAE,OAAO,IAAI,CAAC;IAC/B,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC;IAC1D,OAAO,SAAS,KAAK,YAAY,CAAC;AACpC,CAAC;AAID,MAAM,UAAU,uBAAuB,CACrC,UAAgC,EAChC,kBAA6C,EAC7C,WAAoC,iCAAiC;IAErE,IAAI,UAAU,KAAK,aAAa,IAAI,UAAU,KAAK,YAAY,EAAE,CAAC;QAChE,MAAM,IAAI,GAAG,6BAA6B,CAAC,kBAAkB,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;QAC/E,IAAI,IAAI,KAAK,iBAAiB;YAAE,OAAO,0BAA0B,CAAC;QAClE,IAAI,UAAU,KAAK,YAAY;YAAE,OAAO,6BAA6B,CAAC;QACtE,OAAO,sBAAsB,CAAC;IAChC,CAAC;IACD,IAAI,UAAU,KAAK,UAAU;QAAE,OAAO,iBAAiB,CAAC;IACxD,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** Task-dir relative path of the ledger. Written only by `farmslot-agent ac`. */
|
|
2
|
+
export declare const ACCEPTANCE_STATUS_ARTIFACT = "artifacts/acceptance-status.json";
|
|
3
|
+
export declare const ACCEPTANCE_VERDICTS: readonly ["proven", "weak", "missing", "untestable"];
|
|
4
|
+
export type AcceptanceVerdict = (typeof ACCEPTANCE_VERDICTS)[number];
|
|
5
|
+
export declare const ACCEPTANCE_PROOF_MODES: readonly ["state", "visual", "mixed"];
|
|
6
|
+
export type AcceptanceProofMode = (typeof ACCEPTANCE_PROOF_MODES)[number];
|
|
7
|
+
/** Ids are positional, so a criterion keeps its id for the life of the task dir. */
|
|
8
|
+
export declare const ACCEPTANCE_CRITERION_ID_PATTERN: RegExp;
|
|
9
|
+
/**
|
|
10
|
+
* `AC-<N>` for a criterion's position in the handoff array.
|
|
11
|
+
*
|
|
12
|
+
* @param index 0-based position in `inputs/handoff.json` `task.acceptanceCriteria`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function acceptanceCriterionId(index: number): string;
|
|
15
|
+
export interface AcceptanceCriterionStatus {
|
|
16
|
+
/** `AC-<N>`, N the 1-based position in the handoff criteria array. */
|
|
17
|
+
id: string;
|
|
18
|
+
/** Criterion text as task init recorded it. */
|
|
19
|
+
text: string;
|
|
20
|
+
verdict: AcceptanceVerdict;
|
|
21
|
+
proofMode?: AcceptanceProofMode;
|
|
22
|
+
/** Task-dir relative evidence paths. */
|
|
23
|
+
evidence: string[];
|
|
24
|
+
/** Recipe node ids that prove this criterion. */
|
|
25
|
+
recipeNodes: string[];
|
|
26
|
+
note?: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
}
|
|
29
|
+
export interface AcceptanceStatusLedger {
|
|
30
|
+
schemaVersion: 1;
|
|
31
|
+
criteria: AcceptanceCriterionStatus[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* One criterion as task init registered it: the id and the text, with no verdict.
|
|
35
|
+
* Clients pair this with the ledger so a criterion the worker has not judged yet is
|
|
36
|
+
* visible as awaiting a verdict rather than missing from the panel — the ledger
|
|
37
|
+
* holds only what `ac set` recorded, and nothing may invent a verdict for the rest.
|
|
38
|
+
*/
|
|
39
|
+
export interface AcceptanceCriterionRef {
|
|
40
|
+
id: string;
|
|
41
|
+
text: string;
|
|
42
|
+
}
|
|
43
|
+
/** A criterion paired with its verdict, or null when none is recorded yet. */
|
|
44
|
+
export interface AcceptanceCriterionView extends AcceptanceCriterionRef {
|
|
45
|
+
status: AcceptanceCriterionStatus | null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Every registered criterion in id order, each with its recorded verdict or null.
|
|
49
|
+
* `criteria` is the authority for how many criteria the run has; `ledger` only ever
|
|
50
|
+
* holds the ones already judged.
|
|
51
|
+
*/
|
|
52
|
+
export declare function acceptanceCriteriaView(criteria: ReadonlyArray<AcceptanceCriterionRef>, ledger: AcceptanceStatusLedger | null): AcceptanceCriterionView[];
|
|
53
|
+
export interface AcceptanceStatusSummary {
|
|
54
|
+
proven: number;
|
|
55
|
+
weak: number;
|
|
56
|
+
missing: number;
|
|
57
|
+
untestable: number;
|
|
58
|
+
/** Registered criteria with no verdict recorded yet; 0 unless `criteria` was given. */
|
|
59
|
+
unrecorded: number;
|
|
60
|
+
total: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Contract issues for a parsed ledger; an empty array means the value is a valid
|
|
64
|
+
* {@link AcceptanceStatusLedger}. Issue strings are caller-printable and name the
|
|
65
|
+
* offending field, the way the task artifact contract check reports its own.
|
|
66
|
+
*/
|
|
67
|
+
export declare function validateAcceptanceStatusLedger(value: unknown): string[];
|
|
68
|
+
/**
|
|
69
|
+
* Verdict tally over the ledger.
|
|
70
|
+
*
|
|
71
|
+
* Omitting `criteria` counts only the rows already recorded, which understates a
|
|
72
|
+
* partial ledger: `total` is then "verdicts written", not "criteria the task has".
|
|
73
|
+
* Pass the registered criteria whenever the caller can read them — every caller
|
|
74
|
+
* with the task directory can — to get a `total` of registered criteria and an
|
|
75
|
+
* `unrecorded` count of those still waiting for a verdict.
|
|
76
|
+
*/
|
|
77
|
+
export declare function summarizeAcceptanceStatus(ledger: AcceptanceStatusLedger, criteria?: ReadonlyArray<AcceptanceCriterionRef>): AcceptanceStatusSummary;
|
|
78
|
+
/**
|
|
79
|
+
* The coverage table `artifacts/recipe-coverage.md` holds today, rendered from the
|
|
80
|
+
* ledger. The proof-mode column keeps the lowercase `state` / `visual` / `mixed`
|
|
81
|
+
* vocabulary the evidence rules key off, and the last line is the `Overall recipe
|
|
82
|
+
* coverage:` summary every consumer of the coverage file already looks for.
|
|
83
|
+
*
|
|
84
|
+
* Pass `criteria` so the overall line counts registered criteria: without them a
|
|
85
|
+
* partial ledger reads `1/1 PROVEN` when the task has three criteria. A criterion
|
|
86
|
+
* with no verdict yet is counted in the total and listed as awaiting one; it is
|
|
87
|
+
* never given a verdict it does not have.
|
|
88
|
+
*/
|
|
89
|
+
export declare function renderAcceptanceCoverage(ledger: AcceptanceStatusLedger, criteria?: ReadonlyArray<AcceptanceCriterionRef>): string;
|
|
90
|
+
//# sourceMappingURL=acceptance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance.d.ts","sourceRoot":"","sources":["../../src/contracts/acceptance.ts"],"names":[],"mappings":"AASA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E,eAAO,MAAM,mBAAmB,sDAAuD,CAAC;AACxF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,eAAO,MAAM,sBAAsB,uCAAwC,CAAC;AAC5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,oFAAoF;AACpF,eAAO,MAAM,+BAA+B,QAAqB,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,wCAAwC;IACxC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iDAAiD;IACjD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CA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
|
4
|
+
// Task init assigns the ids (`AC-<N>`, N the 1-based position of the criterion in
|
|
5
|
+
// `inputs/handoff.json` `task.acceptanceCriteria`) and `farmslot-agent ac` is the
|
|
6
|
+
// only writer of `artifacts/acceptance-status.json`. The markdown coverage table
|
|
7
|
+
// workers hand-write today is a rendering of this file, so the terminal contract
|
|
8
|
+
// check, the PR body, and the run-detail panel all read one structured source.
|
|
9
|
+
/** Task-dir relative path of the ledger. Written only by `farmslot-agent ac`. */
|
|
10
|
+
export const ACCEPTANCE_STATUS_ARTIFACT = 'artifacts/acceptance-status.json';
|
|
11
|
+
export const ACCEPTANCE_VERDICTS = ['proven', 'weak', 'missing', 'untestable'];
|
|
12
|
+
export const ACCEPTANCE_PROOF_MODES = ['state', 'visual', 'mixed'];
|
|
13
|
+
/** Ids are positional, so a criterion keeps its id for the life of the task dir. */
|
|
14
|
+
export const ACCEPTANCE_CRITERION_ID_PATTERN = /^AC-[1-9][0-9]*$/;
|
|
15
|
+
/**
|
|
16
|
+
* `AC-<N>` for a criterion's position in the handoff array.
|
|
17
|
+
*
|
|
18
|
+
* @param index 0-based position in `inputs/handoff.json` `task.acceptanceCriteria`.
|
|
19
|
+
*/
|
|
20
|
+
export function acceptanceCriterionId(index) {
|
|
21
|
+
return `AC-${index + 1}`;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Every registered criterion in id order, each with its recorded verdict or null.
|
|
25
|
+
* `criteria` is the authority for how many criteria the run has; `ledger` only ever
|
|
26
|
+
* holds the ones already judged.
|
|
27
|
+
*/
|
|
28
|
+
export function acceptanceCriteriaView(criteria, ledger) {
|
|
29
|
+
const byId = new Map((ledger?.criteria ?? []).map((entry) => [entry.id, entry]));
|
|
30
|
+
const rows = criteria.map((criterion) => ({
|
|
31
|
+
...criterion,
|
|
32
|
+
status: byId.get(criterion.id) ?? null,
|
|
33
|
+
}));
|
|
34
|
+
// A ledger entry for an id the handoff does not list is still shown: hiding it
|
|
35
|
+
// would hide a contract violation the terminal check refuses on.
|
|
36
|
+
for (const entry of ledger?.criteria ?? []) {
|
|
37
|
+
if (!criteria.some((criterion) => criterion.id === entry.id)) {
|
|
38
|
+
rows.push({ id: entry.id, text: entry.text, status: entry });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return rows;
|
|
42
|
+
}
|
|
43
|
+
function isRecord(value) {
|
|
44
|
+
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
45
|
+
}
|
|
46
|
+
function isNonEmptyString(value) {
|
|
47
|
+
return typeof value === 'string' && value.trim().length > 0;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Contract issues for a parsed ledger; an empty array means the value is a valid
|
|
51
|
+
* {@link AcceptanceStatusLedger}. Issue strings are caller-printable and name the
|
|
52
|
+
* offending field, the way the task artifact contract check reports its own.
|
|
53
|
+
*/
|
|
54
|
+
export function validateAcceptanceStatusLedger(value) {
|
|
55
|
+
const issues = [];
|
|
56
|
+
if (!isRecord(value))
|
|
57
|
+
return ['acceptance ledger: expected object'];
|
|
58
|
+
if (value.schemaVersion !== 1)
|
|
59
|
+
issues.push('acceptance ledger schemaVersion: expected 1');
|
|
60
|
+
if (!Array.isArray(value.criteria)) {
|
|
61
|
+
issues.push('acceptance ledger criteria: expected array');
|
|
62
|
+
return issues;
|
|
63
|
+
}
|
|
64
|
+
const seen = new Set();
|
|
65
|
+
value.criteria.forEach((entry, index) => {
|
|
66
|
+
const prefix = `acceptance ledger criteria[${index}]`;
|
|
67
|
+
if (!isRecord(entry)) {
|
|
68
|
+
issues.push(`${prefix}: expected object`);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (!isNonEmptyString(entry.id) || !ACCEPTANCE_CRITERION_ID_PATTERN.test(entry.id)) {
|
|
72
|
+
issues.push(`${prefix}.id: expected AC-<N>`);
|
|
73
|
+
}
|
|
74
|
+
else if (seen.has(entry.id)) {
|
|
75
|
+
issues.push(`${prefix}.id: duplicate ${entry.id}`);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
seen.add(entry.id);
|
|
79
|
+
}
|
|
80
|
+
if (typeof entry.text !== 'string')
|
|
81
|
+
issues.push(`${prefix}.text: expected string`);
|
|
82
|
+
if (!ACCEPTANCE_VERDICTS.includes(entry.verdict)) {
|
|
83
|
+
issues.push(`${prefix}.verdict: expected one of ${ACCEPTANCE_VERDICTS.join(', ')}`);
|
|
84
|
+
}
|
|
85
|
+
if (entry.proofMode !== undefined &&
|
|
86
|
+
!ACCEPTANCE_PROOF_MODES.includes(entry.proofMode)) {
|
|
87
|
+
issues.push(`${prefix}.proofMode: expected one of ${ACCEPTANCE_PROOF_MODES.join(', ')}`);
|
|
88
|
+
}
|
|
89
|
+
for (const key of ['evidence', 'recipeNodes']) {
|
|
90
|
+
const list = entry[key];
|
|
91
|
+
if (!Array.isArray(list) || list.some((item) => !isNonEmptyString(item))) {
|
|
92
|
+
issues.push(`${prefix}.${key}: expected an array of non-empty strings`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (entry.note !== undefined && typeof entry.note !== 'string') {
|
|
96
|
+
issues.push(`${prefix}.note: expected string`);
|
|
97
|
+
}
|
|
98
|
+
if (!isNonEmptyString(entry.updatedAt)) {
|
|
99
|
+
issues.push(`${prefix}.updatedAt: expected non-empty string`);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
return issues;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Verdict tally over the ledger.
|
|
106
|
+
*
|
|
107
|
+
* Omitting `criteria` counts only the rows already recorded, which understates a
|
|
108
|
+
* partial ledger: `total` is then "verdicts written", not "criteria the task has".
|
|
109
|
+
* Pass the registered criteria whenever the caller can read them — every caller
|
|
110
|
+
* with the task directory can — to get a `total` of registered criteria and an
|
|
111
|
+
* `unrecorded` count of those still waiting for a verdict.
|
|
112
|
+
*/
|
|
113
|
+
export function summarizeAcceptanceStatus(ledger, criteria) {
|
|
114
|
+
const total = criteria
|
|
115
|
+
? Math.max(criteria.length, ledger.criteria.length)
|
|
116
|
+
: ledger.criteria.length;
|
|
117
|
+
const summary = {
|
|
118
|
+
proven: 0,
|
|
119
|
+
weak: 0,
|
|
120
|
+
missing: 0,
|
|
121
|
+
untestable: 0,
|
|
122
|
+
unrecorded: 0,
|
|
123
|
+
total,
|
|
124
|
+
};
|
|
125
|
+
for (const criterion of ledger.criteria)
|
|
126
|
+
summary[criterion.verdict] += 1;
|
|
127
|
+
summary.unrecorded =
|
|
128
|
+
total - (summary.proven + summary.weak + summary.missing + summary.untestable);
|
|
129
|
+
return summary;
|
|
130
|
+
}
|
|
131
|
+
function cell(value) {
|
|
132
|
+
return (value
|
|
133
|
+
.replace(/\|/g, '\\|')
|
|
134
|
+
.replace(/\s*\n\s*/g, ' ')
|
|
135
|
+
.trim() || '-');
|
|
136
|
+
}
|
|
137
|
+
function list(values) {
|
|
138
|
+
return values.length > 0 ? cell(values.join(', ')) : '-';
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The coverage table `artifacts/recipe-coverage.md` holds today, rendered from the
|
|
142
|
+
* ledger. The proof-mode column keeps the lowercase `state` / `visual` / `mixed`
|
|
143
|
+
* vocabulary the evidence rules key off, and the last line is the `Overall recipe
|
|
144
|
+
* coverage:` summary every consumer of the coverage file already looks for.
|
|
145
|
+
*
|
|
146
|
+
* Pass `criteria` so the overall line counts registered criteria: without them a
|
|
147
|
+
* partial ledger reads `1/1 PROVEN` when the task has three criteria. A criterion
|
|
148
|
+
* with no verdict yet is counted in the total and listed as awaiting one; it is
|
|
149
|
+
* never given a verdict it does not have.
|
|
150
|
+
*/
|
|
151
|
+
export function renderAcceptanceCoverage(ledger, criteria = ledger.criteria) {
|
|
152
|
+
const summary = summarizeAcceptanceStatus(ledger, criteria);
|
|
153
|
+
const rows = acceptanceCriteriaView(criteria, ledger);
|
|
154
|
+
const untestable = ledger.criteria
|
|
155
|
+
.filter((criterion) => criterion.verdict === 'untestable')
|
|
156
|
+
.map((criterion) => criterion.id);
|
|
157
|
+
const lines = [
|
|
158
|
+
'## Recipe coverage',
|
|
159
|
+
'',
|
|
160
|
+
'| AC | Criterion | Verdict | Proof mode | Recipe nodes | Evidence | Note |',
|
|
161
|
+
'| --- | --- | --- | --- | --- | --- | --- |',
|
|
162
|
+
];
|
|
163
|
+
for (const row of rows) {
|
|
164
|
+
const status = row.status;
|
|
165
|
+
lines.push(`| ${row.id} | ${cell(row.text)} | ${status ? status.verdict.toUpperCase() : 'NO VERDICT'} | ` +
|
|
166
|
+
`${status?.proofMode ?? '-'} | ${list(status?.recipeNodes ?? [])} | ` +
|
|
167
|
+
`${list(status?.evidence ?? [])} | ${cell(status?.note ?? '')} |`);
|
|
168
|
+
}
|
|
169
|
+
lines.push('', `Overall recipe coverage: ${summary.proven}/${summary.total} ACs PROVEN ` +
|
|
170
|
+
`(untestable: ${untestable.length > 0 ? untestable.join(', ') : 'none'}, ` +
|
|
171
|
+
`weak: ${summary.weak}, missing: ${summary.missing}` +
|
|
172
|
+
// Only when some criterion has no verdict: a finished run renders the exact
|
|
173
|
+
// line the spec pins, and a partial one says why the counts fall short.
|
|
174
|
+
`${summary.unrecorded > 0 ? `, no verdict: ${summary.unrecorded}` : ''})`, '');
|
|
175
|
+
return lines.join('\n');
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=acceptance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance.js","sourceRoot":"","sources":["../../src/contracts/acceptance.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2BAA2B;AAC3B,EAAE;AACF,kFAAkF;AAClF,kFAAkF;AAClF,iFAAiF;AACjF,iFAAiF;AACjF,+EAA+E;AAE/E,iFAAiF;AACjF,MAAM,CAAC,MAAM,0BAA0B,GAAG,kCAAkC,CAAC;AAE7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,CAAU,CAAC;AAG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I,CACpE,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,IAAI,CACR,EAAE,EACF,4BAA4B,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,cAAc;QACvE,gBAAgB,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI;QAC1E,SAAS,OAAO,CAAC,IAAI,cAAc,OAAO,CAAC,OAAO,EAAE;QACpD,4EAA4E;QAC5E,wEAAwE;QACxE,GAAG,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,iBAAiB,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAC3E,EAAE,CACH,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -53,7 +53,7 @@ export interface NativeWorkerSessionBinding {
|
|
|
53
53
|
}
|
|
54
54
|
/** A pending recovery can own a new process even while the last recorded generation is closed. */
|
|
55
55
|
export declare function nativeWorkerBindingIsHeld(binding: NativeWorkerSessionBinding | undefined): boolean;
|
|
56
|
-
export declare const AGENT_ROLES: readonly ["primary", "dev", "fix-bug", "review", "self-review", "self-review-fix", "ci-fix"];
|
|
56
|
+
export declare const AGENT_ROLES: readonly ["primary", "dev", "fix-bug", "review", "self-review", "self-review-fix", "ci-fix", "subtask"];
|
|
57
57
|
export type AgentRole = (typeof AGENT_ROLES)[number];
|
|
58
58
|
export type AgentContextStatus = 'launching' | 'working' | 'waiting' | 'complete' | 'failed' | 'blocked' | 'idle';
|
|
59
59
|
export interface AgentContextTarget {
|