rosettify 3.1.0 → 3.2.1

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.
Files changed (84) hide show
  1. package/dist/commands/specs/add.d.ts +1 -1
  2. package/dist/commands/specs/add.d.ts.map +1 -1
  3. package/dist/commands/specs/add.js +39 -11
  4. package/dist/commands/specs/add.js.map +1 -1
  5. package/dist/commands/specs/core.d.ts +100 -22
  6. package/dist/commands/specs/core.d.ts.map +1 -1
  7. package/dist/commands/specs/core.js +173 -30
  8. package/dist/commands/specs/core.js.map +1 -1
  9. package/dist/commands/specs/errors.d.ts +13 -5
  10. package/dist/commands/specs/errors.d.ts.map +1 -1
  11. package/dist/commands/specs/errors.js +19 -7
  12. package/dist/commands/specs/errors.js.map +1 -1
  13. package/dist/commands/specs/field-guide.d.ts +3 -0
  14. package/dist/commands/specs/field-guide.d.ts.map +1 -0
  15. package/dist/commands/specs/field-guide.js +243 -0
  16. package/dist/commands/specs/field-guide.js.map +1 -0
  17. package/dist/commands/specs/help-content.d.ts +15 -0
  18. package/dist/commands/specs/help-content.d.ts.map +1 -1
  19. package/dist/commands/specs/help-content.js +99 -35
  20. package/dist/commands/specs/help-content.js.map +1 -1
  21. package/dist/commands/specs/index.d.ts.map +1 -1
  22. package/dist/commands/specs/index.js +9 -5
  23. package/dist/commands/specs/index.js.map +1 -1
  24. package/dist/commands/specs/info.d.ts.map +1 -1
  25. package/dist/commands/specs/info.js +1 -1
  26. package/dist/commands/specs/info.js.map +1 -1
  27. package/dist/commands/specs/markup-grammar.d.ts +56 -0
  28. package/dist/commands/specs/markup-grammar.d.ts.map +1 -0
  29. package/dist/commands/specs/markup-grammar.js +99 -0
  30. package/dist/commands/specs/markup-grammar.js.map +1 -0
  31. package/dist/commands/specs/migrate.d.ts +1 -1
  32. package/dist/commands/specs/migrate.d.ts.map +1 -1
  33. package/dist/commands/specs/migrate.js +36 -19
  34. package/dist/commands/specs/migrate.js.map +1 -1
  35. package/dist/commands/specs/output.d.ts +32 -11
  36. package/dist/commands/specs/output.d.ts.map +1 -1
  37. package/dist/commands/specs/output.js +2 -2
  38. package/dist/commands/specs/output.js.map +1 -1
  39. package/dist/commands/specs/purge.d.ts.map +1 -1
  40. package/dist/commands/specs/purge.js +8 -0
  41. package/dist/commands/specs/purge.js.map +1 -1
  42. package/dist/commands/specs/query-filter.d.ts +1 -1
  43. package/dist/commands/specs/query-filter.d.ts.map +1 -1
  44. package/dist/commands/specs/query-filter.js +30 -0
  45. package/dist/commands/specs/query-filter.js.map +1 -1
  46. package/dist/commands/specs/render.d.ts +4 -2
  47. package/dist/commands/specs/render.d.ts.map +1 -1
  48. package/dist/commands/specs/render.js +184 -18
  49. package/dist/commands/specs/render.js.map +1 -1
  50. package/dist/commands/specs/req-parser.d.ts +43 -42
  51. package/dist/commands/specs/req-parser.d.ts.map +1 -1
  52. package/dist/commands/specs/req-parser.js +225 -223
  53. package/dist/commands/specs/req-parser.js.map +1 -1
  54. package/dist/commands/specs/rubric.d.ts +35 -5
  55. package/dist/commands/specs/rubric.d.ts.map +1 -1
  56. package/dist/commands/specs/rubric.js +120 -28
  57. package/dist/commands/specs/rubric.js.map +1 -1
  58. package/dist/commands/specs/schemas.d.ts.map +1 -1
  59. package/dist/commands/specs/schemas.js +69 -32
  60. package/dist/commands/specs/schemas.js.map +1 -1
  61. package/dist/commands/specs/update.d.ts.map +1 -1
  62. package/dist/commands/specs/update.js +45 -20
  63. package/dist/commands/specs/update.js.map +1 -1
  64. package/dist/commands/specs/validate.d.ts.map +1 -1
  65. package/dist/commands/specs/validate.js +83 -25
  66. package/dist/commands/specs/validate.js.map +1 -1
  67. package/dist/commands/specs/write.d.ts +9 -4
  68. package/dist/commands/specs/write.d.ts.map +1 -1
  69. package/dist/commands/specs/write.js +23 -6
  70. package/dist/commands/specs/write.js.map +1 -1
  71. package/dist/frontends/cli.d.ts.map +1 -1
  72. package/dist/frontends/cli.js +20 -4
  73. package/dist/frontends/cli.js.map +1 -1
  74. package/dist/registry/types.d.ts +2 -0
  75. package/dist/registry/types.d.ts.map +1 -1
  76. package/dist/shared/constants.d.ts +2 -1
  77. package/dist/shared/constants.d.ts.map +1 -1
  78. package/dist/shared/constants.js +2 -1
  79. package/dist/shared/constants.js.map +1 -1
  80. package/dist/shared/logger.d.ts +2 -0
  81. package/dist/shared/logger.d.ts.map +1 -1
  82. package/dist/shared/logger.js +12 -3
  83. package/dist/shared/logger.js.map +1 -1
  84. package/package.json +5 -4
