@gtrabanco/agentic-workflow-schema 4.7.0 → 4.9.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/index.d.ts CHANGED
@@ -904,7 +904,8 @@ export declare const VERIFICATION_CANONICAL_VECTORS: ReadonlyArray<Readonly<Cano
904
904
  * package-internal, exactly as the verification family's does, and the generated
905
905
  * Draft-07 files are projections of it, not a second authority.
906
906
  */
907
- export { buildPreExecutionArtifactSnapshot, canonicalizePreExecutionArtifactSnapshot, canonicalizePreExecutionReviewReceipt, comparePreExecutionReceiptToSnapshot, digestPreExecutionArtifactSnapshot, digestPreExecutionReviewReceipt, selectSpecProduct, validatePreExecutionArtifactSnapshotV1, validatePreExecutionReceiptAgainstSnapshot, validatePreExecutionReviewReceiptV1, PRE_EXECUTION_ARTIFACT_KINDS, PRE_EXECUTION_AUTHOR_EXCLUSIONS, PRE_EXECUTION_CANONICAL_VECTORS, PRE_EXECUTION_CONTEXT_KINDS, PRE_EXECUTION_CONTEXT_PRESENCE, PRE_EXECUTION_DIAGNOSTIC_CODES, PRE_EXECUTION_FINDING_CLASSES, PRE_EXECUTION_FINDING_RESOLUTIONS, PRE_EXECUTION_FINDING_SEVERITIES, PRE_EXECUTION_FINDING_VERIFICATION, PRE_EXECUTION_FRESHNESS_CODES, PRE_EXECUTION_LIMITS, PRE_EXECUTION_MODEL_DIVERSITY, PRE_EXECUTION_PARENT_ROLES, PRE_EXECUTION_POLICY_VERSION, PRE_EXECUTION_RECEIPT_CONTRACT_ID, PRE_EXECUTION_RECEIPT_TIMELINE_SKEW_MS, PRE_EXECUTION_REVIEW_ROLES, PRE_EXECUTION_RUNTIME_RULES, PRE_EXECUTION_SELECTORS, PRE_EXECUTION_SNAPSHOT_CONTRACT_ID, PRE_EXECUTION_SNAPSHOT_SELECTOR, PRE_EXECUTION_STAGES, PRE_EXECUTION_UNIT_KINDS, PRE_EXECUTION_VERDICTS, UNIT_DOC_REQUIRED_SECTIONS, isImpossibleReceiptTimeline, } from "./pre-execution.js";
907
+ export { buildPreExecutionArtifactSnapshot, canonicalizePreExecutionArtifactSnapshot, canonicalizePreExecutionReviewReceipt, comparePreExecutionReceiptToSnapshot, digestPreExecutionArtifactSnapshot, digestPreExecutionReviewReceipt, selectSpecProduct, validatePreExecutionArtifactSnapshotV1, validatePreExecutionReceiptAgainstSnapshot, validatePreExecutionReviewReceiptV1, PRE_EXECUTION_ARTIFACT_KINDS, PRE_EXECUTION_AUTHOR_EXCLUSIONS, PRE_EXECUTION_CANONICAL_VECTORS, PRE_EXECUTION_CONTEXT_KINDS, PRE_EXECUTION_CONTEXT_PRESENCE, PRE_EXECUTION_DIAGNOSTIC_CODES, PRE_EXECUTION_FINDING_CLASSES, PRE_EXECUTION_FINDING_RESOLUTIONS, PRE_EXECUTION_FINDING_SEVERITIES, PRE_EXECUTION_FINDING_VERIFICATION, PRE_EXECUTION_FRESHNESS_CODES, PRE_EXECUTION_LIMITS, PRE_EXECUTION_MODEL_DIVERSITY, PRE_EXECUTION_PARENT_ROLES, PRE_EXECUTION_POLICY_VERSION, PRE_EXECUTION_RECEIPT_CONTRACT_ID, PRE_EXECUTION_RECEIPT_TIMELINE_SKEW_MS, PRE_EXECUTION_REVIEW_ROLES, PRE_EXECUTION_RUNTIME_RULES, PRE_EXECUTION_SELECTORS, PRE_EXECUTION_SNAPSHOT_CONTRACT_ID, PRE_EXECUTION_SNAPSHOT_SELECTOR, PRE_EXECUTION_STAGES, PRE_EXECUTION_UNIT_KINDS, PRE_EXECUTION_VERDICTS, UNIT_DOC_REQUIRED_SECTIONS, UNIT_DOC_SECTION_SHAPES, UNIT_DOC_SPEC_REF_SECTIONS, isImpossibleReceiptTimeline, resolveUnitDocShape, unitDocSectionsFor, } from "./pre-execution.js";
908
+ export type { UnitDocShape } from "./pre-execution.js";
908
909
  export { VERDICTS_BY_STAGE } from "./pre-execution-contract.js";
