sysprom 1.0.0 → 1.0.6

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 (148) hide show
  1. package/README.md +207 -0
  2. package/dist/schema.json +510 -0
  3. package/dist/src/canonical-json.d.ts +23 -0
  4. package/dist/src/canonical-json.js +120 -0
  5. package/dist/src/cli/commands/add.d.ts +22 -0
  6. package/dist/src/cli/commands/add.js +95 -0
  7. package/dist/src/cli/commands/check.d.ts +10 -0
  8. package/dist/src/cli/commands/check.js +33 -0
  9. package/dist/src/cli/commands/graph.d.ts +15 -0
  10. package/dist/src/cli/commands/graph.js +32 -0
  11. package/dist/src/cli/commands/init.d.ts +2 -0
  12. package/dist/src/cli/commands/init.js +44 -0
  13. package/dist/src/cli/commands/json2md.d.ts +2 -0
  14. package/dist/src/cli/commands/json2md.js +60 -0
  15. package/dist/src/cli/commands/md2json.d.ts +2 -0
  16. package/dist/src/cli/commands/md2json.js +29 -0
  17. package/dist/src/cli/commands/plan.d.ts +2 -0
  18. package/dist/src/cli/commands/plan.js +227 -0
  19. package/dist/src/cli/commands/query.d.ts +2 -0
  20. package/dist/src/cli/commands/query.js +275 -0
  21. package/dist/src/cli/commands/remove.d.ts +13 -0
  22. package/dist/src/cli/commands/remove.js +50 -0
  23. package/dist/src/cli/commands/rename.d.ts +14 -0
  24. package/dist/src/cli/commands/rename.js +34 -0
  25. package/dist/src/cli/commands/search.d.ts +11 -0
  26. package/dist/src/cli/commands/search.js +37 -0
  27. package/dist/src/cli/commands/speckit.d.ts +2 -0
  28. package/dist/src/cli/commands/speckit.js +318 -0
  29. package/dist/src/cli/commands/stats.d.ts +10 -0
  30. package/dist/src/cli/commands/stats.js +51 -0
  31. package/dist/src/cli/commands/task.d.ts +2 -0
  32. package/dist/src/cli/commands/task.js +162 -0
  33. package/dist/src/cli/commands/update.d.ts +2 -0
  34. package/dist/src/cli/commands/update.js +219 -0
  35. package/dist/src/cli/commands/validate.d.ts +10 -0
  36. package/dist/src/cli/commands/validate.js +30 -0
  37. package/dist/src/cli/define-command.d.ts +34 -0
  38. package/dist/src/cli/define-command.js +237 -0
  39. package/dist/src/cli/index.d.ts +2 -0
  40. package/dist/src/cli/index.js +3 -0
  41. package/dist/src/cli/program.d.ts +4 -0
  42. package/dist/src/cli/program.js +46 -0
  43. package/dist/src/cli/shared.d.ts +26 -0
  44. package/dist/src/cli/shared.js +41 -0
  45. package/dist/src/generate-schema.d.ts +1 -0
  46. package/dist/src/generate-schema.js +9 -0
  47. package/dist/src/index.d.ts +48 -0
  48. package/dist/src/index.js +99 -0
  49. package/dist/src/io.d.ts +22 -0
  50. package/dist/src/io.js +66 -0
  51. package/dist/src/json-to-md.d.ts +26 -0
  52. package/dist/src/json-to-md.js +498 -0
  53. package/dist/src/md-to-json.d.ts +22 -0
  54. package/dist/src/md-to-json.js +548 -0
  55. package/dist/src/operations/add-node.d.ts +887 -0
  56. package/dist/src/operations/add-node.js +21 -0
  57. package/dist/src/operations/add-plan-task.d.ts +594 -0
  58. package/dist/src/operations/add-plan-task.js +25 -0
  59. package/dist/src/operations/add-relationship.d.ts +635 -0
  60. package/dist/src/operations/add-relationship.js +25 -0
  61. package/dist/src/operations/check.d.ts +301 -0
  62. package/dist/src/operations/check.js +66 -0
  63. package/dist/src/operations/define-operation.d.ts +14 -0
  64. package/dist/src/operations/define-operation.js +21 -0
  65. package/dist/src/operations/graph.d.ts +303 -0
  66. package/dist/src/operations/graph.js +71 -0
  67. package/dist/src/operations/index.d.ts +38 -0
  68. package/dist/src/operations/index.js +45 -0
  69. package/dist/src/operations/init-document.d.ts +299 -0
  70. package/dist/src/operations/init-document.js +26 -0
  71. package/dist/src/operations/json-to-markdown.d.ts +298 -0
  72. package/dist/src/operations/json-to-markdown.js +13 -0
  73. package/dist/src/operations/mark-task-done.d.ts +594 -0
  74. package/dist/src/operations/mark-task-done.js +26 -0
  75. package/dist/src/operations/mark-task-undone.d.ts +594 -0
  76. package/dist/src/operations/mark-task-undone.js +26 -0
  77. package/dist/src/operations/markdown-to-json.d.ts +298 -0
  78. package/dist/src/operations/markdown-to-json.js +13 -0
  79. package/dist/src/operations/next-id.d.ts +322 -0
  80. package/dist/src/operations/next-id.js +29 -0
  81. package/dist/src/operations/node-history.d.ts +313 -0
  82. package/dist/src/operations/node-history.js +55 -0
  83. package/dist/src/operations/plan-add-task.d.ts +595 -0
  84. package/dist/src/operations/plan-add-task.js +18 -0
  85. package/dist/src/operations/plan-gate.d.ts +351 -0
  86. package/dist/src/operations/plan-gate.js +41 -0
  87. package/dist/src/operations/plan-init.d.ts +299 -0
  88. package/dist/src/operations/plan-init.js +17 -0
  89. package/dist/src/operations/plan-progress.d.ts +313 -0
  90. package/dist/src/operations/plan-progress.js +23 -0
  91. package/dist/src/operations/plan-status.d.ts +349 -0
  92. package/dist/src/operations/plan-status.js +41 -0
  93. package/dist/src/operations/query-node.d.ts +1065 -0
  94. package/dist/src/operations/query-node.js +27 -0
  95. package/dist/src/operations/query-nodes.d.ts +594 -0
  96. package/dist/src/operations/query-nodes.js +23 -0
  97. package/dist/src/operations/query-relationships.d.ts +343 -0
  98. package/dist/src/operations/query-relationships.js +27 -0
  99. package/dist/src/operations/remove-node.d.ts +895 -0
  100. package/dist/src/operations/remove-node.js +58 -0
  101. package/dist/src/operations/remove-relationship.d.ts +622 -0
  102. package/dist/src/operations/remove-relationship.js +26 -0
  103. package/dist/src/operations/rename.d.ts +594 -0
  104. package/dist/src/operations/rename.js +113 -0
  105. package/dist/src/operations/search.d.ts +593 -0
  106. package/dist/src/operations/search.js +39 -0
  107. package/dist/src/operations/speckit-diff.d.ts +330 -0
  108. package/dist/src/operations/speckit-diff.js +89 -0
  109. package/dist/src/operations/speckit-export.d.ts +300 -0
  110. package/dist/src/operations/speckit-export.js +17 -0
  111. package/dist/src/operations/speckit-import.d.ts +299 -0
  112. package/dist/src/operations/speckit-import.js +39 -0
  113. package/dist/src/operations/speckit-sync.d.ts +900 -0
  114. package/dist/src/operations/speckit-sync.js +116 -0
  115. package/dist/src/operations/state-at.d.ts +309 -0
  116. package/dist/src/operations/state-at.js +53 -0
  117. package/dist/src/operations/stats.d.ts +324 -0
  118. package/dist/src/operations/stats.js +85 -0
  119. package/dist/src/operations/task-list.d.ts +305 -0
  120. package/dist/src/operations/task-list.js +44 -0
  121. package/dist/src/operations/timeline.d.ts +312 -0
  122. package/dist/src/operations/timeline.js +46 -0
  123. package/dist/src/operations/trace-from-node.d.ts +1197 -0
  124. package/dist/src/operations/trace-from-node.js +36 -0
  125. package/dist/src/operations/update-metadata.d.ts +593 -0
  126. package/dist/src/operations/update-metadata.js +18 -0
  127. package/dist/src/operations/update-node.d.ts +957 -0
  128. package/dist/src/operations/update-node.js +24 -0
  129. package/dist/src/operations/update-plan-task.d.ts +595 -0
  130. package/dist/src/operations/update-plan-task.js +31 -0
  131. package/dist/src/operations/validate.d.ts +310 -0
  132. package/dist/src/operations/validate.js +82 -0
  133. package/dist/src/schema.d.ts +891 -0
  134. package/dist/src/schema.js +356 -0
  135. package/dist/src/speckit/generate.d.ts +7 -0
  136. package/dist/src/speckit/generate.js +546 -0
  137. package/dist/src/speckit/index.d.ts +4 -0
  138. package/dist/src/speckit/index.js +4 -0
  139. package/dist/src/speckit/parse.d.ts +11 -0
  140. package/dist/src/speckit/parse.js +712 -0
  141. package/dist/src/speckit/plan.d.ts +125 -0
  142. package/dist/src/speckit/plan.js +636 -0
  143. package/dist/src/speckit/project.d.ts +39 -0
  144. package/dist/src/speckit/project.js +141 -0
  145. package/dist/src/text.d.ts +23 -0
  146. package/dist/src/text.js +32 -0
  147. package/package.json +86 -8
  148. package/schema.json +510 -0
