@gordon.gan/specflow 1.7.0-beta → 1.8.0-alpha

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 (151) hide show
  1. package/README.md +4 -4
  2. package/dist/cli/commands/document-run.d.ts +84 -0
  3. package/dist/cli/commands/document-run.js +539 -0
  4. package/dist/cli/index.js +2 -2
  5. package/dist/core/artifact-language.js +11 -1
  6. package/dist/core/document/chapters.d.ts +6 -0
  7. package/dist/core/document/chapters.js +21 -0
  8. package/dist/core/document/coverage.d.ts +25 -0
  9. package/dist/core/document/coverage.js +49 -0
  10. package/dist/core/document/digests.d.ts +41 -0
  11. package/dist/core/document/digests.js +136 -0
  12. package/dist/core/document/engine.d.ts +92 -0
  13. package/dist/core/document/engine.js +487 -0
  14. package/dist/core/{approval → document}/forbidden-patterns.d.ts +4 -2
  15. package/dist/core/document/forbidden-patterns.js +33 -0
  16. package/dist/core/document/gates.d.ts +27 -0
  17. package/dist/core/document/gates.js +33 -0
  18. package/dist/core/document/index.d.ts +7 -0
  19. package/dist/core/document/index.js +7 -0
  20. package/dist/core/document/input-digest.d.ts +55 -0
  21. package/dist/core/document/input-digest.js +121 -0
  22. package/dist/core/document/input-features.d.ts +24 -0
  23. package/dist/core/document/input-features.js +112 -0
  24. package/dist/core/document/lint.d.ts +22 -0
  25. package/dist/core/document/lint.js +29 -0
  26. package/dist/core/document/llm.d.ts +35 -0
  27. package/dist/core/document/llm.js +27 -0
  28. package/dist/core/document/map.d.ts +46 -0
  29. package/dist/core/document/map.js +212 -0
  30. package/dist/core/document/outline.d.ts +26 -0
  31. package/dist/core/document/outline.js +128 -0
  32. package/dist/core/document/paths.d.ts +23 -0
  33. package/dist/core/document/paths.js +31 -0
  34. package/dist/core/document/profile-validator.d.ts +23 -0
  35. package/dist/core/document/profile-validator.js +127 -0
  36. package/dist/core/document/profiles.d.ts +23 -0
  37. package/dist/core/document/profiles.js +69 -0
  38. package/dist/core/document/render.d.ts +19 -0
  39. package/dist/core/document/render.js +97 -0
  40. package/dist/core/document/review.d.ts +42 -0
  41. package/dist/core/document/review.js +157 -0
  42. package/dist/core/document/scene-detect.d.ts +25 -0
  43. package/dist/core/document/scene-detect.js +121 -0
  44. package/dist/core/document/schemas.d.ts +949 -0
  45. package/dist/core/document/schemas.js +158 -0
  46. package/dist/integrations/shared/capability-evidence.js +4 -8
  47. package/dist/integrations/shared/command-catalog.js +1 -1
  48. package/dist/integrations/shared/parity-manifest.js +4 -8
  49. package/package.json +1 -1
  50. package/prompts/apply/phase-a-plan.md +1 -1
  51. package/prompts/document/map/acceptance.md +8 -0
  52. package/prompts/document/map/api-design.md +17 -0
  53. package/prompts/document/map/architecture.md +7 -0
  54. package/prompts/document/map/closed-loop.md +8 -0
  55. package/prompts/document/map/compat-migration.md +8 -0
  56. package/prompts/document/map/config-runtime.md +8 -0
  57. package/prompts/document/map/core-logic.md +8 -0
  58. package/prompts/document/map/data-model.md +17 -0
  59. package/prompts/document/map/deploy.md +8 -0
  60. package/prompts/document/map/fix.md +7 -0
  61. package/prompts/document/map/goal.md +7 -0
  62. package/prompts/document/map/impact.md +7 -0
  63. package/prompts/document/map/implementability.md +8 -0
  64. package/prompts/document/map/mvp-boundary.md +7 -0
  65. package/prompts/document/map/non-goals.md +7 -0
  66. package/prompts/document/map/regression.md +7 -0
  67. package/prompts/document/map/reproduce.md +7 -0
  68. package/prompts/document/map/requirement.md +7 -0
  69. package/prompts/document/map/root-cause.md +7 -0
  70. package/prompts/document/map/signoff.md +8 -0
  71. package/prompts/document/map/tech-selection.md +17 -0
  72. package/prompts/document/map/test-strategy.md +7 -0
  73. package/prompts/document/map/ui-design.md +18 -0
  74. package/prompts/document/outline/general.md +37 -0
  75. package/prompts/document/review/ai-review.md +56 -0
  76. package/prompts/explore/explore-session.md +1 -1
  77. package/prompts/propose/design-draft.md +1 -1
  78. package/prompts/propose/proposal.md +1 -1
  79. package/prompts/propose/specs.md +1 -1
  80. package/prompts/propose/tasks-draft.md +1 -1
  81. package/prompts/refine/design-output.md +1 -1
  82. package/prompts/refine/update-artifacts.md +2 -0
  83. package/prompts/shared/artifact-language.md +13 -0
  84. package/skills/specflow-document/SKILL.md +124 -0
  85. package/templates/document/chapters/acceptance.yaml +16 -0
  86. package/templates/document/chapters/api-design.yaml +24 -0
  87. package/templates/document/chapters/architecture.yaml +18 -0
  88. package/templates/document/chapters/closed-loop.yaml +22 -0
  89. package/templates/document/chapters/compat-migration.yaml +17 -0
  90. package/templates/document/chapters/config-runtime.yaml +16 -0
  91. package/templates/document/chapters/core-logic.yaml +16 -0
  92. package/templates/document/chapters/data-model.yaml +25 -0
  93. package/templates/document/chapters/deploy.yaml +18 -0
  94. package/templates/document/chapters/fix.yaml +18 -0
  95. package/templates/document/chapters/goal.yaml +17 -0
  96. package/templates/document/chapters/impact.yaml +16 -0
  97. package/templates/document/chapters/implementability.yaml +22 -0
  98. package/templates/document/chapters/mvp-boundary.yaml +20 -0
  99. package/templates/document/chapters/non-goals.yaml +17 -0
  100. package/templates/document/chapters/regression.yaml +16 -0
  101. package/templates/document/chapters/reproduce.yaml +16 -0
  102. package/templates/document/chapters/requirement.yaml +18 -0
  103. package/templates/document/chapters/root-cause.yaml +18 -0
  104. package/templates/document/chapters/signoff.yaml +15 -0
  105. package/templates/document/chapters/tech-selection.yaml +20 -0
  106. package/templates/document/chapters/test-strategy.yaml +20 -0
  107. package/templates/document/chapters/ui-design.yaml +22 -0
  108. package/templates/document/profiles/0to1.yaml +12 -0
  109. package/templates/document/profiles/approve.yaml +22 -0
  110. package/templates/document/profiles/bugfix.yaml +10 -0
  111. package/templates/document/profiles/feature.yaml +11 -0
  112. package/dist/cli/commands/approval-assemble.d.ts +0 -64
  113. package/dist/cli/commands/approval-assemble.js +0 -408
  114. package/dist/core/approval/assemble.d.ts +0 -10
  115. package/dist/core/approval/assemble.js +0 -384
  116. package/dist/core/approval/bundle.d.ts +0 -9
  117. package/dist/core/approval/bundle.js +0 -172
  118. package/dist/core/approval/forbidden-patterns.js +0 -37
  119. package/dist/core/approval/index-schema.d.ts +0 -676
  120. package/dist/core/approval/index-schema.js +0 -193
  121. package/dist/core/approval/index.d.ts +0 -12
  122. package/dist/core/approval/index.js +0 -9
  123. package/dist/core/approval/lint.d.ts +0 -10
  124. package/dist/core/approval/lint.js +0 -302
  125. package/dist/core/approval/paths.d.ts +0 -13
  126. package/dist/core/approval/paths.js +0 -43
  127. package/dist/core/approval/pipeline.d.ts +0 -28
  128. package/dist/core/approval/pipeline.js +0 -146
  129. package/dist/core/approval/playbook-schema.d.ts +0 -182
  130. package/dist/core/approval/playbook-schema.js +0 -51
  131. package/dist/core/approval/render.d.ts +0 -20
  132. package/dist/core/approval/render.js +0 -210
  133. package/dist/core/approval/review-pack.d.ts +0 -26
  134. package/dist/core/approval/review-pack.js +0 -205
  135. package/dist/core/approval/types.d.ts +0 -223
  136. package/dist/core/approval/types.js +0 -1
  137. package/prompts/approval/acp-pipeline.md +0 -104
  138. package/prompts/approval/ai-review.md +0 -145
  139. package/prompts/approval/api-guidance.md +0 -179
  140. package/prompts/approval/database-guidance.md +0 -105
  141. package/prompts/approval/frontend-guidance.md +0 -249
  142. package/prompts/approval/generate.md +0 -1583
  143. package/prompts/approval/multi-repo-guidance.md +0 -238
  144. package/prompts/approval/project-conventions-guidance.md +0 -171
  145. package/prompts/approval/runtime-guidance.md +0 -64
  146. package/prompts/approval/segmented-generation.md +0 -157
  147. package/skills/specflow-approval/SKILL.md +0 -663
  148. package/templates/approval-index.yaml +0 -93
  149. package/templates/approval-part.md +0 -15
  150. package/templates/approval-playbook.yaml +0 -28
  151. package/templates/approval.md +0 -261
