@popoverai/dotrequirements 0.24.1 → 0.24.3
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 +1 -1
- package/dist/codebase-to-spec/cache.d.ts +6 -0
- package/dist/codebase-to-spec/cache.js +1 -0
- package/dist/codebase-to-spec/claude.d.ts +1 -0
- package/dist/codebase-to-spec/claude.js +9 -0
- package/dist/codebase-to-spec/dispatch.d.ts +69 -0
- package/dist/codebase-to-spec/dispatch.js +484 -0
- package/dist/codebase-to-spec/pack.d.ts +16 -0
- package/dist/codebase-to-spec/pack.js +17 -3
- package/dist/codebase-to-spec/present.d.ts +8 -1
- package/dist/codebase-to-spec/present.js +7 -4
- package/dist/codebase-to-spec/progress.d.ts +6 -0
- package/dist/codebase-to-spec/progress.js +34 -0
- package/dist/codebase-to-spec/prompts/outline-reviewer.d.ts +1 -1
- package/dist/codebase-to-spec/prompts/outline-reviewer.js +3 -1
- package/dist/codebase-to-spec/prompts/planner-initial.d.ts +1 -1
- package/dist/codebase-to-spec/prompts/planner-initial.js +4 -0
- package/dist/codebase-to-spec/prompts/planner-revise.d.ts +1 -1
- package/dist/codebase-to-spec/prompts/planner-revise.js +2 -2
- package/dist/codebase-to-spec/prompts/spec-reviewer.d.ts +1 -1
- package/dist/codebase-to-spec/prompts/spec-reviewer.js +6 -1
- package/dist/codebase-to-spec/prompts/specifier.d.ts +1 -1
- package/dist/codebase-to-spec/prompts/specifier.js +6 -4
- package/dist/codebase-to-spec/prompts/style-check.d.ts +10 -2
- package/dist/codebase-to-spec/prompts/style-check.js +76 -46
- package/dist/codebase-to-spec/schemas.d.ts +460 -1
- package/dist/codebase-to-spec/schemas.js +158 -1
- package/dist/codebase-to-spec/skill-install.d.ts +36 -12
- package/dist/codebase-to-spec/skill-install.js +127 -26
- package/dist/codebase-to-spec/specifier.js +6 -0
- package/dist/commands/codebase-to-spec/compose-orchestrator.d.ts +14 -0
- package/dist/commands/codebase-to-spec/compose-orchestrator.js +54 -0
- package/dist/commands/codebase-to-spec/dispatch-context.d.ts +12 -0
- package/dist/commands/codebase-to-spec/dispatch-context.js +22 -0
- package/dist/commands/codebase-to-spec/dispatch-editor.d.ts +16 -0
- package/dist/commands/codebase-to-spec/dispatch-editor.js +71 -0
- package/dist/commands/codebase-to-spec/dispatch-planner.d.ts +19 -0
- package/dist/commands/codebase-to-spec/dispatch-planner.js +90 -0
- package/dist/commands/codebase-to-spec/dispatch-spec.d.ts +16 -0
- package/dist/commands/codebase-to-spec/dispatch-spec.js +59 -0
- package/dist/commands/codebase-to-spec/index.js +69 -1
- package/dist/commands/codebase-to-spec/pack.d.ts +6 -0
- package/dist/commands/codebase-to-spec/pack.js +1 -0
- package/dist/commands/codebase-to-spec/present-orchestrator.d.ts +20 -0
- package/dist/commands/codebase-to-spec/present-orchestrator.js +81 -0
- package/dist/commands/codebase-to-spec/present.d.ts +5 -0
- package/dist/commands/codebase-to-spec/present.js +6 -1
- package/dist/commands/codebase-to-spec/run.js +1 -0
- package/dist/commands/codebase-to-spec/skill-install.js +12 -1
- package/dist/templates/agents/cts-worker.md +9 -0
- package/dist/templates/hooks/cts-worker-persona.sh +76 -0
- package/dist/templates/skills/codebase-to-spec/SKILL.md +159 -68
- package/package.json +4 -5
|
@@ -2,77 +2,107 @@
|
|
|
2
2
|
* System prompt for the local style-check tool.
|
|
3
3
|
*
|
|
4
4
|
* Reads a partial-spec file and produces severity-categorized feedback.
|
|
5
|
-
* Stateless — same "fresh set of eyes" pattern as the
|
|
5
|
+
* Stateless — same "fresh set of eyes" pattern as the cloud
|
|
6
6
|
* `mcp__dotrequirements__style_check`.
|
|
7
7
|
*
|
|
8
|
+
* IMPORTANT: This prompt is a verbatim copy of the cloud style-check prompt
|
|
9
|
+
* (REQUIREMENTS_STYLE_PRINCIPLES + severityGuidance) defined in
|
|
10
|
+
* `packages/convex/lib/prompts.ts`. The cts-local style-check is required to
|
|
11
|
+
* MIRROR the cloud tool (CTS-SPEC-3) — when the cloud principles change, this
|
|
12
|
+
* file must be updated in lock-step. A follow-up task should extract the
|
|
13
|
+
* principles into a shared module so this duplication can go away.
|
|
14
|
+
*
|
|
8
15
|
* Requirements covered:
|
|
9
16
|
* - CTS-SPEC-3: Specifier worker runs a local style-check on its own draft
|
|
17
|
+
* that mirrors `mcp__dotrequirements__style_check`
|
|
10
18
|
*/
|
|
11
|
-
export const STYLE_CHECK_PROMPT = `You are a
|
|
19
|
+
export const STYLE_CHECK_PROMPT = `You are a style checker for requirements documentation in the dotrequirements format.
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
Review the requirements file and provide actionable feedback based on these principles:
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
**IMPORTANT**: The arrow notation format (position. Label → content) is the standard dotrequirements format. NEVER suggest changing or removing this format. Focus on the CONTENT of requirements, not the format itself.
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
1. **Use Concrete Examples**: Replace abstract descriptions with specific testable scenarios
|
|
26
|
+
- ❌ Bad: "users can log in"
|
|
27
|
+
- 🔶 Better: "when a registered user provides valid credentials, they are authenticated"
|
|
28
|
+
- ✅ Best: "when a registered user provides credentials like user123/pass123, they are authenticated"
|
|
18
29
|
|
|
19
|
-
|
|
30
|
+
2. **Write Concisely Using Natural Prose and Declarative Style**:
|
|
31
|
+
- ❌ Bad: "registered user with valid credentials is authenticated" (too terse)
|
|
32
|
+
- ❌ Bad: "A registered user, whose life story is as follows..." (too verbose)
|
|
33
|
+
- ✅ Good: "When a registered user provides valid credentials, they are authenticated"
|
|
34
|
+
- Note: Avoid imperative constructions like "should" - use declarative statements that evaluate to true/false
|
|
20
35
|
|
|
21
|
-
|
|
36
|
+
3. **Keep Arrange/Act/Assert in Mind**: Well-written requirements describe clear preconditions, a trigger, and an assertable result
|
|
37
|
+
- Example: "When [preconditions:] a registered user [trigger:] provides valid credentials, [result:] they are authenticated"
|
|
38
|
+
- This pattern helps ensure requirements are testable, regardless of the labeling format used
|
|
22
39
|
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- **Chained actions** — a single requirement covering multiple discrete actions that should be separate requirements.
|
|
29
|
-
- **Hidden sibling dependencies** — a requirement that only makes sense if read alongside its siblings.
|
|
30
|
-
- **Imposed format labels** — Given/When/Then or other framework labels applied uniformly without sharpening meaning. The dotrequirements default is unlabeled criteria; labels are used only when they help.
|
|
40
|
+
4. **Be Framework Neutral**: Don't encourage or discourage specific requirement formats like Gherkin (Given/When/Then), BDD, or other frameworks
|
|
41
|
+
- ✅ Good: Gherkin labels are fine if the user is using them
|
|
42
|
+
- ✅ Good: Plain acceptance criteria without labels are also fine
|
|
43
|
+
- ❌ Bad: Telling users to add or remove Given/When/Then labels based on preference
|
|
44
|
+
- Focus on the quality of the requirement content, not the labeling style
|
|
31
45
|
|
|
32
|
-
|
|
46
|
+
5. **Use Named Personas**: Establish personas in top-level requirements and reuse in children
|
|
47
|
+
- ✅ Good: "A registered user, Jaime, can log in normally" (parent)
|
|
48
|
+
"When Jaime provides valid credentials, they are authenticated" (child)
|
|
33
49
|
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
- UI or design specifics where behavior alone would suffice.
|
|
50
|
+
6. **Use User-Centric Language**: Describe user experience, not technical details
|
|
51
|
+
- ❌ Bad: "they are redirected to app.dotrequirements.io/redirect/dashboard"
|
|
52
|
+
- ✅ Good: "they are automatically brought to the dashboard"
|
|
38
53
|
|
|
39
|
-
|
|
54
|
+
7. **Avoid Multiple Actions in Single Requirements**:
|
|
55
|
+
- ❌ Bad: "When Robin provides credentials, requests an OTP, then provides the OTP..."
|
|
56
|
+
- ✅ Good: Break into separate requirements for each action
|
|
40
57
|
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
58
|
+
8. **Each Requirement Should Be Independent**: Requirements within a block should be independently testable. If requirements depend on each other (they share preconditions or form a sequence), they should either be nested or restate enough context to stand on their own
|
|
59
|
+
- ❌ Bad: Sibling requirements that share context but don't restate it
|
|
60
|
+
"0. → When Jordan submits signup, an account is created"
|
|
61
|
+
"1. → Welcome email is sent"
|
|
62
|
+
"2. → Dashboard appears"
|
|
63
|
+
Problem: Requirements 1-2 can't be tested without knowing the preconditions from 0
|
|
64
|
+
- ✅ Good: Restate context so each is independently testable
|
|
65
|
+
"0. → When Jordan submits signup, an account is created"
|
|
66
|
+
"1. → When Jordan submits signup, a welcome email is sent"
|
|
67
|
+
"2. → When Jordan submits signup, the dashboard appears"
|
|
68
|
+
- ✅ Also good: Use nesting to show the dependency
|
|
69
|
+
"0. When → Jordan submits signup"
|
|
70
|
+
" 0.0. Then → an account is created"
|
|
71
|
+
" 0.1. Then → a welcome email is sent"
|
|
72
|
+
" 0.2. Then → the dashboard appears"
|
|
73
|
+
- Test: Can you understand what's being tested by reading just one requirement, or do you need to read its siblings?
|
|
46
74
|
|
|
47
|
-
|
|
75
|
+
9. **Focus on Behavior, Not Design**:
|
|
76
|
+
- ❌ Bad: "enters valid credentials into two single-line input fields and presses a green button..."
|
|
77
|
+
- ✅ Good: "provides valid credentials"
|
|
48
78
|
|
|
49
|
-
|
|
79
|
+
10. **Focus on User Outcomes, Not Implementation**:
|
|
80
|
+
- ❌ Bad: "When the app requests that Twilio send Casey an OTP from /email/POST endpoint..."
|
|
81
|
+
- ✅ Good: "When Casey requests an email OTP..."
|
|
82
|
+
- Even technical requirements can be user-centric: "95 percent of users experience under 1 second of delay"
|
|
50
83
|
|
|
51
|
-
|
|
84
|
+
11. **Flag Decomposition Issues**: If a requirement looks too large to validate with a single test, identify it
|
|
52
85
|
|
|
53
|
-
|
|
86
|
+
Provide specific, actionable feedback. Do not use emojis. Format as a bulleted list of issues found, or "No style issues found" if the file follows best practices.
|
|
54
87
|
|
|
55
|
-
|
|
88
|
+
## Severity Categorization
|
|
56
89
|
|
|
57
|
-
|
|
58
|
-
## MUST FIX
|
|
90
|
+
Organize your feedback by severity to help users prioritize:
|
|
59
91
|
|
|
60
|
-
-
|
|
92
|
+
**MUST FIX** - Critical issues that block understanding or testability
|
|
93
|
+
**SHOULD FIX** - Important issues that reduce quality
|
|
94
|
+
**COULD IMPROVE** - Minor suggestions and polish
|
|
61
95
|
|
|
62
|
-
|
|
96
|
+
**IMPORTANT**: Categorize each issue based on its actual impact, not to balance categories. Some files may have many issues in one category and none in others - that's expected and correct.
|
|
63
97
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
## COULD IMPROVE
|
|
98
|
+
Do not use emojis. Format your response as:
|
|
67
99
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Omit any heading with no findings. End with a one-line summary like \`OVERALL: <terse assessment>\`.
|
|
100
|
+
## MUST FIX
|
|
101
|
+
[List critical issues, or "None"]
|
|
72
102
|
|
|
73
|
-
##
|
|
103
|
+
## SHOULD FIX
|
|
104
|
+
[List important issues, or "None"]
|
|
74
105
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- Be honest. Accurate signal helps the author iterate.`;
|
|
106
|
+
## COULD IMPROVE
|
|
107
|
+
[List minor suggestions, or "None"]`;
|
|
78
108
|
//# sourceMappingURL=style-check.js.map
|
|
@@ -9,21 +9,56 @@
|
|
|
9
9
|
* - CTS-PLAN-2: outline reviewer output structure (categorized findings + verdict)
|
|
10
10
|
*/
|
|
11
11
|
import { z } from "zod";
|
|
12
|
+
export declare const CustomerSchema: z.ZodObject<{
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
description: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
}, {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}>;
|
|
22
|
+
export type Customer = z.infer<typeof CustomerSchema>;
|
|
12
23
|
export declare const AreaSchema: z.ZodObject<{
|
|
13
24
|
name: z.ZodString;
|
|
14
25
|
description: z.ZodString;
|
|
15
26
|
prefix: z.ZodString;
|
|
16
27
|
files: z.ZodArray<z.ZodString, "many">;
|
|
28
|
+
/**
|
|
29
|
+
* Customers this area serves — at least one. Each customer is a *user* of
|
|
30
|
+
* the software (not a contributor to its codebase). The specifier will use
|
|
31
|
+
* one of these as the persona it grounds the area's requirements in.
|
|
32
|
+
* See CTS-PLAN-1 (customer threading).
|
|
33
|
+
*/
|
|
34
|
+
customers: z.ZodArray<z.ZodObject<{
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
description: z.ZodString;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
}, {
|
|
41
|
+
name: string;
|
|
42
|
+
description: string;
|
|
43
|
+
}>, "many">;
|
|
17
44
|
}, "strip", z.ZodTypeAny, {
|
|
18
45
|
prefix: string;
|
|
19
46
|
files: string[];
|
|
20
47
|
name: string;
|
|
21
48
|
description: string;
|
|
49
|
+
customers: {
|
|
50
|
+
name: string;
|
|
51
|
+
description: string;
|
|
52
|
+
}[];
|
|
22
53
|
}, {
|
|
23
54
|
prefix: string;
|
|
24
55
|
files: string[];
|
|
25
56
|
name: string;
|
|
26
57
|
description: string;
|
|
58
|
+
customers: {
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
}[];
|
|
27
62
|
}>;
|
|
28
63
|
export type Area = z.infer<typeof AreaSchema>;
|
|
29
64
|
export declare const OutlineSchema: z.ZodObject<{
|
|
@@ -35,16 +70,40 @@ export declare const OutlineSchema: z.ZodObject<{
|
|
|
35
70
|
description: z.ZodString;
|
|
36
71
|
prefix: z.ZodString;
|
|
37
72
|
files: z.ZodArray<z.ZodString, "many">;
|
|
73
|
+
/**
|
|
74
|
+
* Customers this area serves — at least one. Each customer is a *user* of
|
|
75
|
+
* the software (not a contributor to its codebase). The specifier will use
|
|
76
|
+
* one of these as the persona it grounds the area's requirements in.
|
|
77
|
+
* See CTS-PLAN-1 (customer threading).
|
|
78
|
+
*/
|
|
79
|
+
customers: z.ZodArray<z.ZodObject<{
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
description: z.ZodString;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
name: string;
|
|
84
|
+
description: string;
|
|
85
|
+
}, {
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
}>, "many">;
|
|
38
89
|
}, "strip", z.ZodTypeAny, {
|
|
39
90
|
prefix: string;
|
|
40
91
|
files: string[];
|
|
41
92
|
name: string;
|
|
42
93
|
description: string;
|
|
94
|
+
customers: {
|
|
95
|
+
name: string;
|
|
96
|
+
description: string;
|
|
97
|
+
}[];
|
|
43
98
|
}, {
|
|
44
99
|
prefix: string;
|
|
45
100
|
files: string[];
|
|
46
101
|
name: string;
|
|
47
102
|
description: string;
|
|
103
|
+
customers: {
|
|
104
|
+
name: string;
|
|
105
|
+
description: string;
|
|
106
|
+
}[];
|
|
48
107
|
}>, "many">;
|
|
49
108
|
}, "strip", z.ZodTypeAny, {
|
|
50
109
|
title: string;
|
|
@@ -55,6 +114,10 @@ export declare const OutlineSchema: z.ZodObject<{
|
|
|
55
114
|
files: string[];
|
|
56
115
|
name: string;
|
|
57
116
|
description: string;
|
|
117
|
+
customers: {
|
|
118
|
+
name: string;
|
|
119
|
+
description: string;
|
|
120
|
+
}[];
|
|
58
121
|
}[];
|
|
59
122
|
}, {
|
|
60
123
|
title: string;
|
|
@@ -65,6 +128,10 @@ export declare const OutlineSchema: z.ZodObject<{
|
|
|
65
128
|
files: string[];
|
|
66
129
|
name: string;
|
|
67
130
|
description: string;
|
|
131
|
+
customers: {
|
|
132
|
+
name: string;
|
|
133
|
+
description: string;
|
|
134
|
+
}[];
|
|
68
135
|
}[];
|
|
69
136
|
}>;
|
|
70
137
|
export type Outline = z.infer<typeof OutlineSchema>;
|
|
@@ -104,8 +171,25 @@ export declare const OUTLINE_JSON_SCHEMA: {
|
|
|
104
171
|
readonly type: "string";
|
|
105
172
|
};
|
|
106
173
|
};
|
|
174
|
+
readonly customers: {
|
|
175
|
+
readonly type: "array";
|
|
176
|
+
readonly minItems: 1;
|
|
177
|
+
readonly items: {
|
|
178
|
+
readonly type: "object";
|
|
179
|
+
readonly properties: {
|
|
180
|
+
readonly name: {
|
|
181
|
+
readonly type: "string";
|
|
182
|
+
};
|
|
183
|
+
readonly description: {
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
readonly required: readonly ["name", "description"];
|
|
188
|
+
readonly additionalProperties: false;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
107
191
|
};
|
|
108
|
-
readonly required: readonly ["name", "description", "prefix", "files"];
|
|
192
|
+
readonly required: readonly ["name", "description", "prefix", "files", "customers"];
|
|
109
193
|
readonly additionalProperties: false;
|
|
110
194
|
};
|
|
111
195
|
};
|
|
@@ -253,5 +337,380 @@ export declare const SPEC_REVIEW_JSON_SCHEMA: {
|
|
|
253
337
|
readonly required: readonly ["coverage_gaps", "framing_errors", "cross_area_issues", "internal_mechanics_drift", "revisions", "verdict"];
|
|
254
338
|
readonly additionalProperties: false;
|
|
255
339
|
};
|
|
340
|
+
export declare const ConversationalCustomerSchema: z.ZodObject<{
|
|
341
|
+
description: z.ZodString;
|
|
342
|
+
}, "strip", z.ZodTypeAny, {
|
|
343
|
+
description: string;
|
|
344
|
+
}, {
|
|
345
|
+
description: string;
|
|
346
|
+
}>;
|
|
347
|
+
export type ConversationalCustomer = z.infer<typeof ConversationalCustomerSchema>;
|
|
348
|
+
/**
|
|
349
|
+
* One entry in the review thread (project-level or per-area). Discriminated
|
|
350
|
+
* on `result`:
|
|
351
|
+
*
|
|
352
|
+
* - `approved`: no revisions required.
|
|
353
|
+
* - `needs-revision`: must include a non-empty `revisions` list — each
|
|
354
|
+
* entry is a clear, actionable instruction for the next planner pass.
|
|
355
|
+
*/
|
|
356
|
+
export declare const ConversationalReviewEntrySchema: z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
|
|
357
|
+
result: z.ZodLiteral<"approved">;
|
|
358
|
+
}, "strip", z.ZodTypeAny, {
|
|
359
|
+
result: "approved";
|
|
360
|
+
}, {
|
|
361
|
+
result: "approved";
|
|
362
|
+
}>, z.ZodObject<{
|
|
363
|
+
result: z.ZodLiteral<"needs-revision">;
|
|
364
|
+
revisions: z.ZodArray<z.ZodString, "many">;
|
|
365
|
+
}, "strip", z.ZodTypeAny, {
|
|
366
|
+
revisions: string[];
|
|
367
|
+
result: "needs-revision";
|
|
368
|
+
}, {
|
|
369
|
+
revisions: string[];
|
|
370
|
+
result: "needs-revision";
|
|
371
|
+
}>]>;
|
|
372
|
+
export type ConversationalReviewEntry = z.infer<typeof ConversationalReviewEntrySchema>;
|
|
373
|
+
/**
|
|
374
|
+
* Review state. Used both at the project level (outline.review) and per
|
|
375
|
+
* area (area.review). `result` mirrors the latest thread entry's result
|
|
376
|
+
* so callers can query state without walking the thread.
|
|
377
|
+
*/
|
|
378
|
+
export declare const ConversationalReviewSchema: z.ZodObject<{
|
|
379
|
+
result: z.ZodEnum<["approved", "needs-revision"]>;
|
|
380
|
+
thread: z.ZodArray<z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
|
|
381
|
+
result: z.ZodLiteral<"approved">;
|
|
382
|
+
}, "strip", z.ZodTypeAny, {
|
|
383
|
+
result: "approved";
|
|
384
|
+
}, {
|
|
385
|
+
result: "approved";
|
|
386
|
+
}>, z.ZodObject<{
|
|
387
|
+
result: z.ZodLiteral<"needs-revision">;
|
|
388
|
+
revisions: z.ZodArray<z.ZodString, "many">;
|
|
389
|
+
}, "strip", z.ZodTypeAny, {
|
|
390
|
+
revisions: string[];
|
|
391
|
+
result: "needs-revision";
|
|
392
|
+
}, {
|
|
393
|
+
revisions: string[];
|
|
394
|
+
result: "needs-revision";
|
|
395
|
+
}>]>, "many">;
|
|
396
|
+
}, "strip", z.ZodTypeAny, {
|
|
397
|
+
result: "approved" | "needs-revision";
|
|
398
|
+
thread: ({
|
|
399
|
+
result: "approved";
|
|
400
|
+
} | {
|
|
401
|
+
revisions: string[];
|
|
402
|
+
result: "needs-revision";
|
|
403
|
+
})[];
|
|
404
|
+
}, {
|
|
405
|
+
result: "approved" | "needs-revision";
|
|
406
|
+
thread: ({
|
|
407
|
+
result: "approved";
|
|
408
|
+
} | {
|
|
409
|
+
revisions: string[];
|
|
410
|
+
result: "needs-revision";
|
|
411
|
+
})[];
|
|
412
|
+
}>;
|
|
413
|
+
export type ConversationalReview = z.infer<typeof ConversationalReviewSchema>;
|
|
414
|
+
export declare const ConversationalAreaSchema: z.ZodObject<{
|
|
415
|
+
name: z.ZodString;
|
|
416
|
+
prefix: z.ZodString;
|
|
417
|
+
description: z.ZodString;
|
|
418
|
+
source_files: z.ZodArray<z.ZodString, "many">;
|
|
419
|
+
customers: z.ZodArray<z.ZodObject<{
|
|
420
|
+
description: z.ZodString;
|
|
421
|
+
}, "strip", z.ZodTypeAny, {
|
|
422
|
+
description: string;
|
|
423
|
+
}, {
|
|
424
|
+
description: string;
|
|
425
|
+
}>, "many">;
|
|
426
|
+
/**
|
|
427
|
+
* Per-area review state — same shape as the project-level review.
|
|
428
|
+
* Optional: planner output doesn't include it; CA adds it after reviewing
|
|
429
|
+
* a partial. Tracks the per-area iteration loop (specify → review →
|
|
430
|
+
* editor → re-review → approved) the same way `outline.review` tracks
|
|
431
|
+
* the outline iteration loop.
|
|
432
|
+
*/
|
|
433
|
+
review: z.ZodOptional<z.ZodObject<{
|
|
434
|
+
result: z.ZodEnum<["approved", "needs-revision"]>;
|
|
435
|
+
thread: z.ZodArray<z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
|
|
436
|
+
result: z.ZodLiteral<"approved">;
|
|
437
|
+
}, "strip", z.ZodTypeAny, {
|
|
438
|
+
result: "approved";
|
|
439
|
+
}, {
|
|
440
|
+
result: "approved";
|
|
441
|
+
}>, z.ZodObject<{
|
|
442
|
+
result: z.ZodLiteral<"needs-revision">;
|
|
443
|
+
revisions: z.ZodArray<z.ZodString, "many">;
|
|
444
|
+
}, "strip", z.ZodTypeAny, {
|
|
445
|
+
revisions: string[];
|
|
446
|
+
result: "needs-revision";
|
|
447
|
+
}, {
|
|
448
|
+
revisions: string[];
|
|
449
|
+
result: "needs-revision";
|
|
450
|
+
}>]>, "many">;
|
|
451
|
+
}, "strip", z.ZodTypeAny, {
|
|
452
|
+
result: "approved" | "needs-revision";
|
|
453
|
+
thread: ({
|
|
454
|
+
result: "approved";
|
|
455
|
+
} | {
|
|
456
|
+
revisions: string[];
|
|
457
|
+
result: "needs-revision";
|
|
458
|
+
})[];
|
|
459
|
+
}, {
|
|
460
|
+
result: "approved" | "needs-revision";
|
|
461
|
+
thread: ({
|
|
462
|
+
result: "approved";
|
|
463
|
+
} | {
|
|
464
|
+
revisions: string[];
|
|
465
|
+
result: "needs-revision";
|
|
466
|
+
})[];
|
|
467
|
+
}>>;
|
|
468
|
+
}, "strip", z.ZodTypeAny, {
|
|
469
|
+
prefix: string;
|
|
470
|
+
name: string;
|
|
471
|
+
description: string;
|
|
472
|
+
customers: {
|
|
473
|
+
description: string;
|
|
474
|
+
}[];
|
|
475
|
+
source_files: string[];
|
|
476
|
+
review?: {
|
|
477
|
+
result: "approved" | "needs-revision";
|
|
478
|
+
thread: ({
|
|
479
|
+
result: "approved";
|
|
480
|
+
} | {
|
|
481
|
+
revisions: string[];
|
|
482
|
+
result: "needs-revision";
|
|
483
|
+
})[];
|
|
484
|
+
} | undefined;
|
|
485
|
+
}, {
|
|
486
|
+
prefix: string;
|
|
487
|
+
name: string;
|
|
488
|
+
description: string;
|
|
489
|
+
customers: {
|
|
490
|
+
description: string;
|
|
491
|
+
}[];
|
|
492
|
+
source_files: string[];
|
|
493
|
+
review?: {
|
|
494
|
+
result: "approved" | "needs-revision";
|
|
495
|
+
thread: ({
|
|
496
|
+
result: "approved";
|
|
497
|
+
} | {
|
|
498
|
+
revisions: string[];
|
|
499
|
+
result: "needs-revision";
|
|
500
|
+
})[];
|
|
501
|
+
} | undefined;
|
|
502
|
+
}>;
|
|
503
|
+
export type ConversationalArea = z.infer<typeof ConversationalAreaSchema>;
|
|
504
|
+
export declare const ConversationalOutlineSchema: z.ZodObject<{
|
|
505
|
+
title: z.ZodString;
|
|
506
|
+
defaultPrefix: z.ZodString;
|
|
507
|
+
summary: z.ZodString;
|
|
508
|
+
review: z.ZodOptional<z.ZodObject<{
|
|
509
|
+
result: z.ZodEnum<["approved", "needs-revision"]>;
|
|
510
|
+
thread: z.ZodArray<z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
|
|
511
|
+
result: z.ZodLiteral<"approved">;
|
|
512
|
+
}, "strip", z.ZodTypeAny, {
|
|
513
|
+
result: "approved";
|
|
514
|
+
}, {
|
|
515
|
+
result: "approved";
|
|
516
|
+
}>, z.ZodObject<{
|
|
517
|
+
result: z.ZodLiteral<"needs-revision">;
|
|
518
|
+
revisions: z.ZodArray<z.ZodString, "many">;
|
|
519
|
+
}, "strip", z.ZodTypeAny, {
|
|
520
|
+
revisions: string[];
|
|
521
|
+
result: "needs-revision";
|
|
522
|
+
}, {
|
|
523
|
+
revisions: string[];
|
|
524
|
+
result: "needs-revision";
|
|
525
|
+
}>]>, "many">;
|
|
526
|
+
}, "strip", z.ZodTypeAny, {
|
|
527
|
+
result: "approved" | "needs-revision";
|
|
528
|
+
thread: ({
|
|
529
|
+
result: "approved";
|
|
530
|
+
} | {
|
|
531
|
+
revisions: string[];
|
|
532
|
+
result: "needs-revision";
|
|
533
|
+
})[];
|
|
534
|
+
}, {
|
|
535
|
+
result: "approved" | "needs-revision";
|
|
536
|
+
thread: ({
|
|
537
|
+
result: "approved";
|
|
538
|
+
} | {
|
|
539
|
+
revisions: string[];
|
|
540
|
+
result: "needs-revision";
|
|
541
|
+
})[];
|
|
542
|
+
}>>;
|
|
543
|
+
areas: z.ZodArray<z.ZodObject<{
|
|
544
|
+
name: z.ZodString;
|
|
545
|
+
prefix: z.ZodString;
|
|
546
|
+
description: z.ZodString;
|
|
547
|
+
source_files: z.ZodArray<z.ZodString, "many">;
|
|
548
|
+
customers: z.ZodArray<z.ZodObject<{
|
|
549
|
+
description: z.ZodString;
|
|
550
|
+
}, "strip", z.ZodTypeAny, {
|
|
551
|
+
description: string;
|
|
552
|
+
}, {
|
|
553
|
+
description: string;
|
|
554
|
+
}>, "many">;
|
|
555
|
+
/**
|
|
556
|
+
* Per-area review state — same shape as the project-level review.
|
|
557
|
+
* Optional: planner output doesn't include it; CA adds it after reviewing
|
|
558
|
+
* a partial. Tracks the per-area iteration loop (specify → review →
|
|
559
|
+
* editor → re-review → approved) the same way `outline.review` tracks
|
|
560
|
+
* the outline iteration loop.
|
|
561
|
+
*/
|
|
562
|
+
review: z.ZodOptional<z.ZodObject<{
|
|
563
|
+
result: z.ZodEnum<["approved", "needs-revision"]>;
|
|
564
|
+
thread: z.ZodArray<z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
|
|
565
|
+
result: z.ZodLiteral<"approved">;
|
|
566
|
+
}, "strip", z.ZodTypeAny, {
|
|
567
|
+
result: "approved";
|
|
568
|
+
}, {
|
|
569
|
+
result: "approved";
|
|
570
|
+
}>, z.ZodObject<{
|
|
571
|
+
result: z.ZodLiteral<"needs-revision">;
|
|
572
|
+
revisions: z.ZodArray<z.ZodString, "many">;
|
|
573
|
+
}, "strip", z.ZodTypeAny, {
|
|
574
|
+
revisions: string[];
|
|
575
|
+
result: "needs-revision";
|
|
576
|
+
}, {
|
|
577
|
+
revisions: string[];
|
|
578
|
+
result: "needs-revision";
|
|
579
|
+
}>]>, "many">;
|
|
580
|
+
}, "strip", z.ZodTypeAny, {
|
|
581
|
+
result: "approved" | "needs-revision";
|
|
582
|
+
thread: ({
|
|
583
|
+
result: "approved";
|
|
584
|
+
} | {
|
|
585
|
+
revisions: string[];
|
|
586
|
+
result: "needs-revision";
|
|
587
|
+
})[];
|
|
588
|
+
}, {
|
|
589
|
+
result: "approved" | "needs-revision";
|
|
590
|
+
thread: ({
|
|
591
|
+
result: "approved";
|
|
592
|
+
} | {
|
|
593
|
+
revisions: string[];
|
|
594
|
+
result: "needs-revision";
|
|
595
|
+
})[];
|
|
596
|
+
}>>;
|
|
597
|
+
}, "strip", z.ZodTypeAny, {
|
|
598
|
+
prefix: string;
|
|
599
|
+
name: string;
|
|
600
|
+
description: string;
|
|
601
|
+
customers: {
|
|
602
|
+
description: string;
|
|
603
|
+
}[];
|
|
604
|
+
source_files: string[];
|
|
605
|
+
review?: {
|
|
606
|
+
result: "approved" | "needs-revision";
|
|
607
|
+
thread: ({
|
|
608
|
+
result: "approved";
|
|
609
|
+
} | {
|
|
610
|
+
revisions: string[];
|
|
611
|
+
result: "needs-revision";
|
|
612
|
+
})[];
|
|
613
|
+
} | undefined;
|
|
614
|
+
}, {
|
|
615
|
+
prefix: string;
|
|
616
|
+
name: string;
|
|
617
|
+
description: string;
|
|
618
|
+
customers: {
|
|
619
|
+
description: string;
|
|
620
|
+
}[];
|
|
621
|
+
source_files: string[];
|
|
622
|
+
review?: {
|
|
623
|
+
result: "approved" | "needs-revision";
|
|
624
|
+
thread: ({
|
|
625
|
+
result: "approved";
|
|
626
|
+
} | {
|
|
627
|
+
revisions: string[];
|
|
628
|
+
result: "needs-revision";
|
|
629
|
+
})[];
|
|
630
|
+
} | undefined;
|
|
631
|
+
}>, "many">;
|
|
632
|
+
}, "strip", z.ZodTypeAny, {
|
|
633
|
+
title: string;
|
|
634
|
+
defaultPrefix: string;
|
|
635
|
+
summary: string;
|
|
636
|
+
areas: {
|
|
637
|
+
prefix: string;
|
|
638
|
+
name: string;
|
|
639
|
+
description: string;
|
|
640
|
+
customers: {
|
|
641
|
+
description: string;
|
|
642
|
+
}[];
|
|
643
|
+
source_files: string[];
|
|
644
|
+
review?: {
|
|
645
|
+
result: "approved" | "needs-revision";
|
|
646
|
+
thread: ({
|
|
647
|
+
result: "approved";
|
|
648
|
+
} | {
|
|
649
|
+
revisions: string[];
|
|
650
|
+
result: "needs-revision";
|
|
651
|
+
})[];
|
|
652
|
+
} | undefined;
|
|
653
|
+
}[];
|
|
654
|
+
review?: {
|
|
655
|
+
result: "approved" | "needs-revision";
|
|
656
|
+
thread: ({
|
|
657
|
+
result: "approved";
|
|
658
|
+
} | {
|
|
659
|
+
revisions: string[];
|
|
660
|
+
result: "needs-revision";
|
|
661
|
+
})[];
|
|
662
|
+
} | undefined;
|
|
663
|
+
}, {
|
|
664
|
+
title: string;
|
|
665
|
+
defaultPrefix: string;
|
|
666
|
+
summary: string;
|
|
667
|
+
areas: {
|
|
668
|
+
prefix: string;
|
|
669
|
+
name: string;
|
|
670
|
+
description: string;
|
|
671
|
+
customers: {
|
|
672
|
+
description: string;
|
|
673
|
+
}[];
|
|
674
|
+
source_files: string[];
|
|
675
|
+
review?: {
|
|
676
|
+
result: "approved" | "needs-revision";
|
|
677
|
+
thread: ({
|
|
678
|
+
result: "approved";
|
|
679
|
+
} | {
|
|
680
|
+
revisions: string[];
|
|
681
|
+
result: "needs-revision";
|
|
682
|
+
})[];
|
|
683
|
+
} | undefined;
|
|
684
|
+
}[];
|
|
685
|
+
review?: {
|
|
686
|
+
result: "approved" | "needs-revision";
|
|
687
|
+
thread: ({
|
|
688
|
+
result: "approved";
|
|
689
|
+
} | {
|
|
690
|
+
revisions: string[];
|
|
691
|
+
result: "needs-revision";
|
|
692
|
+
})[];
|
|
693
|
+
} | undefined;
|
|
694
|
+
}>;
|
|
695
|
+
export type ConversationalOutline = z.infer<typeof ConversationalOutlineSchema>;
|
|
696
|
+
/**
|
|
697
|
+
* Parse YAML text against the conversational outline schema. Throws with
|
|
698
|
+
* a descriptive message on parse or validation failure.
|
|
699
|
+
*/
|
|
700
|
+
export declare function parseConversationalOutline(text: string): ConversationalOutline;
|
|
701
|
+
/**
|
|
702
|
+
* Adapt a conversational orchestrator outline to the legacy Outline shape
|
|
703
|
+
* for use with stages that still take the legacy schema (compose, present).
|
|
704
|
+
*
|
|
705
|
+
* Discards orchestrator-only fields (review); maps `source_files` → `files`;
|
|
706
|
+
* bridges the customer-shape difference by synthesizing a `name` from each
|
|
707
|
+
* conversational customer's description.
|
|
708
|
+
*/
|
|
709
|
+
export declare function conversationalOutlineToLegacy(outline: ConversationalOutline): Outline;
|
|
710
|
+
/**
|
|
711
|
+
* Serialize a conversational outline back to YAML text. Uses literal-block
|
|
712
|
+
* multi-line strings (`|`) where possible for readability.
|
|
713
|
+
*/
|
|
714
|
+
export declare function stringifyConversationalOutline(outline: ConversationalOutline): string;
|
|
256
715
|
export declare function parseSpecReview(text: string): SpecReview;
|
|
257
716
|
//# sourceMappingURL=schemas.d.ts.map
|