909
910
  export type { PreExecutionArtifactInput, PreExecutionArtifactKind, PreExecutionArtifactRow, PreExecutionArtifactSnapshotV1, PreExecutionAuthorExclusion, PreExecutionCanonicalVector, PreExecutionContextBinding, PreExecutionContextInput, PreExecutionContextKind, PreExecutionContextPresence, PreExecutionDiagnostic, PreExecutionDiagnosticCode, PreExecutionFinding, PreExecutionFindingClass, PreExecutionFindingResolution, PreExecutionFindingSeverity, PreExecutionFindingVerification, PreExecutionFreshnessCode, PreExecutionFreshnessResult, PreExecutionModelDiversity, PreExecutionParentReceipt, PreExecutionParentRole, PreExecutionReceiptValidationResult, PreExecutionReviewReceiptV1, PreExecutionReviewerRole, PreExecutionSelector, PreExecutionSnapshotBuildInput, PreExecutionSnapshotValidationResult, PreExecutionStage, PreExecutionUnitKind, PreExecutionVerdict, SpecProductSelection, SpecProductSelectorError, } from "./pre-execution.js";
910
911
  /**
@@ -919,3 +920,5 @@ export { sha256Hex, sha256HexSync } from "./sha256.js";
919
920
  export type { ContinuationEvidence, ContinuationPlatformFamily, ContinuationPrecondition, ContinuationRefusalCode, EmitContinuationInput, EmitContinuationResult, EnvelopeContinuation, } from "./continuation.js";
920
921
  export type { ContinuationCanonicalVector } from "./continuation-vectors.js";
921
922
  export { EVIDENCE_COLUMNS, PROGRESS_ENTRY_PATTERN, ROADMAP_COLUMNS, CHANGELOG_SECTION_PATTERN, BUDGETS_OPERATIONS, MANIFEST_OPERATIONS, UNIT_DOC_OPERATIONS, ROADMAP_OPERATIONS, CHANGELOG_OPERATIONS, } from "./file-schemas.js";
923
+ export { FUTURE_STATUS_KINDS, FINDINGS_TABLE_SEVERITIES, LOG_KIND_TOKENS, SWEEP_CLAIM_KINDS, SWEEP_MISMATCH_REASONS, } from "./vocabularies.js";
924
+ export type { FutureStatus, FindingsTableSeverity, LogKindToken, SweepClaimKind, SweepMismatchReason, } from "./vocabularies.js";
package/dist/index.js CHANGED
@@ -2900,7 +2900,7 @@ export const VERIFICATION_CANONICAL_VECTORS = Object.freeze([
2900
2900
  * package-internal, exactly as the verification family's does, and the generated
2901
2901
  * Draft-07 files are projections of it, not a second authority.
2902
2902
  */