@@ -0,0 +1,949 @@
1
+ /**
2
+ * Document Engine — zod schemas (data model)
3
+ *
4
+ * Source of truth for the Generic LongDoc Engine (design doc
5
+ * docs/GENERIC_LONGDOC_ENGINE_DESIGN.md §6.2, decisions 1–9).
6
+ *
7
+ * Layered source of truth:
8
+ * - Contract entities (interfaces/tables/decisions) → structured, zod-validated
9
+ * - Narrative content → controlled Markdown fragments
10
+ * - Outline is the two-pass core IR (replaces ACP index.yaml/parts_order)
11
+ */
12
+ import { z } from 'zod';
13
+ export declare const FieldSchema: z.ZodObject<{
14
+ name: z.ZodString;
15
+ type: z.ZodString;
16
+ required: z.ZodDefault<z.ZodBoolean>;
17
+ desc: z.ZodOptional<z.ZodString>;
18
+ default: z.ZodOptional<z.ZodString>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ type: string;
21
+ name: string;
22
+ required: boolean;
23
+ default?: string | undefined;
24
+ desc?: string | undefined;
25
+ }, {
26
+ type: string;
27
+ name: string;
28
+ default?: string | undefined;
29
+ required?: boolean | undefined;
30
+ desc?: string | undefined;
31
+ }>;
32
+ export type Field = z.infer<typeof FieldSchema>;
33
+ export declare const ErrorSpecSchema: z.ZodObject<{
34
+ condition: z.ZodString;
35
+ status: z.ZodString;
36
+ note: z.ZodOptional<z.ZodString>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ status: string;
39
+ condition: string;
40
+ note?: string | undefined;
41
+ }, {
42
+ status: string;
43
+ condition: string;
44
+ note?: string | undefined;
45
+ }>;
46
+ export type ErrorSpec = z.infer<typeof ErrorSpecSchema>;
47
+ export declare const InterfaceEntitySchema: z.ZodObject<{
48
+ id: z.ZodString;
49
+ name: z.ZodString;
50
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
51
+ path: z.ZodString;
52
+ request_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
53
+ name: z.ZodString;
54
+ type: z.ZodString;
55
+ required: z.ZodDefault<z.ZodBoolean>;
56
+ desc: z.ZodOptional<z.ZodString>;
57
+ default: z.ZodOptional<z.ZodString>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ type: string;
60
+ name: string;
61
+ required: boolean;
62
+ default?: string | undefined;
63
+ desc?: string | undefined;
64
+ }, {
65
+ type: string;
66
+ name: string;
67
+ default?: string | undefined;
68
+ required?: boolean | undefined;
69
+ desc?: string | undefined;
70
+ }>, "many">>;
71
+ response_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
72
+ name: z.ZodString;
73
+ type: z.ZodString;
74
+ required: z.ZodDefault<z.ZodBoolean>;
75
+ desc: z.ZodOptional<z.ZodString>;
76
+ default: z.ZodOptional<z.ZodString>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ type: string;
79
+ name: string;
80
+ required: boolean;
81
+ default?: string | undefined;
82
+ desc?: string | undefined;
83
+ }, {
84
+ type: string;
85
+ name: string;
86
+ default?: string | undefined;
87
+ required?: boolean | undefined;
88
+ desc?: string | undefined;
89
+ }>, "many">>;
90
+ errors: z.ZodArray<z.ZodObject<{
91
+ condition: z.ZodString;
92
+ status: z.ZodString;
93
+ note: z.ZodOptional<z.ZodString>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ status: string;
96
+ condition: string;
97
+ note?: string | undefined;
98
+ }, {
99
+ status: string;
100
+ condition: string;
101
+ note?: string | undefined;
102
+ }>, "many">;
103
+ failure_examples: z.ZodArray<z.ZodString, "many">;
104
+ }, "strip", z.ZodTypeAny, {
105
+ path: string;
106
+ id: string;
107
+ name: string;
108
+ errors: {
109
+ status: string;
110
+ condition: string;
111
+ note?: string | undefined;
112
+ }[];
113
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
114
+ failure_examples: string[];
115
+ request_fields?: {
116
+ type: string;
117
+ name: string;
118
+ required: boolean;
119
+ default?: string | undefined;
120
+ desc?: string | undefined;
121
+ }[] | undefined;
122
+ response_fields?: {
123
+ type: string;
124
+ name: string;
125
+ required: boolean;
126
+ default?: string | undefined;
127
+ desc?: string | undefined;
128
+ }[] | undefined;
129
+ }, {
130
+ path: string;
131
+ id: string;
132
+ name: string;
133
+ errors: {
134
+ status: string;
135
+ condition: string;
136
+ note?: string | undefined;
137
+ }[];
138
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
139
+ failure_examples: string[];
140
+ request_fields?: {
141
+ type: string;
142
+ name: string;
143
+ default?: string | undefined;
144
+ required?: boolean | undefined;
145
+ desc?: string | undefined;
146
+ }[] | undefined;
147
+ response_fields?: {
148
+ type: string;
149
+ name: string;
150
+ default?: string | undefined;
151
+ required?: boolean | undefined;
152
+ desc?: string | undefined;
153
+ }[] | undefined;
154
+ }>;
155
+ export type InterfaceEntity = z.infer<typeof InterfaceEntitySchema>;
156
+ export declare const TableEntitySchema: z.ZodObject<{
157
+ id: z.ZodString;
158
+ name: z.ZodString;
159
+ ddl: z.ZodString;
160
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
161
+ name: z.ZodString;
162
+ type: z.ZodString;
163
+ required: z.ZodDefault<z.ZodBoolean>;
164
+ desc: z.ZodOptional<z.ZodString>;
165
+ default: z.ZodOptional<z.ZodString>;
166
+ }, "strip", z.ZodTypeAny, {
167
+ type: string;
168
+ name: string;
169
+ required: boolean;
170
+ default?: string | undefined;
171
+ desc?: string | undefined;
172
+ }, {
173
+ type: string;
174
+ name: string;
175
+ default?: string | undefined;
176
+ required?: boolean | undefined;
177
+ desc?: string | undefined;
178
+ }>, "many">>;
179
+ migration: z.ZodOptional<z.ZodString>;
180
+ rollback: z.ZodOptional<z.ZodString>;
181
+ }, "strip", z.ZodTypeAny, {
182
+ id: string;
183
+ name: string;
184
+ ddl: string;
185
+ fields?: {
186
+ type: string;
187
+ name: string;
188
+ required: boolean;
189
+ default?: string | undefined;
190
+ desc?: string | undefined;
191
+ }[] | undefined;
192
+ migration?: string | undefined;
193
+ rollback?: string | undefined;
194
+ }, {
195
+ id: string;
196
+ name: string;
197
+ ddl: string;
198
+ fields?: {
199
+ type: string;
200
+ name: string;
201
+ default?: string | undefined;
202
+ required?: boolean | undefined;
203
+ desc?: string | undefined;
204
+ }[] | undefined;
205
+ migration?: string | undefined;
206
+ rollback?: string | undefined;
207
+ }>;
208
+ export type TableEntity = z.infer<typeof TableEntitySchema>;
209
+ export declare const DecisionEntitySchema: z.ZodObject<{
210
+ id: z.ZodString;
211
+ text: z.ZodString;
212
+ }, "strip", z.ZodTypeAny, {
213
+ id: string;
214
+ text: string;
215
+ }, {
216
+ id: string;
217
+ text: string;
218
+ }>;
219
+ export type DecisionEntity = z.infer<typeof DecisionEntitySchema>;
220
+ export declare const EntitiesSchema: z.ZodObject<{
221
+ interfaces: z.ZodDefault<z.ZodArray<z.ZodObject<{
222
+ id: z.ZodString;
223
+ name: z.ZodString;
224
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
225
+ path: z.ZodString;
226
+ request_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
227
+ name: z.ZodString;
228
+ type: z.ZodString;
229
+ required: z.ZodDefault<z.ZodBoolean>;
230
+ desc: z.ZodOptional<z.ZodString>;
231
+ default: z.ZodOptional<z.ZodString>;
232
+ }, "strip", z.ZodTypeAny, {
233
+ type: string;
234
+ name: string;
235
+ required: boolean;
236
+ default?: string | undefined;
237
+ desc?: string | undefined;
238
+ }, {
239
+ type: string;
240
+ name: string;
241
+ default?: string | undefined;
242
+ required?: boolean | undefined;
243
+ desc?: string | undefined;
244
+ }>, "many">>;
245
+ response_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
246
+ name: z.ZodString;
247
+ type: z.ZodString;
248
+ required: z.ZodDefault<z.ZodBoolean>;
249
+ desc: z.ZodOptional<z.ZodString>;
250
+ default: z.ZodOptional<z.ZodString>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ type: string;
253
+ name: string;
254
+ required: boolean;
255
+ default?: string | undefined;
256
+ desc?: string | undefined;
257
+ }, {
258
+ type: string;
259
+ name: string;
260
+ default?: string | undefined;
261
+ required?: boolean | undefined;
262
+ desc?: string | undefined;
263
+ }>, "many">>;
264
+ errors: z.ZodArray<z.ZodObject<{
265
+ condition: z.ZodString;
266
+ status: z.ZodString;
267
+ note: z.ZodOptional<z.ZodString>;
268
+ }, "strip", z.ZodTypeAny, {
269
+ status: string;
270
+ condition: string;
271
+ note?: string | undefined;
272
+ }, {
273
+ status: string;
274
+ condition: string;
275
+ note?: string | undefined;
276
+ }>, "many">;
277
+ failure_examples: z.ZodArray<z.ZodString, "many">;
278
+ }, "strip", z.ZodTypeAny, {
279
+ path: string;
280
+ id: string;
281
+ name: string;
282
+ errors: {
283
+ status: string;
284
+ condition: string;
285
+ note?: string | undefined;
286
+ }[];
287
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
288
+ failure_examples: string[];
289
+ request_fields?: {
290
+ type: string;
291
+ name: string;
292
+ required: boolean;
293
+ default?: string | undefined;
294
+ desc?: string | undefined;
295
+ }[] | undefined;
296
+ response_fields?: {
297
+ type: string;
298
+ name: string;
299
+ required: boolean;
300
+ default?: string | undefined;
301
+ desc?: string | undefined;
302
+ }[] | undefined;
303
+ }, {
304
+ path: string;
305
+ id: string;
306
+ name: string;
307
+ errors: {
308
+ status: string;
309
+ condition: string;
310
+ note?: string | undefined;
311
+ }[];
312
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
313
+ failure_examples: string[];
314
+ request_fields?: {
315
+ type: string;
316
+ name: string;
317
+ default?: string | undefined;
318
+ required?: boolean | undefined;
319
+ desc?: string | undefined;
320
+ }[] | undefined;
321
+ response_fields?: {
322
+ type: string;
323
+ name: string;
324
+ default?: string | undefined;
325
+ required?: boolean | undefined;
326
+ desc?: string | undefined;
327
+ }[] | undefined;
328
+ }>, "many">>;
329
+ tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
330
+ id: z.ZodString;
331
+ name: z.ZodString;
332
+ ddl: z.ZodString;
333
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
334
+ name: z.ZodString;
335
+ type: z.ZodString;
336
+ required: z.ZodDefault<z.ZodBoolean>;
337
+ desc: z.ZodOptional<z.ZodString>;
338
+ default: z.ZodOptional<z.ZodString>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ type: string;
341
+ name: string;
342
+ required: boolean;
343
+ default?: string | undefined;
344
+ desc?: string | undefined;
345
+ }, {
346
+ type: string;
347
+ name: string;
348
+ default?: string | undefined;
349
+ required?: boolean | undefined;
350
+ desc?: string | undefined;
351
+ }>, "many">>;
352
+ migration: z.ZodOptional<z.ZodString>;
353
+ rollback: z.ZodOptional<z.ZodString>;
354
+ }, "strip", z.ZodTypeAny, {
355
+ id: string;
356
+ name: string;
357
+ ddl: string;
358
+ fields?: {
359
+ type: string;
360
+ name: string;
361
+ required: boolean;
362
+ default?: string | undefined;
363
+ desc?: string | undefined;
364
+ }[] | undefined;
365
+ migration?: string | undefined;
366
+ rollback?: string | undefined;
367
+ }, {
368
+ id: string;
369
+ name: string;
370
+ ddl: string;
371
+ fields?: {
372
+ type: string;
373
+ name: string;
374
+ default?: string | undefined;
375
+ required?: boolean | undefined;
376
+ desc?: string | undefined;
377
+ }[] | undefined;
378
+ migration?: string | undefined;
379
+ rollback?: string | undefined;
380
+ }>, "many">>;
381
+ decisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
382
+ id: z.ZodString;
383
+ text: z.ZodString;
384
+ }, "strip", z.ZodTypeAny, {
385
+ id: string;
386
+ text: string;
387
+ }, {
388
+ id: string;
389
+ text: string;
390
+ }>, "many">>;
391
+ }, "strip", z.ZodTypeAny, {
392
+ interfaces: {
393
+ path: string;
394
+ id: string;
395
+ name: string;
396
+ errors: {
397
+ status: string;
398
+ condition: string;
399
+ note?: string | undefined;
400
+ }[];
401
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
402
+ failure_examples: string[];
403
+ request_fields?: {
404
+ type: string;
405
+ name: string;
406
+ required: boolean;
407
+ default?: string | undefined;
408
+ desc?: string | undefined;
409
+ }[] | undefined;
410
+ response_fields?: {
411
+ type: string;
412
+ name: string;
413
+ required: boolean;
414
+ default?: string | undefined;
415
+ desc?: string | undefined;
416
+ }[] | undefined;
417
+ }[];
418
+ tables: {
419
+ id: string;
420
+ name: string;
421
+ ddl: string;
422
+ fields?: {
423
+ type: string;
424
+ name: string;
425
+ required: boolean;
426
+ default?: string | undefined;
427
+ desc?: string | undefined;
428
+ }[] | undefined;
429
+ migration?: string | undefined;
430
+ rollback?: string | undefined;
431
+ }[];
432
+ decisions: {
433
+ id: string;
434
+ text: string;
435
+ }[];
436
+ }, {
437
+ interfaces?: {
438
+ path: string;
439
+ id: string;
440
+ name: string;
441
+ errors: {
442
+ status: string;
443
+ condition: string;
444
+ note?: string | undefined;
445
+ }[];
446
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
447
+ failure_examples: string[];
448
+ request_fields?: {
449
+ type: string;
450
+ name: string;
451
+ default?: string | undefined;
452
+ required?: boolean | undefined;
453
+ desc?: string | undefined;
454
+ }[] | undefined;
455
+ response_fields?: {
456
+ type: string;
457
+ name: string;
458
+ default?: string | undefined;
459
+ required?: boolean | undefined;
460
+ desc?: string | undefined;
461
+ }[] | undefined;
462
+ }[] | undefined;
463
+ tables?: {
464
+ id: string;
465
+ name: string;
466
+ ddl: string;
467
+ fields?: {
468
+ type: string;
469
+ name: string;
470
+ default?: string | undefined;
471
+ required?: boolean | undefined;
472
+ desc?: string | undefined;
473
+ }[] | undefined;
474
+ migration?: string | undefined;
475
+ rollback?: string | undefined;
476
+ }[] | undefined;
477
+ decisions?: {
478
+ id: string;
479
+ text: string;
480
+ }[] | undefined;
481
+ }>;
482
+ export type Entities = z.infer<typeof EntitiesSchema>;
483
+ export declare const OutlinePointKindSchema: z.ZodEnum<["entity", "narrative", "mixed"]>;
484
+ export type OutlinePointKind = z.infer<typeof OutlinePointKindSchema>;
485
+ export declare const OutlinePointSchema: z.ZodObject<{
486
+ id: z.ZodString;
487
+ text: z.ZodString;
488
+ required: z.ZodDefault<z.ZodBoolean>;
489
+ kind: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
490
+ references: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
491
+ source_segments: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
492
+ }, "strip", z.ZodTypeAny, {
493
+ id: string;
494
+ references: string[];
495
+ kind: "entity" | "narrative" | "mixed";
496
+ required: boolean;
497
+ text: string;
498
+ source_segments: string[];
499
+ }, {
500
+ id: string;
501
+ text: string;
502
+ references?: string[] | undefined;
503
+ kind?: "entity" | "narrative" | "mixed" | undefined;
504
+ required?: boolean | undefined;
505
+ source_segments?: string[] | undefined;
506
+ }>;
507
+ export type OutlinePoint = z.infer<typeof OutlinePointSchema>;
508
+ export declare const OutlineChapterSchema: z.ZodObject<{
509
+ id: z.ZodString;
510
+ title: z.ZodString;
511
+ points: z.ZodArray<z.ZodObject<{
512
+ id: z.ZodString;
513
+ text: z.ZodString;
514
+ required: z.ZodDefault<z.ZodBoolean>;
515
+ kind: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
516
+ references: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
517
+ source_segments: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
518
+ }, "strip", z.ZodTypeAny, {
519
+ id: string;
520
+ references: string[];
521
+ kind: "entity" | "narrative" | "mixed";
522
+ required: boolean;
523
+ text: string;
524
+ source_segments: string[];
525
+ }, {
526
+ id: string;
527
+ text: string;
528
+ references?: string[] | undefined;
529
+ kind?: "entity" | "narrative" | "mixed" | undefined;
530
+ required?: boolean | undefined;
531
+ source_segments?: string[] | undefined;
532
+ }>, "many">;
533
+ optional: z.ZodDefault<z.ZodBoolean>;
534
+ }, "strip", z.ZodTypeAny, {
535
+ id: string;
536
+ title: string;
537
+ points: {
538
+ id: string;
539
+ references: string[];
540
+ kind: "entity" | "narrative" | "mixed";
541
+ required: boolean;
542
+ text: string;
543
+ source_segments: string[];
544
+ }[];
545
+ optional: boolean;
546
+ }, {
547
+ id: string;
548
+ title: string;
549
+ points: {
550
+ id: string;
551
+ text: string;
552
+ references?: string[] | undefined;
553
+ kind?: "entity" | "narrative" | "mixed" | undefined;
554
+ required?: boolean | undefined;
555
+ source_segments?: string[] | undefined;
556
+ }[];
557
+ optional?: boolean | undefined;
558
+ }>;
559
+ export type OutlineChapter = z.infer<typeof OutlineChapterSchema>;
560
+ export declare const OutlineEntitySchema: z.ZodObject<{
561
+ id: z.ZodString;
562
+ frozen: z.ZodString;
563
+ standalone: z.ZodDefault<z.ZodBoolean>;
564
+ }, "strip", z.ZodTypeAny, {
565
+ standalone: boolean;
566
+ id: string;
567
+ frozen: string;
568
+ }, {
569
+ id: string;
570
+ frozen: string;
571
+ standalone?: boolean | undefined;
572
+ }>;
573
+ export type OutlineEntity = z.infer<typeof OutlineEntitySchema>;
574
+ export declare const FillOnceSchema: z.ZodObject<{
575
+ enabled: z.ZodDefault<z.ZodBoolean>;
576
+ input_budget_tokens: z.ZodDefault<z.ZodNumber>;
577
+ }, "strip", z.ZodTypeAny, {
578
+ enabled: boolean;
579
+ input_budget_tokens: number;
580
+ }, {
581
+ enabled?: boolean | undefined;
582
+ input_budget_tokens?: number | undefined;
583
+ }>;
584
+ export type FillOnce = z.infer<typeof FillOnceSchema>;
585
+ export declare const OutlineSchema: z.ZodObject<{
586
+ profile: z.ZodString;
587
+ chapters: z.ZodArray<z.ZodObject<{
588
+ id: z.ZodString;
589
+ title: z.ZodString;
590
+ points: z.ZodArray<z.ZodObject<{
591
+ id: z.ZodString;
592
+ text: z.ZodString;
593
+ required: z.ZodDefault<z.ZodBoolean>;
594
+ kind: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
595
+ references: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
596
+ source_segments: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
597
+ }, "strip", z.ZodTypeAny, {
598
+ id: string;
599
+ references: string[];
600
+ kind: "entity" | "narrative" | "mixed";
601
+ required: boolean;
602
+ text: string;
603
+ source_segments: string[];
604
+ }, {
605
+ id: string;
606
+ text: string;
607
+ references?: string[] | undefined;
608
+ kind?: "entity" | "narrative" | "mixed" | undefined;
609
+ required?: boolean | undefined;
610
+ source_segments?: string[] | undefined;
611
+ }>, "many">;
612
+ optional: z.ZodDefault<z.ZodBoolean>;
613
+ }, "strip", z.ZodTypeAny, {
614
+ id: string;
615
+ title: string;
616
+ points: {
617
+ id: string;
618
+ references: string[];
619
+ kind: "entity" | "narrative" | "mixed";
620
+ required: boolean;
621
+ text: string;
622
+ source_segments: string[];
623
+ }[];
624
+ optional: boolean;
625
+ }, {
626
+ id: string;
627
+ title: string;
628
+ points: {
629
+ id: string;
630
+ text: string;
631
+ references?: string[] | undefined;
632
+ kind?: "entity" | "narrative" | "mixed" | undefined;
633
+ required?: boolean | undefined;
634
+ source_segments?: string[] | undefined;
635
+ }[];
636
+ optional?: boolean | undefined;
637
+ }>, "many">;
638
+ entities: z.ZodDefault<z.ZodArray<z.ZodObject<{
639
+ id: z.ZodString;
640
+ frozen: z.ZodString;
641
+ standalone: z.ZodDefault<z.ZodBoolean>;
642
+ }, "strip", z.ZodTypeAny, {
643
+ standalone: boolean;
644
+ id: string;
645
+ frozen: string;
646
+ }, {
647
+ id: string;
648
+ frozen: string;
649
+ standalone?: boolean | undefined;
650
+ }>, "many">>;
651
+ decisions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
652
+ fill_once: z.ZodOptional<z.ZodObject<{
653
+ enabled: z.ZodDefault<z.ZodBoolean>;
654
+ input_budget_tokens: z.ZodDefault<z.ZodNumber>;
655
+ }, "strip", z.ZodTypeAny, {
656
+ enabled: boolean;
657
+ input_budget_tokens: number;
658
+ }, {
659
+ enabled?: boolean | undefined;
660
+ input_budget_tokens?: number | undefined;
661
+ }>>;
662
+ }, "strip", z.ZodTypeAny, {
663
+ profile: string;
664
+ decisions: string[];
665
+ chapters: {
666
+ id: string;
667
+ title: string;
668
+ points: {
669
+ id: string;
670
+ references: string[];
671
+ kind: "entity" | "narrative" | "mixed";
672
+ required: boolean;
673
+ text: string;
674
+ source_segments: string[];
675
+ }[];
676
+ optional: boolean;
677
+ }[];
678
+ entities: {
679
+ standalone: boolean;
680
+ id: string;
681
+ frozen: string;
682
+ }[];
683
+ fill_once?: {
684
+ enabled: boolean;
685
+ input_budget_tokens: number;
686
+ } | undefined;
687
+ }, {
688
+ profile: string;
689
+ chapters: {
690
+ id: string;
691
+ title: string;
692
+ points: {
693
+ id: string;
694
+ text: string;
695
+ references?: string[] | undefined;
696
+ kind?: "entity" | "narrative" | "mixed" | undefined;
697
+ required?: boolean | undefined;
698
+ source_segments?: string[] | undefined;
699
+ }[];
700
+ optional?: boolean | undefined;
701
+ }[];
702
+ decisions?: string[] | undefined;
703
+ entities?: {
704
+ id: string;
705
+ frozen: string;
706
+ standalone?: boolean | undefined;
707
+ }[] | undefined;
708
+ fill_once?: {
709
+ enabled?: boolean | undefined;
710
+ input_budget_tokens?: number | undefined;
711
+ } | undefined;
712
+ }>;
713
+ export type Outline = z.infer<typeof OutlineSchema>;
714
+ export declare const ConstraintItemKindSchema: z.ZodEnum<["entity", "decision", "point"]>;
715
+ export type ConstraintItemKind = z.infer<typeof ConstraintItemKindSchema>;
716
+ export declare const ConstraintItemSchema: z.ZodObject<{
717
+ kind: z.ZodEnum<["entity", "decision", "point"]>;
718
+ id: z.ZodString;
719
+ label: z.ZodString;
720
+ }, "strip", z.ZodTypeAny, {
721
+ id: string;
722
+ kind: "entity" | "decision" | "point";
723
+ label: string;
724
+ }, {
725
+ id: string;
726
+ kind: "entity" | "decision" | "point";
727
+ label: string;
728
+ }>;
729
+ export type ConstraintItem = z.infer<typeof ConstraintItemSchema>;
730
+ export declare const ChapterComponentSchema: z.ZodObject<{
731
+ id: z.ZodString;
732
+ title: z.ZodString;
733
+ when: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
734
+ depends_on: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
735
+ outline_points: z.ZodDefault<z.ZodArray<z.ZodObject<{
736
+ id: z.ZodString;
737
+ text: z.ZodString;
738
+ required: z.ZodDefault<z.ZodBoolean>;
739
+ kind: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
740
+ references: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
741
+ source_segments: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
742
+ }, "strip", z.ZodTypeAny, {
743
+ id: string;
744
+ references: string[];
745
+ kind: "entity" | "narrative" | "mixed";
746
+ required: boolean;
747
+ text: string;
748
+ source_segments: string[];
749
+ }, {
750
+ id: string;
751
+ text: string;
752
+ references?: string[] | undefined;
753
+ kind?: "entity" | "narrative" | "mixed" | undefined;
754
+ required?: boolean | undefined;
755
+ source_segments?: string[] | undefined;
756
+ }>, "many">>;
757
+ entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
758
+ narratives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
759
+ gates: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
760
+ map_prompt: z.ZodOptional<z.ZodString>;
761
+ output_budget_tokens: z.ZodOptional<z.ZodNumber>;
762
+ }, "strip", z.ZodTypeAny, {
763
+ id: string;
764
+ title: string;
765
+ depends_on: string[];
766
+ outline_points: {
767
+ id: string;
768
+ references: string[];
769
+ kind: "entity" | "narrative" | "mixed";
770
+ required: boolean;
771
+ text: string;
772
+ source_segments: string[];
773
+ }[];
774
+ gates: string[];
775
+ when?: string | undefined;
776
+ entities?: Record<string, any> | undefined;
777
+ narratives?: Record<string, any> | undefined;
778
+ map_prompt?: string | undefined;
779
+ output_budget_tokens?: number | undefined;
780
+ }, {
781
+ id: string;
782
+ title: string;
783
+ when?: unknown;
784
+ entities?: Record<string, any> | undefined;
785
+ depends_on?: string[] | undefined;
786
+ outline_points?: {
787
+ id: string;
788
+ text: string;
789
+ references?: string[] | undefined;
790
+ kind?: "entity" | "narrative" | "mixed" | undefined;
791
+ required?: boolean | undefined;
792
+ source_segments?: string[] | undefined;
793
+ }[] | undefined;
794
+ narratives?: Record<string, any> | undefined;
795
+ gates?: string[] | undefined;
796
+ map_prompt?: string | undefined;
797
+ output_budget_tokens?: number | undefined;
798
+ }>;
799
+ export type ChapterComponent = z.infer<typeof ChapterComponentSchema>;
800
+ export declare const ScenarioProfileSchema: z.ZodObject<{
801
+ id: z.ZodString;
802
+ name: z.ZodString;
803
+ required: z.ZodArray<z.ZodString, "many">;
804
+ optional_candidates: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
805
+ forbidden: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
806
+ shared: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
807
+ }, "strip", z.ZodTypeAny, {
808
+ id: string;
809
+ name: string;
810
+ required: string[];
811
+ optional_candidates: string[];
812
+ forbidden: string[];
813
+ shared: string[];
814
+ }, {
815
+ id: string;
816
+ name: string;
817
+ required: string[];
818
+ optional_candidates?: string[] | undefined;
819
+ forbidden?: string[] | undefined;
820
+ shared?: string[] | undefined;
821
+ }>;
822
+ export type ScenarioProfile = z.infer<typeof ScenarioProfileSchema>;
823
+ export declare const ReviewTargetSchema: z.ZodEnum<["entity", "narrative", "mixed"]>;
824
+ export type ReviewTarget = z.infer<typeof ReviewTargetSchema>;
825
+ export declare const ReviewFindingSchema: z.ZodObject<{
826
+ id: z.ZodString;
827
+ severity: z.ZodEnum<["critical", "important", "minor"]>;
828
+ category: z.ZodString;
829
+ message: z.ZodString;
830
+ target: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
831
+ chapter: z.ZodOptional<z.ZodString>;
832
+ status: z.ZodDefault<z.ZodEnum<["open", "fixed", "waived"]>>;
833
+ waiver_reason: z.ZodOptional<z.ZodString>;
834
+ }, "strip", z.ZodTypeAny, {
835
+ status: "fixed" | "open" | "waived";
836
+ message: string;
837
+ id: string;
838
+ severity: "critical" | "important" | "minor";
839
+ target: "entity" | "narrative" | "mixed";
840
+ category: string;
841
+ chapter?: string | undefined;
842
+ waiver_reason?: string | undefined;
843
+ }, {
844
+ message: string;
845
+ id: string;
846
+ severity: "critical" | "important" | "minor";
847
+ category: string;
848
+ status?: "fixed" | "open" | "waived" | undefined;
849
+ target?: "entity" | "narrative" | "mixed" | undefined;
850
+ chapter?: string | undefined;
851
+ waiver_reason?: string | undefined;
852
+ }>;
853
+ export type ReviewFinding = z.infer<typeof ReviewFindingSchema>;
854
+ export declare const ReviewResultSchema: z.ZodObject<{
855
+ schema: z.ZodLiteral<"specflow.document.review/v1">;
856
+ change: z.ZodString;
857
+ reviewed_at: z.ZodString;
858
+ reviewer: z.ZodDefault<z.ZodEnum<["ai", "human"]>>;
859
+ verdict: z.ZodEnum<["pass", "fail", "pass_with_waivers"]>;
860
+ summary: z.ZodOptional<z.ZodString>;
861
+ findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
862
+ id: z.ZodString;
863
+ severity: z.ZodEnum<["critical", "important", "minor"]>;
864
+ category: z.ZodString;
865
+ message: z.ZodString;
866
+ target: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
867
+ chapter: z.ZodOptional<z.ZodString>;
868
+ status: z.ZodDefault<z.ZodEnum<["open", "fixed", "waived"]>>;
869
+ waiver_reason: z.ZodOptional<z.ZodString>;
870
+ }, "strip", z.ZodTypeAny, {
871
+ status: "fixed" | "open" | "waived";
872
+ message: string;
873
+ id: string;
874
+ severity: "critical" | "important" | "minor";
875
+ target: "entity" | "narrative" | "mixed";
876
+ category: string;
877
+ chapter?: string | undefined;
878
+ waiver_reason?: string | undefined;
879
+ }, {
880
+ message: string;
881
+ id: string;
882
+ severity: "critical" | "important" | "minor";
883
+ category: string;
884
+ status?: "fixed" | "open" | "waived" | undefined;
885
+ target?: "entity" | "narrative" | "mixed" | undefined;
886
+ chapter?: string | undefined;
887
+ waiver_reason?: string | undefined;
888
+ }>, "many">>;
889
+ part_hashes: z.ZodDefault<z.ZodArray<z.ZodObject<{
890
+ id: z.ZodString;
891
+ sha256: z.ZodString;
892
+ }, "strip", z.ZodTypeAny, {
893
+ id: string;
894
+ sha256: string;
895
+ }, {
896
+ id: string;
897
+ sha256: string;
898
+ }>, "many">>;
899
+ }, "strip", z.ZodTypeAny, {
900
+ schema: "specflow.document.review/v1";
901
+ change: string;
902
+ reviewed_at: string;
903
+ reviewer: "ai" | "human";
904
+ verdict: "fail" | "pass" | "pass_with_waivers";
905
+ findings: {
906
+ status: "fixed" | "open" | "waived";
907
+ message: string;
908
+ id: string;
909
+ severity: "critical" | "important" | "minor";
910
+ target: "entity" | "narrative" | "mixed";
911
+ category: string;
912
+ chapter?: string | undefined;
913
+ waiver_reason?: string | undefined;
914
+ }[];
915
+ part_hashes: {
916
+ id: string;
917
+ sha256: string;
918
+ }[];
919
+ summary?: string | undefined;
920
+ }, {
921
+ schema: "specflow.document.review/v1";
922
+ change: string;
923
+ reviewed_at: string;
924
+ verdict: "fail" | "pass" | "pass_with_waivers";
925
+ reviewer?: "ai" | "human" | undefined;
926
+ summary?: string | undefined;
927
+ findings?: {
928
+ message: string;
929
+ id: string;
930
+ severity: "critical" | "important" | "minor";
931
+ category: string;
932
+ status?: "fixed" | "open" | "waived" | undefined;
933
+ target?: "entity" | "narrative" | "mixed" | undefined;
934
+ chapter?: string | undefined;
935
+ waiver_reason?: string | undefined;
936
+ }[] | undefined;
937
+ part_hashes?: {
938
+ id: string;
939
+ sha256: string;
940
+ }[] | undefined;
941
+ }>;
942
+ export type ReviewResult = z.infer<typeof ReviewResultSchema>;
943
+ export declare function parseReviewResult(raw: unknown): ReviewResult;
944
+ export declare function parseInterfaceEntity(raw: unknown): InterfaceEntity;
945
+ export declare function parseTableEntity(raw: unknown): TableEntity;
946
+ export declare function parseEntities(raw: unknown): Entities;
947
+ export declare function parseOutline(raw: unknown): Outline;
948
+ export declare function parseChapterComponent(raw: unknown): ChapterComponent;
949
+ export declare function parseScenarioProfile(raw: unknown): ScenarioProfile;