@gtrabanco/agentic-workflow-schema 4.3.0 → 4.5.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 +13 -4
- package/dist/file-schemas.d.ts +30 -0
- package/dist/file-schemas.js +60 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -1
- package/dist/pre-execution.d.ts +6 -3
- package/dist/pre-execution.js +23 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -463,10 +463,19 @@ const POLICY_VERSION = "2026-08-30";
|
|
|
463
463
|
|
|
464
464
|
// The caller reads the documents: this package never touches Git or the filesystem.
|
|
465
465
|
const spec = [
|
|
466
|
-
"# Toy feature", "", "##
|
|
467
|
-
"##
|
|
468
|
-
"##
|
|
469
|
-
"
|
|
466
|
+
"# Toy feature", "", "## Objective", "", "Ship one usable slice.", "",
|
|
467
|
+
"## Why", "", "The customer needs it.", "",
|
|
468
|
+
"## User outcome", "", "Users can do X.", "",
|
|
469
|
+
"## Acceptance criteria", "", "- [x] S1 done.", "",
|
|
470
|
+
"## Non-goals", "", "- Not S2.", "",
|
|
471
|
+
"## Future cost", "", "None known.", "",
|
|
472
|
+
"## Applicable tests", "", "- Unit tests.", "",
|
|
473
|
+
"## Known pre-existing issues", "", "None.", "",
|
|
474
|
+
"## Tasks", "", "- [x] Implement S1.", "",
|
|
475
|
+
"## Evidence", "", "No external evidence.", "",
|
|
476
|
+
"## Progress log", "", "- P1 done.", "",
|
|
477
|
+
"## Next", "", "Ship it.", "",
|
|
478
|
+
"## References", "", "[Link](https://example.com)", "",
|
|
470
479
|
].join("\n");
|
|
471
480
|
|
|
472
481
|
/** 1. Freeze the exact bytes a reviewer may rely on, at one causal revision. */
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File-schema vocabularies for agwo edit typed file services.
|
|
3
|
+
*
|
|
4
|
+
* This is the canonical source for: evidence-table columns, roadmap table
|
|
5
|
+
* columns, changelog section header pattern, and operation name constants.
|
|
6
|
+
*
|
|
7
|
+
* The unit-doc section list (UNIT_DOC_REQUIRED_SECTIONS) is already owned
|
|
8
|
+
* by src/pre-execution.ts (feature 61 P8); this file re-exports it for
|
|
9
|
+
* agwo edit consumers via the index. The SDK module at
|
|
10
|
+
* `packages/agentic-workflow/src/edit/schema.mjs` duplicates with a
|
|
11
|
+
* pointing comment when the crate does not depend on the schema package.
|
|
12
|
+
*
|
|
13
|
+
* Consumers in `packages/agentic-workflow/src/edit/` import from here
|
|
14
|
+
* (or from the SDK's schema.mjs which mirrors these values).
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @type {readonly ["AC", "What was run", "Exit / digest", "Output (≤2 lines)", "Verified-by"]}
|
|
18
|
+
*/
|
|
19
|
+
export declare const EVIDENCE_COLUMNS: readonly ["AC", "What was run", "Exit / digest", "Output (≤2 lines)", "Verified-by"];
|
|
20
|
+
export declare const PROGRESS_ENTRY_PATTERN: RegExp;
|
|
21
|
+
/**
|
|
22
|
+
* @type {readonly ["NN", "slug", "status", "depends-on", "description"]}
|
|
23
|
+
*/
|
|
24
|
+
export declare const ROADMAP_COLUMNS: readonly ["NN", "slug", "status", "depends-on", "description"];
|
|
25
|
+
export declare const CHANGELOG_SECTION_PATTERN: RegExp;
|
|
26
|
+
export declare const BUDGETS_OPERATIONS: readonly ["ceilingRebase"];
|
|
27
|
+
export declare const MANIFEST_OPERATIONS: readonly ["skillAdd", "skillRemove"];
|
|
28
|
+
export declare const UNIT_DOC_OPERATIONS: readonly ["create", "setSection", "evidence_addRow", "progress_logEntry", "validate"];
|
|
29
|
+
export declare const ROADMAP_OPERATIONS: readonly ["rowUpsert", "annotate"];
|
|
30
|
+
export declare const CHANGELOG_OPERATIONS: readonly ["rowAdd"];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File-schema vocabularies for agwo edit typed file services.
|
|
3
|
+
*
|
|
4
|
+
* This is the canonical source for: evidence-table columns, roadmap table
|
|
5
|
+
* columns, changelog section header pattern, and operation name constants.
|
|
6
|
+
*
|
|
7
|
+
* The unit-doc section list (UNIT_DOC_REQUIRED_SECTIONS) is already owned
|
|
8
|
+
* by src/pre-execution.ts (feature 61 P8); this file re-exports it for
|
|
9
|
+
* agwo edit consumers via the index. The SDK module at
|
|
10
|
+
* `packages/agentic-workflow/src/edit/schema.mjs` duplicates with a
|
|
11
|
+
* pointing comment when the crate does not depend on the schema package.
|
|
12
|
+
*
|
|
13
|
+
* Consumers in `packages/agentic-workflow/src/edit/` import from here
|
|
14
|
+
* (or from the SDK's schema.mjs which mirrors these values).
|
|
15
|
+
*/
|
|
16
|
+
// NOTE: UNIT_DOC_REQUIRED_SECTIONS is owned by pre-execution.ts —
|
|
17
|
+
// re-exported here via index.ts for agwo edit consumers (feature 61 P8).
|
|
18
|
+
// This file does NOT redeclare it to avoid duplicate identifiers.
|
|
19
|
+
// ── Unit doc: evidence-table@1 columns ───────────────────────────────────
|
|
20
|
+
/**
|
|
21
|
+
* @type {readonly ["AC", "What was run", "Exit / digest", "Output (≤2 lines)", "Verified-by"]}
|
|
22
|
+
*/
|
|
23
|
+
export const EVIDENCE_COLUMNS = [
|
|
24
|
+
"AC",
|
|
25
|
+
"What was run",
|
|
26
|
+
"Exit / digest",
|
|
27
|
+
"Output (≤2 lines)",
|
|
28
|
+
"Verified-by",
|
|
29
|
+
];
|
|
30
|
+
// ── Unit doc: progress-log@1 entry regex ─────────────────────────────────
|
|
31
|
+
export const PROGRESS_ENTRY_PATTERN = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2} — .+ → .+ — next: .+$/;
|
|
32
|
+
// ── Roadmap table columns ────────────────────────────────────────────────
|
|
33
|
+
/**
|
|
34
|
+
* @type {readonly ["NN", "slug", "status", "depends-on", "description"]}
|
|
35
|
+
*/
|
|
36
|
+
export const ROADMAP_COLUMNS = [
|
|
37
|
+
"NN",
|
|
38
|
+
"slug",
|
|
39
|
+
"status",
|
|
40
|
+
"depends-on",
|
|
41
|
+
"description",
|
|
42
|
+
];
|
|
43
|
+
// ── Changelog section header pattern ─────────────────────────────────────
|
|
44
|
+
export const CHANGELOG_SECTION_PATTERN = /^#### `(.+)`$/;
|
|
45
|
+
// ── Budgets ceiling rebase operations ────────────────────────────────────
|
|
46
|
+
export const BUDGETS_OPERATIONS = ["ceilingRebase"];
|
|
47
|
+
// ── Manifest operations ──────────────────────────────────────────────────
|
|
48
|
+
export const MANIFEST_OPERATIONS = ["skillAdd", "skillRemove"];
|
|
49
|
+
// ── Unit doc operations ──────────────────────────────────────────────────
|
|
50
|
+
export const UNIT_DOC_OPERATIONS = [
|
|
51
|
+
"create",
|
|
52
|
+
"setSection",
|
|
53
|
+
"evidence_addRow",
|
|
54
|
+
"progress_logEntry",
|
|
55
|
+
"validate",
|
|
56
|
+
];
|
|
57
|
+
// ── Roadmap operations ───────────────────────────────────────────────────
|
|
58
|
+
export const ROADMAP_OPERATIONS = ["rowUpsert", "annotate"];
|
|
59
|
+
// ── Changelog operations ─────────────────────────────────────────────────
|
|
60
|
+
export const CHANGELOG_OPERATIONS = ["rowAdd"];
|
package/dist/index.d.ts
CHANGED
|
@@ -904,7 +904,7 @@ 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,
|
|
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";
|
|
908
908
|
export { VERDICTS_BY_STAGE } from "./pre-execution-contract.js";
|
|
909
909
|
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
910
|
/**
|
|
@@ -918,3 +918,4 @@ export { CONTINUATION_CANONICAL_VECTORS, CONTINUATION_VECTOR_CONTRACT } from "./
|
|
|
918
918
|
export { sha256Hex, sha256HexSync } from "./sha256.js";
|
|
919
919
|
export type { ContinuationEvidence, ContinuationPlatformFamily, ContinuationPrecondition, ContinuationRefusalCode, EmitContinuationInput, EmitContinuationResult, EnvelopeContinuation, } from "./continuation.js";
|
|
920
920
|
export type { ContinuationCanonicalVector } from "./continuation-vectors.js";
|
|
921
|
+
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";
|
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,
|
|
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";
|
|
2904
2904
|
export { VERDICTS_BY_STAGE } from "./pre-execution-contract.js";
|
|
2905
2905
|
// ---------------------------------------------------------------------------
|
|
2906
2906
|
// next.continuation — the executable hand-off object (feature 59)
|
|
@@ -2914,3 +2914,6 @@ export { CONTINUATION_CONTRACT_ID, CONTINUATION_PLATFORM_FAMILIES, CONTINUATION_
|
|
|
2914
2914
|
export { CONTINUATION_CANONICAL_VECTORS, CONTINUATION_VECTOR_CONTRACT } from "./continuation-vectors.js";
|
|
2915
2915
|
/** The digest surface the evidence token is bound through (feature 59, D-59-9). */
|
|
2916
2916
|
export { sha256Hex, sha256HexSync } from "./sha256.js";
|
|
2917
|
+
// ── File-schema vocabularies (agwo edit) ──────────────────────────────────
|
|
2918
|
+
// UNIT_DOC_REQUIRED_SECTIONS is already exported from pre-execution.ts (P8).
|
|
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";
|
package/dist/pre-execution.d.ts
CHANGED
|
@@ -89,8 +89,11 @@ export declare function isImpossibleReceiptTimeline({ finishedAt, sourceCommitDa
|
|
|
89
89
|
sourceCommitDate: unknown;
|
|
90
90
|
skewMs?: unknown;
|
|
91
91
|
}): boolean | null;
|
|
92
|
-
/** The
|
|
93
|
-
|
|
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"];
|
|
94
97
|
/** One artifact bound into a snapshot, by the exact bytes the reviewer read. */
|
|
95
98
|
export interface PreExecutionArtifactRow {
|
|
96
99
|
readonly kind: PreExecutionArtifactKind;
|
|
@@ -198,7 +201,7 @@ export type SpecProductSelection = {
|
|
|
198
201
|
*
|
|
199
202
|
* The selection is byte-exact and total: the level-1 title and the required
|
|
200
203
|
* level-2 sections (Goal, Branch, Size, Dependencies, Product half, Design
|
|
201
|
-
* status), ending at the first boundary heading after
|
|
204
|
+
* status), ending at the first boundary heading after References, with trailing
|
|
202
205
|
* blank lines removed and exactly one final newline. Everything the selector does
|
|
203
206
|
* NOT take — Amendments, the Engineering half, later appendices — stays outside
|
|
204
207
|
* Product authority, so a Plan-phase write can never rotate a Product digest and
|
package/dist/pre-execution.js
CHANGED
|
@@ -109,14 +109,24 @@ function parseStamp(value) {
|
|
|
109
109
|
const ms = Date.parse(value.trim());
|
|
110
110
|
return Number.isNaN(ms) ? null : ms;
|
|
111
111
|
}
|
|
112
|
-
/** The
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
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. */
|
|
116
|
+
export const UNIT_DOC_REQUIRED_SECTIONS = Object.freeze([
|
|
117
|
+
"Objective",
|
|
118
|
+
"Why",
|
|
119
|
+
"User outcome",
|
|
120
|
+
"Acceptance criteria",
|
|
121
|
+
"Non-goals",
|
|
122
|
+
"Future cost",
|
|
123
|
+
"Applicable tests",
|
|
124
|
+
"Known pre-existing issues",
|
|
125
|
+
"Tasks",
|
|
126
|
+
"Evidence",
|
|
127
|
+
"Progress log",
|
|
128
|
+
"Next",
|
|
129
|
+
"References",
|
|
120
130
|
]);
|
|
121
131
|
// ---------------------------------------------------------------------------
|
|
122
132
|
// Shared plumbing: one sink, one capture, one structural engine
|
|
@@ -230,7 +240,7 @@ function selectionError(code, heading) {
|
|
|
230
240
|
*
|
|
231
241
|
* The selection is byte-exact and total: the level-1 title and the required
|
|
232
242
|
* level-2 sections (Goal, Branch, Size, Dependencies, Product half, Design
|
|
233
|
-
* status), ending at the first boundary heading after
|
|
243
|
+
* status), ending at the first boundary heading after References, with trailing
|
|
234
244
|
* blank lines removed and exactly one final newline. Everything the selector does
|
|
235
245
|
* NOT take — Amendments, the Engineering half, later appendices — stays outside
|
|
236
246
|
* Product authority, so a Plan-phase write can never rotate a Product digest and
|
|
@@ -280,14 +290,14 @@ export function selectSpecProduct(text) {
|
|
|
280
290
|
}
|
|
281
291
|
if (titleLine === -1)
|
|
282
292
|
return selectionError("selector-title-missing", "<title>");
|
|
283
|
-
for (const required of
|
|
293
|
+
for (const required of UNIT_DOC_REQUIRED_SECTIONS) {
|
|
284
294
|
if (!headings.some((heading) => heading.name === required)) {
|
|
285
295
|
return selectionError("selector-heading-missing", required);
|
|
286
296
|
}
|
|
287
297
|
}
|
|
288
298
|
const seen = new Set();
|
|
289
299
|
for (const heading of headings) {
|
|
290
|
-
if (!
|
|
300
|
+
if (!UNIT_DOC_REQUIRED_SECTIONS.includes(heading.name))
|
|
291
301
|
continue;
|
|
292
302
|
if (seen.has(heading.name))
|
|
293
303
|
return selectionError("selector-heading-duplicate", heading.name);
|
|
@@ -295,7 +305,7 @@ export function selectSpecProduct(text) {
|
|
|
295
305
|
}
|
|
296
306
|
let highest = -1;
|
|
297
307
|
for (const heading of headings) {
|
|
298
|
-
const index =
|
|
308
|
+
const index = UNIT_DOC_REQUIRED_SECTIONS.indexOf(heading.name);
|
|
299
309
|
if (index === -1)
|
|
300
310
|
continue;
|
|
301
311
|
if (index < highest)
|
|
@@ -306,7 +316,7 @@ export function selectSpecProduct(text) {
|
|
|
306
316
|
// Design-status section opens — never inside a fence.
|
|
307
317
|
let designLine = -1;
|
|
308
318
|
for (const heading of headings)
|
|
309
|
-
if (heading.name === "
|
|
319
|
+
if (heading.name === "References")
|
|
310
320
|
designLine = heading.line;
|
|
311
321
|
let end = lines.length;
|
|
312
322
|
openFence = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gtrabanco/agentic-workflow-schema",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.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",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"envelope"
|
|
12
12
|
],
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"author": "Gabriel Trabanco <gtrabanco@users.noreply.github.com>",
|
|
14
|
+
"author": "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>",
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
17
|
"url": "git+https://github.com/gtrabanco/agentic-workflow.git",
|