2903
- export { buildPreExecutionArtifactSnapshot, canonicalizePreExecutionArtifactSnapshot, canonicalizePreExecutionReviewReceipt, comparePreExecutionReceiptToSnapshot, digestPreExecutionArtifactSnapshot, digestPreExecutionReviewReceipt, selectSpecProduct, validatePreExecutionArtifactSnapshotV1, validatePreExecutionReceiptAgainstSnapshot, validatePreExecutionReviewReceiptV1, PRE_EXECUTION_ARTIFACT_KINDS, PRE_EXECUTION_AUTHOR_EXCLUSIONS, PRE_EXECUTION_CANONICAL_VECTORS, PRE_EXECUTION_CONTEXT_KINDS, PRE_EXECUTION_CONTEXT_PRESENCE, PRE_EXECUTION_DIAGNOSTIC_CODES, PRE_EXECUTION_FINDING_CLASSES, PRE_EXECUTION_FINDING_RESOLUTIONS, PRE_EXECUTION_FINDING_SEVERITIES, PRE_EXECUTION_FINDING_VERIFICATION, PRE_EXECUTION_FRESHNESS_CODES, PRE_EXECUTION_LIMITS, PRE_EXECUTION_MODEL_DIVERSITY, PRE_EXECUTION_PARENT_ROLES, PRE_EXECUTION_POLICY_VERSION, PRE_EXECUTION_RECEIPT_CONTRACT_ID, PRE_EXECUTION_RECEIPT_TIMELINE_SKEW_MS, PRE_EXECUTION_REVIEW_ROLES, PRE_EXECUTION_RUNTIME_RULES, PRE_EXECUTION_SELECTORS, PRE_EXECUTION_SNAPSHOT_CONTRACT_ID, PRE_EXECUTION_SNAPSHOT_SELECTOR, PRE_EXECUTION_STAGES, PRE_EXECUTION_UNIT_KINDS, PRE_EXECUTION_VERDICTS, UNIT_DOC_REQUIRED_SECTIONS, isImpossibleReceiptTimeline, } from "./pre-execution.js";
2903
+ export { buildPreExecutionArtifactSnapshot, canonicalizePreExecutionArtifactSnapshot, canonicalizePreExecutionReviewReceipt, comparePreExecutionReceiptToSnapshot, digestPreExecutionArtifactSnapshot, digestPreExecutionReviewReceipt, selectSpecProduct, validatePreExecutionArtifactSnapshotV1, validatePreExecutionReceiptAgainstSnapshot, validatePreExecutionReviewReceiptV1, PRE_EXECUTION_ARTIFACT_KINDS, PRE_EXECUTION_AUTHOR_EXCLUSIONS, PRE_EXECUTION_CANONICAL_VECTORS, PRE_EXECUTION_CONTEXT_KINDS, PRE_EXECUTION_CONTEXT_PRESENCE, PRE_EXECUTION_DIAGNOSTIC_CODES, PRE_EXECUTION_FINDING_CLASSES, PRE_EXECUTION_FINDING_RESOLUTIONS, PRE_EXECUTION_FINDING_SEVERITIES, PRE_EXECUTION_FINDING_VERIFICATION, PRE_EXECUTION_FRESHNESS_CODES, PRE_EXECUTION_LIMITS, PRE_EXECUTION_MODEL_DIVERSITY, PRE_EXECUTION_PARENT_ROLES, PRE_EXECUTION_POLICY_VERSION, PRE_EXECUTION_RECEIPT_CONTRACT_ID, PRE_EXECUTION_RECEIPT_TIMELINE_SKEW_MS, PRE_EXECUTION_REVIEW_ROLES, PRE_EXECUTION_RUNTIME_RULES, PRE_EXECUTION_SELECTORS, PRE_EXECUTION_SNAPSHOT_CONTRACT_ID, PRE_EXECUTION_SNAPSHOT_SELECTOR, PRE_EXECUTION_STAGES, PRE_EXECUTION_UNIT_KINDS, PRE_EXECUTION_VERDICTS, UNIT_DOC_REQUIRED_SECTIONS, UNIT_DOC_SECTION_SHAPES, UNIT_DOC_SPEC_REF_SECTIONS, isImpossibleReceiptTimeline, resolveUnitDocShape, unitDocSectionsFor, } from "./pre-execution.js";
2904
2904
  export { VERDICTS_BY_STAGE } from "./pre-execution-contract.js";
2905
2905
  // ---------------------------------------------------------------------------
2906
2906
  // next.continuation — the executable hand-off object (feature 59)
