rosettify 3.2.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.
- package/dist/commands/specs/add.d.ts +1 -1
- package/dist/commands/specs/add.d.ts.map +1 -1
- package/dist/commands/specs/add.js +39 -11
- package/dist/commands/specs/add.js.map +1 -1
- package/dist/commands/specs/core.d.ts +100 -22
- package/dist/commands/specs/core.d.ts.map +1 -1
- package/dist/commands/specs/core.js +173 -30
- package/dist/commands/specs/core.js.map +1 -1
- package/dist/commands/specs/errors.d.ts +13 -5
- package/dist/commands/specs/errors.d.ts.map +1 -1
- package/dist/commands/specs/errors.js +19 -7
- package/dist/commands/specs/errors.js.map +1 -1
- package/dist/commands/specs/field-guide.d.ts +3 -0
- package/dist/commands/specs/field-guide.d.ts.map +1 -0
- package/dist/commands/specs/field-guide.js +243 -0
- package/dist/commands/specs/field-guide.js.map +1 -0
- package/dist/commands/specs/help-content.d.ts +15 -0
- package/dist/commands/specs/help-content.d.ts.map +1 -1
- package/dist/commands/specs/help-content.js +99 -35
- package/dist/commands/specs/help-content.js.map +1 -1
- package/dist/commands/specs/index.d.ts.map +1 -1
- package/dist/commands/specs/index.js +9 -5
- package/dist/commands/specs/index.js.map +1 -1
- package/dist/commands/specs/info.d.ts.map +1 -1
- package/dist/commands/specs/info.js +1 -1
- package/dist/commands/specs/info.js.map +1 -1
- package/dist/commands/specs/markup-grammar.d.ts +56 -0
- package/dist/commands/specs/markup-grammar.d.ts.map +1 -0
- package/dist/commands/specs/markup-grammar.js +99 -0
- package/dist/commands/specs/markup-grammar.js.map +1 -0
- package/dist/commands/specs/migrate.d.ts +1 -1
- package/dist/commands/specs/migrate.d.ts.map +1 -1
- package/dist/commands/specs/migrate.js +36 -19
- package/dist/commands/specs/migrate.js.map +1 -1
- package/dist/commands/specs/output.d.ts +32 -11
- package/dist/commands/specs/output.d.ts.map +1 -1
- package/dist/commands/specs/output.js +2 -2
- package/dist/commands/specs/output.js.map +1 -1
- package/dist/commands/specs/purge.d.ts.map +1 -1
- package/dist/commands/specs/purge.js +8 -0
- package/dist/commands/specs/purge.js.map +1 -1
- package/dist/commands/specs/query-filter.d.ts +1 -1
- package/dist/commands/specs/query-filter.d.ts.map +1 -1
- package/dist/commands/specs/query-filter.js +30 -0
- package/dist/commands/specs/query-filter.js.map +1 -1
- package/dist/commands/specs/render.d.ts +4 -2
- package/dist/commands/specs/render.d.ts.map +1 -1
- package/dist/commands/specs/render.js +184 -18
- package/dist/commands/specs/render.js.map +1 -1
- package/dist/commands/specs/req-parser.d.ts +43 -42
- package/dist/commands/specs/req-parser.d.ts.map +1 -1
- package/dist/commands/specs/req-parser.js +225 -223
- package/dist/commands/specs/req-parser.js.map +1 -1
- package/dist/commands/specs/rubric.d.ts +35 -5
- package/dist/commands/specs/rubric.d.ts.map +1 -1
- package/dist/commands/specs/rubric.js +120 -28
- package/dist/commands/specs/rubric.js.map +1 -1
- package/dist/commands/specs/schemas.d.ts.map +1 -1
- package/dist/commands/specs/schemas.js +69 -32
- package/dist/commands/specs/schemas.js.map +1 -1
- package/dist/commands/specs/update.d.ts.map +1 -1
- package/dist/commands/specs/update.js +45 -20
- package/dist/commands/specs/update.js.map +1 -1
- package/dist/commands/specs/validate.d.ts.map +1 -1
- package/dist/commands/specs/validate.js +83 -25
- package/dist/commands/specs/validate.js.map +1 -1
- package/dist/commands/specs/write.d.ts +9 -4
- package/dist/commands/specs/write.d.ts.map +1 -1
- package/dist/commands/specs/write.js +23 -6
- package/dist/commands/specs/write.js.map +1 -1
- package/dist/frontends/cli.d.ts.map +1 -1
- package/dist/frontends/cli.js +15 -3
- package/dist/frontends/cli.js.map +1 -1
- package/dist/registry/types.d.ts +2 -0
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/shared/constants.d.ts +2 -1
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +2 -1
- package/dist/shared/constants.js.map +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@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;YACD,oBAAoB,EAAE;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6CAA6C;aAC3D;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yBAAyB;aACvC;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,oNAAoN;aACvN;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,wCAAwC;aACtD;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,4EAA4E;aAC1F;SACF;KACF;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACvB,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAClC;KACF;IACD,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,QAAQ;IACb,qFAAqF;IACrF,WAAW,EAAE,gBAAsD;CACpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/info.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,OAAO,KAAK,EAAgB,cAAc,EAA0B,MAAM,aAAa,CAAC;AA6CxF,wBAAsB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/info.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,OAAO,KAAK,EAAgB,cAAc,EAA0B,MAAM,aAAa,CAAC;AA6CxF,wBAAsB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAwBrF"}
|
|
@@ -61,7 +61,7 @@ export async function cmdInfo(specsFile) {
|
|
|
61
61
|
if (!doc)
|
|
62
62
|
return err(ERR_SPECS_NOT_FOUND);
|
|
63
63
|
return ok({
|
|
64
|
-
|
|
64
|
+
system: doc.system, // FR-SPECS-0002 — a document holds one system's requirements
|
|
65
65
|
description: doc.description,
|
|
66
66
|
areas: computeAreas(doc),
|
|
67
67
|
totals: computeTotals(doc),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/specs/info.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,+FAA+F;AAC/F,uFAAuF;AACvF,4FAA4F;AAG5F,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAsB,MAAM,WAAW,CAAC;AAExD,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE5E,SAAS,YAAY,CAAC,GAAkB;IACtC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;QACnC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM;YAAE,SAAS;QACtB,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM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,CAAC;YACR,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,6DAA6D;YAEjF,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC;YACxB,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC;YAC1B,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;YAC7B,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;YACvC,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;SACxC,CAAC,CAAC;IACL,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"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { EARS_CONDITION_WORD, type ConditionWord, type EarsEnum } from "./core.js";
|
|
2
|
+
/** FR-SPECS-0023/0025 — re-exported so both consumers reach the one declaration (it lives in
|
|
3
|
+
* core.ts because the write and validate paths need it too) through a single import. */
|
|
4
|
+
export { EARS_CONDITION_WORD };
|
|
5
|
+
export type { ConditionWord, EarsEnum };
|
|
6
|
+
/** The element that carries one requirement unit. */
|
|
7
|
+
export declare const ROOT_ELEMENT = "req";
|
|
8
|
+
/** The self-closing element that carries one acceptance criterion. */
|
|
9
|
+
export declare const CRITERION_ELEMENT = "criteria";
|
|
10
|
+
/** The element that wraps the criterion children — the one element with structure rather than
|
|
11
|
+
* prose, so both consumers treat it specially. */
|
|
12
|
+
export declare const ACCEPTANCE_ELEMENT = "acceptance";
|
|
13
|
+
/** The element that carries the source locations, joined on emit and split on read. */
|
|
14
|
+
export declare const EVIDENCE_ELEMENT = "evidence";
|
|
15
|
+
/**
|
|
16
|
+
* FR-SPECS-0023 — the `<req>` attribute sequence, one inner array per emitted line.
|
|
17
|
+
*
|
|
18
|
+
* DECIDED, do not re-derive: the canonical template's order governs — identity, then placement,
|
|
19
|
+
* then tracking, then provenance, then handling, then the approval group on one line, then the
|
|
20
|
+
* relationships, then the implementation state. The approval group shares a line so that an
|
|
21
|
+
* approval is a one-line difference. The round trip with the reader is what depends on this
|
|
22
|
+
* order being fixed, which is why it is stated once, here.
|
|
23
|
+
*/
|
|
24
|
+
export declare const CANONICAL_ATTR_LINES: readonly (readonly string[])[];
|
|
25
|
+
/** FR-SPECS-0023 — CANONICAL_ATTR_LINES flattened: the full attribute vocabulary, in order. */
|
|
26
|
+
export declare const CANONICAL_ATTR_ORDER: readonly string[];
|
|
27
|
+
/**
|
|
28
|
+
* FR-SPECS-0023 — attributes omitted entirely when their value is empty. Every other attribute in
|
|
29
|
+
* CANONICAL_ATTR_ORDER is always emitted, so the approval group stays a stable one-line diff even
|
|
30
|
+
* before a unit has been approved.
|
|
31
|
+
*/
|
|
32
|
+
export declare const OPTIONAL_ATTRS: readonly string[];
|
|
33
|
+
/**
|
|
34
|
+
* FR-SPECS-0023 — criterion attribute order: id, pattern, condition word, responder, outcome. At
|
|
35
|
+
* most one of the four condition words is ever present on a criterion (the one named by
|
|
36
|
+
* EARS_CONDITION_WORD for its pattern; `ubiquitous` carries none), so emitting in this order
|
|
37
|
+
* always reads id, ears, condition, system, shall.
|
|
38
|
+
*/
|
|
39
|
+
export declare const CRITERION_ATTR_ORDER: readonly string[];
|
|
40
|
+
/** FR-SPECS-0025 — the four condition words, derived from the pattern map so they cannot drift. */
|
|
41
|
+
export declare const CONDITION_ATTRS: readonly ConditionWord[];
|
|
42
|
+
/** FR-SPECS-0023 — fields carried as child elements (prose and structured children); everything
|
|
43
|
+
* else is a single value and is carried as an attribute. Emit order. */
|
|
44
|
+
export declare const ELEMENT_FIELDS: readonly string[];
|
|
45
|
+
/**
|
|
46
|
+
* FR-SPECS-0025 — markup name to spec field name. Only the names that differ are listed; a markup
|
|
47
|
+
* name absent from this map folds onto itself.
|
|
48
|
+
*/
|
|
49
|
+
export declare const MARKUP_TO_FIELD: Readonly<Record<string, string>>;
|
|
50
|
+
/** FR-SPECS-0023 — inverse of MARKUP_TO_FIELD, built from it so the two cannot disagree. */
|
|
51
|
+
export declare const FIELD_TO_MARKUP: Readonly<Record<string, string>>;
|
|
52
|
+
/** FR-SPECS-0023/0025 — joins the stored evidence locations on emit, splits them on read. */
|
|
53
|
+
export declare const EVIDENCE_SEPARATOR = ", ";
|
|
54
|
+
/** FR-SPECS-0023/0025 — joins an id list (`depends`, `related`) on emit, splits it on read. */
|
|
55
|
+
export declare const ID_LIST_SEPARATOR = ", ";
|
|
56
|
+
//# sourceMappingURL=markup-grammar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markup-grammar.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/markup-grammar.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEnF;wFACwF;AACxF,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC;AAExC,qDAAqD;AACrD,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C;kDACkD;AAClD,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAE/C,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAQ9D,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAAgC,CAAC;AAEnF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAO3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EASjD,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAEnD,CAAC;AAEF;wEACwE;AACxE,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAQ3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAI5D,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5D,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,+FAA+F;AAC/F,eAAO,MAAM,iBAAiB,OAAO,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// Implements FR-SPECS-0023/0025 (the canonical requirement-unit markup grammar). Data only: no
|
|
2
|
+
// emit logic, no parse logic, no IO. The renderer (render.ts) and the reader (req-parser.ts) are
|
|
3
|
+
// inverses of each other and share this module precisely so they cannot drift — every attribute
|
|
4
|
+
// name, every attribute ordering decision, and every markup-name-to-field-name fold lives here
|
|
5
|
+
// and nowhere else. Governing template:
|
|
6
|
+
// instructions/r3/core/skills/requirements-authoring/assets/ra-requirement-unit.md
|
|
7
|
+
//
|
|
8
|
+
// Leaf module: imports nothing but types and the condition-word map from core.ts.
|
|
9
|
+
import { EARS_CONDITION_WORD } from "./core.js";
|
|
10
|
+
/** FR-SPECS-0023/0025 — re-exported so both consumers reach the one declaration (it lives in
|
|
11
|
+
* core.ts because the write and validate paths need it too) through a single import. */
|
|
12
|
+
export { EARS_CONDITION_WORD };
|
|
13
|
+
/** The element that carries one requirement unit. */
|
|
14
|
+
export const ROOT_ELEMENT = "req";
|
|
15
|
+
/** The self-closing element that carries one acceptance criterion. */
|
|
16
|
+
export const CRITERION_ELEMENT = "criteria";
|
|
17
|
+
/** The element that wraps the criterion children — the one element with structure rather than
|
|
18
|
+
* prose, so both consumers treat it specially. */
|
|
19
|
+
export const ACCEPTANCE_ELEMENT = "acceptance";
|
|
20
|
+
/** The element that carries the source locations, joined on emit and split on read. */
|
|
21
|
+
export const EVIDENCE_ELEMENT = "evidence";
|
|
22
|
+
/**
|
|
23
|
+
* FR-SPECS-0023 — the `<req>` attribute sequence, one inner array per emitted line.
|
|
24
|
+
*
|
|
25
|
+
* DECIDED, do not re-derive: the canonical template's order governs — identity, then placement,
|
|
26
|
+
* then tracking, then provenance, then handling, then the approval group on one line, then the
|
|
27
|
+
* relationships, then the implementation state. The approval group shares a line so that an
|
|
28
|
+
* approval is a one-line difference. The round trip with the reader is what depends on this
|
|
29
|
+
* order being fixed, which is why it is stated once, here.
|
|
30
|
+
*/
|
|
31
|
+
export const CANONICAL_ATTR_LINES = [
|
|
32
|
+
["id", "type", "level", "subsystem", "component"],
|
|
33
|
+
["ticketId", "classification"],
|
|
34
|
+
["source"],
|
|
35
|
+
["priority", "verification"],
|
|
36
|
+
["status", "approved_by", "changed"],
|
|
37
|
+
["depends", "related"],
|
|
38
|
+
["implementation"],
|
|
39
|
+
];
|
|
40
|
+
/** FR-SPECS-0023 — CANONICAL_ATTR_LINES flattened: the full attribute vocabulary, in order. */
|
|
41
|
+
export const CANONICAL_ATTR_ORDER = CANONICAL_ATTR_LINES.flat();
|
|
42
|
+
/**
|
|
43
|
+
* FR-SPECS-0023 — attributes omitted entirely when their value is empty. Every other attribute in
|
|
44
|
+
* CANONICAL_ATTR_ORDER is always emitted, so the approval group stays a stable one-line diff even
|
|
45
|
+
* before a unit has been approved.
|
|
46
|
+
*/
|
|
47
|
+
export const OPTIONAL_ATTRS = [
|
|
48
|
+
"subsystem",
|
|
49
|
+
"component",
|
|
50
|
+
"ticketId",
|
|
51
|
+
"classification",
|
|
52
|
+
"depends",
|
|
53
|
+
"related",
|
|
54
|
+
];
|
|
55
|
+
/**
|
|
56
|
+
* FR-SPECS-0023 — criterion attribute order: id, pattern, condition word, responder, outcome. At
|
|
57
|
+
* most one of the four condition words is ever present on a criterion (the one named by
|
|
58
|
+
* EARS_CONDITION_WORD for its pattern; `ubiquitous` carries none), so emitting in this order
|
|
59
|
+
* always reads id, ears, condition, system, shall.
|
|
60
|
+
*/
|
|
61
|
+
export const CRITERION_ATTR_ORDER = [
|
|
62
|
+
"id",
|
|
63
|
+
"ears",
|
|
64
|
+
"when",
|
|
65
|
+
"while",
|
|
66
|
+
"where",
|
|
67
|
+
"if",
|
|
68
|
+
"system",
|
|
69
|
+
"shall",
|
|
70
|
+
];
|
|
71
|
+
/** FR-SPECS-0025 — the four condition words, derived from the pattern map so they cannot drift. */
|
|
72
|
+
export const CONDITION_ATTRS = Object.values(EARS_CONDITION_WORD).filter((w) => w !== null);
|
|
73
|
+
/** FR-SPECS-0023 — fields carried as child elements (prose and structured children); everything
|
|
74
|
+
* else is a single value and is carried as an attribute. Emit order. */
|
|
75
|
+
export const ELEMENT_FIELDS = [
|
|
76
|
+
"title",
|
|
77
|
+
"statement",
|
|
78
|
+
"rationale",
|
|
79
|
+
"evidence",
|
|
80
|
+
"acceptance",
|
|
81
|
+
"implementationNotes",
|
|
82
|
+
"notes",
|
|
83
|
+
];
|
|
84
|
+
/**
|
|
85
|
+
* FR-SPECS-0025 — markup name to spec field name. Only the names that differ are listed; a markup
|
|
86
|
+
* name absent from this map folds onto itself.
|
|
87
|
+
*/
|
|
88
|
+
export const MARKUP_TO_FIELD = {
|
|
89
|
+
depends: "depends_on",
|
|
90
|
+
ticketId: "ticket_id",
|
|
91
|
+
implementationNotes: "implementation_notes",
|
|
92
|
+
};
|
|
93
|
+
/** FR-SPECS-0023 — inverse of MARKUP_TO_FIELD, built from it so the two cannot disagree. */
|
|
94
|
+
export const FIELD_TO_MARKUP = Object.fromEntries(Object.entries(MARKUP_TO_FIELD).map(([markup, field]) => [field, markup]));
|
|
95
|
+
/** FR-SPECS-0023/0025 — joins the stored evidence locations on emit, splits them on read. */
|
|
96
|
+
export const EVIDENCE_SEPARATOR = ", ";
|
|
97
|
+
/** FR-SPECS-0023/0025 — joins an id list (`depends`, `related`) on emit, splits it on read. */
|
|
98
|
+
export const ID_LIST_SEPARATOR = ", ";
|
|
99
|
+
//# sourceMappingURL=markup-grammar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markup-grammar.js","sourceRoot":"","sources":["../../../src/commands/specs/markup-grammar.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,iGAAiG;AACjG,gGAAgG;AAChG,+FAA+F;AAC/F,wCAAwC;AACxC,mFAAmF;AACnF,EAAE;AACF,kFAAkF;AAElF,OAAO,EAAE,mBAAmB,EAAqC,MAAM,WAAW,CAAC;AAEnF;wFACwF;AACxF,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAG/B,qDAAqD;AACrD,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC;AAElC,sEAAsE;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE5C;kDACkD;AAClD,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE/C,uFAAuF;AACvF,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAmC;IAClE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC;IACjD,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAC9B,CAAC,QAAQ,CAAC;IACV,CAAC,UAAU,EAAE,cAAc,CAAC;IAC5B,CAAC,QAAQ,EAAE,aAAa,EAAE,SAAS,CAAC;IACpC,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,gBAAgB,CAAC;CACnB,CAAC;AAEF,+FAA+F;AAC/F,MAAM,CAAC,MAAM,oBAAoB,GAAsB,oBAA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ecMigrateResult } from "./output.js";
|
|
3
|
-
export declare function cmdMigrate(sources: string[], specsFile: string, actor?: string): Promise<RunEnvelope<SpecMigrateResult>>;
|
|
3
|
+
export declare function cmdMigrate(sources: string[], specsFile: string, actor?: string, system?: string): Promise<RunEnvelope<SpecMigrateResult>>;
|
|
4
4
|
//# sourceMappingURL=migrate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/migrate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/migrate.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAM3D,OAAO,KAAK,EAAe,iBAAiB,EAAe,MAAM,aAAa,CAAC;AAoC/E,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAkFzC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
// Implements FR-SPECS-0025 (migrate subcommand).
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
1
|
+
// Implements FR-SPECS-0025 (migrate subcommand). Reads requirement units held as markup via
|
|
2
|
+
// req-parser.ts, maps each unit to a spec, registers areas, and appends via applyBatchWrite
|
|
3
|
+
// (allowCreate — the destination may not exist yet).
|
|
4
|
+
//
|
|
5
|
+
// CANONICAL FORM ONLY. A unit that is not in the canonical shape is skipped with a stated reason
|
|
6
|
+
// and is never reconstructed by inference; `migrated` counts the canonical units alone. Skips are
|
|
7
|
+
// recorded per unit, not per file: two skipped units from one source produce two entries sharing
|
|
8
|
+
// that source, and each entry names its unit inside the reason. A whole-source failure (missing
|
|
9
|
+
// file, zero locatable units) is recorded the same way, against the source itself.
|
|
10
|
+
//
|
|
11
|
+
// Report-don't-drop: one failing source never aborts the others in the same call, and every parse
|
|
12
|
+
// issue is reported rather than short-circuiting on the first.
|
|
7
13
|
//
|
|
8
14
|
// Resolution (ambiguity — FR-SPECS-0025's own acceptance criteria phrase a missing/unparseable
|
|
9
15
|
// source as a bare top-level `{error: "source_not_found"}` / `{error: "migrate_parse_error"}`,
|
|
@@ -21,22 +27,26 @@ import * as fs from "fs";
|
|
|
21
27
|
import { ok, err } from "../../shared/envelope.js";
|
|
22
28
|
import { logger } from "../../shared/logger.js";
|
|
23
29
|
import { applyBatchWrite } from "./write.js";
|
|
24
|
-
import { autoRegisterAreas } from "./core.js";
|
|
30
|
+
import { autoRegisterAreas, ensureReservedAreas } from "./core.js";
|
|
25
31
|
import { describeError, ERR_MIGRATE_PARSE_ERROR, ERR_SOURCE_NOT_FOUND } from "./errors.js";
|
|
26
32
|
import { mapToSpec, scanReqBlocks } from "./req-parser.js";
|
|
27
|
-
/** Fills every Spec field a mapped
|
|
28
|
-
*
|
|
29
|
-
*
|
|
33
|
+
/** Fills every Spec field a mapped unit may have left unset. migrate imports historical state
|
|
34
|
+
* as-is (req-parser's mapToSpec does not strip guarded fields — see its own header comment), so
|
|
35
|
+
* this only supplies safe defaults for fields the source genuinely omitted. An empty
|
|
36
|
+
* subsystem/component means the source did not say, never that none applies. */
|
|
30
37
|
function toFullSpec(partial) {
|
|
31
38
|
return {
|
|
32
39
|
id: partial.id,
|
|
33
40
|
type: partial.type ?? "FR",
|
|
34
41
|
level: partial.level || "System",
|
|
42
|
+
subsystem: partial.subsystem ?? "",
|
|
43
|
+
component: partial.component ?? "",
|
|
35
44
|
...(partial.ticket_id ? { ticket_id: partial.ticket_id } : {}),
|
|
36
45
|
...(partial.classification ? { classification: partial.classification } : {}),
|
|
37
46
|
title: partial.title ?? "",
|
|
38
47
|
statement: partial.statement ?? "",
|
|
39
48
|
rationale: partial.rationale ?? "",
|
|
49
|
+
evidence: partial.evidence ?? [],
|
|
40
50
|
source: partial.source ?? "User",
|
|
41
51
|
priority: partial.priority ?? "Must",
|
|
42
52
|
status: partial.status ?? "Draft",
|
|
@@ -52,7 +62,7 @@ function toFullSpec(partial) {
|
|
|
52
62
|
notes: partial.notes ?? "",
|
|
53
63
|
};
|
|
54
64
|
}
|
|
55
|
-
export async function cmdMigrate(sources, specsFile, actor) {
|
|
65
|
+
export async function cmdMigrate(sources, specsFile, actor, system) {
|
|
56
66
|
try {
|
|
57
67
|
const warnings = [];
|
|
58
68
|
const skipped = [];
|
|
@@ -83,17 +93,23 @@ export async function cmdMigrate(sources, specsFile, actor) {
|
|
|
83
93
|
continue;
|
|
84
94
|
}
|
|
85
95
|
for (const block of blocks) {
|
|
86
|
-
const { spec, warnings: blockWarnings } = mapToSpec(block);
|
|
96
|
+
const { spec, warnings: blockWarnings, skip } = mapToSpec(block);
|
|
87
97
|
warnings.push(...blockWarnings);
|
|
88
|
-
if (
|
|
89
|
-
|
|
98
|
+
if (skip) {
|
|
99
|
+
// FR-SPECS-0025 — one entry per skipped unit, sharing this source; the unit is named
|
|
100
|
+
// inside the reason. Nothing about the unit is guessed at.
|
|
101
|
+
skipped.push({ source, reason: skip });
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
90
104
|
pending.push(toFullSpec(spec));
|
|
91
105
|
}
|
|
92
106
|
}
|
|
93
|
-
// FR-SPECS-0025 acceptance:
|
|
94
|
-
//
|
|
95
|
-
// level, this is a hard top-level error, not a silent
|
|
96
|
-
//
|
|
107
|
+
// FR-SPECS-0025 acceptance: if a source path does not exist, or a source cannot be parsed at
|
|
108
|
+
// the file level, the call is rejected with that code — so when nothing was parseable BECAUSE
|
|
109
|
+
// every source failed at the file level, this is a hard top-level error, not a silent
|
|
110
|
+
// ok(migrated:0). A batch where only SOME sources failed still falls through to the write
|
|
111
|
+
// below and stays report-don't-drop. A source whose units were all skipped as non-canonical
|
|
112
|
+
// is not a file-level failure and does not reach here.
|
|
97
113
|
if (pending.length === 0 && firstFailureCode) {
|
|
98
114
|
logger.info({ sources: (sources ?? []).length, skipped: skipped.length }, "specs migrate: all sources failed");
|
|
99
115
|
return err(firstFailureCode);
|
|
@@ -103,12 +119,13 @@ export async function cmdMigrate(sources, specsFile, actor) {
|
|
|
103
119
|
return ok({ migrated: 0, sources: sources ?? [], warnings, skipped });
|
|
104
120
|
}
|
|
105
121
|
const build = (doc) => {
|
|
122
|
+
ensureReservedAreas(doc); // FR-SPECS-0004 — an existing destination is never re-created, so the pre-registered codes are backfilled here
|
|
106
123
|
autoRegisterAreas(doc, pending.map((s) => s.id)); // FR-SPECS-0025 — areas encountered in ids are registered
|
|
107
124
|
doc.specs = [...(doc.specs ?? []), ...pending];
|
|
108
125
|
// affected:[] — migrate imports historical changed/changed_by as-is, never auto-stamped.
|
|
109
126
|
return { ok: true, affected: [], result: { migrated: pending.length, sources: sources ?? [], warnings, skipped } };
|
|
110
127
|
};
|
|
111
|
-
const writeResult = await applyBatchWrite(specsFile, build, { allowCreate: true, actor });
|
|
128
|
+
const writeResult = await applyBatchWrite(specsFile, build, { allowCreate: true, actor, system });
|
|
112
129
|
if (!writeResult.ok) {
|
|
113
130
|
return { ok: false, result: null, error: writeResult.error, include_help: writeResult.include_help };
|
|
114
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../src/commands/specs/migrate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../src/commands/specs/migrate.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,4FAA4F;AAC5F,qDAAqD;AACrD,EAAE;AACF,iGAAiG;AACjG,kGAAkG;AAClG,iGAAiG;AACjG,gGAAgG;AAChG,mFAAmF;AACnF,EAAE;AACF,kGAAkG;AAClG,+DAA+D;AAC/D,EAAE;AACF,+FAA+F;AAC/F,+FAA+F;AAC/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F,MAAM,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,MAAM,GAAG,WAAW,CAAC,MAAO,CAAC,MAAM,CAAC;QAC1C,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC;QACvG,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;IACpB,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"}
|
|
@@ -4,7 +4,7 @@ export interface SpecRef {
|
|
|
4
4
|
status: StatusEnum;
|
|
5
5
|
}
|
|
6
6
|
export interface SpecDocumentSummary {
|
|
7
|
-
|
|
7
|
+
system: string;
|
|
8
8
|
total: number;
|
|
9
9
|
previous_version: string | null;
|
|
10
10
|
}
|
|
@@ -16,7 +16,7 @@ export interface SpecLifecycleResult {
|
|
|
16
16
|
updated: SpecRef[];
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Builds the SpecWriteResult for add/update: document summary (
|
|
19
|
+
* Builds the SpecWriteResult for add/update: document summary (system, total count,
|
|
20
20
|
* previous_version — the backup path from FR-SPECS-0070, null on first create) plus the
|
|
21
21
|
* affected specs' post-write {id,status}.
|
|
22
22
|
*/
|
|
@@ -61,9 +61,13 @@ export interface SpecGraphResult {
|
|
|
61
61
|
cycles: SpecEdge[][];
|
|
62
62
|
unresolved: string[];
|
|
63
63
|
}
|
|
64
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* FR-SPECS-0023 — cmdRender's result: the rendered document string plus the format it used.
|
|
66
|
+
* The union stays inline: a string union is named only when more than one declaration references
|
|
67
|
+
* it, and this one appears here alone.
|
|
68
|
+
*/
|
|
65
69
|
export interface SpecRenderResult {
|
|
66
|
-
format: "markdown" | "text";
|
|
70
|
+
format: "markdown" | "text" | "xml";
|
|
67
71
|
content: string;
|
|
68
72
|
}
|
|
69
73
|
/** FR-SPECS-0011 — cmdGet's result: full spec units found (any status, incl. Removed) + missing ids. */
|
|
@@ -86,6 +90,18 @@ export interface SpecPurgeResult {
|
|
|
86
90
|
purged: string[];
|
|
87
91
|
missing: string[];
|
|
88
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* FR-SPECS-0008/0050 — one field's authoring guidance, emitted both as the field's description in
|
|
95
|
+
* the help schema dictionary and as an entry of the help content's field_guide section. The data
|
|
96
|
+
* itself lives in field-guide.ts, which both surfaces read so they cannot diverge.
|
|
97
|
+
*/
|
|
98
|
+
export interface SpecFieldGuide {
|
|
99
|
+
field: string;
|
|
100
|
+
type: string;
|
|
101
|
+
required: boolean;
|
|
102
|
+
default: string;
|
|
103
|
+
guidance: string;
|
|
104
|
+
}
|
|
89
105
|
/** FR-SPECS-0015 — nested shape for SpecImplementedResult.updated. */
|
|
90
106
|
export interface SpecImplementedItem {
|
|
91
107
|
id: string;
|
|
@@ -125,7 +141,7 @@ export interface SpecNextId {
|
|
|
125
141
|
/** FR-SPECS-0024 — cmdInfo's result: orientation summary (no full spec bodies). Timestamps are
|
|
126
142
|
* local-time display strings (FR-SPECS-0042), not the stored UTC value. */
|
|
127
143
|
export interface SpecInfoResult {
|
|
128
|
-
|
|
144
|
+
system: string;
|
|
129
145
|
description: string;
|
|
130
146
|
areas: SpecAreaInfo[];
|
|
131
147
|
totals: SpecTotals;
|
|
@@ -133,16 +149,21 @@ export interface SpecInfoResult {
|
|
|
133
149
|
created_at: string;
|
|
134
150
|
updated_at: string;
|
|
135
151
|
}
|
|
136
|
-
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
152
|
+
/**
|
|
153
|
+
* FR-SPECS-0025 — nested shape for SpecMigrateResult.skipped: one exclusion with the reason it was
|
|
154
|
+
* excluded. An entry covers either a whole source that could not be read or parsed, or a single
|
|
155
|
+
* unit within a source that was not in the canonical shape and was therefore skipped rather than
|
|
156
|
+
* reconstructed by inference. Two skipped units from one source produce two entries sharing a
|
|
157
|
+
* `source`, and the unit is identified inside `reason` — the shape stays exactly two fields, with
|
|
158
|
+
* no unit-id field.
|
|
159
|
+
*/
|
|
139
160
|
export interface SpecSkipped {
|
|
140
161
|
source: string;
|
|
141
162
|
reason: string;
|
|
142
163
|
}
|
|
143
|
-
/** FR-SPECS-0025 — cmdMigrate's result. `warnings` carries every per
|
|
144
|
-
*
|
|
145
|
-
*
|
|
164
|
+
/** FR-SPECS-0025 — cmdMigrate's result. `warnings` carries every per-unit parse/mapping issue on a
|
|
165
|
+
* unit that was still imported; `skipped` carries exclusions — whole sources and individual
|
|
166
|
+
* non-canonical units alike. `migrated` counts canonical units only. */
|
|
146
167
|
export interface SpecMigrateResult {
|
|
147
168
|
migrated: number;
|
|
148
169
|
sources: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/output.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG3E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,UA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AE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;wEAEwE;AACxE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB"}
|
|
@@ -14,14 +14,14 @@ function toSpecRefs(doc, ids) {
|
|
|
14
14
|
return refs;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Builds the SpecWriteResult for add/update: document summary (
|
|
17
|
+
* Builds the SpecWriteResult for add/update: document summary (system, total count,
|
|
18
18
|
* previous_version — the backup path from FR-SPECS-0070, null on first create) plus the
|
|
19
19
|
* affected specs' post-write {id,status}.
|
|
20
20
|
*/
|
|
21
21
|
export function buildSpecWriteResult(doc, affectedIds, previousVersion) {
|
|
22
22
|
return {
|
|
23
23
|
document: {
|
|
24
|
-
|
|
24
|
+
system: doc.system,
|
|
25
25
|
total: (doc.specs ?? []).length,
|
|
26
26
|
previous_version: previousVersion,
|
|
27
27
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/commands/specs/output.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,gGAAgG;AAChG,gGAAgG;AAChG,mEAAmE;AA6BnE,qGAAqG;AACrG,SAAS,UAAU,CAAC,GAAkB,EAAE,GAAa;IACnD,MAAM,IAAI,GAAG,IAAI,GAAG,CAAe,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,IAAI,GAAc,EAAE,CAAC;I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,OAAO;QACL,QAAQ,EAAE;YACR,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,KAAK,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM;YAC/B,gBAAgB,EAAE,eAAe;SAClC;QACD,QAAQ,EAAE,UAAU,CAAC,GAAG,EAAE,WAAW,CAAC;KACvC,CAAC;AACJ,CAAC;AAED,mHAAmH;AACnH,MAAM,UAAU,wBAAwB,CAAC,GAAkB,EAAE,WAAqB;IAChF,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,GAAG,EAAE,WAAW,CAAC,EAAE,CAAC;AACnD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAuB,EAAE,eAA8B;IACzF,OAAO,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,gBAAgB,EAAE,eAAe,EAAE,EAAE,CAAC;AAC5F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purge.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/purge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"purge.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/purge.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EAAE,EACb,KAAK,EAAE,OAAO,EACd,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAsDvC"}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
// in the same batch. A missing id is reported in `missing`, never errors the batch. Routes
|
|
5
5
|
// through applyBatchWrite's write path but returns affected:[] — a purged spec no longer exists
|
|
6
6
|
// to stamp changed/changed_by on.
|
|
7
|
+
// Purge erases the CONTENT of a requirement completely and its IDENTITY deliberately not at all:
|
|
8
|
+
// every purged id is recorded in the document and stays taken forever, so it can never be handed
|
|
9
|
+
// to a different requirement later and a reader of an old reference is never silently misled.
|
|
7
10
|
import { ok, err } from "../../shared/envelope.js";
|
|
8
11
|
import { logger } from "../../shared/logger.js";
|
|
9
12
|
import { applyBatchWrite } from "./write.js";
|
|
@@ -38,6 +41,11 @@ export async function cmdPurge(specsFile, ids, force, actor) {
|
|
|
38
41
|
if (rejects.length > 0) {
|
|
39
42
|
return { ok: false, error: aggregate(ERR_REFERENCED_BY_OTHERS, rejects) };
|
|
40
43
|
}
|
|
44
|
+
// FR-SPECS-0016/FR-SPECS-0009 — record identity before erasing content. Placed after the
|
|
45
|
+
// referenced_by_others gate above so a rejected batch leaves the registry untouched, and
|
|
46
|
+
// before the removal below so the ids are still known to be genuinely purgeable. The union
|
|
47
|
+
// keeps the field idempotent under any repeated call path.
|
|
48
|
+
doc.purged_ids = [...new Set([...(doc.purged_ids ?? []), ...purgeable])];
|
|
41
49
|
doc.specs = (doc.specs ?? []).filter((s) => !purgeable.includes(s.id));
|
|
42
50
|
// affected:[] — the purged specs no longer exist in doc.specs to stamp changed/changed_by.
|
|
43
51
|
return { ok: true, affected: [], result: { purged: purgeable, missing } };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purge.js","sourceRoot":"","sources":["../../../src/commands/specs/purge.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,8FAA8F;AAC9F,gGAAgG;AAChG,2FAA2F;AAC3F,gGAAgG;AAChG,kCAAkC;
|
|
1
|
+
{"version":3,"file":"purge.js","sourceRoot":"","sources":["../../../src/commands/specs/purge.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,8FAA8F;AAC9F,gGAAgG;AAChG,2FAA2F;AAC3F,gGAAgG;AAChG,kCAAkC;AAClC,iGAAiG;AACjG,iGAAiG;AACj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AAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC;QAC5E,CAAC,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,eAAe,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QACvE,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,MAAM,GAAG,WAAW,CAAC,MAAO,CAAC,MAAM,CAAC;QAC1C,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC,CAAC;QACxG,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;IACpB,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Spec } from "./core.js";
|
|
2
|
-
export declare const FILTER_KEYS: readonly ["type", "area", "status", "priority", "implementation", "verification", "source", "depends_on", "related", "title", "statement"];
|
|
2
|
+
export declare const FILTER_KEYS: readonly ["type", "area", "status", "priority", "implementation", "verification", "source", "depends_on", "related", "title", "statement", "level", "subsystem", "component", "ears", "evidence"];
|
|
3
3
|
export type FilterKey = (typeof FILTER_KEYS)[number];
|
|
4
4
|
export type FilterTerm = {
|
|
5
5
|
kind: "field";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-filter.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/query-filter.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,KAAK,IAAI,EAAW,MAAM,WAAW,CAAC;AAG/C,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"query-filter.d.ts","sourceRoot":"","sources":["../../../src/commands/specs/query-filter.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,KAAK,IAAI,EAAW,MAAM,WAAW,CAAC;AAG/C,eAAO,MAAM,WAAW,mMAkBd,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAOrD,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACrF;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAErD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;CACzB;AAgJD,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAsC5E;AA8ED;sEACsE;AACtE,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,CAMjE"}
|