@@ -0,0 +1,349 @@
1
+ import * as z from "zod";
2
+ export declare const PlanStatusSchema: z.ZodObject<{
3
+ constitution: z.ZodObject<{
4
+ defined: z.ZodBoolean;
5
+ principleCount: z.ZodNumber;
6
+ }, z.core.$strip>;
7
+ spec: z.ZodObject<{
8
+ defined: z.ZodBoolean;
9
+ userStoryCount: z.ZodNumber;
10
+ storiesNeedingAcceptanceCriteria: z.ZodArray<z.ZodString>;
11
+ }, z.core.$strip>;
12
+ plan: z.ZodObject<{
13
+ defined: z.ZodBoolean;
14
+ phaseCount: z.ZodNumber;
15
+ }, z.core.$strip>;
16
+ tasks: z.ZodObject<{
17
+ total: z.ZodNumber;
18
+ done: z.ZodNumber;
19
+ }, z.core.$strip>;
20
+ checklist: z.ZodObject<{
21
+ defined: z.ZodBoolean;
22
+ total: z.ZodNumber;
23
+ done: z.ZodNumber;
24
+ }, z.core.$strip>;
25
+ nextStep: z.ZodString;
26
+ }, z.core.$strip>;
27
+ export type PlanStatusResult = z.infer<typeof PlanStatusSchema>;
28
+ export declare const planStatusOp: import("./define-operation.js").DefinedOperation<z.ZodObject<{
29
+ doc: z.ZodObject<{
30
+ $schema: z.ZodOptional<z.ZodString>;
31
+ metadata: z.ZodOptional<z.ZodObject<{
32
+ title: z.ZodOptional<z.ZodString>;
33
+ doc_type: z.ZodOptional<z.ZodString>;
34
+ scope: z.ZodOptional<z.ZodString>;
35
+ status: z.ZodOptional<z.ZodString>;
36
+ version: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
37
+ }, z.core.$loose> & {
38
+ is(value: unknown): value is {
39
+ [x: string]: unknown;
40
+ title?: string | undefined;
41
+ doc_type?: string | undefined;
42
+ scope?: string | undefined;
43
+ status?: string | undefined;
44
+ version?: string | number | undefined;
45
+ };
46
+ }>;
47
+ nodes: z.ZodArray<z.ZodObject<{
48
+ id: z.ZodString;
49
+ type: z.ZodEnum<{
50
+ intent: "intent";
51
+ concept: "concept";
52
+ capability: "capability";
53
+ element: "element";
54
+ realisation: "realisation";
55
+ invariant: "invariant";
56
+ principle: "principle";
57
+ policy: "policy";
58
+ protocol: "protocol";
59
+ stage: "stage";
60
+ role: "role";
61
+ gate: "gate";
62
+ mode: "mode";
63
+ artefact: "artefact";
64
+ artefact_flow: "artefact_flow";
65
+ decision: "decision";
66
+ change: "change";
67
+ view: "view";
68
+ milestone: "milestone";
69
+ version: "version";
70
+ }> & {
71
+ is(value: unknown): value is "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "artefact_flow" | "decision" | "change" | "view" | "milestone" | "version";
72
+ };
73
+ name: z.ZodString;
74
+ description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
75
+ is(value: unknown): value is string | string[];
76
+ }>;
77
+ status: z.ZodOptional<z.ZodEnum<{
78
+ deprecated: "deprecated";
79
+ proposed: "proposed";
80
+ accepted: "accepted";
81
+ active: "active";
82
+ implemented: "implemented";
83
+ adopted: "adopted";
84
+ defined: "defined";
85
+ introduced: "introduced";
86
+ in_progress: "in_progress";
87
+ complete: "complete";
88
+ consolidated: "consolidated";
89
+ experimental: "experimental";
90
+ retired: "retired";
91
+ superseded: "superseded";
92
+ abandoned: "abandoned";
93
+ deferred: "deferred";
94
+ }> & {
95
+ is(value: unknown): value is "deprecated" | "proposed" | "accepted" | "active" | "implemented" | "adopted" | "defined" | "introduced" | "in_progress" | "complete" | "consolidated" | "experimental" | "retired" | "superseded" | "abandoned" | "deferred";
96
+ }>;
97
+ lifecycle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
98
+ context: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
99
+ is(value: unknown): value is string | string[];
100
+ }>;
101
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
102
+ id: z.ZodString;
103
+ description: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
104
+ is(value: unknown): value is string | string[];
105
+ };
106
+ }, z.core.$loose> & {
107
+ is(value: unknown): value is {
108
+ [x: string]: unknown;
109
+ id: string;
110
+ description: string | string[];
111
+ };
112
+ }>>;
113
+ selected: z.ZodOptional<z.ZodString>;
114
+ rationale: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
115
+ is(value: unknown): value is string | string[];
116
+ }>;
117
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
118
+ operations: z.ZodOptional<z.ZodArray<z.ZodObject<{
119
+ type: z.ZodEnum<{
120
+ link: "link";
121
+ add: "add";
122
+ update: "update";
123
+ remove: "remove";
124
+ }>;
125
+ target: z.ZodOptional<z.ZodString>;
126
+ description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
127
+ is(value: unknown): value is string | string[];
128
+ }>;
129
+ }, z.core.$loose> & {
130
+ is(value: unknown): value is {
131
+ [x: string]: unknown;
132
+ type: "link" | "add" | "update" | "remove";
133
+ target?: string | undefined;
134
+ description?: string | string[] | undefined;
135
+ };
136
+ }>>;
137
+ plan: z.ZodOptional<z.ZodArray<z.ZodObject<{
138
+ description: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
139
+ is(value: unknown): value is string | string[];
140
+ };
141
+ done: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
142
+ }, z.core.$loose> & {
143
+ is(value: unknown): value is {
144
+ [x: string]: unknown;
145
+ description: string | string[];
146
+ done?: boolean | undefined;
147
+ };
148
+ }>>;
149
+ propagation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
150
+ includes: z.ZodOptional<z.ZodArray<z.ZodString>>;
151
+ input: z.ZodOptional<z.ZodString>;
152
+ output: z.ZodOptional<z.ZodString>;
153
+ external_references: z.ZodOptional<z.ZodArray<z.ZodObject<{
154
+ role: z.ZodEnum<{
155
+ output: "output";
156
+ input: "input";
157
+ context: "context";
158
+ evidence: "evidence";
159
+ source: "source";
160
+ standard: "standard";
161
+ prior_art: "prior_art";
162
+ }> & {
163
+ is(value: unknown): value is "output" | "input" | "context" | "evidence" | "source" | "standard" | "prior_art";
164
+ };
165
+ identifier: z.ZodString;
166
+ description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
167
+ is(value: unknown): value is string | string[];
168
+ }>;
169
+ node_id: z.ZodOptional<z.ZodString>;
170
+ internalised: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
171
+ is(value: unknown): value is string | string[];
172
+ }>;
173
+ }, z.core.$strip> & {
174
+ is(value: unknown): value is {
175
+ role: "output" | "input" | "context" | "evidence" | "source" | "standard" | "prior_art";
176
+ identifier: string;
177
+ description?: string | string[] | undefined;
178
+ node_id?: string | undefined;
179
+ internalised?: string | string[] | undefined;
180
+ };
181
+ }>>;
182
+ readonly subsystem: z.ZodOptional<z.ZodObject</*elided*/ any, z.core.$strip>>;
183
+ }, z.core.$loose>>;
184
+ relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
185
+ from: z.ZodString;
186
+ to: z.ZodString;
187
+ type: z.ZodEnum<{
188
+ refines: "refines";
189
+ realises: "realises";
190
+ implements: "implements";
191
+ depends_on: "depends_on";
192
+ constrained_by: "constrained_by";
193
+ affects: "affects";
194
+ supersedes: "supersedes";
195
+ must_preserve: "must_preserve";
196
+ performs: "performs";
197
+ part_of: "part_of";
198
+ precedes: "precedes";
199
+ must_follow: "must_follow";
200
+ blocks: "blocks";
201
+ routes_to: "routes_to";
202
+ governed_by: "governed_by";
203
+ modifies: "modifies";
204
+ triggered_by: "triggered_by";
205
+ applies_to: "applies_to";
206
+ produces: "produces";
207
+ consumes: "consumes";
208
+ transforms_into: "transforms_into";
209
+ selects: "selects";
210
+ requires: "requires";
211
+ disables: "disables";
212
+ }> & {
213
+ is(value: unknown): value is "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "performs" | "part_of" | "precedes" | "must_follow" | "blocks" | "routes_to" | "governed_by" | "modifies" | "triggered_by" | "applies_to" | "produces" | "consumes" | "transforms_into" | "selects" | "requires" | "disables";
214
+ };
215
+ description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
216
+ is(value: unknown): value is string | string[];
217
+ }>;
218
+ }, z.core.$loose> & {
219
+ is(value: unknown): value is {
220
+ [x: string]: unknown;
221
+ from: string;
222
+ to: string;
223
+ type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "performs" | "part_of" | "precedes" | "must_follow" | "blocks" | "routes_to" | "governed_by" | "modifies" | "triggered_by" | "applies_to" | "produces" | "consumes" | "transforms_into" | "selects" | "requires" | "disables";
224
+ description?: string | string[] | undefined;
225
+ };
226
+ }>>;
227
+ external_references: z.ZodOptional<z.ZodArray<z.ZodObject<{
228
+ role: z.ZodEnum<{
229
+ output: "output";
230
+ input: "input";
231
+ context: "context";
232
+ evidence: "evidence";
233
+ source: "source";
234
+ standard: "standard";
235
+ prior_art: "prior_art";
236
+ }> & {
237
+ is(value: unknown): value is "output" | "input" | "context" | "evidence" | "source" | "standard" | "prior_art";
238
+ };
239
+ identifier: z.ZodString;
240
+ description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
241
+ is(value: unknown): value is string | string[];
242
+ }>;
243
+ node_id: z.ZodOptional<z.ZodString>;
244
+ internalised: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]> & {
245
+ is(value: unknown): value is string | string[];
246
+ }>;
247
+ }, z.core.$strip> & {
248
+ is(value: unknown): value is {
249
+ role: "output" | "input" | "context" | "evidence" | "source" | "standard" | "prior_art";
250
+ identifier: string;
251
+ description?: string | string[] | undefined;
252
+ node_id?: string | undefined;
253
+ internalised?: string | string[] | undefined;
254
+ };
255
+ }>>;
256
+ }, z.core.$strip> & {
257
+ is(value: unknown): value is {
258
+ nodes: {
259
+ [x: string]: unknown;
260
+ id: string;
261
+ type: "intent" | "concept" | "capability" | "element" | "realisation" | "invariant" | "principle" | "policy" | "protocol" | "stage" | "role" | "gate" | "mode" | "artefact" | "artefact_flow" | "decision" | "change" | "view" | "milestone" | "version";
262
+ name: string;
263
+ description?: string | string[] | undefined;
264
+ status?: "deprecated" | "proposed" | "accepted" | "active" | "implemented" | "adopted" | "defined" | "introduced" | "in_progress" | "complete" | "consolidated" | "experimental" | "retired" | "superseded" | "abandoned" | "deferred" | undefined;
265
+ lifecycle?: Record<string, string | boolean> | undefined;
266
+ context?: string | string[] | undefined;
267
+ options?: {
268
+ [x: string]: unknown;
269
+ id: string;
270
+ description: string | string[];
271
+ }[] | undefined;
272
+ selected?: string | undefined;
273
+ rationale?: string | string[] | undefined;
274
+ scope?: string[] | undefined;
275
+ operations?: {
276
+ [x: string]: unknown;
277
+ type: "link" | "add" | "update" | "remove";
278
+ target?: string | undefined;
279
+ description?: string | string[] | undefined;
280
+ }[] | undefined;
281
+ plan?: {
282
+ [x: string]: unknown;
283
+ description: string | string[];
284
+ done?: boolean | undefined;
285
+ }[] | undefined;
286
+ propagation?: Record<string, boolean> | undefined;
287
+ includes?: string[] | undefined;
288
+ input?: string | undefined;
289
+ output?: string | undefined;
290
+ external_references?: {
291
+ role: "output" | "input" | "context" | "evidence" | "source" | "standard" | "prior_art";
292
+ identifier: string;
293
+ description?: string | string[] | undefined;
294
+ node_id?: string | undefined;
295
+ internalised?: string | string[] | undefined;
296
+ }[] | undefined;
297
+ subsystem?: /*elided*/ any | undefined;
298
+ }[];
299
+ $schema?: string | undefined;
300
+ metadata?: {
301
+ [x: string]: unknown;
302
+ title?: string | undefined;
303
+ doc_type?: string | undefined;
304
+ scope?: string | undefined;
305
+ status?: string | undefined;
306
+ version?: string | number | undefined;
307
+ } | undefined;
308
+ relationships?: {
309
+ [x: string]: unknown;
310
+ from: string;
311
+ to: string;
312
+ type: "refines" | "realises" | "implements" | "depends_on" | "constrained_by" | "affects" | "supersedes" | "must_preserve" | "performs" | "part_of" | "precedes" | "must_follow" | "blocks" | "routes_to" | "governed_by" | "modifies" | "triggered_by" | "applies_to" | "produces" | "consumes" | "transforms_into" | "selects" | "requires" | "disables";
313
+ description?: string | string[] | undefined;
314
+ }[] | undefined;
315
+ external_references?: {
316
+ role: "output" | "input" | "context" | "evidence" | "source" | "standard" | "prior_art";
317
+ identifier: string;
318
+ description?: string | string[] | undefined;
319
+ node_id?: string | undefined;
320
+ internalised?: string | string[] | undefined;
321
+ }[] | undefined;
322
+ };
323
+ };
324
+ prefix: z.ZodString;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ constitution: z.ZodObject<{
327
+ defined: z.ZodBoolean;
328
+ principleCount: z.ZodNumber;
329
+ }, z.core.$strip>;
330
+ spec: z.ZodObject<{
331
+ defined: z.ZodBoolean;
332
+ userStoryCount: z.ZodNumber;
333
+ storiesNeedingAcceptanceCriteria: z.ZodArray<z.ZodString>;
334
+ }, z.core.$strip>;
335
+ plan: z.ZodObject<{
336
+ defined: z.ZodBoolean;
337
+ phaseCount: z.ZodNumber;
338
+ }, z.core.$strip>;
339
+ tasks: z.ZodObject<{
340
+ total: z.ZodNumber;
341
+ done: z.ZodNumber;
342
+ }, z.core.$strip>;
343
+ checklist: z.ZodObject<{
344
+ defined: z.ZodBoolean;
345
+ total: z.ZodNumber;
346
+ done: z.ZodNumber;
347
+ }, z.core.$strip>;
348
+ nextStep: z.ZodString;
349
+ }, z.core.$strip>>;
@@ -0,0 +1,41 @@
1
+ import * as z from "zod";
2
+ import { defineOperation } from "./define-operation.js";
3
+ import { SysProMDocument } from "../schema.js";
4
+ import { planStatus } from "../speckit/plan.js";
5
+ export const PlanStatusSchema = z.object({
6
+ constitution: z.object({
7
+ defined: z.boolean(),
8
+ principleCount: z.number(),
9
+ }),
10
+ spec: z.object({
11
+ defined: z.boolean(),
12
+ userStoryCount: z.number(),
13
+ storiesNeedingAcceptanceCriteria: z.array(z.string()),
14
+ }),
15
+ plan: z.object({
16
+ defined: z.boolean(),
17
+ phaseCount: z.number(),
18
+ }),
19
+ tasks: z.object({
20
+ total: z.number(),
21
+ done: z.number(),
22
+ }),
23
+ checklist: z.object({
24
+ defined: z.boolean(),
25
+ total: z.number(),
26
+ done: z.number(),
27
+ }),
28
+ nextStep: z.string(),
29
+ });
30
+ export const planStatusOp = defineOperation({
31
+ name: "planStatus",
32
+ description: "Get the status of all plan components",
33
+ input: z.object({
34
+ doc: SysProMDocument,
35
+ prefix: z.string().describe("Plan prefix"),
36
+ }),
37
+ output: PlanStatusSchema,
38
+ fn({ doc, prefix }) {
39
+ return planStatus(doc, prefix);
40
+ },
41
+ });