@gtrabanco/agentic-workflow-schema 4.5.0 → 4.7.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 CHANGED
@@ -467,6 +467,7 @@ const spec = [
467
467
  "## Why", "", "The customer needs it.", "",
468
468
  "## User outcome", "", "Users can do X.", "",
469
469
  "## Acceptance criteria", "", "- [x] S1 done.", "",
470
+ "## Impact", "", "`selectSpecProduct` and the snapshot builder read it.", "",
470
471
  "## Non-goals", "", "- Not S2.", "",
471
472
  "## Future cost", "", "None known.", "",
472
473
  "## Applicable tests", "", "- Unit tests.", "",
@@ -89,11 +89,16 @@ export declare function isImpossibleReceiptTimeline({ finishedAt, sourceCommitDa
89
89
  sourceCommitDate: unknown;
90
90
  skewMs?: unknown;
91
91
  }): boolean | null;
92
- /** The unit document's closed 13-section list (feature 61 P8). The two-half
93
- * SPEC was retired: plan-feature, plan-fix, review-spec, review-plan, and
94
- * design-feature are absorbed into the lane. The lane uses a single unit
95
- * document with these sections; the selector reads them in order. */
96
- export declare const UNIT_DOC_REQUIRED_SECTIONS: readonly ["Objective", "Why", "User outcome", "Acceptance criteria", "Non-goals", "Future cost", "Applicable tests", "Known pre-existing issues", "Tasks", "Evidence", "Progress log", "Next", "References"];
92
+ /** The unit document's closed required-section list (#305: 14 sections). The
93
+ two-half SPEC was retired by feature 61: plan-feature, plan-fix, review-spec,
94
+ review-plan, and design-feature are absorbed into the lane, which uses a single
95
+ unit document with these sections; the selector reads them in order. `Impact`
96
+ is required since #305 — it shipped as a tolerated extra while every published
97
+ surface (both templates, `template/AGENTS.md`, `MIGRATION.md`, `LANE_FLOW.md`,
98
+ `init-workspace`) already promised 14 sections including it, so the machine was
99
+ looser than the product. Its *content* is checked by
100
+ `scripts/promise-coherence.mjs`, not here: this list enforces shape only. */
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"];
97
102
  /** One artifact bound into a snapshot, by the exact bytes the reviewer read. */
98
103
  export interface PreExecutionArtifactRow {
99
104
  readonly kind: PreExecutionArtifactKind;
@@ -200,12 +205,13 @@ export type SpecProductSelection = {
200
205
  * Cut the Product projection out of a SPEC document.
201
206
  *
202
207
  * The selection is byte-exact and total: the level-1 title and the required
203
- * level-2 sections (Goal, Branch, Size, Dependencies, Product half, Design
204
- * status), ending at the first boundary heading after References, with trailing
205
- * blank lines removed and exactly one final newline. Everything the selector does
206
- * NOT take — Amendments, the Engineering half, later appendices — stays outside
207
- * Product authority, so a Plan-phase write can never rotate a Product digest and
208
- * silently erase a recorded review (the property AC2 and S6 test).
208
+ * level-2 sections (`UNIT_DOC_REQUIRED_SECTIONS`, in that order), ending at the
209
+ * first boundary heading after `References`, with trailing blank lines removed
210
+ * and exactly one final newline. Everything the selector does NOT take — the
211
+ * tolerated extras (`## Future`, `## Issue`, `## Branch`, `## Regression scope`),
212
+ * later appendices — stays outside Product authority, so a Plan-phase write can
213
+ * never rotate a Product digest and silently erase a recorded review (the
214
+ * property AC2 and S6 test).
209
215
  *
210
216
  * Determinism rules that make the digest trustworthy:
211
217
  * - line endings normalize to LF first, so a CRLF checkout and an LF editor
@@ -109,15 +109,21 @@ function parseStamp(value) {
109
109
  const ms = Date.parse(value.trim());
110
110
  return Number.isNaN(ms) ? null : ms;
111
111
  }
112
- /** The unit document's closed 13-section list (feature 61 P8). The two-half
113
- * SPEC was retired: plan-feature, plan-fix, review-spec, review-plan, and
114
- * design-feature are absorbed into the lane. The lane uses a single unit
115
- * document with these sections; the selector reads them in order. */
112
+ /** The unit document's closed required-section list (#305: 14 sections). The
113
+ two-half SPEC was retired by feature 61: plan-feature, plan-fix, review-spec,
114
+ review-plan, and design-feature are absorbed into the lane, which uses a single
115
+ unit document with these sections; the selector reads them in order. `Impact`
116
+ is required since #305 — it shipped as a tolerated extra while every published
117
+ surface (both templates, `template/AGENTS.md`, `MIGRATION.md`, `LANE_FLOW.md`,
118
+ `init-workspace`) already promised 14 sections including it, so the machine was
119
+ looser than the product. Its *content* is checked by
120
+ `scripts/promise-coherence.mjs`, not here: this list enforces shape only. */
116
121
  export const UNIT_DOC_REQUIRED_SECTIONS = Object.freeze([
117
122
  "Objective",
118
123
  "Why",
119
124
  "User outcome",
120
125
  "Acceptance criteria",
126
+ "Impact",
121
127
  "Non-goals",
122
128
  "Future cost",
123
129
  "Applicable tests",
@@ -239,12 +245,13 @@ function selectionError(code, heading) {
239
245
  * Cut the Product projection out of a SPEC document.
240
246
  *
241
247
  * The selection is byte-exact and total: the level-1 title and the required
242
- * level-2 sections (Goal, Branch, Size, Dependencies, Product half, Design
243
- * status), ending at the first boundary heading after References, with trailing
244
- * blank lines removed and exactly one final newline. Everything the selector does
245
- * NOT take — Amendments, the Engineering half, later appendices — stays outside
246
- * Product authority, so a Plan-phase write can never rotate a Product digest and
247
- * silently erase a recorded review (the property AC2 and S6 test).
248
+ * level-2 sections (`UNIT_DOC_REQUIRED_SECTIONS`, in that order), ending at the
249
+ * first boundary heading after `References`, with trailing blank lines removed
250
+ * and exactly one final newline. Everything the selector does NOT take — the
251
+ * tolerated extras (`## Future`, `## Issue`, `## Branch`, `## Regression scope`),
252
+ * later appendices — stays outside Product authority, so a Plan-phase write can
253
+ * never rotate a Product digest and silently erase a recorded review (the
254
+ * property AC2 and S6 test).
248
255
  *
249
256
  * Determinism rules that make the digest trustworthy:
250
257
  * - line endings normalize to LF first, so a CRLF checkout and an LF editor
@@ -347,8 +354,11 @@ export function selectSpecProduct(text) {
347
354
  // ---------------------------------------------------------------------------
348
355
  // PreExecutionArtifactSnapshot v1 — semantics the projection cannot state
349
356
  // ---------------------------------------------------------------------------
350
- /** The rows each stage REQUIRES. A fix unit has no Product half (D6). */
351
- const REQUIRED_ARTIFACTS = Object.freeze({ spec: ["spec"], plan: ["spec", "acceptance"] });
357
+ /** The rows each stage REQUIRES. A fix unit has no Product half (D6). The
358
+ * acceptance manifest binds when present (fix/285): it is a pre-lane artifact
359
+ * lane-era units structurally never write — requiring it refused every
360
+ * lane-era plan snapshot (issue #285). */
361
+ const REQUIRED_ARTIFACTS = Object.freeze({ spec: ["spec"], plan: ["spec"] });
352
362
  function snapshotSemantics(document, collector) {
353
363
  const stage = document.stage;
354
364
  const rows = document.artifacts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtrabanco/agentic-workflow-schema",
3
- "version": "4.5.0",
3
+ "version": "4.7.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",