@manehorizons/cadence-types 1.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 +5 -0
- package/dist/anomaly.d.ts +42 -0
- package/dist/anomaly.d.ts.map +1 -0
- package/dist/anomaly.js +42 -0
- package/dist/anomaly.js.map +1 -0
- package/dist/config.d.ts +825 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +234 -0
- package/dist/config.js.map +1 -0
- package/dist/events.d.ts +30 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +20 -0
- package/dist/events.js.map +1 -0
- package/dist/host.d.ts +10 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +2 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/intelligence.d.ts +1876 -0
- package/dist/intelligence.d.ts.map +1 -0
- package/dist/intelligence.js +321 -0
- package/dist/intelligence.js.map +1 -0
- package/dist/plan.d.ts +168 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/plan.js +36 -0
- package/dist/plan.js.map +1 -0
- package/dist/profile.d.ts +23 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +32 -0
- package/dist/profile.js.map +1 -0
- package/dist/spec.d.ts +67 -0
- package/dist/spec.d.ts.map +1 -0
- package/dist/spec.js +19 -0
- package/dist/spec.js.map +1 -0
- package/dist/state.d.ts +256 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +81 -0
- package/dist/state.js.map +1 -0
- package/dist/summary.d.ts +283 -0
- package/dist/summary.d.ts.map +1 -0
- package/dist/summary.js +42 -0
- package/dist/summary.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../src/intelligence.ts"],"names":[],"mappings":"AAA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MAAM,CAAA;CAAE,CAAC;AAE1B,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,WAAW,EAAE,kBAAkB,EAAE,CAAC;CACnC,CAAC"}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const RecommendationSourceZ = z.enum([
|
|
3
|
+
'manual',
|
|
4
|
+
'code-analysis',
|
|
5
|
+
'impact',
|
|
6
|
+
'cadence',
|
|
7
|
+
'session',
|
|
8
|
+
]);
|
|
9
|
+
export const RecommendationStatusZ = z.enum([
|
|
10
|
+
'candidate',
|
|
11
|
+
'accepted',
|
|
12
|
+
'deferred',
|
|
13
|
+
'rejected',
|
|
14
|
+
'converted',
|
|
15
|
+
]);
|
|
16
|
+
export const RecommendationReadinessZ = z.enum([
|
|
17
|
+
'raw-idea',
|
|
18
|
+
'needs-evidence',
|
|
19
|
+
'needs-decision',
|
|
20
|
+
'ready-for-milestone',
|
|
21
|
+
'ready-for-cadence-spec',
|
|
22
|
+
'blocked',
|
|
23
|
+
]);
|
|
24
|
+
export const RecommendationPriorityZ = z.enum(['low', 'medium', 'high', 'critical']);
|
|
25
|
+
export const RecommendationDecayStateZ = z.enum([
|
|
26
|
+
'fresh',
|
|
27
|
+
'aging',
|
|
28
|
+
'stale',
|
|
29
|
+
'superseded',
|
|
30
|
+
'contradicted',
|
|
31
|
+
'needs-revalidation',
|
|
32
|
+
]);
|
|
33
|
+
export const RecommendationZ = z.object({
|
|
34
|
+
id: z.string().min(1),
|
|
35
|
+
title: z.string().min(1),
|
|
36
|
+
summary: z.string().min(1),
|
|
37
|
+
source: RecommendationSourceZ,
|
|
38
|
+
status: RecommendationStatusZ,
|
|
39
|
+
readiness: RecommendationReadinessZ,
|
|
40
|
+
priority: RecommendationPriorityZ,
|
|
41
|
+
leverageScore: z.number().min(0).max(10),
|
|
42
|
+
riskScore: z.number().min(0).max(10),
|
|
43
|
+
confidence: z.number().min(0).max(1),
|
|
44
|
+
decayState: RecommendationDecayStateZ,
|
|
45
|
+
affectedAreas: z.array(z.string()),
|
|
46
|
+
affectedFiles: z.array(z.string()),
|
|
47
|
+
suggestedMilestoneId: z.string().optional(),
|
|
48
|
+
suggestedBackendAction: z.string().optional(),
|
|
49
|
+
evidenceIds: z.array(z.string()),
|
|
50
|
+
assumptionIds: z.array(z.string()),
|
|
51
|
+
decisionIds: z.array(z.string()),
|
|
52
|
+
// Slice 34.1: exact-optional FK to the CADENCE phase this rec was converted
|
|
53
|
+
// into. Set only by `cadence recommendation convert`; never auto-derived.
|
|
54
|
+
convertedToPhaseId: z.string().optional(),
|
|
55
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
56
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
57
|
+
});
|
|
58
|
+
export const EvidenceZ = z.object({
|
|
59
|
+
id: z.string().min(1),
|
|
60
|
+
recommendationId: z.string().min(1),
|
|
61
|
+
kind: z.enum(['file', 'command', 'cadence-artifact', 'note']),
|
|
62
|
+
summary: z.string().min(1),
|
|
63
|
+
path: z.string().optional(),
|
|
64
|
+
command: z.string().optional(),
|
|
65
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
66
|
+
});
|
|
67
|
+
export const AssumptionZ = z.object({
|
|
68
|
+
id: z.string().min(1),
|
|
69
|
+
recommendationId: z.string().min(1),
|
|
70
|
+
text: z.string().min(1),
|
|
71
|
+
status: z.enum(['open', 'validated', 'rejected']),
|
|
72
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
73
|
+
});
|
|
74
|
+
// Slice 31: `supersedes` is a derived inverse-link array. Always present
|
|
75
|
+
// (default []), recomputed on every write via deriveDecisionInverseLinks.
|
|
76
|
+
// Operators never set this directly; the supersession edge is owned by
|
|
77
|
+
// `supersededBy` (Slice 28).
|
|
78
|
+
export const IntelligenceDecisionZ = z.object({
|
|
79
|
+
id: z.string().min(1),
|
|
80
|
+
recommendationId: z.string().optional(),
|
|
81
|
+
title: z.string().min(1),
|
|
82
|
+
rationale: z.string().min(1),
|
|
83
|
+
status: z.enum(['active', 'superseded', 'rescinded']).default('active'),
|
|
84
|
+
decidedAt: z.string().datetime({ offset: true }),
|
|
85
|
+
supersededBy: z.string().optional(),
|
|
86
|
+
supersedes: z.array(z.string()).default([]),
|
|
87
|
+
});
|
|
88
|
+
export const RecommendationLedgerZ = z.object({
|
|
89
|
+
schemaVersion: z.literal(1),
|
|
90
|
+
recommendations: z.array(RecommendationZ),
|
|
91
|
+
});
|
|
92
|
+
export const EvidenceLedgerZ = z.object({
|
|
93
|
+
schemaVersion: z.literal(1),
|
|
94
|
+
evidence: z.array(EvidenceZ),
|
|
95
|
+
});
|
|
96
|
+
export const AssumptionLedgerZ = z.object({
|
|
97
|
+
schemaVersion: z.literal(1),
|
|
98
|
+
assumptions: z.array(AssumptionZ),
|
|
99
|
+
});
|
|
100
|
+
export const IntelligenceDecisionLedgerZ = z.object({
|
|
101
|
+
schemaVersion: z.literal(1),
|
|
102
|
+
decisions: z.array(IntelligenceDecisionZ),
|
|
103
|
+
});
|
|
104
|
+
export function emptyRecommendationLedger() {
|
|
105
|
+
return { schemaVersion: 1, recommendations: [] };
|
|
106
|
+
}
|
|
107
|
+
export function emptyEvidenceLedger() {
|
|
108
|
+
return { schemaVersion: 1, evidence: [] };
|
|
109
|
+
}
|
|
110
|
+
export function emptyAssumptionLedger() {
|
|
111
|
+
return { schemaVersion: 1, assumptions: [] };
|
|
112
|
+
}
|
|
113
|
+
export function emptyIntelligenceDecisionLedger() {
|
|
114
|
+
return { schemaVersion: 1, decisions: [] };
|
|
115
|
+
}
|
|
116
|
+
export const RepoScanZ = z.object({
|
|
117
|
+
git: z.object({
|
|
118
|
+
available: z.boolean(),
|
|
119
|
+
branch: z.string().optional(),
|
|
120
|
+
dirty: z.boolean().optional(),
|
|
121
|
+
ahead: z.number().int().optional(),
|
|
122
|
+
behind: z.number().int().optional(),
|
|
123
|
+
recentCommits: z.array(z.string()).optional(),
|
|
124
|
+
}),
|
|
125
|
+
pkg: z.object({
|
|
126
|
+
name: z.string().optional(),
|
|
127
|
+
version: z.string().optional(),
|
|
128
|
+
workspaces: z.boolean().optional(),
|
|
129
|
+
scripts: z.object({
|
|
130
|
+
test: z.boolean().optional(),
|
|
131
|
+
build: z.boolean().optional(),
|
|
132
|
+
lint: z.boolean().optional(),
|
|
133
|
+
typecheck: z.boolean().optional(),
|
|
134
|
+
}),
|
|
135
|
+
}),
|
|
136
|
+
docs: z.object({
|
|
137
|
+
readme: z.boolean(),
|
|
138
|
+
design: z.boolean(),
|
|
139
|
+
roadmap: z.boolean(),
|
|
140
|
+
changelog: z.boolean(),
|
|
141
|
+
docsDir: z.boolean(),
|
|
142
|
+
}),
|
|
143
|
+
surfaces: z.object({ turbo: z.boolean() }),
|
|
144
|
+
phases: z.object({ count: z.number().int(), latestId: z.string().optional() }),
|
|
145
|
+
});
|
|
146
|
+
export const BackendStatusZ = z.object({
|
|
147
|
+
present: z.boolean(),
|
|
148
|
+
kind: z.literal('cadence').nullable(),
|
|
149
|
+
loopPosition: z.string().optional(),
|
|
150
|
+
activePhase: z.string().nullable().optional(),
|
|
151
|
+
activeDraft: z.string().nullable().optional(),
|
|
152
|
+
activeSpec: z.string().nullable().optional(),
|
|
153
|
+
profile: z.string().optional(),
|
|
154
|
+
tier: z.string().nullable().optional(),
|
|
155
|
+
legalActions: z.array(z.string()),
|
|
156
|
+
artifacts: z
|
|
157
|
+
.object({
|
|
158
|
+
phaseCount: z.number().int(),
|
|
159
|
+
roadmap: z.boolean(),
|
|
160
|
+
state: z.boolean(),
|
|
161
|
+
milestones: z.boolean(),
|
|
162
|
+
})
|
|
163
|
+
.optional(),
|
|
164
|
+
stateError: z.string().optional(),
|
|
165
|
+
});
|
|
166
|
+
export const InspectionFlagCodeZ = z.enum([
|
|
167
|
+
'git-dirty-or-diverged',
|
|
168
|
+
'loop-state-inconsistent',
|
|
169
|
+
'ledger-decay',
|
|
170
|
+
'docs-missing',
|
|
171
|
+
]);
|
|
172
|
+
export const InspectionFlagZ = z.object({
|
|
173
|
+
code: InspectionFlagCodeZ,
|
|
174
|
+
severity: z.enum(['info', 'warn']),
|
|
175
|
+
message: z.string().min(1),
|
|
176
|
+
evidence: z.string().optional(),
|
|
177
|
+
});
|
|
178
|
+
export const InspectionZ = z.object({
|
|
179
|
+
schemaVersion: z.literal(1),
|
|
180
|
+
generatedAt: z.string().datetime({ offset: true }),
|
|
181
|
+
repo: RepoScanZ,
|
|
182
|
+
backend: BackendStatusZ,
|
|
183
|
+
ledger: z.object({
|
|
184
|
+
recommendations: z.number().int(),
|
|
185
|
+
byDecay: z.record(z.string(), z.number().int()),
|
|
186
|
+
evidence: z.number().int(),
|
|
187
|
+
}),
|
|
188
|
+
flags: z.array(InspectionFlagZ),
|
|
189
|
+
});
|
|
190
|
+
export const ScoreTermZ = z.object({
|
|
191
|
+
label: z.string().min(1),
|
|
192
|
+
value: z.number(),
|
|
193
|
+
});
|
|
194
|
+
export const RecommendationRankZ = z.object({
|
|
195
|
+
id: z.string().min(1),
|
|
196
|
+
title: z.string().min(1),
|
|
197
|
+
raw: z.number(),
|
|
198
|
+
score: z.number().int().min(0).max(100),
|
|
199
|
+
status: RecommendationStatusZ,
|
|
200
|
+
readiness: RecommendationReadinessZ,
|
|
201
|
+
priority: RecommendationPriorityZ,
|
|
202
|
+
decayState: RecommendationDecayStateZ,
|
|
203
|
+
terms: z.array(ScoreTermZ),
|
|
204
|
+
suggestedBackendAction: z.string().optional(),
|
|
205
|
+
});
|
|
206
|
+
export const RecommendationAdvisoryZ = z.object({
|
|
207
|
+
kind: z.enum(['finish-loop', 'top-recommendation', 'spec-new', 'empty']),
|
|
208
|
+
primary: z.string().min(1),
|
|
209
|
+
secondary: z.string().optional(),
|
|
210
|
+
});
|
|
211
|
+
export const RecommendationReportZ = z.object({
|
|
212
|
+
schemaVersion: z.literal(1),
|
|
213
|
+
generatedAt: z.string().datetime({ offset: true }),
|
|
214
|
+
ranked: z.array(RecommendationRankZ),
|
|
215
|
+
parked: z.array(z.object({
|
|
216
|
+
id: z.string().min(1),
|
|
217
|
+
title: z.string().min(1),
|
|
218
|
+
status: RecommendationStatusZ,
|
|
219
|
+
readiness: RecommendationReadinessZ,
|
|
220
|
+
})),
|
|
221
|
+
needsAttention: z.array(z.object({
|
|
222
|
+
id: z.string().min(1),
|
|
223
|
+
title: z.string().min(1),
|
|
224
|
+
decayState: RecommendationDecayStateZ,
|
|
225
|
+
})),
|
|
226
|
+
advisory: RecommendationAdvisoryZ,
|
|
227
|
+
totals: z.object({
|
|
228
|
+
total: z.number().int(),
|
|
229
|
+
ranked: z.number().int(),
|
|
230
|
+
parked: z.number().int(),
|
|
231
|
+
needsAttention: z.number().int(),
|
|
232
|
+
excluded: z.number().int(),
|
|
233
|
+
}),
|
|
234
|
+
});
|
|
235
|
+
export const MilestoneStatusZ = z.enum([
|
|
236
|
+
'proposed',
|
|
237
|
+
'accepted',
|
|
238
|
+
'exported',
|
|
239
|
+
'deferred',
|
|
240
|
+
'closed',
|
|
241
|
+
]);
|
|
242
|
+
export const MilestonePreMortemZ = z.object({
|
|
243
|
+
likelyFailureModes: z.array(z.string()),
|
|
244
|
+
hiddenDependencies: z.array(z.string()),
|
|
245
|
+
driftRisks: z.array(z.string()),
|
|
246
|
+
outOfScope: z.array(z.string()),
|
|
247
|
+
});
|
|
248
|
+
export const IntelligenceMilestoneZ = z.object({
|
|
249
|
+
id: z.string().min(1),
|
|
250
|
+
name: z.string().min(1),
|
|
251
|
+
objective: z.string().min(1),
|
|
252
|
+
status: MilestoneStatusZ,
|
|
253
|
+
recommendationIds: z.array(z.string().min(1)).min(1),
|
|
254
|
+
preMortem: MilestonePreMortemZ,
|
|
255
|
+
exportTargets: z.array(z.object({
|
|
256
|
+
backend: z.literal('cadence'),
|
|
257
|
+
artifactPath: z.string(),
|
|
258
|
+
exportedAt: z.string().datetime({ offset: true }),
|
|
259
|
+
})),
|
|
260
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
261
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
262
|
+
});
|
|
263
|
+
export const MilestoneLedgerZ = z.object({
|
|
264
|
+
schemaVersion: z.literal(1),
|
|
265
|
+
milestones: z.array(IntelligenceMilestoneZ),
|
|
266
|
+
});
|
|
267
|
+
export function emptyMilestoneLedger() {
|
|
268
|
+
return { schemaVersion: 1, milestones: [] };
|
|
269
|
+
}
|
|
270
|
+
export const ContextScopeZ = z.enum(['phase', 'handoff', 'review', 'agent']);
|
|
271
|
+
export const ContextRecZ = z.object({
|
|
272
|
+
id: z.string().min(1),
|
|
273
|
+
title: z.string().min(1),
|
|
274
|
+
score: z.number().int(),
|
|
275
|
+
status: RecommendationStatusZ,
|
|
276
|
+
readiness: RecommendationReadinessZ,
|
|
277
|
+
priority: RecommendationPriorityZ,
|
|
278
|
+
suggestedBackendAction: z.string().optional(),
|
|
279
|
+
});
|
|
280
|
+
export const ContextPacketZ = z.object({
|
|
281
|
+
schemaVersion: z.literal(1),
|
|
282
|
+
scope: ContextScopeZ,
|
|
283
|
+
generatedAt: z.string().datetime({ offset: true }),
|
|
284
|
+
loop: z.object({
|
|
285
|
+
present: z.boolean(),
|
|
286
|
+
loopPosition: z.string().optional(),
|
|
287
|
+
activePhase: z.string().nullable().optional(),
|
|
288
|
+
activeDraft: z.string().nullable().optional(),
|
|
289
|
+
activeSpec: z.string().nullable().optional(),
|
|
290
|
+
tier: z.string().nullable().optional(),
|
|
291
|
+
nextAction: z.string().optional(),
|
|
292
|
+
stateError: z.string().optional(),
|
|
293
|
+
}),
|
|
294
|
+
recommendations: z.array(ContextRecZ),
|
|
295
|
+
assumptions: z.array(z.object({
|
|
296
|
+
id: z.string().min(1),
|
|
297
|
+
recommendationId: z.string().min(1),
|
|
298
|
+
text: z.string().min(1),
|
|
299
|
+
status: z.literal('open'),
|
|
300
|
+
})),
|
|
301
|
+
decisions: z.array(z.object({
|
|
302
|
+
id: z.string().min(1),
|
|
303
|
+
title: z.string().min(1),
|
|
304
|
+
rationale: z.string().min(1),
|
|
305
|
+
recommendationId: z.string().optional(),
|
|
306
|
+
status: z.literal('active'),
|
|
307
|
+
})),
|
|
308
|
+
files: z.array(z.object({
|
|
309
|
+
path: z.string().min(1),
|
|
310
|
+
why: z.string().min(1),
|
|
311
|
+
})),
|
|
312
|
+
needsAttention: z.array(ContextRecZ).optional(),
|
|
313
|
+
totals: z.object({
|
|
314
|
+
recommendations: z.number().int(),
|
|
315
|
+
assumptions: z.number().int(),
|
|
316
|
+
decisions: z.number().int(),
|
|
317
|
+
files: z.number().int(),
|
|
318
|
+
recommendationsOmitted: z.number().int(),
|
|
319
|
+
}),
|
|
320
|
+
});
|
|
321
|
+
//# sourceMappingURL=intelligence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intelligence.js","sourceRoot":"","sources":["../src/intelligence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC1C,QAAQ;IACR,eAAe;IACf,QAAQ;IACR,SAAS;IACT,SAAS;CACV,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC1C,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,WAAW;CACZ,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7C,UAAU;IACV,gBAAgB;IAChB,gBAAgB;IAChB,qBAAqB;IACrB,wBAAwB;IACxB,SAAS;CACV,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAGrF,MAAM,CAAC,MAAM,yB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vC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;KAC5B,CAAC,CACH;IACD,KAAK,EAAE,CAAC,CAAC,KAAK,CACZ,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACvB,CAAC,CACH;IACD,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;IAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;QACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;QAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;QAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;QACvB,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;KACzC,CAAC;CACH,CAAC,CAAC"}
|
package/dist/plan.d.ts
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AcceptanceCriterionZ: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
name: z.ZodDefault<z.ZodString>;
|
|
5
|
+
given: z.ZodString;
|
|
6
|
+
when: z.ZodString;
|
|
7
|
+
then: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
given: string;
|
|
12
|
+
when: string;
|
|
13
|
+
then: string;
|
|
14
|
+
}, {
|
|
15
|
+
id: string;
|
|
16
|
+
given: string;
|
|
17
|
+
when: string;
|
|
18
|
+
then: string;
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export type AcceptanceCriterion = z.infer<typeof AcceptanceCriterionZ>;
|
|
22
|
+
export declare const TaskZ: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
26
|
+
action: z.ZodString;
|
|
27
|
+
verify: z.ZodString;
|
|
28
|
+
done: z.ZodString;
|
|
29
|
+
status: z.ZodOptional<z.ZodEnum<["PENDING", "IN_PROGRESS", "DONE", "DONE_WITH_CONCERNS", "NEEDS_CONTEXT", "BLOCKED"]>>;
|
|
30
|
+
touchedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
files: string[];
|
|
35
|
+
action: string;
|
|
36
|
+
verify: string;
|
|
37
|
+
done: string;
|
|
38
|
+
status?: "PENDING" | "IN_PROGRESS" | "DONE" | "DONE_WITH_CONCERNS" | "NEEDS_CONTEXT" | "BLOCKED" | undefined;
|
|
39
|
+
touchedFiles?: string[] | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
files: string[];
|
|
44
|
+
action: string;
|
|
45
|
+
verify: string;
|
|
46
|
+
done: string;
|
|
47
|
+
status?: "PENDING" | "IN_PROGRESS" | "DONE" | "DONE_WITH_CONCERNS" | "NEEDS_CONTEXT" | "BLOCKED" | undefined;
|
|
48
|
+
touchedFiles?: string[] | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
export type Task = z.infer<typeof TaskZ>;
|
|
51
|
+
export declare const DraftZ: z.ZodObject<{
|
|
52
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
phase: z.ZodString;
|
|
55
|
+
tier: z.ZodEnum<["quick-fix", "standard", "complex"]>;
|
|
56
|
+
/** Optional per-phase profile override. When set, wins over the project default in config. */
|
|
57
|
+
profile: z.ZodOptional<z.ZodEnum<["strict", "standard", "auto"]>>;
|
|
58
|
+
title: z.ZodString;
|
|
59
|
+
objective: z.ZodString;
|
|
60
|
+
acceptanceCriteria: z.ZodArray<z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
name: z.ZodDefault<z.ZodString>;
|
|
63
|
+
given: z.ZodString;
|
|
64
|
+
when: z.ZodString;
|
|
65
|
+
then: z.ZodString;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
id: string;
|
|
68
|
+
name: string;
|
|
69
|
+
given: string;
|
|
70
|
+
when: string;
|
|
71
|
+
then: string;
|
|
72
|
+
}, {
|
|
73
|
+
id: string;
|
|
74
|
+
given: string;
|
|
75
|
+
when: string;
|
|
76
|
+
then: string;
|
|
77
|
+
name?: string | undefined;
|
|
78
|
+
}>, "many">;
|
|
79
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
83
|
+
action: z.ZodString;
|
|
84
|
+
verify: z.ZodString;
|
|
85
|
+
done: z.ZodString;
|
|
86
|
+
status: z.ZodOptional<z.ZodEnum<["PENDING", "IN_PROGRESS", "DONE", "DONE_WITH_CONCERNS", "NEEDS_CONTEXT", "BLOCKED"]>>;
|
|
87
|
+
touchedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
files: string[];
|
|
92
|
+
action: string;
|
|
93
|
+
verify: string;
|
|
94
|
+
done: string;
|
|
95
|
+
status?: "PENDING" | "IN_PROGRESS" | "DONE" | "DONE_WITH_CONCERNS" | "NEEDS_CONTEXT" | "BLOCKED" | undefined;
|
|
96
|
+
touchedFiles?: string[] | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
id: string;
|
|
99
|
+
name: string;
|
|
100
|
+
files: string[];
|
|
101
|
+
action: string;
|
|
102
|
+
verify: string;
|
|
103
|
+
done: string;
|
|
104
|
+
status?: "PENDING" | "IN_PROGRESS" | "DONE" | "DONE_WITH_CONCERNS" | "NEEDS_CONTEXT" | "BLOCKED" | undefined;
|
|
105
|
+
touchedFiles?: string[] | undefined;
|
|
106
|
+
}>, "many">;
|
|
107
|
+
boundaries: z.ZodArray<z.ZodString, "many">;
|
|
108
|
+
requiredSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
109
|
+
status: z.ZodEnum<["PENDING", "APPROVED", "IN_PROGRESS", "SETTLED"]>;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
status: "PENDING" | "IN_PROGRESS" | "APPROVED" | "SETTLED";
|
|
112
|
+
schemaVersion: 1;
|
|
113
|
+
tier: "standard" | "complex" | "quick-fix";
|
|
114
|
+
id: string;
|
|
115
|
+
phase: string;
|
|
116
|
+
title: string;
|
|
117
|
+
objective: string;
|
|
118
|
+
acceptanceCriteria: {
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
given: string;
|
|
122
|
+
when: string;
|
|
123
|
+
then: string;
|
|
124
|
+
}[];
|
|
125
|
+
tasks: {
|
|
126
|
+
id: string;
|
|
127
|
+
name: string;
|
|
128
|
+
files: string[];
|
|
129
|
+
action: string;
|
|
130
|
+
verify: string;
|
|
131
|
+
done: string;
|
|
132
|
+
status?: "PENDING" | "IN_PROGRESS" | "DONE" | "DONE_WITH_CONCERNS" | "NEEDS_CONTEXT" | "BLOCKED" | undefined;
|
|
133
|
+
touchedFiles?: string[] | undefined;
|
|
134
|
+
}[];
|
|
135
|
+
boundaries: string[];
|
|
136
|
+
profile?: "strict" | "standard" | "auto" | undefined;
|
|
137
|
+
requiredSkills?: string[] | undefined;
|
|
138
|
+
}, {
|
|
139
|
+
status: "PENDING" | "IN_PROGRESS" | "APPROVED" | "SETTLED";
|
|
140
|
+
schemaVersion: 1;
|
|
141
|
+
tier: "standard" | "complex" | "quick-fix";
|
|
142
|
+
id: string;
|
|
143
|
+
phase: string;
|
|
144
|
+
title: string;
|
|
145
|
+
objective: string;
|
|
146
|
+
acceptanceCriteria: {
|
|
147
|
+
id: string;
|
|
148
|
+
given: string;
|
|
149
|
+
when: string;
|
|
150
|
+
then: string;
|
|
151
|
+
name?: string | undefined;
|
|
152
|
+
}[];
|
|
153
|
+
tasks: {
|
|
154
|
+
id: string;
|
|
155
|
+
name: string;
|
|
156
|
+
files: string[];
|
|
157
|
+
action: string;
|
|
158
|
+
verify: string;
|
|
159
|
+
done: string;
|
|
160
|
+
status?: "PENDING" | "IN_PROGRESS" | "DONE" | "DONE_WITH_CONCERNS" | "NEEDS_CONTEXT" | "BLOCKED" | undefined;
|
|
161
|
+
touchedFiles?: string[] | undefined;
|
|
162
|
+
}[];
|
|
163
|
+
boundaries: string[];
|
|
164
|
+
profile?: "strict" | "standard" | "auto" | undefined;
|
|
165
|
+
requiredSkills?: string[] | undefined;
|
|
166
|
+
}>;
|
|
167
|
+
export type Draft = z.infer<typeof DraftZ>;
|
|
168
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAM/B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEvE,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;EAShB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAEzC,eAAO,MAAM,MAAM;;;;;IAKjB,8FAA8F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS9F,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
package/dist/plan.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TierZ, TaskStatusZ } from './state.js';
|
|
3
|
+
import { ProfileZ } from './profile.js';
|
|
4
|
+
export const AcceptanceCriterionZ = z.object({
|
|
5
|
+
id: z.string().regex(/^AC-\d+$/),
|
|
6
|
+
name: z.string().default(''),
|
|
7
|
+
given: z.string(),
|
|
8
|
+
when: z.string(),
|
|
9
|
+
then: z.string(),
|
|
10
|
+
});
|
|
11
|
+
export const TaskZ = z.object({
|
|
12
|
+
id: z.string(),
|
|
13
|
+
name: z.string(),
|
|
14
|
+
files: z.array(z.string()),
|
|
15
|
+
action: z.string(),
|
|
16
|
+
verify: z.string(),
|
|
17
|
+
done: z.string(),
|
|
18
|
+
status: TaskStatusZ.optional(),
|
|
19
|
+
touchedFiles: z.array(z.string()).optional(),
|
|
20
|
+
});
|
|
21
|
+
export const DraftZ = z.object({
|
|
22
|
+
schemaVersion: z.literal(1),
|
|
23
|
+
id: z.string().regex(/^\d{2}-\d{2}$/),
|
|
24
|
+
phase: z.string(),
|
|
25
|
+
tier: TierZ,
|
|
26
|
+
/** Optional per-phase profile override. When set, wins over the project default in config. */
|
|
27
|
+
profile: ProfileZ.optional(),
|
|
28
|
+
title: z.string(),
|
|
29
|
+
objective: z.string(),
|
|
30
|
+
acceptanceCriteria: z.array(AcceptanceCriterionZ),
|
|
31
|
+
tasks: z.array(TaskZ),
|
|
32
|
+
boundaries: z.array(z.string()),
|
|
33
|
+
requiredSkills: z.array(z.string()).optional(),
|
|
34
|
+
status: z.enum(['PENDING', 'APPROVED', 'IN_PROGRESS', 'SETTLED']),
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=plan.js.map
|
package/dist/plan.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC9B,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,KAAK;IACX,8FAA8F;IAC9F,OAAO,EAAE,QAAQ,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;IACrB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;CAClE,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ProfileZ: z.ZodEnum<["strict", "standard", "auto"]>;
|
|
3
|
+
export type Profile = z.infer<typeof ProfileZ>;
|
|
4
|
+
/**
|
|
5
|
+
* Universe of gate names CADENCE understands. The matrix in
|
|
6
|
+
* DESIGN.md Section 4.1 enumerates each gate's cost class; the engine in
|
|
7
|
+
* `@manehorizons/cadence-core/gates/engine.ts` decides which fire per (tier × profile).
|
|
8
|
+
*/
|
|
9
|
+
export declare const GateZ: z.ZodEnum<["coherence-check", "structural-verifier", "build-test-must-pass", "draft-read", "test-coverage", "anomaly-notify", "approve", "per-task-verify", "code-review", "deep-verify", "interactive-verdict", "plan-review", "security-audit"]>;
|
|
10
|
+
export type Gate = z.infer<typeof GateZ>;
|
|
11
|
+
export declare const GateSetZ: z.ZodObject<{
|
|
12
|
+
gates: z.ZodArray<z.ZodEnum<["coherence-check", "structural-verifier", "build-test-must-pass", "draft-read", "test-coverage", "anomaly-notify", "approve", "per-task-verify", "code-review", "deep-verify", "interactive-verdict", "plan-review", "security-audit"]>, "many">;
|
|
13
|
+
/** Soft cap on auto×complex per DESIGN.md M2 — gate impls refuse without `--allow-auto-complex`. */
|
|
14
|
+
softCap: z.ZodBoolean;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
gates: ("coherence-check" | "structural-verifier" | "build-test-must-pass" | "draft-read" | "test-coverage" | "anomaly-notify" | "approve" | "per-task-verify" | "code-review" | "deep-verify" | "interactive-verdict" | "plan-review" | "security-audit")[];
|
|
17
|
+
softCap: boolean;
|
|
18
|
+
}, {
|
|
19
|
+
gates: ("coherence-check" | "structural-verifier" | "build-test-must-pass" | "draft-read" | "test-coverage" | "anomaly-notify" | "approve" | "per-task-verify" | "code-review" | "deep-verify" | "interactive-verdict" | "plan-review" | "security-audit")[];
|
|
20
|
+
softCap: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
export type GateSet = z.infer<typeof GateSetZ>;
|
|
23
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,QAAQ,2CAAyC,CAAC;AAC/D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,KAAK,oPAkBhB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAEzC,eAAO,MAAM,QAAQ;;IAEnB,oGAAoG;;;;;;;;EAEpG,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
package/dist/profile.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const ProfileZ = z.enum(['strict', 'standard', 'auto']);
|
|
3
|
+
/**
|
|
4
|
+
* Universe of gate names CADENCE understands. The matrix in
|
|
5
|
+
* DESIGN.md Section 4.1 enumerates each gate's cost class; the engine in
|
|
6
|
+
* `@manehorizons/cadence-core/gates/engine.ts` decides which fire per (tier × profile).
|
|
7
|
+
*/
|
|
8
|
+
export const GateZ = z.enum([
|
|
9
|
+
// Free — always fire
|
|
10
|
+
'coherence-check',
|
|
11
|
+
'structural-verifier',
|
|
12
|
+
'build-test-must-pass',
|
|
13
|
+
// Cheap
|
|
14
|
+
'draft-read',
|
|
15
|
+
'test-coverage',
|
|
16
|
+
'anomaly-notify',
|
|
17
|
+
// Medium
|
|
18
|
+
'approve',
|
|
19
|
+
'per-task-verify',
|
|
20
|
+
'code-review',
|
|
21
|
+
// Expensive
|
|
22
|
+
'deep-verify',
|
|
23
|
+
'interactive-verdict',
|
|
24
|
+
'plan-review',
|
|
25
|
+
'security-audit',
|
|
26
|
+
]);
|
|
27
|
+
export const GateSetZ = z.object({
|
|
28
|
+
gates: z.array(GateZ),
|
|
29
|
+
/** Soft cap on auto×complex per DESIGN.md M2 — gate impls refuse without `--allow-auto-complex`. */
|
|
30
|
+
softCap: z.boolean(),
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AAG/D;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC;IAC1B,qBAAqB;IACrB,iBAAiB;IACjB,qBAAqB;IACrB,sBAAsB;IACtB,QAAQ;IACR,YAAY;IACZ,eAAe;IACf,gBAAgB;IAChB,SAAS;IACT,SAAS;IACT,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,aAAa;IACb,qBAAqB;IACrB,aAAa;IACb,gBAAgB;CACjB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;IACrB,oGAAoG;IACpG,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC"}
|