@ai-dev-orchestrator/schemas 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/dist/artifacts/agreement-artifacts.d.ts +311 -0
- package/dist/artifacts/agreement-artifacts.js +48 -0
- package/dist/artifacts/artifact-dependency-graph.d.ts +775 -0
- package/dist/artifacts/artifact-dependency-graph.js +57 -0
- package/dist/artifacts/artifact-system.d.ts +657 -0
- package/dist/artifacts/artifact-system.js +124 -0
- package/dist/artifacts/index.d.ts +3 -0
- package/dist/artifacts/index.js +3 -0
- package/dist/config/configuration.d.ts +324 -0
- package/dist/config/configuration.js +93 -0
- package/dist/config/event-bus-config.d.ts +153 -0
- package/dist/config/event-bus-config.js +27 -0
- package/dist/config/event-payloads.d.ts +919 -0
- package/dist/config/event-payloads.js +304 -0
- package/dist/config/event-system.d.ts +3231 -0
- package/dist/config/event-system.js +428 -0
- package/dist/config/event-types.d.ts +62 -0
- package/dist/config/event-types.js +66 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.js +5 -0
- package/dist/dashboard/dashboard-api.d.ts +149 -0
- package/dist/dashboard/dashboard-api.js +80 -0
- package/dist/dashboard/dashboard-domain.d.ts +1076 -0
- package/dist/dashboard/dashboard-domain.js +305 -0
- package/dist/dashboard/index.d.ts +3 -0
- package/dist/dashboard/index.js +3 -0
- package/dist/dashboard/run-creation-params.d.ts +111 -0
- package/dist/dashboard/run-creation-params.js +14 -0
- package/dist/governance/governance.d.ts +1119 -0
- package/dist/governance/governance.js +111 -0
- package/dist/governance/index.d.ts +3 -0
- package/dist/governance/index.js +3 -0
- package/dist/governance/policy-engine.d.ts +634 -0
- package/dist/governance/policy-engine.js +214 -0
- package/dist/governance/review-resolution.d.ts +1053 -0
- package/dist/governance/review-resolution.js +67 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/observability/diagnostics.d.ts +185 -0
- package/dist/observability/diagnostics.js +63 -0
- package/dist/observability/index.d.ts +2 -0
- package/dist/observability/index.js +2 -0
- package/dist/observability/metrics.d.ts +187 -0
- package/dist/observability/metrics.js +67 -0
- package/dist/persistence/execution-analytics.d.ts +173 -0
- package/dist/persistence/execution-analytics.js +71 -0
- package/dist/persistence/index.d.ts +5 -0
- package/dist/persistence/index.js +5 -0
- package/dist/persistence/project-context.d.ts +164 -0
- package/dist/persistence/project-context.js +88 -0
- package/dist/persistence/repository-model.d.ts +27 -0
- package/dist/persistence/repository-model.js +16 -0
- package/dist/persistence/run-manifest.d.ts +422 -0
- package/dist/persistence/run-manifest.js +118 -0
- package/dist/persistence/state-persistence.d.ts +276 -0
- package/dist/persistence/state-persistence.js +83 -0
- package/dist/runner/built-in-runner-ids.d.ts +8 -0
- package/dist/runner/built-in-runner-ids.js +11 -0
- package/dist/runner/collaboration-model.d.ts +100 -0
- package/dist/runner/collaboration-model.js +19 -0
- package/dist/runner/confidence.d.ts +17 -0
- package/dist/runner/confidence.js +11 -0
- package/dist/runner/index.d.ts +8 -0
- package/dist/runner/index.js +8 -0
- package/dist/runner/permission-approval.d.ts +38 -0
- package/dist/runner/permission-approval.js +14 -0
- package/dist/runner/prompt-engine.d.ts +1467 -0
- package/dist/runner/prompt-engine.js +193 -0
- package/dist/runner/role-system.d.ts +458 -0
- package/dist/runner/role-system.js +94 -0
- package/dist/runner/runner-system.d.ts +1721 -0
- package/dist/runner/runner-system.js +268 -0
- package/dist/runner/task-brief.d.ts +18 -0
- package/dist/runner/task-brief.js +12 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/shared.d.ts +30 -0
- package/dist/shared/shared.js +27 -0
- package/dist/shared/string-enums.d.ts +59 -0
- package/dist/shared/string-enums.js +24 -0
- package/dist/shared/utils.d.ts +25 -0
- package/dist/shared/utils.js +22 -0
- package/dist/specification/canonical-specification.d.ts +475 -0
- package/dist/specification/canonical-specification.js +151 -0
- package/dist/specification/index.d.ts +3 -0
- package/dist/specification/index.js +3 -0
- package/dist/specification/intake.d.ts +419 -0
- package/dist/specification/intake.js +70 -0
- package/dist/specification/iteration-contracts.d.ts +421 -0
- package/dist/specification/iteration-contracts.js +61 -0
- package/dist/workflow/index.d.ts +4 -0
- package/dist/workflow/index.js +4 -0
- package/dist/workflow/workflow-dsl.d.ts +81 -0
- package/dist/workflow/workflow-dsl.js +38 -0
- package/dist/workflow/workflow-engine.d.ts +5788 -0
- package/dist/workflow/workflow-engine.js +414 -0
- package/dist/workflow/workflow-file.d.ts +331 -0
- package/dist/workflow/workflow-file.js +41 -0
- package/dist/workflow/workflow-journal.d.ts +520 -0
- package/dist/workflow/workflow-journal.js +151 -0
- package/package.json +39 -0
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const specificationIdSchema: z.core.$ZodBranded<z.ZodString, "SpecificationId", "out">;
|
|
3
|
+
export type SpecificationId = z.infer<typeof specificationIdSchema>;
|
|
4
|
+
export declare const stakeholderSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
role: z.ZodString;
|
|
7
|
+
interest: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type Stakeholder = z.infer<typeof stakeholderSchema>;
|
|
10
|
+
export declare const assumptionSchema: z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
description: z.ZodString;
|
|
13
|
+
impact: z.ZodEnum<{
|
|
14
|
+
high: "high";
|
|
15
|
+
medium: "medium";
|
|
16
|
+
low: "low";
|
|
17
|
+
}>;
|
|
18
|
+
validated: z.ZodBoolean;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type Assumption = z.infer<typeof assumptionSchema>;
|
|
21
|
+
export declare const constraintSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
description: z.ZodString;
|
|
24
|
+
type: z.ZodEnum<{
|
|
25
|
+
resource: "resource";
|
|
26
|
+
technical: "technical";
|
|
27
|
+
business: "business";
|
|
28
|
+
regulatory: "regulatory";
|
|
29
|
+
timeline: "timeline";
|
|
30
|
+
}>;
|
|
31
|
+
source: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type Constraint = z.infer<typeof constraintSchema>;
|
|
34
|
+
export declare const requirementPrioritySchema: z.ZodEnum<{
|
|
35
|
+
must: "must";
|
|
36
|
+
should: "should";
|
|
37
|
+
could: "could";
|
|
38
|
+
wont: "wont";
|
|
39
|
+
}>;
|
|
40
|
+
export type RequirementPriority = z.infer<typeof requirementPrioritySchema>;
|
|
41
|
+
export declare const functionalRequirementSchema: z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
title: z.ZodString;
|
|
44
|
+
description: z.ZodString;
|
|
45
|
+
priority: z.ZodEnum<{
|
|
46
|
+
must: "must";
|
|
47
|
+
should: "should";
|
|
48
|
+
could: "could";
|
|
49
|
+
wont: "wont";
|
|
50
|
+
}>;
|
|
51
|
+
acceptanceCriteria: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
52
|
+
dependencies: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type FunctionalRequirement = z.infer<typeof functionalRequirementSchema>;
|
|
55
|
+
export declare const nfrCategorySchema: z.ZodEnum<{
|
|
56
|
+
security: "security";
|
|
57
|
+
performance: "performance";
|
|
58
|
+
maintainability: "maintainability";
|
|
59
|
+
other: "other";
|
|
60
|
+
reliability: "reliability";
|
|
61
|
+
scalability: "scalability";
|
|
62
|
+
usability: "usability";
|
|
63
|
+
compatibility: "compatibility";
|
|
64
|
+
}>;
|
|
65
|
+
export type NfrCategory = z.infer<typeof nfrCategorySchema>;
|
|
66
|
+
export declare const nonFunctionalRequirementSchema: z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
title: z.ZodString;
|
|
69
|
+
description: z.ZodString;
|
|
70
|
+
category: z.ZodEnum<{
|
|
71
|
+
security: "security";
|
|
72
|
+
performance: "performance";
|
|
73
|
+
maintainability: "maintainability";
|
|
74
|
+
other: "other";
|
|
75
|
+
reliability: "reliability";
|
|
76
|
+
scalability: "scalability";
|
|
77
|
+
usability: "usability";
|
|
78
|
+
compatibility: "compatibility";
|
|
79
|
+
}>;
|
|
80
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
81
|
+
threshold: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export type NonFunctionalRequirement = z.infer<typeof nonFunctionalRequirementSchema>;
|
|
84
|
+
export declare const verificationMethodSchema: z.ZodEnum<{
|
|
85
|
+
review: "review";
|
|
86
|
+
test: "test";
|
|
87
|
+
demo: "demo";
|
|
88
|
+
analysis: "analysis";
|
|
89
|
+
}>;
|
|
90
|
+
export type VerificationMethod = z.infer<typeof verificationMethodSchema>;
|
|
91
|
+
export declare const acceptanceCriterionSchema: z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
description: z.ZodString;
|
|
94
|
+
verificationMethod: z.ZodEnum<{
|
|
95
|
+
review: "review";
|
|
96
|
+
test: "test";
|
|
97
|
+
demo: "demo";
|
|
98
|
+
analysis: "analysis";
|
|
99
|
+
}>;
|
|
100
|
+
requirementIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
export type AcceptanceCriterion = z.infer<typeof acceptanceCriterionSchema>;
|
|
103
|
+
export declare const riskSchema: z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
description: z.ZodString;
|
|
106
|
+
likelihood: z.ZodEnum<{
|
|
107
|
+
high: "high";
|
|
108
|
+
medium: "medium";
|
|
109
|
+
low: "low";
|
|
110
|
+
}>;
|
|
111
|
+
impact: z.ZodEnum<{
|
|
112
|
+
high: "high";
|
|
113
|
+
medium: "medium";
|
|
114
|
+
low: "low";
|
|
115
|
+
}>;
|
|
116
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
export type Risk = z.infer<typeof riskSchema>;
|
|
119
|
+
export declare const dependencySchema: z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
description: z.ZodString;
|
|
122
|
+
type: z.ZodEnum<{
|
|
123
|
+
external: "external";
|
|
124
|
+
internal: "internal";
|
|
125
|
+
}>;
|
|
126
|
+
status: z.ZodEnum<{
|
|
127
|
+
pending: "pending";
|
|
128
|
+
available: "available";
|
|
129
|
+
blocked: "blocked";
|
|
130
|
+
}>;
|
|
131
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
export type Dependency = z.infer<typeof dependencySchema>;
|
|
134
|
+
export declare const sourceProvenanceSchema: z.ZodObject<{
|
|
135
|
+
fetchedAt: z.ZodString;
|
|
136
|
+
checksum: z.ZodString;
|
|
137
|
+
fieldsMapped: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
export type SourceProvenance = z.infer<typeof sourceProvenanceSchema>;
|
|
140
|
+
export declare const specificationAnalysisSchema: z.ZodObject<{
|
|
141
|
+
completenessScore: z.ZodNumber;
|
|
142
|
+
ambiguityCount: z.ZodNumber;
|
|
143
|
+
riskCount: z.ZodNumber;
|
|
144
|
+
unvalidatedAssumptionCount: z.ZodNumber;
|
|
145
|
+
readinessVerdict: z.ZodEnum<{
|
|
146
|
+
Ready: "Ready";
|
|
147
|
+
NotReady: "NotReady";
|
|
148
|
+
}>;
|
|
149
|
+
analystNotes: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export type SpecificationAnalysis = z.infer<typeof specificationAnalysisSchema>;
|
|
152
|
+
export declare const canonicalSpecificationSchema: z.ZodObject<{
|
|
153
|
+
id: z.core.$ZodBranded<z.ZodString, "SpecificationId", "out">;
|
|
154
|
+
version: z.ZodNumber;
|
|
155
|
+
previousVersion: z.ZodOptional<z.ZodString>;
|
|
156
|
+
title: z.ZodString;
|
|
157
|
+
businessGoal: z.ZodString;
|
|
158
|
+
stakeholders: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
159
|
+
name: z.ZodString;
|
|
160
|
+
role: z.ZodString;
|
|
161
|
+
interest: z.ZodString;
|
|
162
|
+
}, z.core.$strip>>>;
|
|
163
|
+
assumptions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
description: z.ZodString;
|
|
166
|
+
impact: z.ZodEnum<{
|
|
167
|
+
high: "high";
|
|
168
|
+
medium: "medium";
|
|
169
|
+
low: "low";
|
|
170
|
+
}>;
|
|
171
|
+
validated: z.ZodBoolean;
|
|
172
|
+
}, z.core.$strip>>>;
|
|
173
|
+
constraints: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
description: z.ZodString;
|
|
176
|
+
type: z.ZodEnum<{
|
|
177
|
+
resource: "resource";
|
|
178
|
+
technical: "technical";
|
|
179
|
+
business: "business";
|
|
180
|
+
regulatory: "regulatory";
|
|
181
|
+
timeline: "timeline";
|
|
182
|
+
}>;
|
|
183
|
+
source: z.ZodString;
|
|
184
|
+
}, z.core.$strip>>>;
|
|
185
|
+
functionalRequirements: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
title: z.ZodString;
|
|
188
|
+
description: z.ZodString;
|
|
189
|
+
priority: z.ZodEnum<{
|
|
190
|
+
must: "must";
|
|
191
|
+
should: "should";
|
|
192
|
+
could: "could";
|
|
193
|
+
wont: "wont";
|
|
194
|
+
}>;
|
|
195
|
+
acceptanceCriteria: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
196
|
+
dependencies: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
197
|
+
}, z.core.$strip>>>;
|
|
198
|
+
nonFunctionalRequirements: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
199
|
+
id: z.ZodString;
|
|
200
|
+
title: z.ZodString;
|
|
201
|
+
description: z.ZodString;
|
|
202
|
+
category: z.ZodEnum<{
|
|
203
|
+
security: "security";
|
|
204
|
+
performance: "performance";
|
|
205
|
+
maintainability: "maintainability";
|
|
206
|
+
other: "other";
|
|
207
|
+
reliability: "reliability";
|
|
208
|
+
scalability: "scalability";
|
|
209
|
+
usability: "usability";
|
|
210
|
+
compatibility: "compatibility";
|
|
211
|
+
}>;
|
|
212
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
213
|
+
threshold: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>>>;
|
|
215
|
+
acceptanceCriteria: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
216
|
+
id: z.ZodString;
|
|
217
|
+
description: z.ZodString;
|
|
218
|
+
verificationMethod: z.ZodEnum<{
|
|
219
|
+
review: "review";
|
|
220
|
+
test: "test";
|
|
221
|
+
demo: "demo";
|
|
222
|
+
analysis: "analysis";
|
|
223
|
+
}>;
|
|
224
|
+
requirementIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
225
|
+
}, z.core.$strip>>>;
|
|
226
|
+
risks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
227
|
+
id: z.ZodString;
|
|
228
|
+
description: z.ZodString;
|
|
229
|
+
likelihood: z.ZodEnum<{
|
|
230
|
+
high: "high";
|
|
231
|
+
medium: "medium";
|
|
232
|
+
low: "low";
|
|
233
|
+
}>;
|
|
234
|
+
impact: z.ZodEnum<{
|
|
235
|
+
high: "high";
|
|
236
|
+
medium: "medium";
|
|
237
|
+
low: "low";
|
|
238
|
+
}>;
|
|
239
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
240
|
+
}, z.core.$strip>>>;
|
|
241
|
+
dependencies: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
242
|
+
id: z.ZodString;
|
|
243
|
+
description: z.ZodString;
|
|
244
|
+
type: z.ZodEnum<{
|
|
245
|
+
external: "external";
|
|
246
|
+
internal: "internal";
|
|
247
|
+
}>;
|
|
248
|
+
status: z.ZodEnum<{
|
|
249
|
+
pending: "pending";
|
|
250
|
+
available: "available";
|
|
251
|
+
blocked: "blocked";
|
|
252
|
+
}>;
|
|
253
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
254
|
+
}, z.core.$strip>>>;
|
|
255
|
+
definitionOfDone: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
256
|
+
sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
257
|
+
fetchedAt: z.ZodString;
|
|
258
|
+
checksum: z.ZodString;
|
|
259
|
+
fieldsMapped: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
260
|
+
}, z.core.$strip>>>;
|
|
261
|
+
createdAt: z.ZodString;
|
|
262
|
+
updatedAt: z.ZodString;
|
|
263
|
+
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
264
|
+
analysis: z.ZodOptional<z.ZodObject<{
|
|
265
|
+
completenessScore: z.ZodNumber;
|
|
266
|
+
ambiguityCount: z.ZodNumber;
|
|
267
|
+
riskCount: z.ZodNumber;
|
|
268
|
+
unvalidatedAssumptionCount: z.ZodNumber;
|
|
269
|
+
readinessVerdict: z.ZodEnum<{
|
|
270
|
+
Ready: "Ready";
|
|
271
|
+
NotReady: "NotReady";
|
|
272
|
+
}>;
|
|
273
|
+
analystNotes: z.ZodOptional<z.ZodString>;
|
|
274
|
+
}, z.core.$strip>>;
|
|
275
|
+
}, z.core.$strip>;
|
|
276
|
+
export type CanonicalSpecification = z.infer<typeof canonicalSpecificationSchema>;
|
|
277
|
+
export declare const specificationValidationErrorSchema: z.ZodObject<{
|
|
278
|
+
field: z.ZodString;
|
|
279
|
+
message: z.ZodString;
|
|
280
|
+
rule: z.ZodString;
|
|
281
|
+
}, z.core.$strip>;
|
|
282
|
+
export type SpecificationValidationError = z.infer<typeof specificationValidationErrorSchema>;
|
|
283
|
+
export declare const specificationValidationWarningSchema: z.ZodObject<{
|
|
284
|
+
field: z.ZodString;
|
|
285
|
+
message: z.ZodString;
|
|
286
|
+
suggestion: z.ZodString;
|
|
287
|
+
}, z.core.$strip>;
|
|
288
|
+
export type SpecificationValidationWarning = z.infer<typeof specificationValidationWarningSchema>;
|
|
289
|
+
export declare const specificationValidationResultSchema: z.ZodObject<{
|
|
290
|
+
valid: z.ZodBoolean;
|
|
291
|
+
errors: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
292
|
+
field: z.ZodString;
|
|
293
|
+
message: z.ZodString;
|
|
294
|
+
rule: z.ZodString;
|
|
295
|
+
}, z.core.$strip>>>;
|
|
296
|
+
warnings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
297
|
+
field: z.ZodString;
|
|
298
|
+
message: z.ZodString;
|
|
299
|
+
suggestion: z.ZodString;
|
|
300
|
+
}, z.core.$strip>>>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
export type SpecificationValidationResult = z.infer<typeof specificationValidationResultSchema>;
|
|
303
|
+
export declare const completenessResultSchema: z.ZodObject<{
|
|
304
|
+
score: z.ZodNumber;
|
|
305
|
+
missingFields: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
306
|
+
emptyFields: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
307
|
+
fieldScores: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
308
|
+
}, z.core.$strip>;
|
|
309
|
+
export type CompletenessResult = z.infer<typeof completenessResultSchema>;
|
|
310
|
+
export declare const mergeStrategySchema: z.ZodObject<{
|
|
311
|
+
scalarConflict: z.ZodEnum<{
|
|
312
|
+
"last-wins": "last-wins";
|
|
313
|
+
"first-wins": "first-wins";
|
|
314
|
+
"flag-conflict": "flag-conflict";
|
|
315
|
+
}>;
|
|
316
|
+
arrayMerge: z.ZodEnum<{
|
|
317
|
+
union: "union";
|
|
318
|
+
concatenate: "concatenate";
|
|
319
|
+
}>;
|
|
320
|
+
deduplication: z.ZodBoolean;
|
|
321
|
+
}, z.core.$strip>;
|
|
322
|
+
export type MergeStrategy = z.infer<typeof mergeStrategySchema>;
|
|
323
|
+
export declare const mergeConflictSchema: z.ZodObject<{
|
|
324
|
+
field: z.ZodString;
|
|
325
|
+
values: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
326
|
+
source: z.ZodString;
|
|
327
|
+
value: z.ZodString;
|
|
328
|
+
}, z.core.$strip>>>;
|
|
329
|
+
resolution: z.ZodEnum<{
|
|
330
|
+
"auto-resolved": "auto-resolved";
|
|
331
|
+
flagged: "flagged";
|
|
332
|
+
}>;
|
|
333
|
+
resolvedValue: z.ZodOptional<z.ZodString>;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
export type MergeConflict = z.infer<typeof mergeConflictSchema>;
|
|
336
|
+
export declare const mergeResultSchema: z.ZodObject<{
|
|
337
|
+
merged: z.ZodObject<{
|
|
338
|
+
id: z.core.$ZodBranded<z.ZodString, "SpecificationId", "out">;
|
|
339
|
+
version: z.ZodNumber;
|
|
340
|
+
previousVersion: z.ZodOptional<z.ZodString>;
|
|
341
|
+
title: z.ZodString;
|
|
342
|
+
businessGoal: z.ZodString;
|
|
343
|
+
stakeholders: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
344
|
+
name: z.ZodString;
|
|
345
|
+
role: z.ZodString;
|
|
346
|
+
interest: z.ZodString;
|
|
347
|
+
}, z.core.$strip>>>;
|
|
348
|
+
assumptions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
349
|
+
id: z.ZodString;
|
|
350
|
+
description: z.ZodString;
|
|
351
|
+
impact: z.ZodEnum<{
|
|
352
|
+
high: "high";
|
|
353
|
+
medium: "medium";
|
|
354
|
+
low: "low";
|
|
355
|
+
}>;
|
|
356
|
+
validated: z.ZodBoolean;
|
|
357
|
+
}, z.core.$strip>>>;
|
|
358
|
+
constraints: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
359
|
+
id: z.ZodString;
|
|
360
|
+
description: z.ZodString;
|
|
361
|
+
type: z.ZodEnum<{
|
|
362
|
+
resource: "resource";
|
|
363
|
+
technical: "technical";
|
|
364
|
+
business: "business";
|
|
365
|
+
regulatory: "regulatory";
|
|
366
|
+
timeline: "timeline";
|
|
367
|
+
}>;
|
|
368
|
+
source: z.ZodString;
|
|
369
|
+
}, z.core.$strip>>>;
|
|
370
|
+
functionalRequirements: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
371
|
+
id: z.ZodString;
|
|
372
|
+
title: z.ZodString;
|
|
373
|
+
description: z.ZodString;
|
|
374
|
+
priority: z.ZodEnum<{
|
|
375
|
+
must: "must";
|
|
376
|
+
should: "should";
|
|
377
|
+
could: "could";
|
|
378
|
+
wont: "wont";
|
|
379
|
+
}>;
|
|
380
|
+
acceptanceCriteria: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
381
|
+
dependencies: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
382
|
+
}, z.core.$strip>>>;
|
|
383
|
+
nonFunctionalRequirements: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
384
|
+
id: z.ZodString;
|
|
385
|
+
title: z.ZodString;
|
|
386
|
+
description: z.ZodString;
|
|
387
|
+
category: z.ZodEnum<{
|
|
388
|
+
security: "security";
|
|
389
|
+
performance: "performance";
|
|
390
|
+
maintainability: "maintainability";
|
|
391
|
+
other: "other";
|
|
392
|
+
reliability: "reliability";
|
|
393
|
+
scalability: "scalability";
|
|
394
|
+
usability: "usability";
|
|
395
|
+
compatibility: "compatibility";
|
|
396
|
+
}>;
|
|
397
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
398
|
+
threshold: z.ZodOptional<z.ZodString>;
|
|
399
|
+
}, z.core.$strip>>>;
|
|
400
|
+
acceptanceCriteria: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
401
|
+
id: z.ZodString;
|
|
402
|
+
description: z.ZodString;
|
|
403
|
+
verificationMethod: z.ZodEnum<{
|
|
404
|
+
review: "review";
|
|
405
|
+
test: "test";
|
|
406
|
+
demo: "demo";
|
|
407
|
+
analysis: "analysis";
|
|
408
|
+
}>;
|
|
409
|
+
requirementIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
410
|
+
}, z.core.$strip>>>;
|
|
411
|
+
risks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
412
|
+
id: z.ZodString;
|
|
413
|
+
description: z.ZodString;
|
|
414
|
+
likelihood: z.ZodEnum<{
|
|
415
|
+
high: "high";
|
|
416
|
+
medium: "medium";
|
|
417
|
+
low: "low";
|
|
418
|
+
}>;
|
|
419
|
+
impact: z.ZodEnum<{
|
|
420
|
+
high: "high";
|
|
421
|
+
medium: "medium";
|
|
422
|
+
low: "low";
|
|
423
|
+
}>;
|
|
424
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
425
|
+
}, z.core.$strip>>>;
|
|
426
|
+
dependencies: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
427
|
+
id: z.ZodString;
|
|
428
|
+
description: z.ZodString;
|
|
429
|
+
type: z.ZodEnum<{
|
|
430
|
+
external: "external";
|
|
431
|
+
internal: "internal";
|
|
432
|
+
}>;
|
|
433
|
+
status: z.ZodEnum<{
|
|
434
|
+
pending: "pending";
|
|
435
|
+
available: "available";
|
|
436
|
+
blocked: "blocked";
|
|
437
|
+
}>;
|
|
438
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
439
|
+
}, z.core.$strip>>>;
|
|
440
|
+
definitionOfDone: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
441
|
+
sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
442
|
+
fetchedAt: z.ZodString;
|
|
443
|
+
checksum: z.ZodString;
|
|
444
|
+
fieldsMapped: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
445
|
+
}, z.core.$strip>>>;
|
|
446
|
+
createdAt: z.ZodString;
|
|
447
|
+
updatedAt: z.ZodString;
|
|
448
|
+
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
449
|
+
analysis: z.ZodOptional<z.ZodObject<{
|
|
450
|
+
completenessScore: z.ZodNumber;
|
|
451
|
+
ambiguityCount: z.ZodNumber;
|
|
452
|
+
riskCount: z.ZodNumber;
|
|
453
|
+
unvalidatedAssumptionCount: z.ZodNumber;
|
|
454
|
+
readinessVerdict: z.ZodEnum<{
|
|
455
|
+
Ready: "Ready";
|
|
456
|
+
NotReady: "NotReady";
|
|
457
|
+
}>;
|
|
458
|
+
analystNotes: z.ZodOptional<z.ZodString>;
|
|
459
|
+
}, z.core.$strip>>;
|
|
460
|
+
}, z.core.$strip>;
|
|
461
|
+
conflicts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
462
|
+
field: z.ZodString;
|
|
463
|
+
values: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
464
|
+
source: z.ZodString;
|
|
465
|
+
value: z.ZodString;
|
|
466
|
+
}, z.core.$strip>>>;
|
|
467
|
+
resolution: z.ZodEnum<{
|
|
468
|
+
"auto-resolved": "auto-resolved";
|
|
469
|
+
flagged: "flagged";
|
|
470
|
+
}>;
|
|
471
|
+
resolvedValue: z.ZodOptional<z.ZodString>;
|
|
472
|
+
}, z.core.$strip>>>;
|
|
473
|
+
}, z.core.$strip>;
|
|
474
|
+
export type MergeResult = z.infer<typeof mergeResultSchema>;
|
|
475
|
+
export declare const COMPLETENESS_WEIGHTS: Record<string, number>;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { readinessVerdictSchema, threeTierSeveritySchema } from '../shared/string-enums';
|
|
3
|
+
export const specificationIdSchema = z.string().brand('SpecificationId');
|
|
4
|
+
export const stakeholderSchema = z.object({
|
|
5
|
+
name: z.string(),
|
|
6
|
+
role: z.string(),
|
|
7
|
+
interest: z.string(),
|
|
8
|
+
});
|
|
9
|
+
export const assumptionSchema = z.object({
|
|
10
|
+
id: z.string(),
|
|
11
|
+
description: z.string(),
|
|
12
|
+
impact: threeTierSeveritySchema,
|
|
13
|
+
validated: z.boolean(),
|
|
14
|
+
});
|
|
15
|
+
export const constraintSchema = z.object({
|
|
16
|
+
id: z.string(),
|
|
17
|
+
description: z.string(),
|
|
18
|
+
type: z.enum(['technical', 'business', 'regulatory', 'timeline', 'resource']),
|
|
19
|
+
source: z.string(),
|
|
20
|
+
});
|
|
21
|
+
export const requirementPrioritySchema = z.enum(['must', 'should', 'could', 'wont']);
|
|
22
|
+
export const functionalRequirementSchema = z.object({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
title: z.string(),
|
|
25
|
+
description: z.string(),
|
|
26
|
+
priority: requirementPrioritySchema,
|
|
27
|
+
acceptanceCriteria: z.array(z.string()).readonly(),
|
|
28
|
+
dependencies: z.array(z.string()).readonly().optional(),
|
|
29
|
+
});
|
|
30
|
+
export const nfrCategorySchema = z.enum([
|
|
31
|
+
'performance',
|
|
32
|
+
'security',
|
|
33
|
+
'reliability',
|
|
34
|
+
'scalability',
|
|
35
|
+
'usability',
|
|
36
|
+
'maintainability',
|
|
37
|
+
'compatibility',
|
|
38
|
+
'other',
|
|
39
|
+
]);
|
|
40
|
+
export const nonFunctionalRequirementSchema = z.object({
|
|
41
|
+
id: z.string(),
|
|
42
|
+
title: z.string(),
|
|
43
|
+
description: z.string(),
|
|
44
|
+
category: nfrCategorySchema,
|
|
45
|
+
metric: z.string().optional(),
|
|
46
|
+
threshold: z.string().optional(),
|
|
47
|
+
});
|
|
48
|
+
export const verificationMethodSchema = z.enum(['test', 'review', 'demo', 'analysis']);
|
|
49
|
+
export const acceptanceCriterionSchema = z.object({
|
|
50
|
+
id: z.string(),
|
|
51
|
+
description: z.string(),
|
|
52
|
+
verificationMethod: verificationMethodSchema,
|
|
53
|
+
requirementIds: z.array(z.string()).readonly(),
|
|
54
|
+
});
|
|
55
|
+
export const riskSchema = z.object({
|
|
56
|
+
id: z.string(),
|
|
57
|
+
description: z.string(),
|
|
58
|
+
likelihood: threeTierSeveritySchema,
|
|
59
|
+
impact: threeTierSeveritySchema,
|
|
60
|
+
mitigation: z.string().optional(),
|
|
61
|
+
});
|
|
62
|
+
export const dependencySchema = z.object({
|
|
63
|
+
id: z.string(),
|
|
64
|
+
description: z.string(),
|
|
65
|
+
type: z.enum(['internal', 'external']),
|
|
66
|
+
status: z.enum(['available', 'pending', 'blocked']),
|
|
67
|
+
owner: z.string().optional(),
|
|
68
|
+
});
|
|
69
|
+
export const sourceProvenanceSchema = z.object({
|
|
70
|
+
fetchedAt: z.string(),
|
|
71
|
+
checksum: z.string(),
|
|
72
|
+
fieldsMapped: z.array(z.string()).readonly(),
|
|
73
|
+
});
|
|
74
|
+
export const specificationAnalysisSchema = z.object({
|
|
75
|
+
completenessScore: z.number(),
|
|
76
|
+
ambiguityCount: z.number(),
|
|
77
|
+
riskCount: z.number(),
|
|
78
|
+
unvalidatedAssumptionCount: z.number(),
|
|
79
|
+
readinessVerdict: readinessVerdictSchema,
|
|
80
|
+
analystNotes: z.string().optional(),
|
|
81
|
+
});
|
|
82
|
+
export const canonicalSpecificationSchema = z.object({
|
|
83
|
+
id: specificationIdSchema,
|
|
84
|
+
version: z.number(),
|
|
85
|
+
previousVersion: z.string().optional(),
|
|
86
|
+
title: z.string(),
|
|
87
|
+
businessGoal: z.string(),
|
|
88
|
+
stakeholders: z.array(stakeholderSchema).readonly(),
|
|
89
|
+
assumptions: z.array(assumptionSchema).readonly(),
|
|
90
|
+
constraints: z.array(constraintSchema).readonly(),
|
|
91
|
+
functionalRequirements: z.array(functionalRequirementSchema).readonly(),
|
|
92
|
+
nonFunctionalRequirements: z.array(nonFunctionalRequirementSchema).readonly(),
|
|
93
|
+
acceptanceCriteria: z.array(acceptanceCriterionSchema).readonly(),
|
|
94
|
+
risks: z.array(riskSchema).readonly(),
|
|
95
|
+
dependencies: z.array(dependencySchema).readonly(),
|
|
96
|
+
definitionOfDone: z.array(z.string()).readonly(),
|
|
97
|
+
sources: z.array(sourceProvenanceSchema).readonly(),
|
|
98
|
+
createdAt: z.string(),
|
|
99
|
+
updatedAt: z.string(),
|
|
100
|
+
extensions: z.record(z.string(), z.unknown()).optional(),
|
|
101
|
+
analysis: specificationAnalysisSchema.optional(),
|
|
102
|
+
});
|
|
103
|
+
export const specificationValidationErrorSchema = z.object({
|
|
104
|
+
field: z.string(),
|
|
105
|
+
message: z.string(),
|
|
106
|
+
rule: z.string(),
|
|
107
|
+
});
|
|
108
|
+
export const specificationValidationWarningSchema = z.object({
|
|
109
|
+
field: z.string(),
|
|
110
|
+
message: z.string(),
|
|
111
|
+
suggestion: z.string(),
|
|
112
|
+
});
|
|
113
|
+
export const specificationValidationResultSchema = z.object({
|
|
114
|
+
valid: z.boolean(),
|
|
115
|
+
errors: z.array(specificationValidationErrorSchema).readonly(),
|
|
116
|
+
warnings: z.array(specificationValidationWarningSchema).readonly(),
|
|
117
|
+
});
|
|
118
|
+
export const completenessResultSchema = z.object({
|
|
119
|
+
score: z.number(),
|
|
120
|
+
missingFields: z.array(z.string()).readonly(),
|
|
121
|
+
emptyFields: z.array(z.string()).readonly(),
|
|
122
|
+
fieldScores: z.record(z.string(), z.number()),
|
|
123
|
+
});
|
|
124
|
+
export const mergeStrategySchema = z.object({
|
|
125
|
+
scalarConflict: z.enum(['last-wins', 'first-wins', 'flag-conflict']),
|
|
126
|
+
arrayMerge: z.enum(['union', 'concatenate']),
|
|
127
|
+
deduplication: z.boolean(),
|
|
128
|
+
});
|
|
129
|
+
export const mergeConflictSchema = z.object({
|
|
130
|
+
field: z.string(),
|
|
131
|
+
values: z.array(z.object({ source: z.string(), value: z.string() })).readonly(),
|
|
132
|
+
resolution: z.enum(['auto-resolved', 'flagged']),
|
|
133
|
+
resolvedValue: z.string().optional(),
|
|
134
|
+
});
|
|
135
|
+
export const mergeResultSchema = z.object({
|
|
136
|
+
merged: canonicalSpecificationSchema,
|
|
137
|
+
conflicts: z.array(mergeConflictSchema).readonly(),
|
|
138
|
+
});
|
|
139
|
+
export const COMPLETENESS_WEIGHTS = {
|
|
140
|
+
title: 0.05,
|
|
141
|
+
businessGoal: 0.1,
|
|
142
|
+
stakeholders: 0.05,
|
|
143
|
+
assumptions: 0.1,
|
|
144
|
+
constraints: 0.05,
|
|
145
|
+
functionalRequirements: 0.25,
|
|
146
|
+
nonFunctionalRequirements: 0.1,
|
|
147
|
+
acceptanceCriteria: 0.15,
|
|
148
|
+
risks: 0.05,
|
|
149
|
+
dependencies: 0.05,
|
|
150
|
+
definitionOfDone: 0.05,
|
|
151
|
+
};
|