sysprom 1.20.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schema.json +4 -44
- package/dist/src/cli/commands/add.js +6 -2
- package/dist/src/cli/commands/query.js +5 -3
- package/dist/src/cli/commands/speckit.js +2 -2
- package/dist/src/cli/commands/update.js +6 -4
- package/dist/src/endpoint-types.d.ts +4 -0
- package/dist/src/endpoint-types.js +22 -121
- package/dist/src/json-to-md.js +2 -16
- package/dist/src/lifecycle-state.d.ts +9 -0
- package/dist/src/lifecycle-state.js +22 -0
- package/dist/src/mcp/server.js +3 -6
- package/dist/src/md-to-json.js +1 -19
- package/dist/src/operations/add-node.d.ts +21 -135
- package/dist/src/operations/add-plan-task.d.ts +14 -90
- package/dist/src/operations/add-relationship.d.ts +16 -105
- package/dist/src/operations/check.d.ts +7 -45
- package/dist/src/operations/graph-decision.d.ts +7 -45
- package/dist/src/operations/graph-decision.js +0 -1
- package/dist/src/operations/graph-dependency.d.ts +7 -45
- package/dist/src/operations/graph-dependency.js +3 -23
- package/dist/src/operations/graph-refinement.d.ts +7 -45
- package/dist/src/operations/graph-shared.js +1 -3
- package/dist/src/operations/graph.d.ts +7 -45
- package/dist/src/operations/infer-completeness.d.ts +10 -54
- package/dist/src/operations/infer-derived.d.ts +7 -45
- package/dist/src/operations/infer-derived.js +28 -4
- package/dist/src/operations/infer-impact.d.ts +49 -315
- package/dist/src/operations/infer-impact.js +22 -3
- package/dist/src/operations/infer-lifecycle.d.ts +8 -106
- package/dist/src/operations/infer-lifecycle.js +4 -10
- package/dist/src/operations/init-document.d.ts +7 -45
- package/dist/src/operations/json-to-markdown.d.ts +7 -45
- package/dist/src/operations/mark-task-done.d.ts +14 -90
- package/dist/src/operations/mark-task-undone.d.ts +14 -90
- package/dist/src/operations/markdown-to-json.d.ts +7 -45
- package/dist/src/operations/next-id.d.ts +8 -48
- package/dist/src/operations/node-history.d.ts +7 -45
- package/dist/src/operations/plan-add-task.d.ts +14 -90
- package/dist/src/operations/plan-gate.d.ts +7 -45
- package/dist/src/operations/plan-init.d.ts +7 -45
- package/dist/src/operations/plan-progress.d.ts +7 -45
- package/dist/src/operations/plan-status.d.ts +7 -45
- package/dist/src/operations/query-node.d.ts +29 -195
- package/dist/src/operations/query-nodes.d.ts +15 -91
- package/dist/src/operations/query-nodes.js +6 -4
- package/dist/src/operations/query-relationships.d.ts +9 -60
- package/dist/src/operations/remove-node.d.ts +21 -135
- package/dist/src/operations/remove-node.js +11 -1
- package/dist/src/operations/remove-relationship.d.ts +15 -104
- package/dist/src/operations/rename.d.ts +14 -90
- package/dist/src/operations/search.d.ts +14 -90
- package/dist/src/operations/speckit-diff.d.ts +7 -45
- package/dist/src/operations/speckit-export.d.ts +7 -45
- package/dist/src/operations/speckit-import.d.ts +7 -45
- package/dist/src/operations/speckit-sync.d.ts +22 -136
- package/dist/src/operations/speckit-sync.js +3 -3
- package/dist/src/operations/state-at.d.ts +7 -45
- package/dist/src/operations/stats.d.ts +7 -45
- package/dist/src/operations/sync.d.ts +21 -135
- package/dist/src/operations/task-list.d.ts +7 -45
- package/dist/src/operations/timeline.d.ts +7 -45
- package/dist/src/operations/trace-from-node.d.ts +21 -135
- package/dist/src/operations/update-metadata.d.ts +14 -90
- package/dist/src/operations/update-node.d.ts +20 -155
- package/dist/src/operations/update-plan-task.d.ts +14 -90
- package/dist/src/operations/validate.d.ts +7 -45
- package/dist/src/operations/validate.js +8 -6
- package/dist/src/schema.d.ts +22 -164
- package/dist/src/schema.js +4 -27
- package/dist/src/speckit/generate.js +10 -7
- package/dist/src/speckit/parse.js +6 -3
- package/dist/src/speckit/plan.js +1 -1
- package/package.json +12 -1
- package/schema.json +4 -44
package/dist/src/schema.d.ts
CHANGED
|
@@ -24,14 +24,12 @@ export declare const NodeType: z.ZodEnum<{
|
|
|
24
24
|
gate: "gate";
|
|
25
25
|
mode: "mode";
|
|
26
26
|
artefact: "artefact";
|
|
27
|
-
artefact_flow: "artefact_flow";
|
|
28
27
|
decision: "decision";
|
|
29
28
|
change: "change";
|
|
30
29
|
view: "view";
|
|
31
30
|
milestone: "milestone";
|
|
32
|
-
version: "version";
|
|
33
31
|
}> & {
|
|
34
|
-
is(value: unknown): value is "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "
|
|
32
|
+
is(value: unknown): value is "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "decision" | "change" | "view" | "milestone";
|
|
35
33
|
};
|
|
36
34
|
/** A valid node type string. */
|
|
37
35
|
export type NodeType = z.infer<typeof NodeType>;
|
|
@@ -51,15 +49,13 @@ export declare const NODE_TYPE_LABELS: {
|
|
|
51
49
|
readonly gate: "Gates";
|
|
52
50
|
readonly mode: "Modes";
|
|
53
51
|
readonly artefact: "Artefacts";
|
|
54
|
-
readonly artefact_flow: "Artefact Flows";
|
|
55
52
|
readonly decision: "Decisions";
|
|
56
53
|
readonly change: "Changes";
|
|
57
54
|
readonly view: "Views";
|
|
58
55
|
readonly milestone: "Milestones";
|
|
59
|
-
readonly version: "Versions";
|
|
60
56
|
};
|
|
61
57
|
/** Reverse map from human-readable label to node type key (e.g. `"Intent"` → `"intent"`). */
|
|
62
|
-
export declare const NODE_LABEL_TO_TYPE: Record<string, "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "
|
|
58
|
+
export declare const NODE_LABEL_TO_TYPE: Record<string, "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "decision" | "change" | "view" | "milestone">;
|
|
63
59
|
/** All valid node status values, ordered by typical lifecycle progression. */
|
|
64
60
|
export declare const NODE_STATUSES: readonly ["proposed", "accepted", "active", "implemented", "adopted", "defined", "introduced", "in_progress", "complete", "consolidated", "experimental", "deprecated", "retired", "superseded", "abandoned", "deferred"];
|
|
65
61
|
/** Zod schema for the set of valid node statuses (e.g. `"proposed"`, `"active"`, `"deprecated"`). */
|
|
@@ -95,27 +91,14 @@ export declare const RelationshipType: z.ZodEnum<{
|
|
|
95
91
|
affects: "affects";
|
|
96
92
|
supersedes: "supersedes";
|
|
97
93
|
must_preserve: "must_preserve";
|
|
98
|
-
performs: "performs";
|
|
99
94
|
part_of: "part_of";
|
|
100
95
|
precedes: "precedes";
|
|
101
96
|
must_follow: "must_follow";
|
|
102
|
-
blocks: "blocks";
|
|
103
|
-
routes_to: "routes_to";
|
|
104
|
-
orchestrates: "orchestrates";
|
|
105
97
|
governed_by: "governed_by";
|
|
106
98
|
modifies: "modifies";
|
|
107
|
-
triggered_by: "triggered_by";
|
|
108
|
-
applies_to: "applies_to";
|
|
109
99
|
produces: "produces";
|
|
110
|
-
consumes: "consumes";
|
|
111
|
-
transforms_into: "transforms_into";
|
|
112
|
-
selects: "selects";
|
|
113
|
-
requires: "requires";
|
|
114
|
-
disables: "disables";
|
|
115
|
-
influence: "influence";
|
|
116
|
-
justifies: "justifies";
|
|
117
100
|
}> & {
|
|
118
|
-
is(value: unknown): value is "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
101
|
+
is(value: unknown): value is "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces";
|
|
119
102
|
};
|
|
120
103
|
/** A valid relationship type string. */
|
|
121
104
|
export type RelationshipType = z.infer<typeof RelationshipType>;
|
|
@@ -129,28 +112,15 @@ export declare const RELATIONSHIP_TYPE_LABELS: {
|
|
|
129
112
|
readonly affects: "Affects";
|
|
130
113
|
readonly supersedes: "Supersedes";
|
|
131
114
|
readonly must_preserve: "Must preserve";
|
|
132
|
-
readonly performs: "Performs";
|
|
133
115
|
readonly part_of: "Part of";
|
|
134
116
|
readonly precedes: "Precedes";
|
|
135
117
|
readonly must_follow: "Must follow";
|
|
136
|
-
readonly blocks: "Blocks";
|
|
137
|
-
readonly routes_to: "Routes to";
|
|
138
|
-
readonly orchestrates: "Orchestrates";
|
|
139
118
|
readonly governed_by: "Governed by";
|
|
140
119
|
readonly modifies: "Modifies";
|
|
141
|
-
readonly triggered_by: "Triggered by";
|
|
142
|
-
readonly applies_to: "Applies to";
|
|
143
120
|
readonly produces: "Produces";
|
|
144
|
-
readonly consumes: "Consumes";
|
|
145
|
-
readonly transforms_into: "Transforms into";
|
|
146
|
-
readonly selects: "Selects";
|
|
147
|
-
readonly requires: "Requires";
|
|
148
|
-
readonly disables: "Disables";
|
|
149
|
-
readonly influence: "Influence";
|
|
150
|
-
readonly justifies: "Justifies";
|
|
151
121
|
};
|
|
152
122
|
/** Reverse map from human-readable label to relationship type key (e.g. `"Refines"` → `"refines"`). */
|
|
153
|
-
export declare const RELATIONSHIP_LABEL_TO_TYPE: Record<string, "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
123
|
+
export declare const RELATIONSHIP_LABEL_TO_TYPE: Record<string, "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces">;
|
|
154
124
|
/** Zod schema for impact polarity (e.g. `"positive"`, `"negative"`, `"neutral"`, `"uncertain"`). */
|
|
155
125
|
export declare const ImpactPolarity: z.ZodEnum<{
|
|
156
126
|
positive: "positive";
|
|
@@ -311,27 +281,14 @@ export declare const Relationship: z.ZodObject<{
|
|
|
311
281
|
affects: "affects";
|
|
312
282
|
supersedes: "supersedes";
|
|
313
283
|
must_preserve: "must_preserve";
|
|
314
|
-
performs: "performs";
|
|
315
284
|
part_of: "part_of";
|
|
316
285
|
precedes: "precedes";
|
|
317
286
|
must_follow: "must_follow";
|
|
318
|
-
blocks: "blocks";
|
|
319
|
-
routes_to: "routes_to";
|
|
320
|
-
orchestrates: "orchestrates";
|
|
321
287
|
governed_by: "governed_by";
|
|
322
288
|
modifies: "modifies";
|
|
323
|
-
triggered_by: "triggered_by";
|
|
324
|
-
applies_to: "applies_to";
|
|
325
289
|
produces: "produces";
|
|
326
|
-
consumes: "consumes";
|
|
327
|
-
transforms_into: "transforms_into";
|
|
328
|
-
selects: "selects";
|
|
329
|
-
requires: "requires";
|
|
330
|
-
disables: "disables";
|
|
331
|
-
influence: "influence";
|
|
332
|
-
justifies: "justifies";
|
|
333
290
|
}> & {
|
|
334
|
-
is(value: unknown): value is "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
291
|
+
is(value: unknown): value is "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces";
|
|
335
292
|
};
|
|
336
293
|
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
|
|
337
294
|
is(value: unknown): value is string | string[];
|
|
@@ -350,7 +307,7 @@ export declare const Relationship: z.ZodObject<{
|
|
|
350
307
|
[x: string]: unknown;
|
|
351
308
|
from: string;
|
|
352
309
|
to: string;
|
|
353
|
-
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
310
|
+
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces";
|
|
354
311
|
description?: string | string[] | undefined;
|
|
355
312
|
polarity?: "positive" | "negative" | "neutral" | "uncertain" | undefined;
|
|
356
313
|
strength?: number | undefined;
|
|
@@ -389,27 +346,14 @@ declare const SysProMDocumentSchema: z.ZodObject<{
|
|
|
389
346
|
affects: "affects";
|
|
390
347
|
supersedes: "supersedes";
|
|
391
348
|
must_preserve: "must_preserve";
|
|
392
|
-
performs: "performs";
|
|
393
349
|
part_of: "part_of";
|
|
394
350
|
precedes: "precedes";
|
|
395
351
|
must_follow: "must_follow";
|
|
396
|
-
blocks: "blocks";
|
|
397
|
-
routes_to: "routes_to";
|
|
398
|
-
orchestrates: "orchestrates";
|
|
399
352
|
governed_by: "governed_by";
|
|
400
353
|
modifies: "modifies";
|
|
401
|
-
triggered_by: "triggered_by";
|
|
402
|
-
applies_to: "applies_to";
|
|
403
354
|
produces: "produces";
|
|
404
|
-
consumes: "consumes";
|
|
405
|
-
transforms_into: "transforms_into";
|
|
406
|
-
selects: "selects";
|
|
407
|
-
requires: "requires";
|
|
408
|
-
disables: "disables";
|
|
409
|
-
influence: "influence";
|
|
410
|
-
justifies: "justifies";
|
|
411
355
|
}> & {
|
|
412
|
-
is(value: unknown): value is "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
356
|
+
is(value: unknown): value is "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces";
|
|
413
357
|
};
|
|
414
358
|
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
|
|
415
359
|
is(value: unknown): value is string | string[];
|
|
@@ -428,7 +372,7 @@ declare const SysProMDocumentSchema: z.ZodObject<{
|
|
|
428
372
|
[x: string]: unknown;
|
|
429
373
|
from: string;
|
|
430
374
|
to: string;
|
|
431
|
-
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
375
|
+
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces";
|
|
432
376
|
description?: string | string[] | undefined;
|
|
433
377
|
polarity?: "positive" | "negative" | "neutral" | "uncertain" | undefined;
|
|
434
378
|
strength?: number | undefined;
|
|
@@ -482,39 +426,18 @@ export declare const NodeBase: z.ZodObject<{
|
|
|
482
426
|
gate: "gate";
|
|
483
427
|
mode: "mode";
|
|
484
428
|
artefact: "artefact";
|
|
485
|
-
artefact_flow: "artefact_flow";
|
|
486
429
|
decision: "decision";
|
|
487
430
|
change: "change";
|
|
488
431
|
view: "view";
|
|
489
432
|
milestone: "milestone";
|
|
490
|
-
version: "version";
|
|
491
433
|
}> & {
|
|
492
|
-
is(value: unknown): value is "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "
|
|
434
|
+
is(value: unknown): value is "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "decision" | "change" | "view" | "milestone";
|
|
493
435
|
};
|
|
494
436
|
name: z.ZodString;
|
|
495
437
|
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
|
|
496
438
|
is(value: unknown): value is string | string[];
|
|
497
439
|
}>;
|
|
498
|
-
status: z.ZodOptional<z.
|
|
499
|
-
deprecated: "deprecated";
|
|
500
|
-
proposed: "proposed";
|
|
501
|
-
accepted: "accepted";
|
|
502
|
-
active: "active";
|
|
503
|
-
implemented: "implemented";
|
|
504
|
-
adopted: "adopted";
|
|
505
|
-
defined: "defined";
|
|
506
|
-
introduced: "introduced";
|
|
507
|
-
in_progress: "in_progress";
|
|
508
|
-
complete: "complete";
|
|
509
|
-
consolidated: "consolidated";
|
|
510
|
-
experimental: "experimental";
|
|
511
|
-
retired: "retired";
|
|
512
|
-
superseded: "superseded";
|
|
513
|
-
abandoned: "abandoned";
|
|
514
|
-
deferred: "deferred";
|
|
515
|
-
}> & {
|
|
516
|
-
is(value: unknown): value is "deprecated" | "proposed" | "accepted" | "active" | "implemented" | "adopted" | "defined" | "introduced" | "in_progress" | "complete" | "consolidated" | "experimental" | "retired" | "superseded" | "abandoned" | "deferred";
|
|
517
|
-
}>;
|
|
440
|
+
status: z.ZodOptional<z.ZodNever>;
|
|
518
441
|
lifecycle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
519
442
|
context: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
|
|
520
443
|
is(value: unknown): value is string | string[];
|
|
@@ -569,8 +492,6 @@ export declare const NodeBase: z.ZodObject<{
|
|
|
569
492
|
}>>;
|
|
570
493
|
propagation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
571
494
|
includes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
572
|
-
input: z.ZodOptional<z.ZodString>;
|
|
573
|
-
output: z.ZodOptional<z.ZodString>;
|
|
574
495
|
external_references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
575
496
|
role: z.ZodEnum<{
|
|
576
497
|
output: "output";
|
|
@@ -619,39 +540,18 @@ declare const NodeSchema: z.ZodObject<{
|
|
|
619
540
|
gate: "gate";
|
|
620
541
|
mode: "mode";
|
|
621
542
|
artefact: "artefact";
|
|
622
|
-
artefact_flow: "artefact_flow";
|
|
623
543
|
decision: "decision";
|
|
624
544
|
change: "change";
|
|
625
545
|
view: "view";
|
|
626
546
|
milestone: "milestone";
|
|
627
|
-
version: "version";
|
|
628
547
|
}> & {
|
|
629
|
-
is(value: unknown): value is "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "
|
|
548
|
+
is(value: unknown): value is "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "decision" | "change" | "view" | "milestone";
|
|
630
549
|
};
|
|
631
550
|
name: z.ZodString;
|
|
632
551
|
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
|
|
633
552
|
is(value: unknown): value is string | string[];
|
|
634
553
|
}>;
|
|
635
|
-
status: z.ZodOptional<z.
|
|
636
|
-
deprecated: "deprecated";
|
|
637
|
-
proposed: "proposed";
|
|
638
|
-
accepted: "accepted";
|
|
639
|
-
active: "active";
|
|
640
|
-
implemented: "implemented";
|
|
641
|
-
adopted: "adopted";
|
|
642
|
-
defined: "defined";
|
|
643
|
-
introduced: "introduced";
|
|
644
|
-
in_progress: "in_progress";
|
|
645
|
-
complete: "complete";
|
|
646
|
-
consolidated: "consolidated";
|
|
647
|
-
experimental: "experimental";
|
|
648
|
-
retired: "retired";
|
|
649
|
-
superseded: "superseded";
|
|
650
|
-
abandoned: "abandoned";
|
|
651
|
-
deferred: "deferred";
|
|
652
|
-
}> & {
|
|
653
|
-
is(value: unknown): value is "deprecated" | "proposed" | "accepted" | "active" | "implemented" | "adopted" | "defined" | "introduced" | "in_progress" | "complete" | "consolidated" | "experimental" | "retired" | "superseded" | "abandoned" | "deferred";
|
|
654
|
-
}>;
|
|
554
|
+
status: z.ZodOptional<z.ZodNever>;
|
|
655
555
|
lifecycle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
656
556
|
context: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
|
|
657
557
|
is(value: unknown): value is string | string[];
|
|
@@ -706,8 +606,6 @@ declare const NodeSchema: z.ZodObject<{
|
|
|
706
606
|
}>>;
|
|
707
607
|
propagation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
708
608
|
includes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
709
|
-
input: z.ZodOptional<z.ZodString>;
|
|
710
|
-
output: z.ZodOptional<z.ZodString>;
|
|
711
609
|
external_references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
712
610
|
role: z.ZodEnum<{
|
|
713
611
|
output: "output";
|
|
@@ -775,27 +673,14 @@ export declare const SysProMDocument: z.ZodObject<{
|
|
|
775
673
|
affects: "affects";
|
|
776
674
|
supersedes: "supersedes";
|
|
777
675
|
must_preserve: "must_preserve";
|
|
778
|
-
performs: "performs";
|
|
779
676
|
part_of: "part_of";
|
|
780
677
|
precedes: "precedes";
|
|
781
678
|
must_follow: "must_follow";
|
|
782
|
-
blocks: "blocks";
|
|
783
|
-
routes_to: "routes_to";
|
|
784
|
-
orchestrates: "orchestrates";
|
|
785
679
|
governed_by: "governed_by";
|
|
786
680
|
modifies: "modifies";
|
|
787
|
-
triggered_by: "triggered_by";
|
|
788
|
-
applies_to: "applies_to";
|
|
789
681
|
produces: "produces";
|
|
790
|
-
consumes: "consumes";
|
|
791
|
-
transforms_into: "transforms_into";
|
|
792
|
-
selects: "selects";
|
|
793
|
-
requires: "requires";
|
|
794
|
-
disables: "disables";
|
|
795
|
-
influence: "influence";
|
|
796
|
-
justifies: "justifies";
|
|
797
682
|
}> & {
|
|
798
|
-
is(value: unknown): value is "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
683
|
+
is(value: unknown): value is "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces";
|
|
799
684
|
};
|
|
800
685
|
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
|
|
801
686
|
is(value: unknown): value is string | string[];
|
|
@@ -814,7 +699,7 @@ export declare const SysProMDocument: z.ZodObject<{
|
|
|
814
699
|
[x: string]: unknown;
|
|
815
700
|
from: string;
|
|
816
701
|
to: string;
|
|
817
|
-
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
702
|
+
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces";
|
|
818
703
|
description?: string | string[] | undefined;
|
|
819
704
|
polarity?: "positive" | "negative" | "neutral" | "uncertain" | undefined;
|
|
820
705
|
strength?: number | undefined;
|
|
@@ -854,10 +739,10 @@ export declare const SysProMDocument: z.ZodObject<{
|
|
|
854
739
|
nodes: {
|
|
855
740
|
[x: string]: unknown;
|
|
856
741
|
id: string;
|
|
857
|
-
type: "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "
|
|
742
|
+
type: "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "decision" | "change" | "view" | "milestone";
|
|
858
743
|
name: string;
|
|
859
744
|
description?: string | string[] | undefined;
|
|
860
|
-
status?:
|
|
745
|
+
status?: undefined;
|
|
861
746
|
lifecycle?: Record<string, string | boolean> | undefined;
|
|
862
747
|
context?: string | string[] | undefined;
|
|
863
748
|
options?: {
|
|
@@ -881,8 +766,6 @@ export declare const SysProMDocument: z.ZodObject<{
|
|
|
881
766
|
}[] | undefined;
|
|
882
767
|
propagation?: Record<string, boolean> | undefined;
|
|
883
768
|
includes?: string[] | undefined;
|
|
884
|
-
input?: string | undefined;
|
|
885
|
-
output?: string | undefined;
|
|
886
769
|
external_references?: {
|
|
887
770
|
role: "output" | "input" | "context" | "evidence" | "source" | "standard" | "prior_art";
|
|
888
771
|
identifier: string;
|
|
@@ -905,7 +788,7 @@ export declare const SysProMDocument: z.ZodObject<{
|
|
|
905
788
|
[x: string]: unknown;
|
|
906
789
|
from: string;
|
|
907
790
|
to: string;
|
|
908
|
-
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
791
|
+
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces";
|
|
909
792
|
description?: string | string[] | undefined;
|
|
910
793
|
polarity?: "positive" | "negative" | "neutral" | "uncertain" | undefined;
|
|
911
794
|
strength?: number | undefined;
|
|
@@ -943,39 +826,18 @@ export declare const Node: z.ZodObject<{
|
|
|
943
826
|
gate: "gate";
|
|
944
827
|
mode: "mode";
|
|
945
828
|
artefact: "artefact";
|
|
946
|
-
artefact_flow: "artefact_flow";
|
|
947
829
|
decision: "decision";
|
|
948
830
|
change: "change";
|
|
949
831
|
view: "view";
|
|
950
832
|
milestone: "milestone";
|
|
951
|
-
version: "version";
|
|
952
833
|
}> & {
|
|
953
|
-
is(value: unknown): value is "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "
|
|
834
|
+
is(value: unknown): value is "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "decision" | "change" | "view" | "milestone";
|
|
954
835
|
};
|
|
955
836
|
name: z.ZodString;
|
|
956
837
|
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
|
|
957
838
|
is(value: unknown): value is string | string[];
|
|
958
839
|
}>;
|
|
959
|
-
status: z.ZodOptional<z.
|
|
960
|
-
deprecated: "deprecated";
|
|
961
|
-
proposed: "proposed";
|
|
962
|
-
accepted: "accepted";
|
|
963
|
-
active: "active";
|
|
964
|
-
implemented: "implemented";
|
|
965
|
-
adopted: "adopted";
|
|
966
|
-
defined: "defined";
|
|
967
|
-
introduced: "introduced";
|
|
968
|
-
in_progress: "in_progress";
|
|
969
|
-
complete: "complete";
|
|
970
|
-
consolidated: "consolidated";
|
|
971
|
-
experimental: "experimental";
|
|
972
|
-
retired: "retired";
|
|
973
|
-
superseded: "superseded";
|
|
974
|
-
abandoned: "abandoned";
|
|
975
|
-
deferred: "deferred";
|
|
976
|
-
}> & {
|
|
977
|
-
is(value: unknown): value is "deprecated" | "proposed" | "accepted" | "active" | "implemented" | "adopted" | "defined" | "introduced" | "in_progress" | "complete" | "consolidated" | "experimental" | "retired" | "superseded" | "abandoned" | "deferred";
|
|
978
|
-
}>;
|
|
840
|
+
status: z.ZodOptional<z.ZodNever>;
|
|
979
841
|
lifecycle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
980
842
|
context: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
|
|
981
843
|
is(value: unknown): value is string | string[];
|
|
@@ -1030,8 +892,6 @@ export declare const Node: z.ZodObject<{
|
|
|
1030
892
|
}>>;
|
|
1031
893
|
propagation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1032
894
|
includes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1033
|
-
input: z.ZodOptional<z.ZodString>;
|
|
1034
|
-
output: z.ZodOptional<z.ZodString>;
|
|
1035
895
|
external_references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1036
896
|
role: z.ZodEnum<{
|
|
1037
897
|
output: "output";
|
|
@@ -1066,10 +926,10 @@ export declare const Node: z.ZodObject<{
|
|
|
1066
926
|
is(value: unknown): value is {
|
|
1067
927
|
[x: string]: unknown;
|
|
1068
928
|
id: string;
|
|
1069
|
-
type: "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "
|
|
929
|
+
type: "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "decision" | "change" | "view" | "milestone";
|
|
1070
930
|
name: string;
|
|
1071
931
|
description?: string | string[] | undefined;
|
|
1072
|
-
status?:
|
|
932
|
+
status?: undefined;
|
|
1073
933
|
lifecycle?: Record<string, string | boolean> | undefined;
|
|
1074
934
|
context?: string | string[] | undefined;
|
|
1075
935
|
options?: {
|
|
@@ -1093,8 +953,6 @@ export declare const Node: z.ZodObject<{
|
|
|
1093
953
|
}[] | undefined;
|
|
1094
954
|
propagation?: Record<string, boolean> | undefined;
|
|
1095
955
|
includes?: string[] | undefined;
|
|
1096
|
-
input?: string | undefined;
|
|
1097
|
-
output?: string | undefined;
|
|
1098
956
|
external_references?: {
|
|
1099
957
|
role: "output" | "input" | "context" | "evidence" | "source" | "standard" | "prior_art";
|
|
1100
958
|
identifier: string;
|
|
@@ -1117,7 +975,7 @@ export declare const Node: z.ZodObject<{
|
|
|
1117
975
|
[x: string]: unknown;
|
|
1118
976
|
from: string;
|
|
1119
977
|
to: string;
|
|
1120
|
-
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "
|
|
978
|
+
type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "part_of" | "precedes" | "must_follow" | "governed_by" | "modifies" | "produces";
|
|
1121
979
|
description?: string | string[] | undefined;
|
|
1122
980
|
polarity?: "positive" | "negative" | "neutral" | "uncertain" | undefined;
|
|
1123
981
|
strength?: number | undefined;
|
package/dist/src/schema.js
CHANGED
|
@@ -58,12 +58,10 @@ const nodeTypeDef = labelledEnum({
|
|
|
58
58
|
gate: "Gates",
|
|
59
59
|
mode: "Modes",
|
|
60
60
|
artefact: "Artefacts",
|
|
61
|
-
artefact_flow: "Artefact Flows",
|
|
62
61
|
decision: "Decisions",
|
|
63
62
|
change: "Changes",
|
|
64
63
|
view: "Views",
|
|
65
64
|
milestone: "Milestones",
|
|
66
|
-
version: "Versions",
|
|
67
65
|
});
|
|
68
66
|
/** Zod schema for the set of valid node types (e.g. `"intent"`, `"decision"`, `"change"`). */
|
|
69
67
|
export const NodeType = nodeTypeDef.schema;
|
|
@@ -107,25 +105,12 @@ const relationshipTypeDef = labelledEnum({
|
|
|
107
105
|
affects: "Affects",
|
|
108
106
|
supersedes: "Supersedes",
|
|
109
107
|
must_preserve: "Must preserve",
|
|
110
|
-
performs: "Performs",
|
|
111
108
|
part_of: "Part of",
|
|
112
109
|
precedes: "Precedes",
|
|
113
110
|
must_follow: "Must follow",
|
|
114
|
-
blocks: "Blocks",
|
|
115
|
-
routes_to: "Routes to",
|
|
116
|
-
orchestrates: "Orchestrates",
|
|
117
111
|
governed_by: "Governed by",
|
|
118
112
|
modifies: "Modifies",
|
|
119
|
-
triggered_by: "Triggered by",
|
|
120
|
-
applies_to: "Applies to",
|
|
121
113
|
produces: "Produces",
|
|
122
|
-
consumes: "Consumes",
|
|
123
|
-
transforms_into: "Transforms into",
|
|
124
|
-
selects: "Selects",
|
|
125
|
-
requires: "Requires",
|
|
126
|
-
disables: "Disables",
|
|
127
|
-
influence: "Influence",
|
|
128
|
-
justifies: "Justifies",
|
|
129
114
|
});
|
|
130
115
|
/** Zod schema for the set of valid relationship types (e.g. `"refines"`, `"depends_on"`, `"affects"`). */
|
|
131
116
|
export const RelationshipType = relationshipTypeDef.schema;
|
|
@@ -271,7 +256,10 @@ export const NodeBase = z
|
|
|
271
256
|
type: NodeType,
|
|
272
257
|
name: z.string().describe("Human-readable name."),
|
|
273
258
|
description: Text.optional(),
|
|
274
|
-
status:
|
|
259
|
+
status: z
|
|
260
|
+
.never()
|
|
261
|
+
.optional()
|
|
262
|
+
.describe("Deprecated field. Node-level status is not supported; use lifecycle states instead."),
|
|
275
263
|
lifecycle: z
|
|
276
264
|
.record(z.string(), z.union([z.boolean(), z.string()]))
|
|
277
265
|
.describe("Map of lifecycle state names to completion status. Values may be boolean or an ISO date string indicating when the state was reached.")
|
|
@@ -306,14 +294,6 @@ export const NodeBase = z
|
|
|
306
294
|
.array(z.string())
|
|
307
295
|
.describe("IDs of nodes included in this projection. Applicable to view nodes.")
|
|
308
296
|
.optional(),
|
|
309
|
-
input: z
|
|
310
|
-
.string()
|
|
311
|
-
.describe("ID of the input artefact. Applicable to artefact_flow nodes.")
|
|
312
|
-
.optional(),
|
|
313
|
-
output: z
|
|
314
|
-
.string()
|
|
315
|
-
.describe("ID of the output artefact. Applicable to artefact_flow nodes.")
|
|
316
|
-
.optional(),
|
|
317
297
|
external_references: z
|
|
318
298
|
.array(ExternalReference)
|
|
319
299
|
.describe("External resources related to this node.")
|
|
@@ -365,7 +345,6 @@ export const NODE_FILE_MAP = {
|
|
|
365
345
|
"gate",
|
|
366
346
|
"mode",
|
|
367
347
|
"artefact",
|
|
368
|
-
"artefact_flow",
|
|
369
348
|
],
|
|
370
349
|
DECISIONS: ["decision"],
|
|
371
350
|
CHANGES: ["change"],
|
|
@@ -386,12 +365,10 @@ export const NODE_ID_PREFIX = {
|
|
|
386
365
|
gate: "GATE",
|
|
387
366
|
mode: "MODE",
|
|
388
367
|
artefact: "ART",
|
|
389
|
-
artefact_flow: "FLOW",
|
|
390
368
|
decision: "DEC",
|
|
391
369
|
change: "CHG",
|
|
392
370
|
view: "VIEW",
|
|
393
371
|
milestone: "MILE",
|
|
394
|
-
version: "VER",
|
|
395
372
|
};
|
|
396
373
|
// ---------------------------------------------------------------------------
|
|
397
374
|
// Generate JSON Schema
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { textToString } from "../text.js";
|
|
4
|
+
import { hasLifecycleState, primaryLifecycleState, } from "../lifecycle-state.js";
|
|
4
5
|
// ============================================================================
|
|
5
6
|
// Helper functions
|
|
6
7
|
// ============================================================================
|
|
@@ -120,23 +121,23 @@ function parseTasks(node) {
|
|
|
120
121
|
}));
|
|
121
122
|
}
|
|
122
123
|
/**
|
|
123
|
-
* Format the
|
|
124
|
-
* @param
|
|
124
|
+
* Format the lifecycle state for spec output: "proposed" -> "Draft", etc.
|
|
125
|
+
* @param state - The node lifecycle state.
|
|
125
126
|
* @returns Formatted status label.
|
|
126
127
|
* @example
|
|
127
128
|
* ```ts
|
|
128
129
|
* formatStatus("proposed"); // => "Draft"
|
|
129
130
|
* ```
|
|
130
131
|
*/
|
|
131
|
-
function formatStatus(
|
|
132
|
-
if (!
|
|
132
|
+
function formatStatus(state) {
|
|
133
|
+
if (!state)
|
|
133
134
|
return "Draft";
|
|
134
135
|
const mapping = {
|
|
135
136
|
proposed: "Draft",
|
|
136
137
|
active: "Active",
|
|
137
138
|
complete: "Complete",
|
|
138
139
|
};
|
|
139
|
-
return mapping[
|
|
140
|
+
return mapping[state] ?? state;
|
|
140
141
|
}
|
|
141
142
|
// ============================================================================
|
|
142
143
|
// generate Constitution
|
|
@@ -244,7 +245,7 @@ export function generateSpec(doc, prefix) {
|
|
|
244
245
|
// Metadata
|
|
245
246
|
output += `**Feature Branch**: \`${prefix.toLowerCase()}\`\n`;
|
|
246
247
|
output += `**Created**: ${new Date().toISOString().split("T")[0]}\n`;
|
|
247
|
-
output += `**Status**: ${formatStatus(spec
|
|
248
|
+
output += `**Status**: ${formatStatus(primaryLifecycleState(spec))}\n\n`;
|
|
248
249
|
// User Scenarios & Testing section
|
|
249
250
|
output += "## User Scenarios & Testing *(mandatory)*\n\n";
|
|
250
251
|
const capabilityRels = findRelationshipsTo(doc, specId, "refines");
|
|
@@ -314,7 +315,9 @@ export function generateSpec(doc, prefix) {
|
|
|
314
315
|
else {
|
|
315
316
|
frNodes.forEach((req) => {
|
|
316
317
|
const reqText = textToString(req.description ?? "");
|
|
317
|
-
const status = req
|
|
318
|
+
const status = hasLifecycleState(req, "proposed")
|
|
319
|
+
? ` [NEEDS CLARIFICATION]`
|
|
320
|
+
: "";
|
|
318
321
|
output += `- **${req.id}**: ${reqText}${status}\n`;
|
|
319
322
|
});
|
|
320
323
|
output += "\n";
|
|
@@ -165,6 +165,9 @@ function mapStatusValue(value) {
|
|
|
165
165
|
};
|
|
166
166
|
return statusMap[lower] ?? "proposed";
|
|
167
167
|
}
|
|
168
|
+
function statusLifecycle(status) {
|
|
169
|
+
return { [status]: true };
|
|
170
|
+
}
|
|
168
171
|
/**
|
|
169
172
|
* Extract a single line value from body text (e.g., "**Created**: 2025-01-01").
|
|
170
173
|
* @param body - Markdown body text.
|
|
@@ -311,7 +314,7 @@ export function parseSpec(content, idPrefix) {
|
|
|
311
314
|
id: specId,
|
|
312
315
|
type: "artefact",
|
|
313
316
|
name: title,
|
|
314
|
-
status,
|
|
317
|
+
lifecycle: statusLifecycle(status),
|
|
315
318
|
description: titleSection?.body,
|
|
316
319
|
});
|
|
317
320
|
// Track user stories, FRs, SCs, and entities
|
|
@@ -390,7 +393,7 @@ export function parseSpec(content, idPrefix) {
|
|
|
390
393
|
type: "invariant",
|
|
391
394
|
name: `FR-${String(frIdx)}`,
|
|
392
395
|
description: frText,
|
|
393
|
-
|
|
396
|
+
lifecycle: statusLifecycle(needsClarification ? "proposed" : "active"),
|
|
394
397
|
});
|
|
395
398
|
relationships.push({
|
|
396
399
|
from: frId,
|
|
@@ -437,7 +440,7 @@ export function parseSpec(content, idPrefix) {
|
|
|
437
440
|
type: "invariant",
|
|
438
441
|
name: `SC-${String(scIdx)}`,
|
|
439
442
|
description: scText,
|
|
440
|
-
|
|
443
|
+
lifecycle: statusLifecycle("active"),
|
|
441
444
|
});
|
|
442
445
|
relationships.push({
|
|
443
446
|
from: scId,
|
package/dist/src/speckit/plan.js
CHANGED