@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,419 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const intakeVerdictSchema: z.ZodEnum<{
|
|
3
|
+
Ready: "Ready";
|
|
4
|
+
NotReady: "NotReady";
|
|
5
|
+
}>;
|
|
6
|
+
export type IntakeVerdict = z.infer<typeof intakeVerdictSchema>;
|
|
7
|
+
export declare const sourceMetadataSchema: z.ZodObject<{
|
|
8
|
+
fetchedAt: z.ZodString;
|
|
9
|
+
checksum: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type SourceMetadata = z.infer<typeof sourceMetadataSchema>;
|
|
12
|
+
export declare const intermediateRequirementsSchema: z.ZodObject<{
|
|
13
|
+
title: z.ZodOptional<z.ZodString>;
|
|
14
|
+
description: z.ZodOptional<z.ZodString>;
|
|
15
|
+
rawFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
16
|
+
sourceMetadata: z.ZodObject<{
|
|
17
|
+
fetchedAt: z.ZodString;
|
|
18
|
+
checksum: z.ZodString;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type IntermediateRequirements = z.infer<typeof intermediateRequirementsSchema>;
|
|
22
|
+
export declare const analystConfigSchema: z.ZodObject<{
|
|
23
|
+
readinessThreshold: z.ZodNumber;
|
|
24
|
+
maxAmbiguities: z.ZodNumber;
|
|
25
|
+
requireExplicitAssumptions: z.ZodBoolean;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type AnalystConfig = z.infer<typeof analystConfigSchema>;
|
|
28
|
+
export declare const intakeConfigSchema: z.ZodObject<{
|
|
29
|
+
analyst: z.ZodObject<{
|
|
30
|
+
readinessThreshold: z.ZodNumber;
|
|
31
|
+
maxAmbiguities: z.ZodNumber;
|
|
32
|
+
requireExplicitAssumptions: z.ZodBoolean;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type IntakeConfig = z.infer<typeof intakeConfigSchema>;
|
|
36
|
+
export declare const intakeResultSchema: z.ZodObject<{
|
|
37
|
+
verdict: z.ZodEnum<{
|
|
38
|
+
Ready: "Ready";
|
|
39
|
+
NotReady: "NotReady";
|
|
40
|
+
}>;
|
|
41
|
+
artifacts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
42
|
+
type: z.ZodEnum<{
|
|
43
|
+
intake_requirements: "intake_requirements";
|
|
44
|
+
canonical_specification: "canonical_specification";
|
|
45
|
+
clarification_questions: "clarification_questions";
|
|
46
|
+
clarification_answers: "clarification_answers";
|
|
47
|
+
plan: "plan";
|
|
48
|
+
plan_review: "plan_review";
|
|
49
|
+
test_plan: "test_plan";
|
|
50
|
+
implementation: "implementation";
|
|
51
|
+
static_review: "static_review";
|
|
52
|
+
security_review: "security_review";
|
|
53
|
+
performance_review: "performance_review";
|
|
54
|
+
adversarial_review: "adversarial_review";
|
|
55
|
+
design_review: "design_review";
|
|
56
|
+
docs_review: "docs_review";
|
|
57
|
+
ux_review: "ux_review";
|
|
58
|
+
review_report: "review_report";
|
|
59
|
+
remediation_plan: "remediation_plan";
|
|
60
|
+
verification: "verification";
|
|
61
|
+
judge_decision: "judge_decision";
|
|
62
|
+
planning_agreement: "planning_agreement";
|
|
63
|
+
implementation_agreement: "implementation_agreement";
|
|
64
|
+
verification_agreement: "verification_agreement";
|
|
65
|
+
release_summary: "release_summary";
|
|
66
|
+
release_agreement: "release_agreement";
|
|
67
|
+
escalation_context: "escalation_context";
|
|
68
|
+
run_manifest: "run_manifest";
|
|
69
|
+
codebase_context: "codebase_context";
|
|
70
|
+
test_suite: "test_suite";
|
|
71
|
+
acceptance_validation: "acceptance_validation";
|
|
72
|
+
review_findings: "review_findings";
|
|
73
|
+
task_breakdown: "task_breakdown";
|
|
74
|
+
decomposition_review: "decomposition_review";
|
|
75
|
+
task_specifications: "task_specifications";
|
|
76
|
+
pr_diff_context: "pr_diff_context";
|
|
77
|
+
}>;
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
version: z.ZodNumber;
|
|
80
|
+
checksum: z.ZodString;
|
|
81
|
+
}, z.core.$strip>>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export type IntakeResult = z.infer<typeof intakeResultSchema>;
|
|
84
|
+
export declare const ambiguitySeveritySchema: z.ZodEnum<{
|
|
85
|
+
high: "high";
|
|
86
|
+
medium: "medium";
|
|
87
|
+
low: "low";
|
|
88
|
+
}>;
|
|
89
|
+
export type AmbiguitySeverity = z.infer<typeof ambiguitySeveritySchema>;
|
|
90
|
+
export declare const ambiguitySchema: z.ZodObject<{
|
|
91
|
+
id: z.ZodString;
|
|
92
|
+
field: z.ZodString;
|
|
93
|
+
description: z.ZodString;
|
|
94
|
+
severity: z.ZodEnum<{
|
|
95
|
+
high: "high";
|
|
96
|
+
medium: "medium";
|
|
97
|
+
low: "low";
|
|
98
|
+
}>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export type Ambiguity = z.infer<typeof ambiguitySchema>;
|
|
101
|
+
export declare const requirementsAnalysisSchema: z.ZodObject<{
|
|
102
|
+
completenessScore: z.ZodNumber;
|
|
103
|
+
ambiguities: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
field: z.ZodString;
|
|
106
|
+
description: z.ZodString;
|
|
107
|
+
severity: z.ZodEnum<{
|
|
108
|
+
high: "high";
|
|
109
|
+
medium: "medium";
|
|
110
|
+
low: "low";
|
|
111
|
+
}>;
|
|
112
|
+
}, z.core.$strip>>>;
|
|
113
|
+
assumptions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
description: z.ZodString;
|
|
116
|
+
impact: z.ZodEnum<{
|
|
117
|
+
high: "high";
|
|
118
|
+
medium: "medium";
|
|
119
|
+
low: "low";
|
|
120
|
+
}>;
|
|
121
|
+
validated: z.ZodBoolean;
|
|
122
|
+
}, z.core.$strip>>>;
|
|
123
|
+
risks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
124
|
+
id: z.ZodString;
|
|
125
|
+
description: z.ZodString;
|
|
126
|
+
likelihood: z.ZodEnum<{
|
|
127
|
+
high: "high";
|
|
128
|
+
medium: "medium";
|
|
129
|
+
low: "low";
|
|
130
|
+
}>;
|
|
131
|
+
impact: z.ZodEnum<{
|
|
132
|
+
high: "high";
|
|
133
|
+
medium: "medium";
|
|
134
|
+
low: "low";
|
|
135
|
+
}>;
|
|
136
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
constraints: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
139
|
+
id: z.ZodString;
|
|
140
|
+
description: z.ZodString;
|
|
141
|
+
type: z.ZodEnum<{
|
|
142
|
+
resource: "resource";
|
|
143
|
+
technical: "technical";
|
|
144
|
+
business: "business";
|
|
145
|
+
regulatory: "regulatory";
|
|
146
|
+
timeline: "timeline";
|
|
147
|
+
}>;
|
|
148
|
+
source: z.ZodString;
|
|
149
|
+
}, z.core.$strip>>>;
|
|
150
|
+
dependencies: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
151
|
+
id: z.ZodString;
|
|
152
|
+
description: z.ZodString;
|
|
153
|
+
type: z.ZodEnum<{
|
|
154
|
+
external: "external";
|
|
155
|
+
internal: "internal";
|
|
156
|
+
}>;
|
|
157
|
+
status: z.ZodEnum<{
|
|
158
|
+
pending: "pending";
|
|
159
|
+
available: "available";
|
|
160
|
+
blocked: "blocked";
|
|
161
|
+
}>;
|
|
162
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
163
|
+
}, z.core.$strip>>>;
|
|
164
|
+
missingInformation: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
export type RequirementsAnalysis = z.infer<typeof requirementsAnalysisSchema>;
|
|
167
|
+
export declare const clarificationQuestionCategorySchema: z.ZodEnum<{
|
|
168
|
+
ambiguity: "ambiguity";
|
|
169
|
+
missing: "missing";
|
|
170
|
+
assumption: "assumption";
|
|
171
|
+
risk: "risk";
|
|
172
|
+
constraint: "constraint";
|
|
173
|
+
}>;
|
|
174
|
+
export type ClarificationQuestionCategory = z.infer<typeof clarificationQuestionCategorySchema>;
|
|
175
|
+
export declare const clarificationQuestionSchema: z.ZodObject<{
|
|
176
|
+
id: z.ZodString;
|
|
177
|
+
category: z.ZodEnum<{
|
|
178
|
+
ambiguity: "ambiguity";
|
|
179
|
+
missing: "missing";
|
|
180
|
+
assumption: "assumption";
|
|
181
|
+
risk: "risk";
|
|
182
|
+
constraint: "constraint";
|
|
183
|
+
}>;
|
|
184
|
+
question: z.ZodString;
|
|
185
|
+
context: z.ZodString;
|
|
186
|
+
suggestedDefault: z.ZodOptional<z.ZodString>;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
export type ClarificationQuestion = z.infer<typeof clarificationQuestionSchema>;
|
|
189
|
+
export declare const analystInputSchema: z.ZodObject<{
|
|
190
|
+
specification: z.ZodObject<{
|
|
191
|
+
id: z.core.$ZodBranded<z.ZodString, "SpecificationId", "out">;
|
|
192
|
+
version: z.ZodNumber;
|
|
193
|
+
previousVersion: z.ZodOptional<z.ZodString>;
|
|
194
|
+
title: z.ZodString;
|
|
195
|
+
businessGoal: z.ZodString;
|
|
196
|
+
stakeholders: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
197
|
+
name: z.ZodString;
|
|
198
|
+
role: z.ZodString;
|
|
199
|
+
interest: z.ZodString;
|
|
200
|
+
}, z.core.$strip>>>;
|
|
201
|
+
assumptions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
202
|
+
id: z.ZodString;
|
|
203
|
+
description: z.ZodString;
|
|
204
|
+
impact: z.ZodEnum<{
|
|
205
|
+
high: "high";
|
|
206
|
+
medium: "medium";
|
|
207
|
+
low: "low";
|
|
208
|
+
}>;
|
|
209
|
+
validated: z.ZodBoolean;
|
|
210
|
+
}, z.core.$strip>>>;
|
|
211
|
+
constraints: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
212
|
+
id: z.ZodString;
|
|
213
|
+
description: z.ZodString;
|
|
214
|
+
type: z.ZodEnum<{
|
|
215
|
+
resource: "resource";
|
|
216
|
+
technical: "technical";
|
|
217
|
+
business: "business";
|
|
218
|
+
regulatory: "regulatory";
|
|
219
|
+
timeline: "timeline";
|
|
220
|
+
}>;
|
|
221
|
+
source: z.ZodString;
|
|
222
|
+
}, z.core.$strip>>>;
|
|
223
|
+
functionalRequirements: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
224
|
+
id: z.ZodString;
|
|
225
|
+
title: z.ZodString;
|
|
226
|
+
description: z.ZodString;
|
|
227
|
+
priority: z.ZodEnum<{
|
|
228
|
+
must: "must";
|
|
229
|
+
should: "should";
|
|
230
|
+
could: "could";
|
|
231
|
+
wont: "wont";
|
|
232
|
+
}>;
|
|
233
|
+
acceptanceCriteria: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
234
|
+
dependencies: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
235
|
+
}, z.core.$strip>>>;
|
|
236
|
+
nonFunctionalRequirements: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
237
|
+
id: z.ZodString;
|
|
238
|
+
title: z.ZodString;
|
|
239
|
+
description: z.ZodString;
|
|
240
|
+
category: z.ZodEnum<{
|
|
241
|
+
security: "security";
|
|
242
|
+
performance: "performance";
|
|
243
|
+
maintainability: "maintainability";
|
|
244
|
+
other: "other";
|
|
245
|
+
reliability: "reliability";
|
|
246
|
+
scalability: "scalability";
|
|
247
|
+
usability: "usability";
|
|
248
|
+
compatibility: "compatibility";
|
|
249
|
+
}>;
|
|
250
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
251
|
+
threshold: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, z.core.$strip>>>;
|
|
253
|
+
acceptanceCriteria: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
254
|
+
id: z.ZodString;
|
|
255
|
+
description: z.ZodString;
|
|
256
|
+
verificationMethod: z.ZodEnum<{
|
|
257
|
+
review: "review";
|
|
258
|
+
test: "test";
|
|
259
|
+
demo: "demo";
|
|
260
|
+
analysis: "analysis";
|
|
261
|
+
}>;
|
|
262
|
+
requirementIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
263
|
+
}, z.core.$strip>>>;
|
|
264
|
+
risks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
description: z.ZodString;
|
|
267
|
+
likelihood: z.ZodEnum<{
|
|
268
|
+
high: "high";
|
|
269
|
+
medium: "medium";
|
|
270
|
+
low: "low";
|
|
271
|
+
}>;
|
|
272
|
+
impact: z.ZodEnum<{
|
|
273
|
+
high: "high";
|
|
274
|
+
medium: "medium";
|
|
275
|
+
low: "low";
|
|
276
|
+
}>;
|
|
277
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
278
|
+
}, z.core.$strip>>>;
|
|
279
|
+
dependencies: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
280
|
+
id: z.ZodString;
|
|
281
|
+
description: z.ZodString;
|
|
282
|
+
type: z.ZodEnum<{
|
|
283
|
+
external: "external";
|
|
284
|
+
internal: "internal";
|
|
285
|
+
}>;
|
|
286
|
+
status: z.ZodEnum<{
|
|
287
|
+
pending: "pending";
|
|
288
|
+
available: "available";
|
|
289
|
+
blocked: "blocked";
|
|
290
|
+
}>;
|
|
291
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
292
|
+
}, z.core.$strip>>>;
|
|
293
|
+
definitionOfDone: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
294
|
+
sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
295
|
+
fetchedAt: z.ZodString;
|
|
296
|
+
checksum: z.ZodString;
|
|
297
|
+
fieldsMapped: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
298
|
+
}, z.core.$strip>>>;
|
|
299
|
+
createdAt: z.ZodString;
|
|
300
|
+
updatedAt: z.ZodString;
|
|
301
|
+
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
302
|
+
analysis: z.ZodOptional<z.ZodObject<{
|
|
303
|
+
completenessScore: z.ZodNumber;
|
|
304
|
+
ambiguityCount: z.ZodNumber;
|
|
305
|
+
riskCount: z.ZodNumber;
|
|
306
|
+
unvalidatedAssumptionCount: z.ZodNumber;
|
|
307
|
+
readinessVerdict: z.ZodEnum<{
|
|
308
|
+
Ready: "Ready";
|
|
309
|
+
NotReady: "NotReady";
|
|
310
|
+
}>;
|
|
311
|
+
analystNotes: z.ZodOptional<z.ZodString>;
|
|
312
|
+
}, z.core.$strip>>;
|
|
313
|
+
}, z.core.$strip>;
|
|
314
|
+
config: z.ZodObject<{
|
|
315
|
+
readinessThreshold: z.ZodNumber;
|
|
316
|
+
maxAmbiguities: z.ZodNumber;
|
|
317
|
+
requireExplicitAssumptions: z.ZodBoolean;
|
|
318
|
+
}, z.core.$strip>;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
export type AnalystInput = z.infer<typeof analystInputSchema>;
|
|
321
|
+
export declare const analystOutputSchema: z.ZodObject<{
|
|
322
|
+
verdict: z.ZodEnum<{
|
|
323
|
+
Ready: "Ready";
|
|
324
|
+
NotReady: "NotReady";
|
|
325
|
+
}>;
|
|
326
|
+
analysis: z.ZodObject<{
|
|
327
|
+
completenessScore: z.ZodNumber;
|
|
328
|
+
ambiguities: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
329
|
+
id: z.ZodString;
|
|
330
|
+
field: z.ZodString;
|
|
331
|
+
description: z.ZodString;
|
|
332
|
+
severity: z.ZodEnum<{
|
|
333
|
+
high: "high";
|
|
334
|
+
medium: "medium";
|
|
335
|
+
low: "low";
|
|
336
|
+
}>;
|
|
337
|
+
}, z.core.$strip>>>;
|
|
338
|
+
assumptions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
339
|
+
id: z.ZodString;
|
|
340
|
+
description: z.ZodString;
|
|
341
|
+
impact: z.ZodEnum<{
|
|
342
|
+
high: "high";
|
|
343
|
+
medium: "medium";
|
|
344
|
+
low: "low";
|
|
345
|
+
}>;
|
|
346
|
+
validated: z.ZodBoolean;
|
|
347
|
+
}, z.core.$strip>>>;
|
|
348
|
+
risks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
349
|
+
id: z.ZodString;
|
|
350
|
+
description: z.ZodString;
|
|
351
|
+
likelihood: z.ZodEnum<{
|
|
352
|
+
high: "high";
|
|
353
|
+
medium: "medium";
|
|
354
|
+
low: "low";
|
|
355
|
+
}>;
|
|
356
|
+
impact: z.ZodEnum<{
|
|
357
|
+
high: "high";
|
|
358
|
+
medium: "medium";
|
|
359
|
+
low: "low";
|
|
360
|
+
}>;
|
|
361
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
362
|
+
}, z.core.$strip>>>;
|
|
363
|
+
constraints: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
364
|
+
id: z.ZodString;
|
|
365
|
+
description: z.ZodString;
|
|
366
|
+
type: z.ZodEnum<{
|
|
367
|
+
resource: "resource";
|
|
368
|
+
technical: "technical";
|
|
369
|
+
business: "business";
|
|
370
|
+
regulatory: "regulatory";
|
|
371
|
+
timeline: "timeline";
|
|
372
|
+
}>;
|
|
373
|
+
source: z.ZodString;
|
|
374
|
+
}, z.core.$strip>>>;
|
|
375
|
+
dependencies: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
376
|
+
id: z.ZodString;
|
|
377
|
+
description: z.ZodString;
|
|
378
|
+
type: z.ZodEnum<{
|
|
379
|
+
external: "external";
|
|
380
|
+
internal: "internal";
|
|
381
|
+
}>;
|
|
382
|
+
status: z.ZodEnum<{
|
|
383
|
+
pending: "pending";
|
|
384
|
+
available: "available";
|
|
385
|
+
blocked: "blocked";
|
|
386
|
+
}>;
|
|
387
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
388
|
+
}, z.core.$strip>>>;
|
|
389
|
+
missingInformation: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
390
|
+
}, z.core.$strip>;
|
|
391
|
+
questions: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
392
|
+
id: z.ZodString;
|
|
393
|
+
category: z.ZodEnum<{
|
|
394
|
+
ambiguity: "ambiguity";
|
|
395
|
+
missing: "missing";
|
|
396
|
+
assumption: "assumption";
|
|
397
|
+
risk: "risk";
|
|
398
|
+
constraint: "constraint";
|
|
399
|
+
}>;
|
|
400
|
+
question: z.ZodString;
|
|
401
|
+
context: z.ZodString;
|
|
402
|
+
suggestedDefault: z.ZodOptional<z.ZodString>;
|
|
403
|
+
}, z.core.$strip>>>>;
|
|
404
|
+
}, z.core.$strip>;
|
|
405
|
+
export type AnalystOutput = z.infer<typeof analystOutputSchema>;
|
|
406
|
+
export declare const ambiguityResultSchema: z.ZodObject<{
|
|
407
|
+
ambiguities: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
408
|
+
id: z.ZodString;
|
|
409
|
+
field: z.ZodString;
|
|
410
|
+
description: z.ZodString;
|
|
411
|
+
severity: z.ZodEnum<{
|
|
412
|
+
high: "high";
|
|
413
|
+
medium: "medium";
|
|
414
|
+
low: "low";
|
|
415
|
+
}>;
|
|
416
|
+
}, z.core.$strip>>>;
|
|
417
|
+
isReady: z.ZodBoolean;
|
|
418
|
+
}, z.core.$strip>;
|
|
419
|
+
export type AmbiguityResult = z.infer<typeof ambiguityResultSchema>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { artifactRefSchema } from '../artifacts/artifact-system';
|
|
3
|
+
import { readinessVerdictSchema, threeTierSeveritySchema } from '../shared/string-enums';
|
|
4
|
+
import { canonicalSpecificationSchema, assumptionSchema, riskSchema, constraintSchema, dependencySchema, } from './canonical-specification';
|
|
5
|
+
export const intakeVerdictSchema = readinessVerdictSchema;
|
|
6
|
+
export const sourceMetadataSchema = z.object({
|
|
7
|
+
fetchedAt: z.string(),
|
|
8
|
+
checksum: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export const intermediateRequirementsSchema = z.object({
|
|
11
|
+
title: z.string().optional(),
|
|
12
|
+
description: z.string().optional(),
|
|
13
|
+
rawFields: z.record(z.string(), z.unknown()).optional(),
|
|
14
|
+
sourceMetadata: sourceMetadataSchema,
|
|
15
|
+
});
|
|
16
|
+
export const analystConfigSchema = z.object({
|
|
17
|
+
readinessThreshold: z.number(),
|
|
18
|
+
maxAmbiguities: z.number(),
|
|
19
|
+
requireExplicitAssumptions: z.boolean(),
|
|
20
|
+
});
|
|
21
|
+
export const intakeConfigSchema = z.object({
|
|
22
|
+
analyst: analystConfigSchema,
|
|
23
|
+
});
|
|
24
|
+
export const intakeResultSchema = z.object({
|
|
25
|
+
verdict: intakeVerdictSchema,
|
|
26
|
+
artifacts: z.array(artifactRefSchema).readonly(),
|
|
27
|
+
});
|
|
28
|
+
export const ambiguitySeveritySchema = threeTierSeveritySchema;
|
|
29
|
+
export const ambiguitySchema = z.object({
|
|
30
|
+
id: z.string(),
|
|
31
|
+
field: z.string(),
|
|
32
|
+
description: z.string(),
|
|
33
|
+
severity: ambiguitySeveritySchema,
|
|
34
|
+
});
|
|
35
|
+
export const requirementsAnalysisSchema = z.object({
|
|
36
|
+
completenessScore: z.number(),
|
|
37
|
+
ambiguities: z.array(ambiguitySchema).readonly(),
|
|
38
|
+
assumptions: z.array(assumptionSchema).readonly(),
|
|
39
|
+
risks: z.array(riskSchema).readonly(),
|
|
40
|
+
constraints: z.array(constraintSchema).readonly(),
|
|
41
|
+
dependencies: z.array(dependencySchema).readonly(),
|
|
42
|
+
missingInformation: z.array(z.string()).readonly(),
|
|
43
|
+
});
|
|
44
|
+
export const clarificationQuestionCategorySchema = z.enum([
|
|
45
|
+
'ambiguity',
|
|
46
|
+
'missing',
|
|
47
|
+
'assumption',
|
|
48
|
+
'risk',
|
|
49
|
+
'constraint',
|
|
50
|
+
]);
|
|
51
|
+
export const clarificationQuestionSchema = z.object({
|
|
52
|
+
id: z.string(),
|
|
53
|
+
category: clarificationQuestionCategorySchema,
|
|
54
|
+
question: z.string(),
|
|
55
|
+
context: z.string(),
|
|
56
|
+
suggestedDefault: z.string().optional(),
|
|
57
|
+
});
|
|
58
|
+
export const analystInputSchema = z.object({
|
|
59
|
+
specification: canonicalSpecificationSchema,
|
|
60
|
+
config: analystConfigSchema,
|
|
61
|
+
});
|
|
62
|
+
export const analystOutputSchema = z.object({
|
|
63
|
+
verdict: intakeVerdictSchema,
|
|
64
|
+
analysis: requirementsAnalysisSchema,
|
|
65
|
+
questions: z.array(clarificationQuestionSchema).readonly().optional(),
|
|
66
|
+
});
|
|
67
|
+
export const ambiguityResultSchema = z.object({
|
|
68
|
+
ambiguities: z.array(ambiguitySchema).readonly(),
|
|
69
|
+
isReady: z.boolean(),
|
|
70
|
+
});
|