@gordon.gan/specflow 1.8.0-beta → 1.8.2-beta

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 (181) hide show
  1. package/README.md +7 -5
  2. package/dist/cli/commands/document-run.d.ts +98 -0
  3. package/dist/cli/commands/document-run.js +1064 -0
  4. package/dist/cli/index.js +2 -2
  5. package/dist/core/artifact-language.js +11 -1
  6. package/dist/core/document/asset-paths.d.ts +15 -0
  7. package/dist/core/document/asset-paths.js +38 -0
  8. package/dist/core/document/chapters.d.ts +6 -0
  9. package/dist/core/document/chapters.js +38 -0
  10. package/dist/core/document/coverage.d.ts +25 -0
  11. package/dist/core/document/coverage.js +49 -0
  12. package/dist/core/document/digests.d.ts +40 -0
  13. package/dist/core/document/digests.js +144 -0
  14. package/dist/core/document/engine.d.ts +101 -0
  15. package/dist/core/document/engine.js +722 -0
  16. package/dist/core/document/extract.d.ts +61 -0
  17. package/dist/core/document/extract.js +437 -0
  18. package/dist/core/{approval → document}/forbidden-patterns.d.ts +4 -2
  19. package/dist/core/document/forbidden-patterns.js +36 -0
  20. package/dist/core/document/gates.d.ts +39 -0
  21. package/dist/core/document/gates.js +75 -0
  22. package/dist/core/document/input-digest.d.ts +63 -0
  23. package/dist/core/document/input-digest.js +200 -0
  24. package/dist/core/document/input-features.d.ts +43 -0
  25. package/dist/core/document/input-features.js +161 -0
  26. package/dist/core/document/lint.d.ts +39 -0
  27. package/dist/core/document/lint.js +147 -0
  28. package/dist/core/document/llm.d.ts +28 -0
  29. package/dist/core/document/llm.js +22 -0
  30. package/dist/core/document/map.d.ts +52 -0
  31. package/dist/core/document/map.js +296 -0
  32. package/dist/core/document/outline.d.ts +29 -0
  33. package/dist/core/document/outline.js +171 -0
  34. package/dist/core/document/paths.d.ts +23 -0
  35. package/dist/core/document/paths.js +36 -0
  36. package/dist/core/document/profile-validator.d.ts +23 -0
  37. package/dist/core/document/profile-validator.js +155 -0
  38. package/dist/core/document/profiles.d.ts +23 -0
  39. package/dist/core/document/profiles.js +76 -0
  40. package/dist/core/document/render.d.ts +61 -0
  41. package/dist/core/document/render.js +243 -0
  42. package/dist/core/document/review.d.ts +57 -0
  43. package/dist/core/document/review.js +202 -0
  44. package/dist/core/document/scene-detect.d.ts +32 -0
  45. package/dist/core/document/scene-detect.js +237 -0
  46. package/dist/core/document/schemas.d.ts +1111 -0
  47. package/dist/core/document/schemas.js +191 -0
  48. package/dist/integrations/shared/capability-evidence.js +4 -9
  49. package/dist/integrations/shared/command-catalog.js +2 -1
  50. package/dist/integrations/shared/parity-manifest.js +4 -9
  51. package/package.json +2 -1
  52. package/prompts/apply/phase-a-plan.md +1 -1
  53. package/prompts/document/map/acceptance.md +9 -0
  54. package/prompts/document/map/anti-ai.md +29 -0
  55. package/prompts/document/map/api-design.md +26 -0
  56. package/prompts/document/map/architecture.md +27 -0
  57. package/prompts/document/map/benchmark.md +26 -0
  58. package/prompts/document/map/closed-loop.md +9 -0
  59. package/prompts/document/map/compat-migration.md +31 -0
  60. package/prompts/document/map/component-design.md +30 -0
  61. package/prompts/document/map/config-runtime.md +9 -0
  62. package/prompts/document/map/core-flow.md +62 -0
  63. package/prompts/document/map/core-logic.md +9 -0
  64. package/prompts/document/map/data-model.md +18 -0
  65. package/prompts/document/map/deploy.md +26 -0
  66. package/prompts/document/map/fix.md +8 -0
  67. package/prompts/document/map/frontend-architecture.md +35 -0
  68. package/prompts/document/map/goal.md +8 -0
  69. package/prompts/document/map/impact.md +8 -0
  70. package/prompts/document/map/implementability.md +9 -0
  71. package/prompts/document/map/migration-guide.md +36 -0
  72. package/prompts/document/map/mvp-boundary.md +8 -0
  73. package/prompts/document/map/non-goals.md +8 -0
  74. package/prompts/document/map/ops.md +33 -0
  75. package/prompts/document/map/performance.md +32 -0
  76. package/prompts/document/map/poc-demo.md +25 -0
  77. package/prompts/document/map/regression.md +8 -0
  78. package/prompts/document/map/reproduce.md +8 -0
  79. package/prompts/document/map/requirement.md +8 -0
  80. package/prompts/document/map/research.md +25 -0
  81. package/prompts/document/map/root-cause.md +8 -0
  82. package/prompts/document/map/signoff.md +9 -0
  83. package/prompts/document/map/state-management.md +23 -0
  84. package/prompts/document/map/tech-selection.md +29 -0
  85. package/prompts/document/map/test-strategy.md +24 -0
  86. package/prompts/document/map/ui-design.md +21 -0
  87. package/prompts/document/outline/general.md +46 -0
  88. package/prompts/document/review/ai-review.md +57 -0
  89. package/prompts/document/shared/grounding.md +84 -0
  90. package/prompts/explore/explore-session.md +1 -1
  91. package/prompts/propose/design-draft.md +1 -1
  92. package/prompts/propose/proposal.md +1 -1
  93. package/prompts/propose/specs.md +1 -1
  94. package/prompts/propose/tasks-draft.md +1 -1
  95. package/prompts/refine/design-output.md +1 -1
  96. package/prompts/refine/update-artifacts.md +2 -0
  97. package/prompts/shared/artifact-language.md +13 -0
  98. package/skills/specflow-techdoc/SKILL.md +143 -0
  99. package/skills/specflow-techdoc-synth/SKILL.md +115 -0
  100. package/templates/document/chapters/acceptance.yaml +16 -0
  101. package/templates/document/chapters/api-design.yaml +29 -0
  102. package/templates/document/chapters/architecture.yaml +21 -0
  103. package/templates/document/chapters/benchmark.yaml +20 -0
  104. package/templates/document/chapters/closed-loop.yaml +22 -0
  105. package/templates/document/chapters/compat-migration.yaml +21 -0
  106. package/templates/document/chapters/component-design.yaml +22 -0
  107. package/templates/document/chapters/config-runtime.yaml +16 -0
  108. package/templates/document/chapters/core-flow.yaml +27 -0
  109. package/templates/document/chapters/core-logic.yaml +16 -0
  110. package/templates/document/chapters/data-model.yaml +25 -0
  111. package/templates/document/chapters/deploy.yaml +22 -0
  112. package/templates/document/chapters/fix.yaml +18 -0
  113. package/templates/document/chapters/frontend-architecture.yaml +22 -0
  114. package/templates/document/chapters/goal.yaml +17 -0
  115. package/templates/document/chapters/impact.yaml +16 -0
  116. package/templates/document/chapters/implementability.yaml +22 -0
  117. package/templates/document/chapters/migration-guide.yaml +21 -0
  118. package/templates/document/chapters/mvp-boundary.yaml +20 -0
  119. package/templates/document/chapters/non-goals.yaml +17 -0
  120. package/templates/document/chapters/ops.yaml +25 -0
  121. package/templates/document/chapters/performance.yaml +21 -0
  122. package/templates/document/chapters/poc-demo.yaml +22 -0
  123. package/templates/document/chapters/regression.yaml +16 -0
  124. package/templates/document/chapters/reproduce.yaml +16 -0
  125. package/templates/document/chapters/requirement.yaml +18 -0
  126. package/templates/document/chapters/research.yaml +22 -0
  127. package/templates/document/chapters/root-cause.yaml +18 -0
  128. package/templates/document/chapters/signoff.yaml +15 -0
  129. package/templates/document/chapters/state-management.yaml +22 -0
  130. package/templates/document/chapters/tech-selection.yaml +23 -0
  131. package/templates/document/chapters/test-strategy.yaml +23 -0
  132. package/templates/document/chapters/ui-design.yaml +28 -0
  133. package/templates/document/profiles/0to1.yaml +44 -0
  134. package/templates/document/profiles/approve.yaml +22 -0
  135. package/templates/document/profiles/bugfix.yaml +15 -0
  136. package/templates/document/profiles/feature.yaml +23 -0
  137. package/templates/document/profiles/frontend-0to1.yaml +47 -0
  138. package/templates/document/profiles/migration.yaml +42 -0
  139. package/templates/document/profiles/poc.yaml +46 -0
  140. package/dist/cli/commands/approval-assemble.d.ts +0 -64
  141. package/dist/cli/commands/approval-assemble.js +0 -408
  142. package/dist/core/approval/assemble.d.ts +0 -10
  143. package/dist/core/approval/assemble.js +0 -384
  144. package/dist/core/approval/bundle.d.ts +0 -9
  145. package/dist/core/approval/bundle.js +0 -172
  146. package/dist/core/approval/forbidden-patterns.js +0 -40
  147. package/dist/core/approval/index-schema.d.ts +0 -676
  148. package/dist/core/approval/index-schema.js +0 -193
  149. package/dist/core/approval/index.d.ts +0 -12
  150. package/dist/core/approval/index.js +0 -9
  151. package/dist/core/approval/lint.d.ts +0 -10
  152. package/dist/core/approval/lint.js +0 -302
  153. package/dist/core/approval/paths.d.ts +0 -13
  154. package/dist/core/approval/paths.js +0 -43
  155. package/dist/core/approval/pipeline.d.ts +0 -28
  156. package/dist/core/approval/pipeline.js +0 -146
  157. package/dist/core/approval/playbook-schema.d.ts +0 -182
  158. package/dist/core/approval/playbook-schema.js +0 -51
  159. package/dist/core/approval/render.d.ts +0 -20
  160. package/dist/core/approval/render.js +0 -210
  161. package/dist/core/approval/review-pack.d.ts +0 -26
  162. package/dist/core/approval/review-pack.js +0 -205
  163. package/dist/core/approval/types.d.ts +0 -223
  164. package/dist/core/approval/types.js +0 -1
  165. package/prompts/approval/acp-pipeline.md +0 -106
  166. package/prompts/approval/ai-review.md +0 -145
  167. package/prompts/approval/api-guidance.md +0 -179
  168. package/prompts/approval/database-guidance.md +0 -105
  169. package/prompts/approval/frontend-guidance.md +0 -249
  170. package/prompts/approval/generate.md +0 -1596
  171. package/prompts/approval/multi-repo-guidance.md +0 -263
  172. package/prompts/approval/multi-repo-spoke-subagent.md +0 -94
  173. package/prompts/approval/project-conventions-guidance.md +0 -171
  174. package/prompts/approval/runtime-guidance.md +0 -64
  175. package/prompts/approval/segmented-generation.md +0 -157
  176. package/skills/specflow-approval/SKILL.md +0 -778
  177. package/templates/approval-index.yaml +0 -93
  178. package/templates/approval-part.md +0 -15
  179. package/templates/approval-playbook-talos-scenario-job-compile.yaml +0 -29
  180. package/templates/approval-playbook.yaml +0 -28
  181. package/templates/approval.md +0 -261