@@ -2917,3 +2917,5 @@ export { sha256Hex, sha256HexSync } from "./sha256.js";
2917
2917
  // ── File-schema vocabularies (agwo edit) ──────────────────────────────────
2918
2918
  // UNIT_DOC_REQUIRED_SECTIONS is already exported from pre-execution.ts (P8).
2919
2919
  export { EVIDENCE_COLUMNS, PROGRESS_ENTRY_PATTERN, ROADMAP_COLUMNS, CHANGELOG_SECTION_PATTERN, BUDGETS_OPERATIONS, MANIFEST_OPERATIONS, UNIT_DOC_OPERATIONS, ROADMAP_OPERATIONS, CHANGELOG_OPERATIONS, } from "./file-schemas.js";
2920
+ // ── Published closed vocabularies (unit 84, issue #315) ─────────────
2921
+ export { FUTURE_STATUS_KINDS, FINDINGS_TABLE_SEVERITIES, LOG_KIND_TOKENS, SWEEP_CLAIM_KINDS, SWEEP_MISMATCH_REASONS, } from "./vocabularies.js";
@@ -99,6 +99,29 @@ surface (both templates, `template/AGENTS.md`, `MIGRATION.md`, `LANE_FLOW.md`,
99
99
  looser than the product. Its *content* is checked by
100
100
  `scripts/promise-coherence.mjs`, not here: this list enforces shape only. */
101
101
  export declare const UNIT_DOC_REQUIRED_SECTIONS: readonly ["Objective", "Why", "User outcome", "Acceptance criteria", "Impact", "Non-goals", "Future cost", "Applicable tests", "Known pre-existing issues", "Tasks", "Evidence", "Progress log", "Next", "References"];
102
+ /**
103
+ * The re-cut (`spec-by-reference`, issue #308) required-section list: the shape a
104
+ * migrated unit doc carries. `## Specs` numbers the owner's requirements
105
+ * verbatim and `## Log` appends every request, correction, evidence run, gate
106
+ * run and folded finding; `## Findings` carries the OPEN rows that used to live
107
+ * in `review-findings.md`. Everything else is shared with the legacy list: the
108
+ * re-cut adds three headings (`Specs`, `Findings`, `Log`) and drops the six they
109
+ * replace — `Objective`, `Why`, `User outcome` and `Acceptance criteria` into
110
+ * `Specs`, `Evidence` and `Progress log` into `Findings` and `Log`.
111
+ */
112
+ export declare const UNIT_DOC_SPEC_REF_SECTIONS: readonly ["Specs", "Impact", "Non-goals", "Future cost", "Applicable tests", "Known pre-existing issues", "Tasks", "Findings", "Log", "Next", "References"];
113
+ /**
114
+ * The accepted shapes, keyed by the name the readers report. Migration is
115
+ * additive (issue #308 §Scope 4): a closed unit keeps `legacy` and is never
116
+ * rewritten, an open unit picks up `spec-by-reference` at its next touch, and
117
+ * both resolve through the same selector — one shape table, never two lists a
118
+ * reader has to choose between by guesswork.
119
+ */
120
+ export declare const UNIT_DOC_SECTION_SHAPES: Readonly<{
121
+ readonly legacy: readonly ["Objective", "Why", "User outcome", "Acceptance criteria", "Impact", "Non-goals", "Future cost", "Applicable tests", "Known pre-existing issues", "Tasks", "Evidence", "Progress log", "Next", "References"];
122
+ readonly "spec-by-reference": readonly ["Specs", "Impact", "Non-goals", "Future cost", "Applicable tests", "Known pre-existing issues", "Tasks", "Findings", "Log", "Next", "References"];
123
+ }>;
124
+ export type UnitDocShape = keyof typeof UNIT_DOC_SECTION_SHAPES;
102
125
  /** One artifact bound into a snapshot, by the exact bytes the reviewer read. */
103
126
  export interface PreExecutionArtifactRow {
104
127
  readonly kind: PreExecutionArtifactKind;
@@ -201,6 +224,16 @@ export type SpecProductSelection = {
201
224
  readonly ok: false;
202
225
  readonly errors: readonly SpecProductSelectorError[];
203
226
  };
227
+ /**
228
+ * Resolve which accepted shape a set of level-2 headings belongs to: the shape
229
+ * whose required sections are all present, preferring `legacy` when both are (a
230
+ * doc that carries both `Evidence` and `Log` is a half-migrated doc — the caller
231
+ * reports the excess, this function never guesses). Returns `null` when neither
232
+ * shape is satisfied, which is the missing-heading case the selector reports.
233
+ */
234
+ export declare function resolveUnitDocShape(headings: readonly string[]): UnitDocShape | null;
235
+ /** The section list of the shape a document asserts, or the legacy list absent one. */
236
+ export declare function unitDocSectionsFor(shape: UnitDocShape | null): readonly string[];
204
237
  /**
205
238
  * Cut the Product projection out of a SPEC document.
206
239
  *
@@ -134,6 +134,40 @@ export const UNIT_DOC_REQUIRED_SECTIONS = Object.freeze([
134
134
  "Next",
135
135
  "References",
136
136
  ]);
137
+ /**
138
+ * The re-cut (`spec-by-reference`, issue #308) required-section list: the shape a
139
+ * migrated unit doc carries. `## Specs` numbers the owner's requirements
140
+ * verbatim and `## Log` appends every request, correction, evidence run, gate
141
+ * run and folded finding; `## Findings` carries the OPEN rows that used to live
142
+ * in `review-findings.md`. Everything else is shared with the legacy list: the
143
+ * re-cut adds three headings (`Specs`, `Findings`, `Log`) and drops the six they
144
+ * replace — `Objective`, `Why`, `User outcome` and `Acceptance criteria` into
145
+ * `Specs`, `Evidence` and `Progress log` into `Findings` and `Log`.
146
+ */
147
+ export const UNIT_DOC_SPEC_REF_SECTIONS = Object.freeze([
148
+ "Specs",
149
+ "Impact",
150
+ "Non-goals",
151
+ "Future cost",
152
+ "Applicable tests",
153
+ "Known pre-existing issues",
154
+ "Tasks",
155
+ "Findings",
156
+ "Log",
157
+ "Next",
158
+ "References",
159
+ ]);
160
+ /**
161
+ * The accepted shapes, keyed by the name the readers report. Migration is
162
+ * additive (issue #308 §Scope 4): a closed unit keeps `legacy` and is never
163
+ * rewritten, an open unit picks up `spec-by-reference` at its next touch, and
164
+ * both resolve through the same selector — one shape table, never two lists a
165
+ * reader has to choose between by guesswork.
166
+ */
167
+ export const UNIT_DOC_SECTION_SHAPES = Object.freeze({
168
+ legacy: UNIT_DOC_REQUIRED_SECTIONS,
169
+ "spec-by-reference": UNIT_DOC_SPEC_REF_SECTIONS,
170
+ });
137
171
  // ---------------------------------------------------------------------------
138
172
  // Shared plumbing: one sink, one capture, one structural engine
139
173
  // ---------------------------------------------------------------------------
@@ -241,6 +275,24 @@ function advanceFence(run, open) {
241
275
  function selectionError(code, heading) {
242
276
  return { ok: false, errors: Object.freeze([Object.freeze({ code, heading })]) };
243
277
  }
278
+ /**
279
+ * Resolve which accepted shape a set of level-2 headings belongs to: the shape
280
+ * whose required sections are all present, preferring `legacy` when both are (a
281
+ * doc that carries both `Evidence` and `Log` is a half-migrated doc — the caller
282
+ * reports the excess, this function never guesses). Returns `null` when neither
283
+ * shape is satisfied, which is the missing-heading case the selector reports.
284
+ */
285
+ export function resolveUnitDocShape(headings) {
286
+ for (const [name, sections] of Object.entries(UNIT_DOC_SECTION_SHAPES)) {
287
+ if (sections.every((section) => headings.includes(section)))
288
+ return name;
289
+ }
290
+ return null;
291
+ }
292
+ /** The section list of the shape a document asserts, or the legacy list absent one. */
293
+ export function unitDocSectionsFor(shape) {
294
+ return shape === null ? UNIT_DOC_REQUIRED_SECTIONS : UNIT_DOC_SECTION_SHAPES[shape];
295
+ }
244
296
  /**
245
297
  * Cut the Product projection out of a SPEC document.
246
298
  *
@@ -297,14 +349,21 @@ export function selectSpecProduct(text) {
297
349
  }
298
350
  if (titleLine === -1)
299
351
  return selectionError("selector-title-missing", "<title>");
300
- for (const required of UNIT_DOC_REQUIRED_SECTIONS) {
352
+ // One contract, two accepted shapes (#308). The required list is resolved from
353
+ // the headings the document actually carries; a document satisfying neither
354
+ // shape reports the first missing section of the legacy list, which is the
355
+ // shape every unit predating the re-cut carries.
356
+ const names = headings.map((heading) => heading.name);
357
+ const shape = resolveUnitDocShape(names);
358
+ const requiredSections = unitDocSectionsFor(shape);
359
+ for (const required of requiredSections) {
301
360
  if (!headings.some((heading) => heading.name === required)) {
302
361
  return selectionError("selector-heading-missing", required);
303
362
  }
304
363
  }
305
364
  const seen = new Set();
306
365
  for (const heading of headings) {
307
- if (!UNIT_DOC_REQUIRED_SECTIONS.includes(heading.name))
366
+ if (!requiredSections.includes(heading.name))
308
367
  continue;
309
368
  if (seen.has(heading.name))
310
369
  return selectionError("selector-heading-duplicate", heading.name);
@@ -312,7 +371,7 @@ export function selectSpecProduct(text) {
312
371
  }
313
372
  let highest = -1;
314
373
  for (const heading of headings) {
315
- const index = UNIT_DOC_REQUIRED_SECTIONS.indexOf(heading.name);
374
+ const index = requiredSections.indexOf(heading.name);
316
375
  if (index === -1)
317
376
  continue;
318
377
  if (index < highest)
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Published closed vocabularies — the canonical machine-readable declarations
3
+ * (unit 84, issue #315 S1, decision D2).
4
+ *
5
+ * The repo publishes these sets in prose (the unit-doc templates, the ledger
6
+ * references, the sensor); the prose is a citation, never a second definition.
7
+ * A parity suite (`scripts/vocabulary-parity.test.mjs`) pins every second copy
8
+ * to the consts below — the F22/`LOG_KINDS` pattern, moved to the canonical
9
+ * home. Adding or removing a token is a schema-const + grammar-block +
10
+ * parity-pin change in one PR, never a prose-only edit.
11
+ */
12
+ /** The `## Future` row status vocabulary (`future-status`), published by both
13
+ * unit-doc templates and the `UnitDoc` skeleton: `open`, `planned`, or
14
+ * `discarded <YYYY-MM-DD>` (the date is grammar, not vocabulary). */
15
+ export declare const FUTURE_STATUS_KINDS: readonly string[];
16
+ export type FutureStatus = (typeof FUTURE_STATUS_KINDS)[number];
17
+ /** The findings-table severity vocabulary (`finding-severity`), published by
18
+ * the `findings-table@1` block: `high | med | low`. Distinct from the review
19
+ * payload's five-level `FINDING_SEVERITIES` scale (index.ts) — the table is
20
+ * the ledger scale; the sensor's `SEVERITY_VOCABULARY` may accept legacy
21
+ * aliases on read, but the canonical table scale is this set. */
22
+ export declare const FINDINGS_TABLE_SEVERITIES: readonly string[];
23
+ export type FindingsTableSeverity = (typeof FINDINGS_TABLE_SEVERITIES)[number];
24
+ /** The `## Log` line-kind vocabulary (`log-kind`), published by the
25
+ * `log-kind@1` block. The reader const is `scripts/unit-doc-phases.mjs`
26
+ * `LOG_KINDS`; the parity suite pins the two together. */
27
+ export declare const LOG_KIND_TOKENS: readonly string[];
28
+ export type LogKindToken = (typeof LOG_KIND_TOKENS)[number];
29
+ /** The sweep claim kind the promise-coherence gate publishes (unit 84 S2): the
30
+ * `swept: /<pattern>/<flags> → expected <n> in <glob>` declaration a fold
31
+ * appends to its `## Log` entry (grammar owner: `sweep-declaration@1` in
32
+ * `skills/execute-phase/references/FOLDING.md`). */
33
+ export declare const SWEEP_CLAIM_KINDS: readonly string[];
34
+ export type SweepClaimKind = (typeof SWEEP_CLAIM_KINDS)[number];
35
+ /** The sweep claim's fail-closed reason code. */
36
+ export declare const SWEEP_MISMATCH_REASONS: readonly string[];
37
+ export type SweepMismatchReason = (typeof SWEEP_MISMATCH_REASONS)[number];
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Published closed vocabularies — the canonical machine-readable declarations
3
+ * (unit 84, issue #315 S1, decision D2).
4
+ *
5
+ * The repo publishes these sets in prose (the unit-doc templates, the ledger
6
+ * references, the sensor); the prose is a citation, never a second definition.
7
+ * A parity suite (`scripts/vocabulary-parity.test.mjs`) pins every second copy
8
+ * to the consts below — the F22/`LOG_KINDS` pattern, moved to the canonical
9
+ * home. Adding or removing a token is a schema-const + grammar-block +
10
+ * parity-pin change in one PR, never a prose-only edit.
11
+ */
12
+ /** The `## Future` row status vocabulary (`future-status`), published by both
13
+ * unit-doc templates and the `UnitDoc` skeleton: `open`, `planned`, or
14
+ * `discarded <YYYY-MM-DD>` (the date is grammar, not vocabulary). */
15
+ export const FUTURE_STATUS_KINDS = Object.freeze(["open", "planned", "discarded"]);
16
+ /** The findings-table severity vocabulary (`finding-severity`), published by
17
+ * the `findings-table@1` block: `high | med | low`. Distinct from the review
18
+ * payload's five-level `FINDING_SEVERITIES` scale (index.ts) — the table is
19
+ * the ledger scale; the sensor's `SEVERITY_VOCABULARY` may accept legacy
20
+ * aliases on read, but the canonical table scale is this set. */
21
+ export const FINDINGS_TABLE_SEVERITIES = Object.freeze(["high", "med", "low"]);
22
+ // The findings-table class vocabulary (`finding-class`) is already published
23
+ // canonically: `PRE_EXECUTION_FINDING_CLASSES` in `pre-execution.ts` is exactly
24
+ // the `product | plan | source | environment | runtime` set the
25
+ // `findings-table@1` block cites — no second const is created here.
26
+ /** The `## Log` line-kind vocabulary (`log-kind`), published by the
27
+ * `log-kind@1` block. The reader const is `scripts/unit-doc-phases.mjs`
28
+ * `LOG_KINDS`; the parity suite pins the two together. */
29
+ export const LOG_KIND_TOKENS = Object.freeze(["L", "E", "G", "F", "D", "P", "R", "V"]);
30
+ /** The sweep claim kind the promise-coherence gate publishes (unit 84 S2): the
31
+ * `swept: /<pattern>/<flags> → expected <n> in <glob>` declaration a fold
32
+ * appends to its `## Log` entry (grammar owner: `sweep-declaration@1` in
33
+ * `skills/execute-phase/references/FOLDING.md`). */
34
+ export const SWEEP_CLAIM_KINDS = Object.freeze(["sweep"]);
35
+ /** The sweep claim's fail-closed reason code. */
36
+ export const SWEEP_MISMATCH_REASONS = Object.freeze(["sweep-mismatch"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtrabanco/agentic-workflow-schema",
3
- "version": "4.7.0",
3
+ "version": "4.9.0",
4
4
  "description": "Versioned machine contracts, JSON Schemas, parsers, and deterministic document snapshots for agentic-workflow orchestration.",
5
5
  "keywords": [
6
6
  "agentic-workflow",