@@ -8,5 +8,5 @@ import { type SpecWriteResult } from "./output.js";
8
8
  * code-based; the aggregate's leading `code` reuses the first violation's own code, since SPECS
9
9
  * §13 names no separate umbrella code for a mixed-cause batch rejection.
10
10
  */
11
- export declare function cmdAdd(specsFile: string, items: unknown[], actor?: string): Promise<RunEnvelope<SpecWriteResult>>;
11
+ export declare function cmdAdd(specsFile: string, items: unknown[], actor?: string, system?: string): Promise<RunEnvelope<SpecWriteResult>>;
12
12
  //# sourceMappingURL=add.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/add.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAuB3D,OAAO,EAAE,KAAK,eAAe,EAA6C,MAAM,aAAa,CAAC;AAoE9F;;;;;;;GAOG;AACH,wBAAsB,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAiDvH"}
1
+ {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/add.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA4B3D,OAAO,EAAE,KAAK,eAAe,EAA6C,MAAM,aAAa,CAAC;AA4F9F;;;;;;;GAOG;AACH,wBAAsB,MAAM,CAC1B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,OAAO,EAAE,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAoDvC"}
@@ -1,11 +1,14 @@
1
1
  // Implements FR-SPECS-0010 (add subcommand). Batch append of caller-supplied spec objects;
2
2
  // creates the document if it does not yet exist (FR-SPECS-0002). All-or-nothing (FR-SPECS-0030):
3
3
  // any rejected item fails the whole batch with one aggregated error string, nothing is written.
4
+ // Per-item structural checks (FR-SPECS-0001 level/criteria, FR-SPECS-0009 id-vs-type agreement)
5
+ // live in prepareItem so every failing item lands in the same aggregated string; the reserved
6
+ // quality-characteristic areas are backfilled on this write path (FR-SPECS-0004).
4
7
  import { ok, err } from "../../shared/envelope.js";
5
8
  import { logger } from "../../shared/logger.js";
6
9
  import { applyBatchWrite } from "./write.js";
7
10
  import { aggregate } from "./aggregate.js";
8
- import { autoRegisterAreas, stripGuarded, validateAreaRegistration, validateIdFormat, validateKnownFields, validatePriority, validateRequired, validateSource, validateType, validateVerification, } from "./core.js";
11
+ import { assignCriterionIds, autoRegisterAreas, ensureReservedAreas, stripGuarded, validateCriteria, validateIdFormat, validateIdTypeConsistency, validateKnownFields, validateLevel, validatePriority, validateRequired, validateSource, validateType, validateVerification, } from "./core.js";
9
12
  import { buildSpecWriteResult, withPreviousVersion } from "./output.js";
10
13
  import { ERR_MISSING_DATA, ERR_MISSING_ID, ERR_INVALID_SPEC_FIELD } from "./errors.js";
11
14
  // FR-SPECS-0010 — new spec always enters as Draft/NotStarted regardless of caller input; any
@@ -41,15 +44,32 @@ function prepareItem(raw, index) {
41
44
  const idFormatErr = validateIdFormat(id);
42
45
  if (idFormatErr)
43
46
  return { reject: { ref: id, reason: idFormatErr } };
47
+ // FR-SPECS-0001 — `level` defaults to System only when the caller omitted it (absent, or an
48
+ // empty/whitespace string). Anything actually supplied is held to the enum, exactly like
49
+ // `type` above, so a typo is refused instead of being silently laundered into the default.
50
+ const levelRaw = stripped["level"];
51
+ const level = levelRaw === undefined || (typeof levelRaw === "string" && levelRaw.trim() === "") ? "System" : levelRaw;
52
+ const levelErr = validateLevel(level);
53
+ if (levelErr)
54
+ return { reject: { ref: id, reason: levelErr } };
55
+ // FR-SPECS-0009 — the id prefix and `type` must agree; the id can never change afterwards.
56
+ const idTypeErr = validateIdTypeConsistency(id, stripped["type"]);
57
+ if (idTypeErr)
58
+ return { reject: { ref: id, reason: idTypeErr } };
44
59
  const spec = {
45
60
  id,
46
61
  type: stripped["type"],
47
- level: typeof stripped["level"] === "string" && stripped["level"].trim() !== "" ? stripped["level"] : "System",
62
+ level: level,
63
+ // FR-SPECS-0001 — empty subsystem/component means the author did not know the location,
64
+ // never that it does not apply; evidence defaults to no recorded source location.
65
+ subsystem: stripped["subsystem"] ?? "",
66
+ component: stripped["component"] ?? "",
48
67
  ...(typeof stripped["ticket_id"] === "string" ? { ticket_id: stripped["ticket_id"] } : {}),
49
68
  ...(typeof stripped["classification"] === "string" ? { classification: stripped["classification"] } : {}),
50
69
  title: stripped["title"] ?? "",
51
70
  statement: stripped["statement"] ?? "",
52
71
  rationale: stripped["rationale"] ?? "",
72
+ evidence: stripped["evidence"] ?? [],
53
73
  source: stripped["source"],
54
74
  priority: stripped["priority"],
55
75
  status: "Draft", // FR-SPECS-0040 — guarded default
@@ -67,6 +87,12 @@ function prepareItem(raw, index) {
67
87
  const requiredErr = validateRequired(spec);
68
88
  if (requiredErr)
69
89
  return { reject: { ref: id, reason: requiredErr } };
90
+ // FR-SPECS-0001 — omitted criterion ids are filled before validation, so a caller may supply
91
+ // some ids and leave the rest to the tool; a supplied id is never renumbered, only checked.
92
+ spec.acceptance = assignCriterionIds(id, spec.acceptance);
93
+ const criteriaErr = validateCriteria(spec);
94
+ if (criteriaErr)
95
+ return { reject: { ref: id, reason: criteriaErr } };
70
96
  return { spec };
71
97
  }
72
98
  /**
@@ -77,7 +103,7 @@ function prepareItem(raw, index) {
77
103
  * code-based; the aggregate's leading `code` reuses the first violation's own code, since SPECS
78
104
  * §13 names no separate umbrella code for a mixed-cause batch rejection.
79
105
  */
80
- export async function cmdAdd(specsFile, items, actor) {
106
+ export async function cmdAdd(specsFile, items, actor, system) {
81
107
  try {
82
108
  if (!items || items.length === 0)
83
109
  return err(ERR_MISSING_DATA, true);
@@ -97,21 +123,23 @@ export async function cmdAdd(specsFile, items, actor) {
97
123
  return { ok: false, error: aggregate(rejects[0].reason, rejects) };
98
124
  }
99
125
  const newIds = prepared.map((s) => s.id);
100
- // FR-SPECS-0004 — register any new AREA before the registration check below, so a batch
101
- // introducing a brand-new area succeeds instead of being rejected unknown_area.
126
+ // FR-SPECS-0004 AC7 — the reserved quality-characteristic areas are pre-registered in every
127
+ // document. A document that already exists is never re-created, so seeding them at creation
128
+ // alone would never reach it; backfilling here on the write path is what makes the guarantee
129
+ // hold for a pre-existing document. Idempotent, and it never renames an existing entry.
130
+ ensureReservedAreas(doc);
131
+ // FR-SPECS-0004 — a write naming an area the registry does not hold registers it, taking
132
+ // the code itself as the name, so a write is never refused for introducing an area
133
+ // (registration on first use). validateAreaRegistration is validate-only (FR-SPECS-0021):
134
+ // it exists to flag a hand-edited document naming an area this call never registered.
102
135
  autoRegisterAreas(doc, newIds);
103
- for (const spec of prepared) {
104
- const areaErr = validateAreaRegistration(spec, doc);
105
- if (areaErr)
106
- return { ok: false, error: aggregate(areaErr, [{ ref: spec.id, reason: areaErr }]) };
107
- }
108
136
  doc.specs = [...(doc.specs ?? []), ...prepared];
109
137
  // previous_version is a placeholder here — the real backup path is only known after
110
138
  // applyBatchWrite returns; injected below via withPreviousVersion.
111
139
  const result = buildSpecWriteResult(doc, newIds, null);
112
140
  return { ok: true, affected: newIds, result };
113
141
  };
114
- const writeResult = await applyBatchWrite(specsFile, build, { allowCreate: true, actor });
142
+ const writeResult = await applyBatchWrite(specsFile, build, { allowCreate: true, actor, system });
115
143
  if (!writeResult.ok) {
116
144
  return { ok: false, result: null, error: writeResult.error, include_help: writeResult.include_help };
117
145
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/commands/specs/add.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,iGAAiG;AACjG,gGAAgG;AAGhG,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAmB,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAOL,iBAAiB,EACjB,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAwB,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAEvF,6FAA6F;AAC7F,6FAA6F;AAC7F,SAAS,WAAW,CAAC,GAAY,EAAE,KAAa;IAC9C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAClE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,KAAK,EAAE,EAAE,MAAM,EAAE,sBAAsB,EAAE,EAAE,CAAC;IAC/E,CAAC;IACD,MAAM,IAAI,GAAG,GAA8B,CAAC;IAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrD,OAAO,EAA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WAAW,GAAG,MAAM,eAAe,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAClG,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC;YACpB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC,YAAY,EAAE,CAAC;QACvG,CAAC;QAED,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,WAAW,CAAC,MAAO,CAAC;QACzD,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,WAAW,CAAC,CAAC;QACvE,OAAO,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC3D,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvD,OAAO,GAAG,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAC;IACvC,CAAC;AACH,CAAC"}
@@ -11,20 +11,45 @@ export declare const SOURCES: readonly ["User", "Inferred", "Sources", "Document
11
11
  export type SourceEnum = (typeof SOURCES)[number];
12
12
  export declare const VERIFS: readonly ["Test", "Analysis", "Inspection", "Demo"];
13
13
  export type VerifEnum = (typeof VERIFS)[number];
14
+ export declare const EARS_PATTERNS: readonly ["ubiquitous", "event", "state", "optional", "unwanted"];
15
+ export type EarsEnum = (typeof EARS_PATTERNS)[number];
16
+ export declare const LEVELS: readonly ["System", "Subsystem", "Component"];
17
+ export type LevelEnum = (typeof LEVELS)[number];
18
+ /** FR-SPECS-0006 — the four condition words an acceptance criterion may carry. */
19
+ export type ConditionWord = "when" | "while" | "where" | "if";
20
+ /**
21
+ * FR-SPECS-0006 — the one condition word each EARS pattern names; null for `ubiquitous`, which
22
+ * carries none. Single source for the write check, the validate check, and the markup round trip.
23
+ */
24
+ export declare const EARS_CONDITION_WORD: Readonly<Record<EarsEnum, ConditionWord | null>>;
25
+ /**
26
+ * FR-SPECS-0001 — one EARS acceptance criterion. Exactly one condition word is carried, selected
27
+ * by `ears` (EARS_CONDITION_WORD); `ubiquitous` carries none. `if` and `while` are legal TypeScript
28
+ * property names (reserved only as statement keywords) and the JSON field names are fixed by the
29
+ * schema, so they are deliberately not renamed.
30
+ */
14
31
  export interface AcceptanceCriterion {
15
- given: string;
16
- when: string;
17
- then: string;
32
+ id: string;
33
+ ears: EarsEnum;
34
+ when?: string;
35
+ while?: string;
36
+ where?: string;
37
+ if?: string;
38
+ system: string;
39
+ shall: string;
18
40
  }
19
41
  export interface Spec {
20
42
  id: string;
21
43
  type: SpecType;
22
- level: string;
44
+ level: LevelEnum;
45
+ subsystem: string;
46
+ component: string;
23
47
  ticket_id?: string;
24
48
  classification?: string;
25
49
  title: string;
26
50
  statement: string;
27
51
  rationale: string;
52
+ evidence: string[];
28
53
  source: SourceEnum;
29
54
  priority: MoscowEnum;
30
55
  status: StatusEnum;
@@ -43,12 +68,19 @@ export interface AreaEntry {
43
68
  code: string;
44
69
  name: string;
45
70
  }
71
+ /**
72
+ * FR-SPECS-0004 — the nine quality-characteristic codes pre-registered in every document. They are
73
+ * recommended, never mandatory: any registered area is legal on any type, and an NFR whose area
74
+ * falls outside these nine is accepted on write and reported by validate as a recommendation.
75
+ */
76
+ export declare const RESERVED_NFR_AREAS: readonly AreaEntry[];
46
77
  export interface SpecsDocument {
47
- component: string;
78
+ system: string;
48
79
  description: string;
49
80
  created_at: string;
50
81
  updated_at: string;
51
82
  previous_version: string | null;
83
+ purged_ids: string[];
52
84
  areas: AreaEntry[];
53
85
  specs: Spec[];
54
86
  }
@@ -58,6 +90,7 @@ export declare const GUARDED_FIELDS: readonly ["status", "approved_by", "impleme
58
90
  export type GuardedField = (typeof GUARDED_FIELDS)[number];
59
91
  /** Drops any key in GUARDED_FIELDS from a spec item. Flat check — specs has no nested phases/steps. */
60
92
  export declare function stripGuarded(item: Record<string, unknown>): Record<string, unknown>;
93
+ export declare const KNOWN_SPEC_FIELDS: ReadonlySet<string>;
61
94
  export declare const ID_RE: RegExp;
62
95
  /** Parses a spec id into its prefix/area/sequence parts, or null if it does not match ID_RE. */
63
96
  export declare function parseId(id: string): {
@@ -68,24 +101,56 @@ export declare function parseId(id: string): {
68
101
  /** FR-SPECS-0004 — id must match `<PREFIX>-<AREA>-<NNNN>`. */
69
102
  export declare function validateIdFormat(id: string): string | null;
70
103
  /**
71
- * FR-SPECS-0004 — AREA must be registered in doc.areas. Callers that auto-register new areas
72
- * (add, migrate) MUST call autoRegisterAreas() over the batch's ids before this check, so a
73
- * new AREA introduced by the same call is not rejected. An id that fails ID_RE is not this
74
- * function's concern (validateIdFormat covers it) — an unparseable id is treated as passing
75
- * here so the two errors don't collide on the same item.
104
+ * FR-SPECS-0004/0021 — true when spec's AREA is not registered in doc.areas. validate-only: on
105
+ * every write path (add, migrate) autoRegisterAreas() registers a brand-new AREA before this
106
+ * would ever run, so a write is never refused for introducing one (registration on first use).
107
+ * What remains reachable is a hand-edited or externally-assembled document naming an area the
108
+ * registry does not hold, which validate (FR-SPECS-0021) reports as an `area_registration`
109
+ * finding at error severity. An id that fails ID_RE is not this function's concern
110
+ * (validateIdFormat covers it) — an unparseable id is treated as registered so the two checks
111
+ * don't collide on the same item.
112
+ */
113
+ export declare function validateAreaRegistration(spec: Spec, doc: SpecsDocument): boolean;
114
+ /**
115
+ * FR-SPECS-0004 AC4/AC7 — appends any of the nine quality-characteristic codes missing from
116
+ * doc.areas, preserving every existing entry and its name (a document that renamed a code keeps
117
+ * its own name). Idempotent. Called from newDocument() and from the add/migrate write paths only:
118
+ * a read path must never mutate the document (FR-SPECS-0021 AC9).
76
119
  */
77
- export declare function validateAreaRegistration(spec: Spec, doc: SpecsDocument): string | null;
120
+ export declare function ensureReservedAreas(doc: SpecsDocument): void;
78
121
  /**
79
- * FR-SPECS-0004 — for each id whose AREA is not yet in doc.areas, registers it with the
80
- * default name (name = code). add/migrate call this BEFORE validateAreaRegistration so a
81
- * batch introducing a brand-new area succeeds instead of being rejected unknown_area.
82
- * update never calls this — it introduces no new ids.
122
+ * FR-SPECS-0004 — for each id whose AREA is not yet in doc.areas, registers it with the default
123
+ * name (name = code), so a write introducing a brand-new area is never refused (registration on
124
+ * first use). update never calls this — it introduces no new ids.
83
125
  */
84
126
  export declare function autoRegisterAreas(doc: SpecsDocument, ids: string[]): void;
85
- /** FR-SPECS-0004 — update/patch MUST NOT change a spec's id. Reuses the plan pattern. */
86
- export declare function validateImmutableId(patchId: string | undefined, targetId: string): string | null;
87
127
  /** FR-SPECS-0003 — `type` must be one of SPEC_TYPES. */
88
128
  export declare function validateType(t: unknown): string | null;
129
+ /** FR-SPECS-0001 — `level` must be one of LEVELS. Mirrors validateType. */
130
+ export declare function validateLevel(v: unknown): string | null;
131
+ /** FR-SPECS-0001 — a criterion's `ears` must be one of EARS_PATTERNS. Mirrors validateType. */
132
+ export declare function validateEars(v: unknown): string | null;
133
+ /**
134
+ * FR-SPECS-0009 — a spec's `type` must agree with the prefix of its own id, on add and update
135
+ * alike, because the id can never change and a disagreeing pair could only be deleted and
136
+ * re-authored. An id that fails ID_RE, or a `type` outside SPEC_TYPES, is not this function's
137
+ * concern (validateIdFormat / validateType cover those) — both pass here so the errors don't
138
+ * collide on the same item.
139
+ */
140
+ export declare function validateIdTypeConsistency(id: string, type: unknown): string | null;
141
+ /**
142
+ * FR-SPECS-0001 AC3 — fills every omitted criterion id with the next free `<specId>.AC<n>`.
143
+ * Supplied ids are claimed first and never renumbered; omitted ones are then filled in array
144
+ * order, each taking the lowest n >= 1 not already claimed. Pure — returns a new array.
145
+ */
146
+ export declare function assignCriterionIds(specId: string, criteria: AcceptanceCriterion[]): AcceptanceCriterion[];
147
+ /**
148
+ * FR-SPECS-0001 AC4/AC5/AC6 — field-level criterion checks that reject a write: an out-of-enum
149
+ * `ears`, a missing `system` or `shall`, and two criteria within one unit sharing an id. Whether a
150
+ * criterion's condition word agrees with its `ears`, and whether it carries more than one, are
151
+ * cross-field rules reported by validate (FR-SPECS-0006), not rejected here.
152
+ */
153
+ export declare function validateCriteria(spec: Spec): string | null;
89
154
  /** FR-SPECS-0001 — `source` must be one of SOURCES. Mirrors validateType. */
90
155
  export declare function validateSource(s: unknown): string | null;
91
156
  /** FR-SPECS-0001 — `priority` must be one of MOSCOW. Mirrors validateType. */
@@ -96,7 +161,13 @@ export declare function validateVerification(v: unknown): string | null;
96
161
  export declare function validateKnownFields(item: Record<string, unknown>): string | null;
97
162
  /** FR-SPECS-0001/0006 — every required field (per REQUIRED_STRING_FIELDS) must be non-empty, and `acceptance` non-empty. */
98
163
  export declare function validateRequired(spec: Partial<Spec>): string | null;
99
- /** FR-SPECS-0005 — every spec id in the document must be unique. */
164
+ /**
165
+ * FR-SPECS-0005, 0009, 0016 — every spec id must be unique across both the document's live specs
166
+ * and its `purged_ids` registry. The seen-set is seeded from the registry before walking the
167
+ * specs, so a live id colliding with either a live id or a purged one is rejected with the same
168
+ * `duplicate_id`. This is the single enforcement point for never-reuse: every write subcommand
169
+ * reaches it through the shared post-batch gate, so add, update and migrate are covered at once.
170
+ */
100
171
  export declare function validateUniqueIds(doc: SpecsDocument): string | null;
101
172
  /**
102
173
  * FR-SPECS-0005 — every depends_on/related entry must reference an id present in the document.
@@ -111,13 +182,20 @@ export declare function validateDependsAcyclic(doc: SpecsDocument): string | nul
111
182
  /**
112
183
  * FR-SPECS-0007 — enforces: max SPECS_MAX_SPECS specs per document; max
113
184
  * SPECS_MAX_DEPENDENCIES_PER_SPEC entries in each of depends_on/related; max
114
- * SPECS_MAX_ACCEPTANCE_PER_SPEC acceptance criteria per spec; max SPECS_MAX_STRING_LENGTH
115
- * characters per string field; max SPECS_MAX_NAME_LENGTH characters per id/title/name/code.
185
+ * SPECS_MAX_ACCEPTANCE_PER_SPEC acceptance criteria per spec; max SPECS_MAX_EVIDENCE_PER_SPEC
186
+ * evidence locations per spec; max SPECS_MAX_STRING_LENGTH characters per string field; max
187
+ * SPECS_MAX_NAME_LENGTH characters per id/title/name/code/system.
116
188
  * (SPECS_MAX_BATCH_SIZE is enforced by index.ts before processing, not here.)
189
+ * `purged_ids` is deliberately uncapped — growth is bounded by deliberate human action.
117
190
  */
118
191
  export declare function validateSizeLimits(doc: SpecsDocument): string | null;
119
192
  export declare function loadSpecs(file: string): SpecsDocument | null;
120
193
  export declare function saveSpecs(file: string, doc: SpecsDocument): void;
121
- /** FR-SPECS-0002 — a fresh, empty specs document. previous_version stays null until the first backup exists. */
122
- export declare function newDocument(component?: string): SpecsDocument;
194
+ /**
195
+ * FR-SPECS-0002 — a fresh, empty specs document. previous_version stays null until the first
196
+ * backup exists; the purged-id registry starts empty; the nine reserved quality-characteristic
197
+ * codes are pre-registered (FR-SPECS-0004 AC7). A document that already exists is never
198
+ * re-created, so the write paths call ensureReservedAreas too.
199
+ */
200
+ export declare function newDocument(system?: string): SpecsDocument;
123
201
  //# sourceMappingURL=core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/core.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA8B5D,eAAO,MAAM,UAAU,uCAAwC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,QAAQ,qEAAsE,CAAC;AAC5F,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,KAAK,kFAAmF,CAAC;AACtG,MAAM,MAAM,QAAQ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