@@ -0,0 +1,1111 @@
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 declare const InterfaceEntitySchema: z.ZodObject<{
47
+ id: z.ZodString;
48
+ name: z.ZodString;
49
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
50
+ path: z.ZodString;
51
+ request_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ name: z.ZodString;
53
+ type: z.ZodString;
54
+ required: z.ZodDefault<z.ZodBoolean>;
55
+ desc: z.ZodOptional<z.ZodString>;
56
+ default: z.ZodOptional<z.ZodString>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ type: string;
59
+ name: string;
60
+ required: boolean;
61
+ default?: string | undefined;
62
+ desc?: string | undefined;
63
+ }, {
64
+ type: string;
65
+ name: string;
66
+ default?: string | undefined;
67
+ required?: boolean | undefined;
68
+ desc?: string | undefined;
69
+ }>, "many">>;
70
+ response_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
71
+ name: z.ZodString;
72
+ type: z.ZodString;
73
+ required: z.ZodDefault<z.ZodBoolean>;
74
+ desc: z.ZodOptional<z.ZodString>;
75
+ default: z.ZodOptional<z.ZodString>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ type: string;
78
+ name: string;
79
+ required: boolean;
80
+ default?: string | undefined;
81
+ desc?: string | undefined;
82
+ }, {
83
+ type: string;
84
+ name: string;
85
+ default?: string | undefined;
86
+ required?: boolean | undefined;
87
+ desc?: string | undefined;
88
+ }>, "many">>;
89
+ errors: z.ZodArray<z.ZodObject<{
90
+ condition: z.ZodString;
91
+ status: z.ZodString;
92
+ note: z.ZodOptional<z.ZodString>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ status: string;
95
+ condition: string;
96
+ note?: string | undefined;
97
+ }, {
98
+ status: string;
99
+ condition: string;
100
+ note?: string | undefined;
101
+ }>, "many">;
102
+ failure_examples: z.ZodArray<z.ZodString, "many">;
103
+ }, "strip", z.ZodTypeAny, {
104
+ path: string;
105
+ id: string;
106
+ name: string;
107
+ errors: {
108
+ status: string;
109
+ condition: string;
110
+ note?: string | undefined;
111
+ }[];
112
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
113
+ failure_examples: string[];
114
+ request_fields?: {
115
+ type: string;
116
+ name: string;
117
+ required: boolean;
118
+ default?: string | undefined;
119
+ desc?: string | undefined;
120
+ }[] | undefined;
121
+ response_fields?: {
122
+ type: string;
123
+ name: string;
124
+ required: boolean;
125
+ default?: string | undefined;
126
+ desc?: string | undefined;
127
+ }[] | undefined;
128
+ }, {
129
+ path: string;
130
+ id: string;
131
+ name: string;
132
+ errors: {
133
+ status: string;
134
+ condition: string;
135
+ note?: string | undefined;
136
+ }[];
137
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
138
+ failure_examples: string[];
139
+ request_fields?: {
140
+ type: string;
141
+ name: string;
142
+ default?: string | undefined;
143
+ required?: boolean | undefined;
144
+ desc?: string | undefined;
145
+ }[] | undefined;
146
+ response_fields?: {
147
+ type: string;
148
+ name: string;
149
+ default?: string | undefined;
150
+ required?: boolean | undefined;
151
+ desc?: string | undefined;
152
+ }[] | undefined;
153
+ }>;
154
+ export type InterfaceEntity = z.infer<typeof InterfaceEntitySchema>;
155
+ export declare const TableEntitySchema: z.ZodObject<{
156
+ id: z.ZodString;
157
+ name: z.ZodString;
158
+ ddl: z.ZodString;
159
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
160
+ name: z.ZodString;
161
+ type: z.ZodString;
162
+ required: z.ZodDefault<z.ZodBoolean>;
163
+ desc: z.ZodOptional<z.ZodString>;
164
+ default: z.ZodOptional<z.ZodString>;
165
+ }, "strip", z.ZodTypeAny, {
166
+ type: string;
167
+ name: string;
168
+ required: boolean;
169
+ default?: string | undefined;
170
+ desc?: string | undefined;
171
+ }, {
172
+ type: string;
173
+ name: string;
174
+ default?: string | undefined;
175
+ required?: boolean | undefined;
176
+ desc?: string | undefined;
177
+ }>, "many">>;
178
+ migration: z.ZodOptional<z.ZodString>;
179
+ rollback: z.ZodOptional<z.ZodString>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ id: string;
182
+ name: string;
183
+ ddl: string;
184
+ fields?: {
185
+ type: string;
186
+ name: string;
187
+ required: boolean;
188
+ default?: string | undefined;
189
+ desc?: string | undefined;
190
+ }[] | undefined;
191
+ migration?: string | undefined;
192
+ rollback?: string | undefined;
193
+ }, {
194
+ id: string;
195
+ name: string;
196
+ ddl: string;
197
+ fields?: {
198
+ type: string;
199
+ name: string;
200
+ default?: string | undefined;
201
+ required?: boolean | undefined;
202
+ desc?: string | undefined;
203
+ }[] | undefined;
204
+ migration?: string | undefined;
205
+ rollback?: string | undefined;
206
+ }>;
207
+ export type TableEntity = z.infer<typeof TableEntitySchema>;
208
+ export declare const DecisionEntitySchema: z.ZodObject<{
209
+ id: z.ZodString;
210
+ text: z.ZodString;
211
+ }, "strip", z.ZodTypeAny, {
212
+ id: string;
213
+ text: string;
214
+ }, {
215
+ id: string;
216
+ text: string;
217
+ }>;
218
+ export type DecisionEntity = z.infer<typeof DecisionEntitySchema>;
219
+ export declare const EntitiesSchema: z.ZodObject<{
220
+ interfaces: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
221
+ id: z.ZodString;
222
+ name: z.ZodString;
223
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
224
+ path: z.ZodString;
225
+ request_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
226
+ name: z.ZodString;
227
+ type: z.ZodString;
228
+ required: z.ZodDefault<z.ZodBoolean>;
229
+ desc: z.ZodOptional<z.ZodString>;
230
+ default: z.ZodOptional<z.ZodString>;
231
+ }, "strip", z.ZodTypeAny, {
232
+ type: string;
233
+ name: string;
234
+ required: boolean;
235
+ default?: string | undefined;
236
+ desc?: string | undefined;
237
+ }, {
238
+ type: string;
239
+ name: string;
240
+ default?: string | undefined;
241
+ required?: boolean | undefined;
242
+ desc?: string | undefined;
243
+ }>, "many">>;
244
+ response_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
245
+ name: z.ZodString;
246
+ type: z.ZodString;
247
+ required: z.ZodDefault<z.ZodBoolean>;
248
+ desc: z.ZodOptional<z.ZodString>;
249
+ default: z.ZodOptional<z.ZodString>;
250
+ }, "strip", z.ZodTypeAny, {
251
+ type: string;
252
+ name: string;
253
+ required: boolean;
254
+ default?: string | undefined;
255
+ desc?: string | undefined;
256
+ }, {
257
+ type: string;
258
+ name: string;
259
+ default?: string | undefined;
260
+ required?: boolean | undefined;
261
+ desc?: string | undefined;
262
+ }>, "many">>;
263
+ errors: z.ZodArray<z.ZodObject<{
264
+ condition: z.ZodString;
265
+ status: z.ZodString;
266
+ note: z.ZodOptional<z.ZodString>;
267
+ }, "strip", z.ZodTypeAny, {
268
+ status: string;
269
+ condition: string;
270
+ note?: string | undefined;
271
+ }, {
272
+ status: string;
273
+ condition: string;
274
+ note?: string | undefined;
275
+ }>, "many">;
276
+ failure_examples: z.ZodArray<z.ZodString, "many">;
277
+ }, "strip", z.ZodTypeAny, {
278
+ path: string;
279
+ id: string;
280
+ name: string;
281
+ errors: {
282
+ status: string;
283
+ condition: string;
284
+ note?: string | undefined;
285
+ }[];
286
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
287
+ failure_examples: string[];
288
+ request_fields?: {
289
+ type: string;
290
+ name: string;
291
+ required: boolean;
292
+ default?: string | undefined;
293
+ desc?: string | undefined;
294
+ }[] | undefined;
295
+ response_fields?: {
296
+ type: string;
297
+ name: string;
298
+ required: boolean;
299
+ default?: string | undefined;
300
+ desc?: string | undefined;
301
+ }[] | undefined;
302
+ }, {
303
+ path: string;
304
+ id: string;
305
+ name: string;
306
+ errors: {
307
+ status: string;
308
+ condition: string;
309
+ note?: string | undefined;
310
+ }[];
311
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
312
+ failure_examples: string[];
313
+ request_fields?: {
314
+ type: string;
315
+ name: string;
316
+ default?: string | undefined;
317
+ required?: boolean | undefined;
318
+ desc?: string | undefined;
319
+ }[] | undefined;
320
+ response_fields?: {
321
+ type: string;
322
+ name: string;
323
+ default?: string | undefined;
324
+ required?: boolean | undefined;
325
+ desc?: string | undefined;
326
+ }[] | undefined;
327
+ }>, "many">>, {
328
+ path: string;
329
+ id: string;
330
+ name: string;
331
+ errors: {
332
+ status: string;
333
+ condition: string;
334
+ note?: string | undefined;
335
+ }[];
336
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
337
+ failure_examples: string[];
338
+ request_fields?: {
339
+ type: string;
340
+ name: string;
341
+ required: boolean;
342
+ default?: string | undefined;
343
+ desc?: string | undefined;
344
+ }[] | undefined;
345
+ response_fields?: {
346
+ type: string;
347
+ name: string;
348
+ required: boolean;
349
+ default?: string | undefined;
350
+ desc?: string | undefined;
351
+ }[] | undefined;
352
+ }[], {
353
+ path: string;
354
+ id: string;
355
+ name: string;
356
+ errors: {
357
+ status: string;
358
+ condition: string;
359
+ note?: string | undefined;
360
+ }[];
361
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
362
+ failure_examples: string[];
363
+ request_fields?: {
364
+ type: string;
365
+ name: string;
366
+ default?: string | undefined;
367
+ required?: boolean | undefined;
368
+ desc?: string | undefined;
369
+ }[] | undefined;
370
+ response_fields?: {
371
+ type: string;
372
+ name: string;
373
+ default?: string | undefined;
374
+ required?: boolean | undefined;
375
+ desc?: string | undefined;
376
+ }[] | undefined;
377
+ }[] | undefined>;
378
+ tables: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
379
+ id: z.ZodString;
380
+ name: z.ZodString;
381
+ ddl: z.ZodString;
382
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
383
+ name: z.ZodString;
384
+ type: z.ZodString;
385
+ required: z.ZodDefault<z.ZodBoolean>;
386
+ desc: z.ZodOptional<z.ZodString>;
387
+ default: z.ZodOptional<z.ZodString>;
388
+ }, "strip", z.ZodTypeAny, {
389
+ type: string;
390
+ name: string;
391
+ required: boolean;
392
+ default?: string | undefined;
393
+ desc?: string | undefined;
394
+ }, {
395
+ type: string;
396
+ name: string;
397
+ default?: string | undefined;
398
+ required?: boolean | undefined;
399
+ desc?: string | undefined;
400
+ }>, "many">>;
401
+ migration: z.ZodOptional<z.ZodString>;
402
+ rollback: z.ZodOptional<z.ZodString>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ id: string;
405
+ name: string;
406
+ ddl: string;
407
+ fields?: {
408
+ type: string;
409
+ name: string;
410
+ required: boolean;
411
+ default?: string | undefined;
412
+ desc?: string | undefined;
413
+ }[] | undefined;
414
+ migration?: string | undefined;
415
+ rollback?: string | undefined;
416
+ }, {
417
+ id: string;
418
+ name: string;
419
+ ddl: string;
420
+ fields?: {
421
+ type: string;
422
+ name: string;
423
+ default?: string | undefined;
424
+ required?: boolean | undefined;
425
+ desc?: string | undefined;
426
+ }[] | undefined;
427
+ migration?: string | undefined;
428
+ rollback?: string | undefined;
429
+ }>, "many">>, {
430
+ id: string;
431
+ name: string;
432
+ ddl: string;
433
+ fields?: {
434
+ type: string;
435
+ name: string;
436
+ required: boolean;
437
+ default?: string | undefined;
438
+ desc?: string | undefined;
439
+ }[] | undefined;
440
+ migration?: string | undefined;
441
+ rollback?: string | undefined;
442
+ }[], {
443
+ id: string;
444
+ name: string;
445
+ ddl: string;
446
+ fields?: {
447
+ type: string;
448
+ name: string;
449
+ default?: string | undefined;
450
+ required?: boolean | undefined;
451
+ desc?: string | undefined;
452
+ }[] | undefined;
453
+ migration?: string | undefined;
454
+ rollback?: string | undefined;
455
+ }[] | undefined>;
456
+ decisions: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
457
+ id: z.ZodString;
458
+ text: z.ZodString;
459
+ }, "strip", z.ZodTypeAny, {
460
+ id: string;
461
+ text: string;
462
+ }, {
463
+ id: string;
464
+ text: string;
465
+ }>, "many">>, {
466
+ id: string;
467
+ text: string;
468
+ }[], {
469
+ id: string;
470
+ text: string;
471
+ }[] | undefined>;
472
+ }, "strip", z.ZodTypeAny, {
473
+ interfaces: {
474
+ path: string;
475
+ id: string;
476
+ name: string;
477
+ errors: {
478
+ status: string;
479
+ condition: string;
480
+ note?: string | undefined;
481
+ }[];
482
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
483
+ failure_examples: string[];
484
+ request_fields?: {
485
+ type: string;
486
+ name: string;
487
+ required: boolean;
488
+ default?: string | undefined;
489
+ desc?: string | undefined;
490
+ }[] | undefined;
491
+ response_fields?: {
492
+ type: string;
493
+ name: string;
494
+ required: boolean;
495
+ default?: string | undefined;
496
+ desc?: string | undefined;
497
+ }[] | undefined;
498
+ }[];
499
+ tables: {
500
+ id: string;
501
+ name: string;
502
+ ddl: string;
503
+ fields?: {
504
+ type: string;
505
+ name: string;
506
+ required: boolean;
507
+ default?: string | undefined;
508
+ desc?: string | undefined;
509
+ }[] | undefined;
510
+ migration?: string | undefined;
511
+ rollback?: string | undefined;
512
+ }[];
513
+ decisions: {
514
+ id: string;
515
+ text: string;
516
+ }[];
517
+ }, {
518
+ interfaces?: {
519
+ path: string;
520
+ id: string;
521
+ name: string;
522
+ errors: {
523
+ status: string;
524
+ condition: string;
525
+ note?: string | undefined;
526
+ }[];
527
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
528
+ failure_examples: string[];
529
+ request_fields?: {
530
+ type: string;
531
+ name: string;
532
+ default?: string | undefined;
533
+ required?: boolean | undefined;
534
+ desc?: string | undefined;
535
+ }[] | undefined;
536
+ response_fields?: {
537
+ type: string;
538
+ name: string;
539
+ default?: string | undefined;
540
+ required?: boolean | undefined;
541
+ desc?: string | undefined;
542
+ }[] | undefined;
543
+ }[] | undefined;
544
+ tables?: {
545
+ id: string;
546
+ name: string;
547
+ ddl: string;
548
+ fields?: {
549
+ type: string;
550
+ name: string;
551
+ default?: string | undefined;
552
+ required?: boolean | undefined;
553
+ desc?: string | undefined;
554
+ }[] | undefined;
555
+ migration?: string | undefined;
556
+ rollback?: string | undefined;
557
+ }[] | undefined;
558
+ decisions?: {
559
+ id: string;
560
+ text: string;
561
+ }[] | undefined;
562
+ }>;
563
+ export type Entities = z.infer<typeof EntitiesSchema>;
564
+ export declare const OutlinePointKindSchema: z.ZodEnum<["entity", "narrative", "mixed"]>;
565
+ export declare const OutlinePointSchema: z.ZodObject<{
566
+ id: z.ZodString;
567
+ text: z.ZodString;
568
+ required: z.ZodDefault<z.ZodBoolean>;
569
+ kind: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
570
+ references: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
571
+ source_segments: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
572
+ }, "strip", z.ZodTypeAny, {
573
+ id: string;
574
+ references: string[];
575
+ kind: "entity" | "narrative" | "mixed";
576
+ required: boolean;
577
+ text: string;
578
+ source_segments: string[];
579
+ }, {
580
+ id: string;
581
+ text: string;
582
+ references?: string[] | undefined;
583
+ kind?: "entity" | "narrative" | "mixed" | undefined;
584
+ required?: boolean | undefined;
585
+ source_segments?: string[] | undefined;
586
+ }>;
587
+ export type OutlinePoint = z.infer<typeof OutlinePointSchema>;
588
+ export declare const OutlineChapterSchema: z.ZodObject<{
589
+ id: z.ZodString;
590
+ title: z.ZodString;
591
+ points: z.ZodArray<z.ZodObject<{
592
+ id: z.ZodString;
593
+ text: z.ZodString;
594
+ required: z.ZodDefault<z.ZodBoolean>;
595
+ kind: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
596
+ references: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
597
+ source_segments: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
598
+ }, "strip", z.ZodTypeAny, {
599
+ id: string;
600
+ references: string[];
601
+ kind: "entity" | "narrative" | "mixed";
602
+ required: boolean;
603
+ text: string;
604
+ source_segments: string[];
605
+ }, {
606
+ id: string;
607
+ text: string;
608
+ references?: string[] | undefined;
609
+ kind?: "entity" | "narrative" | "mixed" | undefined;
610
+ required?: boolean | undefined;
611
+ source_segments?: string[] | undefined;
612
+ }>, "many">;
613
+ optional: z.ZodDefault<z.ZodBoolean>;
614
+ }, "strip", z.ZodTypeAny, {
615
+ id: string;
616
+ title: string;
617
+ points: {
618
+ id: string;
619
+ references: string[];
620
+ kind: "entity" | "narrative" | "mixed";
621
+ required: boolean;
622
+ text: string;
623
+ source_segments: string[];
624
+ }[];
625
+ optional: boolean;
626
+ }, {
627
+ id: string;
628
+ title: string;
629
+ points: {
630
+ id: string;
631
+ text: string;
632
+ references?: string[] | undefined;
633
+ kind?: "entity" | "narrative" | "mixed" | undefined;
634
+ required?: boolean | undefined;
635
+ source_segments?: string[] | undefined;
636
+ }[];
637
+ optional?: boolean | undefined;
638
+ }>;
639
+ export type OutlineChapter = z.infer<typeof OutlineChapterSchema>;
640
+ export declare const OutlineEntitySchema: z.ZodObject<{
641
+ id: z.ZodString;
642
+ frozen: z.ZodString;
643
+ standalone: z.ZodDefault<z.ZodBoolean>;
644
+ }, "strip", z.ZodTypeAny, {
645
+ standalone: boolean;
646
+ id: string;
647
+ frozen: string;
648
+ }, {
649
+ id: string;
650
+ frozen: string;
651
+ standalone?: boolean | undefined;
652
+ }>;
653
+ export declare const FillOnceSchema: z.ZodObject<{
654
+ enabled: z.ZodDefault<z.ZodBoolean>;
655
+ input_budget_tokens: z.ZodDefault<z.ZodNumber>;
656
+ }, "strip", z.ZodTypeAny, {
657
+ enabled: boolean;
658
+ input_budget_tokens: number;
659
+ }, {
660
+ enabled?: boolean | undefined;
661
+ input_budget_tokens?: number | undefined;
662
+ }>;
663
+ export declare const OutlineSchema: z.ZodObject<{
664
+ profile: z.ZodString;
665
+ chapters: z.ZodArray<z.ZodObject<{
666
+ id: z.ZodString;
667
+ title: z.ZodString;
668
+ points: z.ZodArray<z.ZodObject<{
669
+ id: z.ZodString;
670
+ text: z.ZodString;
671
+ required: z.ZodDefault<z.ZodBoolean>;
672
+ kind: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
673
+ references: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
674
+ source_segments: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
675
+ }, "strip", z.ZodTypeAny, {
676
+ id: string;
677
+ references: string[];
678
+ kind: "entity" | "narrative" | "mixed";
679
+ required: boolean;
680
+ text: string;
681
+ source_segments: string[];
682
+ }, {
683
+ id: string;
684
+ text: string;
685
+ references?: string[] | undefined;
686
+ kind?: "entity" | "narrative" | "mixed" | undefined;
687
+ required?: boolean | undefined;
688
+ source_segments?: string[] | undefined;
689
+ }>, "many">;
690
+ optional: z.ZodDefault<z.ZodBoolean>;
691
+ }, "strip", z.ZodTypeAny, {
692
+ id: string;
693
+ title: string;
694
+ points: {
695
+ id: string;
696
+ references: string[];
697
+ kind: "entity" | "narrative" | "mixed";
698
+ required: boolean;
699
+ text: string;
700
+ source_segments: string[];
701
+ }[];
702
+ optional: boolean;
703
+ }, {
704
+ id: string;
705
+ title: string;
706
+ points: {
707
+ id: string;
708
+ text: string;
709
+ references?: string[] | undefined;
710
+ kind?: "entity" | "narrative" | "mixed" | undefined;
711
+ required?: boolean | undefined;
712
+ source_segments?: string[] | undefined;
713
+ }[];
714
+ optional?: boolean | undefined;
715
+ }>, "many">;
716
+ entities: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
717
+ id: z.ZodString;
718
+ frozen: z.ZodString;
719
+ standalone: z.ZodDefault<z.ZodBoolean>;
720
+ }, "strip", z.ZodTypeAny, {
721
+ standalone: boolean;
722
+ id: string;
723
+ frozen: string;
724
+ }, {
725
+ id: string;
726
+ frozen: string;
727
+ standalone?: boolean | undefined;
728
+ }>, "many">>, {
729
+ standalone: boolean;
730
+ id: string;
731
+ frozen: string;
732
+ }[], {
733
+ id: string;
734
+ frozen: string;
735
+ standalone?: boolean | undefined;
736
+ }[] | undefined>;
737
+ decisions: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
738
+ fill_once: z.ZodOptional<z.ZodObject<{
739
+ enabled: z.ZodDefault<z.ZodBoolean>;
740
+ input_budget_tokens: z.ZodDefault<z.ZodNumber>;
741
+ }, "strip", z.ZodTypeAny, {
742
+ enabled: boolean;
743
+ input_budget_tokens: number;
744
+ }, {
745
+ enabled?: boolean | undefined;
746
+ input_budget_tokens?: number | undefined;
747
+ }>>;
748
+ }, "strip", z.ZodTypeAny, {
749
+ profile: string;
750
+ decisions: string[];
751
+ chapters: {
752
+ id: string;
753
+ title: string;
754
+ points: {
755
+ id: string;
756
+ references: string[];
757
+ kind: "entity" | "narrative" | "mixed";
758
+ required: boolean;
759
+ text: string;
760
+ source_segments: string[];
761
+ }[];
762
+ optional: boolean;
763
+ }[];
764
+ entities: {
765
+ standalone: boolean;
766
+ id: string;
767
+ frozen: string;
768
+ }[];
769
+ fill_once?: {
770
+ enabled: boolean;
771
+ input_budget_tokens: number;
772
+ } | undefined;
773
+ }, {
774
+ profile: string;
775
+ chapters: {
776
+ id: string;
777
+ title: string;
778
+ points: {
779
+ id: string;
780
+ text: string;
781
+ references?: string[] | undefined;
782
+ kind?: "entity" | "narrative" | "mixed" | undefined;
783
+ required?: boolean | undefined;
784
+ source_segments?: string[] | undefined;
785
+ }[];
786
+ optional?: boolean | undefined;
787
+ }[];
788
+ decisions?: string[] | undefined;
789
+ entities?: {
790
+ id: string;
791
+ frozen: string;
792
+ standalone?: boolean | undefined;
793
+ }[] | undefined;
794
+ fill_once?: {
795
+ enabled?: boolean | undefined;
796
+ input_budget_tokens?: number | undefined;
797
+ } | undefined;
798
+ }>;
799
+ export type Outline = z.infer<typeof OutlineSchema>;
800
+ export declare const ConstraintItemKindSchema: z.ZodEnum<["entity", "decision", "point"]>;
801
+ export declare const ConstraintItemSchema: z.ZodObject<{
802
+ kind: z.ZodEnum<["entity", "decision", "point"]>;
803
+ id: z.ZodString;
804
+ label: z.ZodString;
805
+ }, "strip", z.ZodTypeAny, {
806
+ id: string;
807
+ kind: "entity" | "decision" | "point";
808
+ label: string;
809
+ }, {
810
+ id: string;
811
+ kind: "entity" | "decision" | "point";
812
+ label: string;
813
+ }>;
814
+ export type ConstraintItem = z.infer<typeof ConstraintItemSchema>;
815
+ export declare const ChapterComponentSchema: z.ZodObject<{
816
+ id: z.ZodString;
817
+ title: z.ZodString;
818
+ when: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
819
+ depends_on: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
820
+ outline_points: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
821
+ id: z.ZodString;
822
+ text: z.ZodString;
823
+ required: z.ZodDefault<z.ZodBoolean>;
824
+ kind: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
825
+ references: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
826
+ source_segments: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
827
+ }, "strip", z.ZodTypeAny, {
828
+ id: string;
829
+ references: string[];
830
+ kind: "entity" | "narrative" | "mixed";
831
+ required: boolean;
832
+ text: string;
833
+ source_segments: string[];
834
+ }, {
835
+ id: string;
836
+ text: string;
837
+ references?: string[] | undefined;
838
+ kind?: "entity" | "narrative" | "mixed" | undefined;
839
+ required?: boolean | undefined;
840
+ source_segments?: string[] | undefined;
841
+ }>, "many">>, {
842
+ id: string;
843
+ references: string[];
844
+ kind: "entity" | "narrative" | "mixed";
845
+ required: boolean;
846
+ text: string;
847
+ source_segments: string[];
848
+ }[], {
849
+ id: string;
850
+ text: string;
851
+ references?: string[] | undefined;
852
+ kind?: "entity" | "narrative" | "mixed" | undefined;
853
+ required?: boolean | undefined;
854
+ source_segments?: string[] | undefined;
855
+ }[] | undefined>;
856
+ entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
857
+ narratives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
858
+ gates: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
859
+ map_prompt: z.ZodOptional<z.ZodString>;
860
+ output_budget_tokens: z.ZodOptional<z.ZodNumber>;
861
+ }, "strip", z.ZodTypeAny, {
862
+ id: string;
863
+ title: string;
864
+ depends_on: string[];
865
+ outline_points: {
866
+ id: string;
867
+ references: string[];
868
+ kind: "entity" | "narrative" | "mixed";
869
+ required: boolean;
870
+ text: string;
871
+ source_segments: string[];
872
+ }[];
873
+ gates: string[];
874
+ when?: string | undefined;
875
+ entities?: Record<string, any> | undefined;
876
+ narratives?: Record<string, any> | undefined;
877
+ map_prompt?: string | undefined;
878
+ output_budget_tokens?: number | undefined;
879
+ }, {
880
+ id: string;
881
+ title: string;
882
+ when?: unknown;
883
+ entities?: Record<string, any> | undefined;
884
+ depends_on?: string[] | undefined;
885
+ outline_points?: {
886
+ id: string;
887
+ text: string;
888
+ references?: string[] | undefined;
889
+ kind?: "entity" | "narrative" | "mixed" | undefined;
890
+ required?: boolean | undefined;
891
+ source_segments?: string[] | undefined;
892
+ }[] | undefined;
893
+ narratives?: Record<string, any> | undefined;
894
+ gates?: string[] | undefined;
895
+ map_prompt?: string | undefined;
896
+ output_budget_tokens?: number | undefined;
897
+ }>;
898
+ export type ChapterComponent = z.infer<typeof ChapterComponentSchema>;
899
+ export declare const ScenarioProfileSchema: z.ZodObject<{
900
+ id: z.ZodString;
901
+ name: z.ZodString;
902
+ required: z.ZodArray<z.ZodString, "many">;
903
+ optional_candidates: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
904
+ forbidden: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
905
+ shared: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
906
+ appendices: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodEnum<["anti-ai", "handoff"]>, "many">>, ("handoff" | "anti-ai")[], ("handoff" | "anti-ai")[] | undefined>;
907
+ }, "strip", z.ZodTypeAny, {
908
+ id: string;
909
+ name: string;
910
+ required: string[];
911
+ optional_candidates: string[];
912
+ forbidden: string[];
913
+ shared: string[];
914
+ appendices: ("handoff" | "anti-ai")[];
915
+ }, {
916
+ id: string;
917
+ name: string;
918
+ required: string[];
919
+ optional_candidates?: string[] | undefined;
920
+ forbidden?: string[] | undefined;
921
+ shared?: string[] | undefined;
922
+ appendices?: ("handoff" | "anti-ai")[] | undefined;
923
+ }>;
924
+ export type ScenarioProfile = z.infer<typeof ScenarioProfileSchema>;
925
+ export declare const ReviewTargetSchema: z.ZodEnum<["entity", "narrative", "mixed"]>;
926
+ export declare const ReviewFindingSchema: z.ZodObject<{
927
+ id: z.ZodString;
928
+ severity: z.ZodEnum<["critical", "important", "minor"]>;
929
+ category: z.ZodString;
930
+ message: z.ZodString;
931
+ target: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
932
+ chapter: z.ZodOptional<z.ZodString>;
933
+ status: z.ZodDefault<z.ZodEnum<["open", "fixed", "waived"]>>;
934
+ waiver_reason: z.ZodOptional<z.ZodString>;
935
+ }, "strip", z.ZodTypeAny, {
936
+ status: "fixed" | "open" | "waived";
937
+ message: string;
938
+ id: string;
939
+ severity: "critical" | "important" | "minor";
940
+ target: "entity" | "narrative" | "mixed";
941
+ category: string;
942
+ chapter?: string | undefined;
943
+ waiver_reason?: string | undefined;
944
+ }, {
945
+ message: string;
946
+ id: string;
947
+ severity: "critical" | "important" | "minor";
948
+ category: string;
949
+ status?: "fixed" | "open" | "waived" | undefined;
950
+ target?: "entity" | "narrative" | "mixed" | undefined;
951
+ chapter?: string | undefined;
952
+ waiver_reason?: string | undefined;
953
+ }>;
954
+ export type ReviewFinding = z.infer<typeof ReviewFindingSchema>;
955
+ export declare const ReviewResultSchema: z.ZodObject<{
956
+ schema: z.ZodLiteral<"specflow.document.review/v1">;
957
+ change: z.ZodString;
958
+ reviewed_at: z.ZodString;
959
+ reviewer: z.ZodDefault<z.ZodEnum<["ai", "human"]>>;
960
+ verdict: z.ZodEnum<["pass", "fail", "pass_with_waivers"]>;
961
+ summary: z.ZodOptional<z.ZodString>;
962
+ findings: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
963
+ id: z.ZodString;
964
+ severity: z.ZodEnum<["critical", "important", "minor"]>;
965
+ category: z.ZodString;
966
+ message: z.ZodString;
967
+ target: z.ZodDefault<z.ZodEnum<["entity", "narrative", "mixed"]>>;
968
+ chapter: z.ZodOptional<z.ZodString>;
969
+ status: z.ZodDefault<z.ZodEnum<["open", "fixed", "waived"]>>;
970
+ waiver_reason: z.ZodOptional<z.ZodString>;
971
+ }, "strip", z.ZodTypeAny, {
972
+ status: "fixed" | "open" | "waived";
973
+ message: string;
974
+ id: string;
975
+ severity: "critical" | "important" | "minor";
976
+ target: "entity" | "narrative" | "mixed";
977
+ category: string;
978
+ chapter?: string | undefined;
979
+ waiver_reason?: string | undefined;
980
+ }, {
981
+ message: string;
982
+ id: string;
983
+ severity: "critical" | "important" | "minor";
984
+ category: string;
985
+ status?: "fixed" | "open" | "waived" | undefined;
986
+ target?: "entity" | "narrative" | "mixed" | undefined;
987
+ chapter?: string | undefined;
988
+ waiver_reason?: string | undefined;
989
+ }>, "many">>, {
990
+ status: "fixed" | "open" | "waived";
991
+ message: string;
992
+ id: string;
993
+ severity: "critical" | "important" | "minor";
994
+ target: "entity" | "narrative" | "mixed";
995
+ category: string;
996
+ chapter?: string | undefined;
997
+ waiver_reason?: string | undefined;
998
+ }[], {
999
+ message: string;
1000
+ id: string;
1001
+ severity: "critical" | "important" | "minor";
1002
+ category: string;
1003
+ status?: "fixed" | "open" | "waived" | undefined;
1004
+ target?: "entity" | "narrative" | "mixed" | undefined;
1005
+ chapter?: string | undefined;
1006
+ waiver_reason?: string | undefined;
1007
+ }[] | undefined>;
1008
+ part_hashes: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
1009
+ id: z.ZodString;
1010
+ sha256: z.ZodString;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ id: string;
1013
+ sha256: string;
1014
+ }, {
1015
+ id: string;
1016
+ sha256: string;
1017
+ }>, "many">>, {
1018
+ id: string;
1019
+ sha256: string;
1020
+ }[], {
1021
+ id: string;
1022
+ sha256: string;
1023
+ }[] | undefined>;
1024
+ /** decision 9 · tamper semantics: chapters the ENGINE legitimately changed after the review
1025
+ * snapshot (entity refill / narrative fix notes). The tamper check exempts these from the
1026
+ * post-review "stale" verdict — every other chapter must still match the reviewer-time
1027
+ * `part_hashes` snapshot. */
1028
+ post_review_repairs: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
1029
+ chapter: z.ZodString;
1030
+ at: z.ZodString;
1031
+ }, "strip", z.ZodTypeAny, {
1032
+ at: string;
1033
+ chapter: string;
1034
+ }, {
1035
+ at: string;
1036
+ chapter: string;
1037
+ }>, "many">>, {
1038
+ at: string;
1039
+ chapter: string;
1040
+ }[], {
1041
+ at: string;
1042
+ chapter: string;
1043
+ }[] | undefined>;
1044
+ }, "strip", z.ZodTypeAny, {
1045
+ schema: "specflow.document.review/v1";
1046
+ change: string;
1047
+ reviewed_at: string;
1048
+ reviewer: "ai" | "human";
1049
+ verdict: "fail" | "pass" | "pass_with_waivers";
1050
+ findings: {
1051
+ status: "fixed" | "open" | "waived";
1052
+ message: string;
1053
+ id: string;
1054
+ severity: "critical" | "important" | "minor";
1055
+ target: "entity" | "narrative" | "mixed";
1056
+ category: string;
1057
+ chapter?: string | undefined;
1058
+ waiver_reason?: string | undefined;
1059
+ }[];
1060
+ part_hashes: {
1061
+ id: string;
1062
+ sha256: string;
1063
+ }[];
1064
+ post_review_repairs: {
1065
+ at: string;
1066
+ chapter: string;
1067
+ }[];
1068
+ summary?: string | undefined;
1069
+ }, {
1070
+ schema: "specflow.document.review/v1";
1071
+ change: string;
1072
+ reviewed_at: string;
1073
+ verdict: "fail" | "pass" | "pass_with_waivers";
1074
+ reviewer?: "ai" | "human" | undefined;
1075
+ summary?: string | undefined;
1076
+ findings?: {
1077
+ message: string;
1078
+ id: string;
1079
+ severity: "critical" | "important" | "minor";
1080
+ category: string;
1081
+ status?: "fixed" | "open" | "waived" | undefined;
1082
+ target?: "entity" | "narrative" | "mixed" | undefined;
1083
+ chapter?: string | undefined;
1084
+ waiver_reason?: string | undefined;
1085
+ }[] | undefined;
1086
+ part_hashes?: {
1087
+ id: string;
1088
+ sha256: string;
1089
+ }[] | undefined;
1090
+ post_review_repairs?: {
1091
+ at: string;
1092
+ chapter: string;
1093
+ }[] | undefined;
1094
+ }>;
1095
+ export type ReviewResult = z.infer<typeof ReviewResultSchema>;
1096
+ export declare function parseReviewResult(raw: unknown): ReviewResult;
1097
+ export declare function parseInterfaceEntity(raw: unknown): InterfaceEntity;
1098
+ export declare function parseTableEntity(raw: unknown): TableEntity;
1099
+ export declare function parseDecisionEntity(raw: unknown): DecisionEntity;
1100
+ export declare function parseEntities(raw: unknown): Entities;
1101
+ /**
1102
+ * 兼容两种章节 JSON 块格式的实体解析:
1103
+ * - 未包装:`{"interfaces": [...], "tables": [...], "decisions": [...]}`(引擎推荐,validate 期望)
1104
+ * - 包装:`{"entities": {"interfaces": [...]}}`(部分 map 提示词曾要求,Agent 可能照此写)
1105
+ * zod 默认 strip 未知 key,若顶层只有 `entities` 会被剥成空实体——这里显式解包后再解析,
1106
+ * 避免「提示词包装格式 → 实体被剥空 → validate 报缺失 → Agent 反复返工」。
1107
+ */
1108
+ export declare function parseEntitiesLenient(raw: unknown): Entities;
1109
+ export declare function parseOutline(raw: unknown): Outline;
1110
+ export declare function parseChapterComponent(raw: unknown): ChapterComponent;
1111
+ export declare function parseScenarioProfile(raw: unknown): ScenarioProfile;