@jamesaphoenix/tx-types 0.11.0 → 0.12.0
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/README.md +105 -360
- package/dist/doc.d.ts +785 -10
- package/dist/doc.d.ts.map +1 -1
- package/dist/doc.js +332 -5
- package/dist/doc.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/response.d.ts +108 -12
- package/dist/response.d.ts.map +1 -1
- package/dist/response.js +13 -1
- package/dist/response.js.map +1 -1
- package/dist/task.d.ts +24 -7
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js +26 -4
- package/dist/task.js.map +1 -1
- package/package.json +1 -1
package/dist/doc.d.ts
CHANGED
|
@@ -6,19 +6,43 @@
|
|
|
6
6
|
* Core type definitions using Effect Schema (Doctrine Rule 10).
|
|
7
7
|
*
|
|
8
8
|
* Docs are structured YAML (source of truth) with rendered MD views.
|
|
9
|
-
* YAML content lives on disk (
|
|
9
|
+
* YAML content lives on disk (specs/); DB stores metadata + links only.
|
|
10
10
|
*/
|
|
11
11
|
import { Schema } from "effect";
|
|
12
|
-
export declare const DOC_KINDS: readonly ["overview", "prd", "design", "requirement", "system_design"];
|
|
12
|
+
export declare const DOC_KINDS: readonly ["overview", "prd", "design", "requirement", "system_design", "runbook", "decision"];
|
|
13
13
|
export declare const DOC_STATUSES: readonly ["changing", "locked"];
|
|
14
14
|
export declare const DOC_LINK_TYPES: readonly ["overview_to_prd", "overview_to_design", "prd_to_design", "design_patch", "requirement_to_prd", "requirement_to_design", "system_design_to_design", "system_design_to_prd"];
|
|
15
15
|
export declare const TASK_DOC_LINK_TYPES: readonly ["implements", "references"];
|
|
16
16
|
export declare const INVARIANT_ENFORCEMENT_TYPES: readonly ["integration_test", "linter", "llm_as_judge"];
|
|
17
17
|
export declare const INVARIANT_STATUSES: readonly ["active", "deprecated"];
|
|
18
18
|
export declare const INVARIANT_SOURCES: readonly ["explicit", "goals", "decision", "constraint"];
|
|
19
|
+
export declare const MD_DOC_KINDS: readonly ["spec", "task"];
|
|
20
|
+
export declare const MD_SPEC_TYPES: readonly ["prd", "design", "overview", "runbook", "decision"];
|
|
21
|
+
export declare const MD_SPEC_STATUSES: readonly ["active", "draft", "deprecated", "archived"];
|
|
22
|
+
export declare const MD_EARS_REQUIREMENT_KINDS: readonly ["ubiquitous", "event-driven", "state-driven", "unwanted", "optional", "complex"];
|
|
23
|
+
export declare const MD_EARS_PRIORITIES: readonly ["must", "should", "may"];
|
|
24
|
+
export declare const MD_VERIFICATION_TEST_TYPES: readonly ["unit", "integration", "e2e", "property", "manual"];
|
|
25
|
+
export declare const MD_INTERFACE_TYPES: readonly ["http", "queue", "event", "rpc", "cron"];
|
|
26
|
+
export declare const MD_INVARIANT_SEVERITIES: readonly ["low", "medium", "high", "critical"];
|
|
27
|
+
export declare const MD_REQUIRED_SECTIONS_BY_SPEC_TYPE: {
|
|
28
|
+
readonly prd: readonly ["Summary", "Problem", "Scope", "Requirements", "Acceptance Criteria"];
|
|
29
|
+
readonly design: readonly ["Summary", "Architecture", "Interfaces", "Data Model", "Invariants", "Failure Modes", "Verification"];
|
|
30
|
+
readonly overview: readonly ["Summary", "Architecture", "Components", "Data Flows"];
|
|
31
|
+
readonly runbook: readonly ["Summary", "Symptoms", "Diagnosis", "Mitigation", "Escalation"];
|
|
32
|
+
readonly decision: readonly ["Summary", "Context", "Alternatives", "Decision", "Consequences"];
|
|
33
|
+
};
|
|
19
34
|
/** Doc kind — overview, requirement, prd, design, or system_design. */
|
|
20
|
-
export declare const DocKindSchema: Schema.Literal<["overview", "prd", "design", "requirement", "system_design"]>;
|
|
35
|
+
export declare const DocKindSchema: Schema.Literal<["overview", "prd", "design", "requirement", "system_design", "runbook", "decision"]>;
|
|
21
36
|
export type DocKind = typeof DocKindSchema.Type;
|
|
37
|
+
/** Markdown-first doc kind — `spec` or `task`. */
|
|
38
|
+
export declare const MdDocKindSchema: Schema.Literal<["spec", "task"]>;
|
|
39
|
+
export type MdDocKind = typeof MdDocKindSchema.Type;
|
|
40
|
+
/** Markdown-first spec subtype. */
|
|
41
|
+
export declare const MdSpecTypeSchema: Schema.Literal<["prd", "design", "overview", "runbook", "decision"]>;
|
|
42
|
+
export type MdSpecType = typeof MdSpecTypeSchema.Type;
|
|
43
|
+
/** Markdown-first spec status. */
|
|
44
|
+
export declare const MdSpecStatusSchema: Schema.Literal<["active", "draft", "deprecated", "archived"]>;
|
|
45
|
+
export type MdSpecStatus = typeof MdSpecStatusSchema.Type;
|
|
22
46
|
/** Doc status — changing (editable) or locked (immutable). */
|
|
23
47
|
export declare const DocStatusSchema: Schema.Literal<["changing", "locked"]>;
|
|
24
48
|
export type DocStatus = typeof DocStatusSchema.Type;
|
|
@@ -35,7 +59,7 @@ export type DocId = typeof DocIdSchema.Type;
|
|
|
35
59
|
export declare const DocSchema: Schema.Struct<{
|
|
36
60
|
id: Schema.brand<Schema.filter<typeof Schema.Number>, "DocId">;
|
|
37
61
|
hash: typeof Schema.String;
|
|
38
|
-
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design"]>;
|
|
62
|
+
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design", "runbook", "decision"]>;
|
|
39
63
|
name: typeof Schema.String;
|
|
40
64
|
title: typeof Schema.String;
|
|
41
65
|
version: Schema.filter<typeof Schema.Number>;
|
|
@@ -63,7 +87,7 @@ export declare const DocWithLinksSchema: Schema.Struct<{
|
|
|
63
87
|
invariantCount: Schema.filter<typeof Schema.Number>;
|
|
64
88
|
id: Schema.brand<Schema.filter<typeof Schema.Number>, "DocId">;
|
|
65
89
|
hash: typeof Schema.String;
|
|
66
|
-
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design"]>;
|
|
90
|
+
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design", "runbook", "decision"]>;
|
|
67
91
|
name: typeof Schema.String;
|
|
68
92
|
title: typeof Schema.String;
|
|
69
93
|
version: Schema.filter<typeof Schema.Number>;
|
|
@@ -95,14 +119,14 @@ export declare const TaskDocLinkSchema: Schema.Struct<{
|
|
|
95
119
|
export type TaskDocLink = typeof TaskDocLinkSchema.Type;
|
|
96
120
|
/** Input for creating a new doc. */
|
|
97
121
|
export declare const CreateDocInputSchema: Schema.Struct<{
|
|
98
|
-
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design"]>;
|
|
122
|
+
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design", "runbook", "decision"]>;
|
|
99
123
|
name: typeof Schema.String;
|
|
100
124
|
title: typeof Schema.String;
|
|
101
|
-
|
|
125
|
+
content: typeof Schema.String;
|
|
102
126
|
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
103
127
|
}>;
|
|
104
128
|
export type CreateDocInput = typeof CreateDocInputSchema.Type;
|
|
105
|
-
/** EARS requirement patterns. */
|
|
129
|
+
/** EARS requirement patterns (kept for backward compat with legacy decomposed EARS). */
|
|
106
130
|
export declare const EARS_PATTERNS: readonly ["ubiquitous", "event_driven", "state_driven", "unwanted", "optional", "complex"];
|
|
107
131
|
export declare const EarsPatternSchema: Schema.Literal<["ubiquitous", "event_driven", "state_driven", "unwanted", "optional", "complex"]>;
|
|
108
132
|
export type EarsPattern = typeof EarsPatternSchema.Type;
|
|
@@ -111,6 +135,23 @@ export type EarsPriority = typeof EarsPrioritySchema.Type;
|
|
|
111
135
|
/** EARS requirement ID — EARS-<SYSTEM>-NNN. */
|
|
112
136
|
export declare const EarsRequirementIdSchema: Schema.brand<Schema.filter<typeof Schema.String>, "EarsRequirementId">;
|
|
113
137
|
export type EarsRequirementId = typeof EarsRequirementIdSchema.Type;
|
|
138
|
+
/**
|
|
139
|
+
* Simplified EARS requirement: id + statement (single string).
|
|
140
|
+
* This is the canonical schema per DOC_SCHEMA_SPEC.
|
|
141
|
+
* Legacy decomposed fields (pattern/trigger/state/condition/system/response)
|
|
142
|
+
* are accepted at runtime for backward compat but not part of the new schema.
|
|
143
|
+
*/
|
|
144
|
+
export declare const YamlEarsRequirementSchema: Schema.Struct<{
|
|
145
|
+
id: typeof Schema.String;
|
|
146
|
+
statement: typeof Schema.String;
|
|
147
|
+
category: Schema.optional<typeof Schema.String>;
|
|
148
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
149
|
+
}>;
|
|
150
|
+
export type YamlEarsRequirement = typeof YamlEarsRequirementSchema.Type;
|
|
151
|
+
/**
|
|
152
|
+
* Legacy decomposed EARS requirement schema (backward compat).
|
|
153
|
+
* New specs should use YamlEarsRequirementSchema instead.
|
|
154
|
+
*/
|
|
114
155
|
export declare const EarsRequirementSchema: Schema.Struct<{
|
|
115
156
|
id: Schema.brand<Schema.filter<typeof Schema.String>, "EarsRequirementId">;
|
|
116
157
|
pattern: Schema.Literal<["ubiquitous", "event_driven", "state_driven", "unwanted", "optional", "complex"]>;
|
|
@@ -135,6 +176,740 @@ export declare const renderEarsRule: (opts: {
|
|
|
135
176
|
condition?: string;
|
|
136
177
|
feature?: string;
|
|
137
178
|
}) => string;
|
|
179
|
+
/** Traceability row — links a requirement to a verification method. */
|
|
180
|
+
export declare const TRACEABILITY_LEVELS: readonly ["unit", "integration", "e2e"];
|
|
181
|
+
export declare const TraceabilityLevelSchema: Schema.Literal<["unit", "integration", "e2e"]>;
|
|
182
|
+
export type TraceabilityLevel = typeof TraceabilityLevelSchema.Type;
|
|
183
|
+
export declare const TraceabilityRowSchema: Schema.Struct<{
|
|
184
|
+
requirement_id: typeof Schema.String;
|
|
185
|
+
level: Schema.Literal<["unit", "integration", "e2e"]>;
|
|
186
|
+
verification: typeof Schema.String;
|
|
187
|
+
success_criteria: typeof Schema.String;
|
|
188
|
+
}>;
|
|
189
|
+
export type TraceabilityRow = typeof TraceabilityRowSchema.Type;
|
|
190
|
+
/** Invariant (YAML content shape — lighter than DB InvariantSchema). */
|
|
191
|
+
export declare const YamlInvariantSchema: Schema.Struct<{
|
|
192
|
+
id: typeof Schema.String;
|
|
193
|
+
statement: typeof Schema.String;
|
|
194
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
195
|
+
}>;
|
|
196
|
+
export type YamlInvariant = typeof YamlInvariantSchema.Type;
|
|
197
|
+
/** Failure mode. */
|
|
198
|
+
export declare const FailureModeSchema: Schema.Struct<{
|
|
199
|
+
condition: typeof Schema.String;
|
|
200
|
+
impact: typeof Schema.String;
|
|
201
|
+
handling: typeof Schema.String;
|
|
202
|
+
}>;
|
|
203
|
+
export type FailureMode = typeof FailureModeSchema.Type;
|
|
204
|
+
/** Edge case. */
|
|
205
|
+
export declare const EdgeCaseSchema: Schema.Struct<{
|
|
206
|
+
condition: typeof Schema.String;
|
|
207
|
+
expected_behavior: typeof Schema.String;
|
|
208
|
+
}>;
|
|
209
|
+
export type EdgeCase = typeof EdgeCaseSchema.Type;
|
|
210
|
+
/** Actor (requirement kind). */
|
|
211
|
+
export declare const ActorSchema: Schema.Struct<{
|
|
212
|
+
name: typeof Schema.String;
|
|
213
|
+
description: Schema.optional<typeof Schema.String>;
|
|
214
|
+
}>;
|
|
215
|
+
export type Actor = typeof ActorSchema.Type;
|
|
216
|
+
/** Use case (requirement kind). */
|
|
217
|
+
export declare const UseCaseSchema: Schema.Struct<{
|
|
218
|
+
id: typeof Schema.String;
|
|
219
|
+
actor: typeof Schema.String;
|
|
220
|
+
trigger: typeof Schema.String;
|
|
221
|
+
outcome: typeof Schema.String;
|
|
222
|
+
}>;
|
|
223
|
+
export type UseCase = typeof UseCaseSchema.Type;
|
|
224
|
+
/** Applies-to entry (system_design kind). */
|
|
225
|
+
export declare const AppliesToSchema: Schema.Struct<{
|
|
226
|
+
target: typeof Schema.String;
|
|
227
|
+
reason: typeof Schema.String;
|
|
228
|
+
}>;
|
|
229
|
+
export type AppliesTo = typeof AppliesToSchema.Type;
|
|
230
|
+
/** Decision log entry (system_design kind). */
|
|
231
|
+
export declare const DecisionLogEntrySchema: Schema.Struct<{
|
|
232
|
+
decision: typeof Schema.String;
|
|
233
|
+
rationale: typeof Schema.String;
|
|
234
|
+
date: Schema.optional<typeof Schema.String>;
|
|
235
|
+
consequence: Schema.optional<typeof Schema.String>;
|
|
236
|
+
}>;
|
|
237
|
+
export type DecisionLogEntry = typeof DecisionLogEntrySchema.Type;
|
|
238
|
+
/** Markdown-first spec/task name — kebab-case identifier. */
|
|
239
|
+
export declare const MdNameSchema: Schema.brand<Schema.filter<typeof Schema.String>, "MdName">;
|
|
240
|
+
export type MdName = typeof MdNameSchema.Type;
|
|
241
|
+
/** ISO date (YYYY-MM-DD) used by markdown-first frontmatter. */
|
|
242
|
+
export declare const MdDateSchema: Schema.brand<Schema.filter<typeof Schema.String>, "MdDate">;
|
|
243
|
+
export type MdDate = typeof MdDateSchema.Type;
|
|
244
|
+
/** Markdown-first common spec frontmatter. */
|
|
245
|
+
export declare const MdFrontmatterSchema: Schema.Struct<{
|
|
246
|
+
kind: Schema.Literal<["spec"]>;
|
|
247
|
+
spec_type: Schema.Literal<["prd", "design", "overview", "runbook", "decision"]>;
|
|
248
|
+
name: Schema.brand<Schema.filter<typeof Schema.String>, "MdName">;
|
|
249
|
+
title: typeof Schema.String;
|
|
250
|
+
status: Schema.Literal<["active", "draft", "deprecated", "archived"]>;
|
|
251
|
+
version: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
252
|
+
owners: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
253
|
+
summary: typeof Schema.String;
|
|
254
|
+
domain: typeof Schema.String;
|
|
255
|
+
tags: Schema.Array$<typeof Schema.String>;
|
|
256
|
+
depends_on: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "MdName">>;
|
|
257
|
+
supersedes: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "MdName">>;
|
|
258
|
+
implements: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "MdName">>;
|
|
259
|
+
last_reviewed_at: Schema.brand<Schema.filter<typeof Schema.String>, "MdDate">;
|
|
260
|
+
}>;
|
|
261
|
+
export type MdFrontmatter = typeof MdFrontmatterSchema.Type;
|
|
262
|
+
/** EARS requirement kind in embedded yaml blocks. */
|
|
263
|
+
export declare const MdEarsRequirementKindSchema: Schema.Literal<["ubiquitous", "event-driven", "state-driven", "unwanted", "optional", "complex"]>;
|
|
264
|
+
export type MdEarsRequirementKind = typeof MdEarsRequirementKindSchema.Type;
|
|
265
|
+
/** EARS priority in markdown-first requirements. */
|
|
266
|
+
export declare const MdEarsPrioritySchema: Schema.Literal<["must", "should", "may"]>;
|
|
267
|
+
export type MdEarsPriority = typeof MdEarsPrioritySchema.Type;
|
|
268
|
+
/** EARS requirement ID in embedded requirements block. */
|
|
269
|
+
export declare const MdEarsRequirementIdSchema: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
270
|
+
export type MdEarsRequirementId = typeof MdEarsRequirementIdSchema.Type;
|
|
271
|
+
/** EARS requirement entry from fenced yaml blocks. */
|
|
272
|
+
export declare const MdEarsRequirementSchema: Schema.Struct<{
|
|
273
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
274
|
+
kind: Schema.Literal<["ubiquitous", "event-driven", "state-driven", "unwanted", "optional", "complex"]>;
|
|
275
|
+
statement: typeof Schema.String;
|
|
276
|
+
when: Schema.optional<typeof Schema.String>;
|
|
277
|
+
while: Schema.optional<typeof Schema.String>;
|
|
278
|
+
if: Schema.optional<typeof Schema.String>;
|
|
279
|
+
where: Schema.optional<typeof Schema.String>;
|
|
280
|
+
priority: Schema.Literal<["must", "should", "may"]>;
|
|
281
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
282
|
+
}>;
|
|
283
|
+
export type MdEarsRequirement = typeof MdEarsRequirementSchema.Type;
|
|
284
|
+
/** Invariant severity used by markdown-first docs. */
|
|
285
|
+
export declare const MdInvariantSeveritySchema: Schema.Literal<["low", "medium", "high", "critical"]>;
|
|
286
|
+
export type MdInvariantSeverity = typeof MdInvariantSeveritySchema.Type;
|
|
287
|
+
/** Markdown-first invariant ID in embedded invariants block. */
|
|
288
|
+
export declare const MdInvariantIdSchema: Schema.brand<Schema.filter<typeof Schema.String>, "MdInvariantId">;
|
|
289
|
+
export type MdInvariantId = typeof MdInvariantIdSchema.Type;
|
|
290
|
+
/** Invariant entry from fenced yaml blocks. */
|
|
291
|
+
export declare const MdInvariantSchema: Schema.Struct<{
|
|
292
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdInvariantId">;
|
|
293
|
+
statement: typeof Schema.String;
|
|
294
|
+
severity: Schema.Literal<["low", "medium", "high", "critical"]>;
|
|
295
|
+
verified_by: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
296
|
+
}>;
|
|
297
|
+
export type MdInvariant = typeof MdInvariantSchema.Type;
|
|
298
|
+
/** Verification test type in markdown-first verification mappings. */
|
|
299
|
+
export declare const MdVerificationTestTypeSchema: Schema.Literal<["unit", "integration", "e2e", "property", "manual"]>;
|
|
300
|
+
export type MdVerificationTestType = typeof MdVerificationTestTypeSchema.Type;
|
|
301
|
+
/** Verification mapping entry from fenced yaml blocks. */
|
|
302
|
+
export declare const MdVerificationSchema: Schema.Struct<{
|
|
303
|
+
requirement_id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
304
|
+
test_type: Schema.Literal<["unit", "integration", "e2e", "property", "manual"]>;
|
|
305
|
+
target: typeof Schema.String;
|
|
306
|
+
}>;
|
|
307
|
+
export type MdVerification = typeof MdVerificationSchema.Type;
|
|
308
|
+
/** Interface type in markdown-first interface definitions. */
|
|
309
|
+
export declare const MdInterfaceTypeSchema: Schema.Literal<["http", "queue", "event", "rpc", "cron"]>;
|
|
310
|
+
export type MdInterfaceType = typeof MdInterfaceTypeSchema.Type;
|
|
311
|
+
/** Interface entry from fenced yaml blocks. */
|
|
312
|
+
export declare const MdInterfaceSchema: Schema.Struct<{
|
|
313
|
+
name: typeof Schema.String;
|
|
314
|
+
type: Schema.Literal<["http", "queue", "event", "rpc", "cron"]>;
|
|
315
|
+
method: Schema.optional<typeof Schema.String>;
|
|
316
|
+
path: Schema.optional<typeof Schema.String>;
|
|
317
|
+
semantics: typeof Schema.String;
|
|
318
|
+
contract: Schema.optional<typeof Schema.String>;
|
|
319
|
+
}>;
|
|
320
|
+
export type MdInterface = typeof MdInterfaceSchema.Type;
|
|
321
|
+
/** Failure mode entry from fenced yaml blocks. */
|
|
322
|
+
export declare const MdFailureModeSchema: Schema.Struct<{
|
|
323
|
+
condition: typeof Schema.String;
|
|
324
|
+
impact: typeof Schema.String;
|
|
325
|
+
handling: typeof Schema.String;
|
|
326
|
+
}>;
|
|
327
|
+
export type MdFailureMode = typeof MdFailureModeSchema.Type;
|
|
328
|
+
/** Acceptance criterion ID in embedded acceptance_criteria blocks. */
|
|
329
|
+
export declare const MdAcceptanceCriterionIdSchema: Schema.brand<Schema.filter<typeof Schema.String>, "MdAcceptanceCriterionId">;
|
|
330
|
+
export type MdAcceptanceCriterionId = typeof MdAcceptanceCriterionIdSchema.Type;
|
|
331
|
+
/** Acceptance criterion entry from fenced yaml blocks. */
|
|
332
|
+
export declare const MdAcceptanceCriterionSchema: Schema.Struct<{
|
|
333
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdAcceptanceCriterionId">;
|
|
334
|
+
statement: typeof Schema.String;
|
|
335
|
+
}>;
|
|
336
|
+
export type MdAcceptanceCriterion = typeof MdAcceptanceCriterionSchema.Type;
|
|
337
|
+
/** Markdown section extracted from parsed markdown body. */
|
|
338
|
+
export declare const MdSectionSchema: Schema.Struct<{
|
|
339
|
+
heading: typeof Schema.String;
|
|
340
|
+
body: typeof Schema.String;
|
|
341
|
+
}>;
|
|
342
|
+
export type MdSection = typeof MdSectionSchema.Type;
|
|
343
|
+
/** Parsed embedded yaml blocks extracted from markdown body. */
|
|
344
|
+
export declare const MdEmbeddedBlocksSchema: Schema.Struct<{
|
|
345
|
+
ears_requirements: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
346
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
347
|
+
kind: Schema.Literal<["ubiquitous", "event-driven", "state-driven", "unwanted", "optional", "complex"]>;
|
|
348
|
+
statement: typeof Schema.String;
|
|
349
|
+
when: Schema.optional<typeof Schema.String>;
|
|
350
|
+
while: Schema.optional<typeof Schema.String>;
|
|
351
|
+
if: Schema.optional<typeof Schema.String>;
|
|
352
|
+
where: Schema.optional<typeof Schema.String>;
|
|
353
|
+
priority: Schema.Literal<["must", "should", "may"]>;
|
|
354
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
355
|
+
}>>>;
|
|
356
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
357
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdInvariantId">;
|
|
358
|
+
statement: typeof Schema.String;
|
|
359
|
+
severity: Schema.Literal<["low", "medium", "high", "critical"]>;
|
|
360
|
+
verified_by: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
361
|
+
}>>>;
|
|
362
|
+
verification: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
363
|
+
requirement_id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
364
|
+
test_type: Schema.Literal<["unit", "integration", "e2e", "property", "manual"]>;
|
|
365
|
+
target: typeof Schema.String;
|
|
366
|
+
}>>>;
|
|
367
|
+
interfaces: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
368
|
+
name: typeof Schema.String;
|
|
369
|
+
type: Schema.Literal<["http", "queue", "event", "rpc", "cron"]>;
|
|
370
|
+
method: Schema.optional<typeof Schema.String>;
|
|
371
|
+
path: Schema.optional<typeof Schema.String>;
|
|
372
|
+
semantics: typeof Schema.String;
|
|
373
|
+
contract: Schema.optional<typeof Schema.String>;
|
|
374
|
+
}>>>;
|
|
375
|
+
failure_modes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
376
|
+
condition: typeof Schema.String;
|
|
377
|
+
impact: typeof Schema.String;
|
|
378
|
+
handling: typeof Schema.String;
|
|
379
|
+
}>>>;
|
|
380
|
+
acceptance_criteria: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
381
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdAcceptanceCriterionId">;
|
|
382
|
+
statement: typeof Schema.String;
|
|
383
|
+
}>>>;
|
|
384
|
+
}>;
|
|
385
|
+
export type MdEmbeddedBlocks = typeof MdEmbeddedBlocksSchema.Type;
|
|
386
|
+
/** Parsed markdown-first `spec` document. */
|
|
387
|
+
export declare const MdParsedSpecDocSchema: Schema.Struct<{
|
|
388
|
+
kind: Schema.Literal<["spec"]>;
|
|
389
|
+
frontmatter: Schema.Struct<{
|
|
390
|
+
kind: Schema.Literal<["spec"]>;
|
|
391
|
+
spec_type: Schema.Literal<["prd", "design", "overview", "runbook", "decision"]>;
|
|
392
|
+
name: Schema.brand<Schema.filter<typeof Schema.String>, "MdName">;
|
|
393
|
+
title: typeof Schema.String;
|
|
394
|
+
status: Schema.Literal<["active", "draft", "deprecated", "archived"]>;
|
|
395
|
+
version: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
396
|
+
owners: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
397
|
+
summary: typeof Schema.String;
|
|
398
|
+
domain: typeof Schema.String;
|
|
399
|
+
tags: Schema.Array$<typeof Schema.String>;
|
|
400
|
+
depends_on: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "MdName">>;
|
|
401
|
+
supersedes: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "MdName">>;
|
|
402
|
+
implements: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "MdName">>;
|
|
403
|
+
last_reviewed_at: Schema.brand<Schema.filter<typeof Schema.String>, "MdDate">;
|
|
404
|
+
}>;
|
|
405
|
+
sections: Schema.Array$<Schema.Struct<{
|
|
406
|
+
heading: typeof Schema.String;
|
|
407
|
+
body: typeof Schema.String;
|
|
408
|
+
}>>;
|
|
409
|
+
blocks: Schema.Struct<{
|
|
410
|
+
ears_requirements: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
411
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
412
|
+
kind: Schema.Literal<["ubiquitous", "event-driven", "state-driven", "unwanted", "optional", "complex"]>;
|
|
413
|
+
statement: typeof Schema.String;
|
|
414
|
+
when: Schema.optional<typeof Schema.String>;
|
|
415
|
+
while: Schema.optional<typeof Schema.String>;
|
|
416
|
+
if: Schema.optional<typeof Schema.String>;
|
|
417
|
+
where: Schema.optional<typeof Schema.String>;
|
|
418
|
+
priority: Schema.Literal<["must", "should", "may"]>;
|
|
419
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
420
|
+
}>>>;
|
|
421
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
422
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdInvariantId">;
|
|
423
|
+
statement: typeof Schema.String;
|
|
424
|
+
severity: Schema.Literal<["low", "medium", "high", "critical"]>;
|
|
425
|
+
verified_by: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
426
|
+
}>>>;
|
|
427
|
+
verification: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
428
|
+
requirement_id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
429
|
+
test_type: Schema.Literal<["unit", "integration", "e2e", "property", "manual"]>;
|
|
430
|
+
target: typeof Schema.String;
|
|
431
|
+
}>>>;
|
|
432
|
+
interfaces: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
433
|
+
name: typeof Schema.String;
|
|
434
|
+
type: Schema.Literal<["http", "queue", "event", "rpc", "cron"]>;
|
|
435
|
+
method: Schema.optional<typeof Schema.String>;
|
|
436
|
+
path: Schema.optional<typeof Schema.String>;
|
|
437
|
+
semantics: typeof Schema.String;
|
|
438
|
+
contract: Schema.optional<typeof Schema.String>;
|
|
439
|
+
}>>>;
|
|
440
|
+
failure_modes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
441
|
+
condition: typeof Schema.String;
|
|
442
|
+
impact: typeof Schema.String;
|
|
443
|
+
handling: typeof Schema.String;
|
|
444
|
+
}>>>;
|
|
445
|
+
acceptance_criteria: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
446
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdAcceptanceCriterionId">;
|
|
447
|
+
statement: typeof Schema.String;
|
|
448
|
+
}>>>;
|
|
449
|
+
}>;
|
|
450
|
+
}>;
|
|
451
|
+
export type MdParsedSpecDoc = typeof MdParsedSpecDocSchema.Type;
|
|
452
|
+
/** Parsed markdown-first `task` document (frontmatter is intentionally open-ended). */
|
|
453
|
+
export declare const MdParsedTaskDocSchema: Schema.Struct<{
|
|
454
|
+
kind: Schema.Literal<["task"]>;
|
|
455
|
+
frontmatter: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
456
|
+
sections: Schema.Array$<Schema.Struct<{
|
|
457
|
+
heading: typeof Schema.String;
|
|
458
|
+
body: typeof Schema.String;
|
|
459
|
+
}>>;
|
|
460
|
+
blocks: Schema.Struct<{
|
|
461
|
+
ears_requirements: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
462
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
463
|
+
kind: Schema.Literal<["ubiquitous", "event-driven", "state-driven", "unwanted", "optional", "complex"]>;
|
|
464
|
+
statement: typeof Schema.String;
|
|
465
|
+
when: Schema.optional<typeof Schema.String>;
|
|
466
|
+
while: Schema.optional<typeof Schema.String>;
|
|
467
|
+
if: Schema.optional<typeof Schema.String>;
|
|
468
|
+
where: Schema.optional<typeof Schema.String>;
|
|
469
|
+
priority: Schema.Literal<["must", "should", "may"]>;
|
|
470
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
471
|
+
}>>>;
|
|
472
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
473
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdInvariantId">;
|
|
474
|
+
statement: typeof Schema.String;
|
|
475
|
+
severity: Schema.Literal<["low", "medium", "high", "critical"]>;
|
|
476
|
+
verified_by: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
477
|
+
}>>>;
|
|
478
|
+
verification: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
479
|
+
requirement_id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
480
|
+
test_type: Schema.Literal<["unit", "integration", "e2e", "property", "manual"]>;
|
|
481
|
+
target: typeof Schema.String;
|
|
482
|
+
}>>>;
|
|
483
|
+
interfaces: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
484
|
+
name: typeof Schema.String;
|
|
485
|
+
type: Schema.Literal<["http", "queue", "event", "rpc", "cron"]>;
|
|
486
|
+
method: Schema.optional<typeof Schema.String>;
|
|
487
|
+
path: Schema.optional<typeof Schema.String>;
|
|
488
|
+
semantics: typeof Schema.String;
|
|
489
|
+
contract: Schema.optional<typeof Schema.String>;
|
|
490
|
+
}>>>;
|
|
491
|
+
failure_modes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
492
|
+
condition: typeof Schema.String;
|
|
493
|
+
impact: typeof Schema.String;
|
|
494
|
+
handling: typeof Schema.String;
|
|
495
|
+
}>>>;
|
|
496
|
+
acceptance_criteria: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
497
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdAcceptanceCriterionId">;
|
|
498
|
+
statement: typeof Schema.String;
|
|
499
|
+
}>>>;
|
|
500
|
+
}>;
|
|
501
|
+
}>;
|
|
502
|
+
export type MdParsedTaskDoc = typeof MdParsedTaskDocSchema.Type;
|
|
503
|
+
/** Full parsed representation of a markdown-first doc (`spec` or `task`). */
|
|
504
|
+
export declare const MdParsedDocSchema: Schema.Union<[Schema.Struct<{
|
|
505
|
+
kind: Schema.Literal<["spec"]>;
|
|
506
|
+
frontmatter: Schema.Struct<{
|
|
507
|
+
kind: Schema.Literal<["spec"]>;
|
|
508
|
+
spec_type: Schema.Literal<["prd", "design", "overview", "runbook", "decision"]>;
|
|
509
|
+
name: Schema.brand<Schema.filter<typeof Schema.String>, "MdName">;
|
|
510
|
+
title: typeof Schema.String;
|
|
511
|
+
status: Schema.Literal<["active", "draft", "deprecated", "archived"]>;
|
|
512
|
+
version: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
513
|
+
owners: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
514
|
+
summary: typeof Schema.String;
|
|
515
|
+
domain: typeof Schema.String;
|
|
516
|
+
tags: Schema.Array$<typeof Schema.String>;
|
|
517
|
+
depends_on: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "MdName">>;
|
|
518
|
+
supersedes: Schema.Array$<Schema.brand<Schema.filter<typeof Schema.String>, "MdName">>;
|
|
519
|
+
implements: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "MdName">>;
|
|
520
|
+
last_reviewed_at: Schema.brand<Schema.filter<typeof Schema.String>, "MdDate">;
|
|
521
|
+
}>;
|
|
522
|
+
sections: Schema.Array$<Schema.Struct<{
|
|
523
|
+
heading: typeof Schema.String;
|
|
524
|
+
body: typeof Schema.String;
|
|
525
|
+
}>>;
|
|
526
|
+
blocks: Schema.Struct<{
|
|
527
|
+
ears_requirements: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
528
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
529
|
+
kind: Schema.Literal<["ubiquitous", "event-driven", "state-driven", "unwanted", "optional", "complex"]>;
|
|
530
|
+
statement: typeof Schema.String;
|
|
531
|
+
when: Schema.optional<typeof Schema.String>;
|
|
532
|
+
while: Schema.optional<typeof Schema.String>;
|
|
533
|
+
if: Schema.optional<typeof Schema.String>;
|
|
534
|
+
where: Schema.optional<typeof Schema.String>;
|
|
535
|
+
priority: Schema.Literal<["must", "should", "may"]>;
|
|
536
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
537
|
+
}>>>;
|
|
538
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
539
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdInvariantId">;
|
|
540
|
+
statement: typeof Schema.String;
|
|
541
|
+
severity: Schema.Literal<["low", "medium", "high", "critical"]>;
|
|
542
|
+
verified_by: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
543
|
+
}>>>;
|
|
544
|
+
verification: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
545
|
+
requirement_id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
546
|
+
test_type: Schema.Literal<["unit", "integration", "e2e", "property", "manual"]>;
|
|
547
|
+
target: typeof Schema.String;
|
|
548
|
+
}>>>;
|
|
549
|
+
interfaces: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
550
|
+
name: typeof Schema.String;
|
|
551
|
+
type: Schema.Literal<["http", "queue", "event", "rpc", "cron"]>;
|
|
552
|
+
method: Schema.optional<typeof Schema.String>;
|
|
553
|
+
path: Schema.optional<typeof Schema.String>;
|
|
554
|
+
semantics: typeof Schema.String;
|
|
555
|
+
contract: Schema.optional<typeof Schema.String>;
|
|
556
|
+
}>>>;
|
|
557
|
+
failure_modes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
558
|
+
condition: typeof Schema.String;
|
|
559
|
+
impact: typeof Schema.String;
|
|
560
|
+
handling: typeof Schema.String;
|
|
561
|
+
}>>>;
|
|
562
|
+
acceptance_criteria: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
563
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdAcceptanceCriterionId">;
|
|
564
|
+
statement: typeof Schema.String;
|
|
565
|
+
}>>>;
|
|
566
|
+
}>;
|
|
567
|
+
}>, Schema.Struct<{
|
|
568
|
+
kind: Schema.Literal<["task"]>;
|
|
569
|
+
frontmatter: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
570
|
+
sections: Schema.Array$<Schema.Struct<{
|
|
571
|
+
heading: typeof Schema.String;
|
|
572
|
+
body: typeof Schema.String;
|
|
573
|
+
}>>;
|
|
574
|
+
blocks: Schema.Struct<{
|
|
575
|
+
ears_requirements: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
576
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
577
|
+
kind: Schema.Literal<["ubiquitous", "event-driven", "state-driven", "unwanted", "optional", "complex"]>;
|
|
578
|
+
statement: typeof Schema.String;
|
|
579
|
+
when: Schema.optional<typeof Schema.String>;
|
|
580
|
+
while: Schema.optional<typeof Schema.String>;
|
|
581
|
+
if: Schema.optional<typeof Schema.String>;
|
|
582
|
+
where: Schema.optional<typeof Schema.String>;
|
|
583
|
+
priority: Schema.Literal<["must", "should", "may"]>;
|
|
584
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
585
|
+
}>>>;
|
|
586
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
587
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdInvariantId">;
|
|
588
|
+
statement: typeof Schema.String;
|
|
589
|
+
severity: Schema.Literal<["low", "medium", "high", "critical"]>;
|
|
590
|
+
verified_by: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
591
|
+
}>>>;
|
|
592
|
+
verification: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
593
|
+
requirement_id: Schema.brand<Schema.filter<typeof Schema.String>, "MdEarsRequirementId">;
|
|
594
|
+
test_type: Schema.Literal<["unit", "integration", "e2e", "property", "manual"]>;
|
|
595
|
+
target: typeof Schema.String;
|
|
596
|
+
}>>>;
|
|
597
|
+
interfaces: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
598
|
+
name: typeof Schema.String;
|
|
599
|
+
type: Schema.Literal<["http", "queue", "event", "rpc", "cron"]>;
|
|
600
|
+
method: Schema.optional<typeof Schema.String>;
|
|
601
|
+
path: Schema.optional<typeof Schema.String>;
|
|
602
|
+
semantics: typeof Schema.String;
|
|
603
|
+
contract: Schema.optional<typeof Schema.String>;
|
|
604
|
+
}>>>;
|
|
605
|
+
failure_modes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
606
|
+
condition: typeof Schema.String;
|
|
607
|
+
impact: typeof Schema.String;
|
|
608
|
+
handling: typeof Schema.String;
|
|
609
|
+
}>>>;
|
|
610
|
+
acceptance_criteria: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
611
|
+
id: Schema.brand<Schema.filter<typeof Schema.String>, "MdAcceptanceCriterionId">;
|
|
612
|
+
statement: typeof Schema.String;
|
|
613
|
+
}>>>;
|
|
614
|
+
}>;
|
|
615
|
+
}>]>;
|
|
616
|
+
export type MdParsedDoc = typeof MdParsedDocSchema.Type;
|
|
617
|
+
/** Overview doc YAML content. */
|
|
618
|
+
export declare const OverviewContentSchema: Schema.Struct<{
|
|
619
|
+
kind: Schema.Literal<["overview"]>;
|
|
620
|
+
problem_definition: typeof Schema.String;
|
|
621
|
+
subsystems: typeof Schema.String;
|
|
622
|
+
object_model: Schema.optional<typeof Schema.String>;
|
|
623
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
624
|
+
id: typeof Schema.String;
|
|
625
|
+
statement: typeof Schema.String;
|
|
626
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
627
|
+
}>>>;
|
|
628
|
+
failure_modes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
629
|
+
condition: typeof Schema.String;
|
|
630
|
+
impact: typeof Schema.String;
|
|
631
|
+
handling: typeof Schema.String;
|
|
632
|
+
}>>>;
|
|
633
|
+
edge_cases: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
634
|
+
condition: typeof Schema.String;
|
|
635
|
+
expected_behavior: typeof Schema.String;
|
|
636
|
+
}>>>;
|
|
637
|
+
constraints: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
638
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
639
|
+
name: typeof Schema.String;
|
|
640
|
+
title: typeof Schema.String;
|
|
641
|
+
}>;
|
|
642
|
+
export type OverviewContent = typeof OverviewContentSchema.Type;
|
|
643
|
+
/** PRD doc YAML content. */
|
|
644
|
+
export declare const PrdContentSchema: Schema.Struct<{
|
|
645
|
+
kind: Schema.Literal<["prd"]>;
|
|
646
|
+
status: Schema.Literal<["changing", "locked"]>;
|
|
647
|
+
problem: typeof Schema.String;
|
|
648
|
+
solution: typeof Schema.String;
|
|
649
|
+
ears_requirements: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
650
|
+
id: typeof Schema.String;
|
|
651
|
+
statement: typeof Schema.String;
|
|
652
|
+
category: Schema.optional<typeof Schema.String>;
|
|
653
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
654
|
+
}>>>;
|
|
655
|
+
acceptance_criteria: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
656
|
+
non_goals: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
657
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
658
|
+
requirements: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
659
|
+
out_of_scope: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
660
|
+
name: typeof Schema.String;
|
|
661
|
+
title: typeof Schema.String;
|
|
662
|
+
}>;
|
|
663
|
+
export type PrdContent = typeof PrdContentSchema.Type;
|
|
664
|
+
/** Design doc YAML content. */
|
|
665
|
+
export declare const DesignContentSchema: Schema.Struct<{
|
|
666
|
+
kind: Schema.Literal<["design"]>;
|
|
667
|
+
status: Schema.Literal<["changing", "locked"]>;
|
|
668
|
+
version: Schema.filter<typeof Schema.Number>;
|
|
669
|
+
problem_definition: typeof Schema.String;
|
|
670
|
+
architecture: typeof Schema.String;
|
|
671
|
+
testing_strategy: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
672
|
+
requirement_id: typeof Schema.String;
|
|
673
|
+
level: Schema.Literal<["unit", "integration", "e2e"]>;
|
|
674
|
+
verification: typeof Schema.String;
|
|
675
|
+
success_criteria: typeof Schema.String;
|
|
676
|
+
}>>>;
|
|
677
|
+
goals: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
678
|
+
data_model: Schema.optional<typeof Schema.String>;
|
|
679
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
680
|
+
id: typeof Schema.String;
|
|
681
|
+
statement: typeof Schema.String;
|
|
682
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
683
|
+
}>>>;
|
|
684
|
+
failure_modes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
685
|
+
condition: typeof Schema.String;
|
|
686
|
+
impact: typeof Schema.String;
|
|
687
|
+
handling: typeof Schema.String;
|
|
688
|
+
}>>>;
|
|
689
|
+
edge_cases: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
690
|
+
condition: typeof Schema.String;
|
|
691
|
+
expected_behavior: typeof Schema.String;
|
|
692
|
+
}>>>;
|
|
693
|
+
non_goals: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
694
|
+
open_questions: Schema.optional<typeof Schema.String>;
|
|
695
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
696
|
+
name: typeof Schema.String;
|
|
697
|
+
title: typeof Schema.String;
|
|
698
|
+
}>;
|
|
699
|
+
export type DesignContent = typeof DesignContentSchema.Type;
|
|
700
|
+
/**
|
|
701
|
+
* Requirement doc YAML content (DEPRECATED — use prd + design).
|
|
702
|
+
* At least one of functional_requirements or ears_requirements must be present.
|
|
703
|
+
*/
|
|
704
|
+
export declare const RequirementContentSchema: Schema.Struct<{
|
|
705
|
+
kind: Schema.Literal<["requirement"]>;
|
|
706
|
+
status: Schema.Literal<["changing", "locked"]>;
|
|
707
|
+
overview: typeof Schema.String;
|
|
708
|
+
actors: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
709
|
+
name: typeof Schema.String;
|
|
710
|
+
description: Schema.optional<typeof Schema.String>;
|
|
711
|
+
}>>>;
|
|
712
|
+
use_cases: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
713
|
+
id: typeof Schema.String;
|
|
714
|
+
actor: typeof Schema.String;
|
|
715
|
+
trigger: typeof Schema.String;
|
|
716
|
+
outcome: typeof Schema.String;
|
|
717
|
+
}>>>;
|
|
718
|
+
functional_requirements: Schema.optional<typeof Schema.String>;
|
|
719
|
+
ears_requirements: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
720
|
+
id: typeof Schema.String;
|
|
721
|
+
statement: typeof Schema.String;
|
|
722
|
+
category: Schema.optional<typeof Schema.String>;
|
|
723
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
724
|
+
}>>>;
|
|
725
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
726
|
+
id: typeof Schema.String;
|
|
727
|
+
statement: typeof Schema.String;
|
|
728
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
729
|
+
}>>>;
|
|
730
|
+
non_functional_requirements: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
731
|
+
traceability: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
732
|
+
requirement_id: typeof Schema.String;
|
|
733
|
+
level: Schema.Literal<["unit", "integration", "e2e"]>;
|
|
734
|
+
verification: typeof Schema.String;
|
|
735
|
+
success_criteria: typeof Schema.String;
|
|
736
|
+
}>>>;
|
|
737
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
738
|
+
name: typeof Schema.String;
|
|
739
|
+
title: typeof Schema.String;
|
|
740
|
+
}>;
|
|
741
|
+
export type RequirementContent = typeof RequirementContentSchema.Type;
|
|
742
|
+
/** System design doc YAML content. */
|
|
743
|
+
export declare const SystemDesignContentSchema: Schema.Struct<{
|
|
744
|
+
kind: Schema.Literal<["system_design"]>;
|
|
745
|
+
status: Schema.Literal<["changing", "locked"]>;
|
|
746
|
+
overview: typeof Schema.String;
|
|
747
|
+
scope: typeof Schema.String;
|
|
748
|
+
design: typeof Schema.String;
|
|
749
|
+
constraints: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
750
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
751
|
+
id: typeof Schema.String;
|
|
752
|
+
statement: typeof Schema.String;
|
|
753
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
754
|
+
}>>>;
|
|
755
|
+
applies_to: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
756
|
+
target: typeof Schema.String;
|
|
757
|
+
reason: typeof Schema.String;
|
|
758
|
+
}>>>;
|
|
759
|
+
decision_log: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
760
|
+
decision: typeof Schema.String;
|
|
761
|
+
rationale: typeof Schema.String;
|
|
762
|
+
date: Schema.optional<typeof Schema.String>;
|
|
763
|
+
consequence: Schema.optional<typeof Schema.String>;
|
|
764
|
+
}>>>;
|
|
765
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
766
|
+
name: typeof Schema.String;
|
|
767
|
+
title: typeof Schema.String;
|
|
768
|
+
}>;
|
|
769
|
+
export type SystemDesignContent = typeof SystemDesignContentSchema.Type;
|
|
770
|
+
/** Map from doc kind to its content schema. */
|
|
771
|
+
export declare const DOC_CONTENT_SCHEMAS: {
|
|
772
|
+
readonly overview: Schema.Struct<{
|
|
773
|
+
kind: Schema.Literal<["overview"]>;
|
|
774
|
+
problem_definition: typeof Schema.String;
|
|
775
|
+
subsystems: typeof Schema.String;
|
|
776
|
+
object_model: Schema.optional<typeof Schema.String>;
|
|
777
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
778
|
+
id: typeof Schema.String;
|
|
779
|
+
statement: typeof Schema.String;
|
|
780
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
781
|
+
}>>>;
|
|
782
|
+
failure_modes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
783
|
+
condition: typeof Schema.String;
|
|
784
|
+
impact: typeof Schema.String;
|
|
785
|
+
handling: typeof Schema.String;
|
|
786
|
+
}>>>;
|
|
787
|
+
edge_cases: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
788
|
+
condition: typeof Schema.String;
|
|
789
|
+
expected_behavior: typeof Schema.String;
|
|
790
|
+
}>>>;
|
|
791
|
+
constraints: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
792
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
793
|
+
name: typeof Schema.String;
|
|
794
|
+
title: typeof Schema.String;
|
|
795
|
+
}>;
|
|
796
|
+
readonly prd: Schema.Struct<{
|
|
797
|
+
kind: Schema.Literal<["prd"]>;
|
|
798
|
+
status: Schema.Literal<["changing", "locked"]>;
|
|
799
|
+
problem: typeof Schema.String;
|
|
800
|
+
solution: typeof Schema.String;
|
|
801
|
+
ears_requirements: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
802
|
+
id: typeof Schema.String;
|
|
803
|
+
statement: typeof Schema.String;
|
|
804
|
+
category: Schema.optional<typeof Schema.String>;
|
|
805
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
806
|
+
}>>>;
|
|
807
|
+
acceptance_criteria: Schema.filter<Schema.Array$<typeof Schema.String>>;
|
|
808
|
+
non_goals: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
809
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
810
|
+
requirements: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
811
|
+
out_of_scope: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
812
|
+
name: typeof Schema.String;
|
|
813
|
+
title: typeof Schema.String;
|
|
814
|
+
}>;
|
|
815
|
+
readonly design: Schema.Struct<{
|
|
816
|
+
kind: Schema.Literal<["design"]>;
|
|
817
|
+
status: Schema.Literal<["changing", "locked"]>;
|
|
818
|
+
version: Schema.filter<typeof Schema.Number>;
|
|
819
|
+
problem_definition: typeof Schema.String;
|
|
820
|
+
architecture: typeof Schema.String;
|
|
821
|
+
testing_strategy: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
822
|
+
requirement_id: typeof Schema.String;
|
|
823
|
+
level: Schema.Literal<["unit", "integration", "e2e"]>;
|
|
824
|
+
verification: typeof Schema.String;
|
|
825
|
+
success_criteria: typeof Schema.String;
|
|
826
|
+
}>>>;
|
|
827
|
+
goals: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
828
|
+
data_model: Schema.optional<typeof Schema.String>;
|
|
829
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
830
|
+
id: typeof Schema.String;
|
|
831
|
+
statement: typeof Schema.String;
|
|
832
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
833
|
+
}>>>;
|
|
834
|
+
failure_modes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
835
|
+
condition: typeof Schema.String;
|
|
836
|
+
impact: typeof Schema.String;
|
|
837
|
+
handling: typeof Schema.String;
|
|
838
|
+
}>>>;
|
|
839
|
+
edge_cases: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
840
|
+
condition: typeof Schema.String;
|
|
841
|
+
expected_behavior: typeof Schema.String;
|
|
842
|
+
}>>>;
|
|
843
|
+
non_goals: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
844
|
+
open_questions: Schema.optional<typeof Schema.String>;
|
|
845
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
846
|
+
name: typeof Schema.String;
|
|
847
|
+
title: typeof Schema.String;
|
|
848
|
+
}>;
|
|
849
|
+
readonly requirement: Schema.Struct<{
|
|
850
|
+
kind: Schema.Literal<["requirement"]>;
|
|
851
|
+
status: Schema.Literal<["changing", "locked"]>;
|
|
852
|
+
overview: typeof Schema.String;
|
|
853
|
+
actors: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
854
|
+
name: typeof Schema.String;
|
|
855
|
+
description: Schema.optional<typeof Schema.String>;
|
|
856
|
+
}>>>;
|
|
857
|
+
use_cases: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
858
|
+
id: typeof Schema.String;
|
|
859
|
+
actor: typeof Schema.String;
|
|
860
|
+
trigger: typeof Schema.String;
|
|
861
|
+
outcome: typeof Schema.String;
|
|
862
|
+
}>>>;
|
|
863
|
+
functional_requirements: Schema.optional<typeof Schema.String>;
|
|
864
|
+
ears_requirements: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
865
|
+
id: typeof Schema.String;
|
|
866
|
+
statement: typeof Schema.String;
|
|
867
|
+
category: Schema.optional<typeof Schema.String>;
|
|
868
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
869
|
+
}>>>;
|
|
870
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
871
|
+
id: typeof Schema.String;
|
|
872
|
+
statement: typeof Schema.String;
|
|
873
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
874
|
+
}>>>;
|
|
875
|
+
non_functional_requirements: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
876
|
+
traceability: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
877
|
+
requirement_id: typeof Schema.String;
|
|
878
|
+
level: Schema.Literal<["unit", "integration", "e2e"]>;
|
|
879
|
+
verification: typeof Schema.String;
|
|
880
|
+
success_criteria: typeof Schema.String;
|
|
881
|
+
}>>>;
|
|
882
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
883
|
+
name: typeof Schema.String;
|
|
884
|
+
title: typeof Schema.String;
|
|
885
|
+
}>;
|
|
886
|
+
readonly system_design: Schema.Struct<{
|
|
887
|
+
kind: Schema.Literal<["system_design"]>;
|
|
888
|
+
status: Schema.Literal<["changing", "locked"]>;
|
|
889
|
+
overview: typeof Schema.String;
|
|
890
|
+
scope: typeof Schema.String;
|
|
891
|
+
design: typeof Schema.String;
|
|
892
|
+
constraints: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
893
|
+
invariants: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
894
|
+
id: typeof Schema.String;
|
|
895
|
+
statement: typeof Schema.String;
|
|
896
|
+
rationale: Schema.optional<typeof Schema.String>;
|
|
897
|
+
}>>>;
|
|
898
|
+
applies_to: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
899
|
+
target: typeof Schema.String;
|
|
900
|
+
reason: typeof Schema.String;
|
|
901
|
+
}>>>;
|
|
902
|
+
decision_log: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
903
|
+
decision: typeof Schema.String;
|
|
904
|
+
rationale: typeof Schema.String;
|
|
905
|
+
date: Schema.optional<typeof Schema.String>;
|
|
906
|
+
consequence: Schema.optional<typeof Schema.String>;
|
|
907
|
+
}>>>;
|
|
908
|
+
user_specific_content: Schema.optional<typeof Schema.String>;
|
|
909
|
+
name: typeof Schema.String;
|
|
910
|
+
title: typeof Schema.String;
|
|
911
|
+
}>;
|
|
912
|
+
};
|
|
138
913
|
/** Invariant enforcement type — how the invariant is verified. */
|
|
139
914
|
export declare const InvariantEnforcementSchema: Schema.Literal<["integration_test", "linter", "llm_as_judge"]>;
|
|
140
915
|
export type InvariantEnforcement = typeof InvariantEnforcementSchema.Type;
|
|
@@ -245,7 +1020,7 @@ export declare const assertDocLinkType: (linkType: string) => DocLinkType;
|
|
|
245
1020
|
export declare const DocGraphNodeSchema: Schema.Struct<{
|
|
246
1021
|
id: typeof Schema.String;
|
|
247
1022
|
label: typeof Schema.String;
|
|
248
|
-
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design", "task"]>;
|
|
1023
|
+
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design", "runbook", "decision", "task"]>;
|
|
249
1024
|
status: Schema.optional<typeof Schema.String>;
|
|
250
1025
|
}>;
|
|
251
1026
|
export type DocGraphNode = typeof DocGraphNodeSchema.Type;
|
|
@@ -261,7 +1036,7 @@ export declare const DocGraphSchema: Schema.Struct<{
|
|
|
261
1036
|
nodes: Schema.Array$<Schema.Struct<{
|
|
262
1037
|
id: typeof Schema.String;
|
|
263
1038
|
label: typeof Schema.String;
|
|
264
|
-
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design", "task"]>;
|
|
1039
|
+
kind: Schema.Literal<["overview", "prd", "design", "requirement", "system_design", "runbook", "decision", "task"]>;
|
|
265
1040
|
status: Schema.optional<typeof Schema.String>;
|
|
266
1041
|
}>>;
|
|
267
1042
|
edges: Schema.Array$<Schema.Struct<{
|