meto-cli 0.1.5 → 0.4.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/dist/cli/ai-generator.d.ts +57 -0
- package/dist/cli/ai-generator.d.ts.map +1 -0
- package/dist/cli/ai-generator.js +172 -0
- package/dist/cli/ai-generator.js.map +1 -0
- package/dist/cli/ai-parser.d.ts +57 -0
- package/dist/cli/ai-parser.d.ts.map +1 -0
- package/dist/cli/ai-parser.js +146 -0
- package/dist/cli/ai-parser.js.map +1 -0
- package/dist/cli/index.js +92 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/preflight.d.ts +7 -0
- package/dist/cli/preflight.d.ts.map +1 -1
- package/dist/cli/preflight.js +16 -2
- package/dist/cli/preflight.js.map +1 -1
- package/dist/cli/prompts.d.ts +27 -1
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +68 -38
- package/dist/cli/prompts.js.map +1 -1
- package/dist/cli/renderer.d.ts +6 -4
- package/dist/cli/renderer.d.ts.map +1 -1
- package/dist/cli/renderer.js +22 -4
- package/dist/cli/renderer.js.map +1 -1
- package/package.json +1 -1
- package/templates/ai/tasks/tasks-backlog.md +2 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { TechStack } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Minimal context the user provides before AI takes over generation.
|
|
4
|
+
*/
|
|
5
|
+
export interface AIGenerationContext {
|
|
6
|
+
projectName: string;
|
|
7
|
+
description: string;
|
|
8
|
+
targetUsers: string;
|
|
9
|
+
techStack: TechStack;
|
|
10
|
+
customStack: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Result of a successful AI generation subprocess call.
|
|
14
|
+
*/
|
|
15
|
+
export interface AIGenerationResult {
|
|
16
|
+
/** Raw stdout output from the Claude Code subprocess. */
|
|
17
|
+
raw: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Error thrown when the Claude Code subprocess exits with a non-zero code.
|
|
21
|
+
*/
|
|
22
|
+
export declare class AIGenerationError extends Error {
|
|
23
|
+
/** The stderr output from the failed subprocess. */
|
|
24
|
+
readonly stderr: string;
|
|
25
|
+
/** The exit code from the subprocess (null if terminated by signal). */
|
|
26
|
+
readonly exitCode: number | null;
|
|
27
|
+
constructor(stderr: string, exitCode: number | null);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Error thrown when the Claude Code subprocess exceeds the timeout.
|
|
31
|
+
*/
|
|
32
|
+
export declare class AIGenerationTimeoutError extends Error {
|
|
33
|
+
/** The timeout duration in milliseconds. */
|
|
34
|
+
readonly timeoutMs: number;
|
|
35
|
+
constructor(timeoutMs: number);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Builds the structured prompt that instructs Claude Code to generate project content.
|
|
39
|
+
*
|
|
40
|
+
* The prompt specifies section markers so the output can be deterministically parsed.
|
|
41
|
+
* Each section is delimited by `---SECTION:<NAME>---` and `---END:<NAME>---` markers.
|
|
42
|
+
*/
|
|
43
|
+
export declare function buildAIPrompt(context: AIGenerationContext): string;
|
|
44
|
+
/**
|
|
45
|
+
* Invokes Claude Code as a subprocess with a structured prompt and returns the raw output.
|
|
46
|
+
*
|
|
47
|
+
* The function spawns `claude` with the `-p` flag, passing the generation prompt.
|
|
48
|
+
* It captures stdout and returns it as a raw string for downstream parsing.
|
|
49
|
+
*
|
|
50
|
+
* @param context - The minimal project context collected from the user
|
|
51
|
+
* @param timeoutMs - Maximum time to wait for the subprocess (default 90 seconds)
|
|
52
|
+
* @returns The raw stdout output from Claude Code
|
|
53
|
+
* @throws {AIGenerationTimeoutError} If the subprocess exceeds the timeout
|
|
54
|
+
* @throws {AIGenerationError} If the subprocess exits with a non-zero code
|
|
55
|
+
*/
|
|
56
|
+
export declare function generateWithAI(context: AIGenerationContext, timeoutMs?: number): Promise<AIGenerationResult>;
|
|
57
|
+
//# sourceMappingURL=ai-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-generator.d.ts","sourceRoot":"","sources":["../../src/cli/ai-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;gBAErB,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAOpD;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,SAAS,EAAE,MAAM;CAM9B;AAOD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAuFlE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,mBAAmB,EAC5B,SAAS,GAAE,MAA2B,GACrC,OAAO,CAAC,kBAAkB,CAAC,CAwC7B"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { getStackDescription } from "./stacks.js";
|
|
3
|
+
/**
|
|
4
|
+
* Error thrown when the Claude Code subprocess exits with a non-zero code.
|
|
5
|
+
*/
|
|
6
|
+
export class AIGenerationError extends Error {
|
|
7
|
+
/** The stderr output from the failed subprocess. */
|
|
8
|
+
stderr;
|
|
9
|
+
/** The exit code from the subprocess (null if terminated by signal). */
|
|
10
|
+
exitCode;
|
|
11
|
+
constructor(stderr, exitCode) {
|
|
12
|
+
const codeInfo = exitCode !== null ? ` (exit code ${exitCode})` : "";
|
|
13
|
+
super(`AI generation failed${codeInfo}: ${stderr}`);
|
|
14
|
+
this.name = "AIGenerationError";
|
|
15
|
+
this.stderr = stderr;
|
|
16
|
+
this.exitCode = exitCode;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Error thrown when the Claude Code subprocess exceeds the timeout.
|
|
21
|
+
*/
|
|
22
|
+
export class AIGenerationTimeoutError extends Error {
|
|
23
|
+
/** The timeout duration in milliseconds. */
|
|
24
|
+
timeoutMs;
|
|
25
|
+
constructor(timeoutMs) {
|
|
26
|
+
const seconds = Math.round(timeoutMs / 1000);
|
|
27
|
+
super(`AI generation timed out after ${seconds} seconds`);
|
|
28
|
+
this.name = "AIGenerationTimeoutError";
|
|
29
|
+
this.timeoutMs = timeoutMs;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Default timeout for the AI generation subprocess (90 seconds).
|
|
34
|
+
*/
|
|
35
|
+
const DEFAULT_TIMEOUT_MS = 90_000;
|
|
36
|
+
/**
|
|
37
|
+
* Builds the structured prompt that instructs Claude Code to generate project content.
|
|
38
|
+
*
|
|
39
|
+
* The prompt specifies section markers so the output can be deterministically parsed.
|
|
40
|
+
* Each section is delimited by `---SECTION:<NAME>---` and `---END:<NAME>---` markers.
|
|
41
|
+
*/
|
|
42
|
+
export function buildAIPrompt(context) {
|
|
43
|
+
const stackDescription = context.techStack === "custom"
|
|
44
|
+
? context.customStack ?? "Custom stack"
|
|
45
|
+
: getStackDescription(context.techStack);
|
|
46
|
+
return `You are a senior product manager and technical architect. Based on the project brief below, generate structured project content for a software project scaffold.
|
|
47
|
+
|
|
48
|
+
PROJECT BRIEF:
|
|
49
|
+
- Name: ${context.projectName}
|
|
50
|
+
- Description: ${context.description}
|
|
51
|
+
- Target Users: ${context.targetUsers}
|
|
52
|
+
- Tech Stack: ${stackDescription}
|
|
53
|
+
|
|
54
|
+
Generate the following sections. Each section MUST be wrapped in markers exactly as shown. Do not include the markers inside the content itself.
|
|
55
|
+
|
|
56
|
+
---SECTION:PRODUCT_VISION---
|
|
57
|
+
Write an expanded product vision (3-5 paragraphs). Cover what the product does, why it matters, who it serves, and what differentiates it. Be specific and actionable, not generic.
|
|
58
|
+
---END:PRODUCT_VISION---
|
|
59
|
+
|
|
60
|
+
---SECTION:PROBLEM_STATEMENT---
|
|
61
|
+
Write a clear problem statement (2-3 paragraphs). Describe the pain point, who experiences it, and why existing solutions fall short.
|
|
62
|
+
---END:PROBLEM_STATEMENT---
|
|
63
|
+
|
|
64
|
+
---SECTION:SUCCESS_CRITERIA---
|
|
65
|
+
Write 5-8 measurable success criteria as a markdown bullet list. Each criterion should be specific and verifiable (e.g., "New user can complete onboarding in under 2 minutes").
|
|
66
|
+
---END:SUCCESS_CRITERIA---
|
|
67
|
+
|
|
68
|
+
---SECTION:VALUE_PROPOSITION---
|
|
69
|
+
Write a one-line value proposition that captures the core benefit. Follow it with 2-3 supporting sentences.
|
|
70
|
+
---END:VALUE_PROPOSITION---
|
|
71
|
+
|
|
72
|
+
---SECTION:OUT_OF_SCOPE---
|
|
73
|
+
Write 5-8 items that are explicitly out of scope for v1 as a markdown bullet list. Be specific about what will NOT be built.
|
|
74
|
+
---END:OUT_OF_SCOPE---
|
|
75
|
+
|
|
76
|
+
---SECTION:EPICS---
|
|
77
|
+
Generate 4-6 epics. Each epic must follow this exact format:
|
|
78
|
+
|
|
79
|
+
## E1 -- [Epic Title]
|
|
80
|
+
**Goal:** [One sentence describing the outcome]
|
|
81
|
+
**Status:** Not started
|
|
82
|
+
**Tasks:** To be sliced by @meto-pm
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## E2 -- [Epic Title]
|
|
87
|
+
**Goal:** [One sentence describing the outcome]
|
|
88
|
+
**Status:** Not started
|
|
89
|
+
**Tasks:** To be sliced by @meto-pm
|
|
90
|
+
|
|
91
|
+
Continue for E3, E4, etc. Epics should progress logically from setup through core features to deployment.
|
|
92
|
+
---END:EPICS---
|
|
93
|
+
|
|
94
|
+
---SECTION:STARTER_TASKS---
|
|
95
|
+
Slice the FIRST epic (E1) into 3-5 task slices. Each task must follow this exact format:
|
|
96
|
+
|
|
97
|
+
## [slice-001] -- [Task Title]
|
|
98
|
+
**Epic:** E1 | **Size:** S | **Depends on:** none
|
|
99
|
+
|
|
100
|
+
**User Story**
|
|
101
|
+
As a [role], I want [capability] so that [benefit].
|
|
102
|
+
|
|
103
|
+
**Acceptance Criteria**
|
|
104
|
+
- [ ] [Specific, testable criterion]
|
|
105
|
+
- [ ] [Another criterion]
|
|
106
|
+
- [ ] [At least 3 criteria per task]
|
|
107
|
+
|
|
108
|
+
**Out of Scope**
|
|
109
|
+
[What this task does NOT include]
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
Continue with [slice-002], [slice-003], etc. Tasks should be small enough to complete in one session.
|
|
114
|
+
---END:STARTER_TASKS---
|
|
115
|
+
|
|
116
|
+
---SECTION:DEFINITION_OF_DONE---
|
|
117
|
+
Write a Definition of Done checklist with two sections:
|
|
118
|
+
|
|
119
|
+
## Universal Checks
|
|
120
|
+
- [ ] [5-6 universal quality checks appropriate for the tech stack]
|
|
121
|
+
|
|
122
|
+
## Stack-Specific Checks
|
|
123
|
+
- [ ] [4-5 checks specific to the chosen technology]
|
|
124
|
+
---END:DEFINITION_OF_DONE---
|
|
125
|
+
|
|
126
|
+
IMPORTANT: Output ONLY the sections above with their markers. No introduction, no conclusion, no commentary outside the markers.`;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Invokes Claude Code as a subprocess with a structured prompt and returns the raw output.
|
|
130
|
+
*
|
|
131
|
+
* The function spawns `claude` with the `-p` flag, passing the generation prompt.
|
|
132
|
+
* It captures stdout and returns it as a raw string for downstream parsing.
|
|
133
|
+
*
|
|
134
|
+
* @param context - The minimal project context collected from the user
|
|
135
|
+
* @param timeoutMs - Maximum time to wait for the subprocess (default 90 seconds)
|
|
136
|
+
* @returns The raw stdout output from Claude Code
|
|
137
|
+
* @throws {AIGenerationTimeoutError} If the subprocess exceeds the timeout
|
|
138
|
+
* @throws {AIGenerationError} If the subprocess exits with a non-zero code
|
|
139
|
+
*/
|
|
140
|
+
export function generateWithAI(context, timeoutMs = DEFAULT_TIMEOUT_MS) {
|
|
141
|
+
const prompt = buildAIPrompt(context);
|
|
142
|
+
return new Promise((resolve, reject) => {
|
|
143
|
+
const child = spawn("claude", ["-p", prompt], {
|
|
144
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
145
|
+
});
|
|
146
|
+
let stdout = "";
|
|
147
|
+
let stderr = "";
|
|
148
|
+
child.stdout.on("data", (chunk) => {
|
|
149
|
+
stdout += chunk.toString();
|
|
150
|
+
});
|
|
151
|
+
child.stderr.on("data", (chunk) => {
|
|
152
|
+
stderr += chunk.toString();
|
|
153
|
+
});
|
|
154
|
+
const timer = setTimeout(() => {
|
|
155
|
+
child.kill("SIGTERM");
|
|
156
|
+
reject(new AIGenerationTimeoutError(timeoutMs));
|
|
157
|
+
}, timeoutMs);
|
|
158
|
+
child.on("close", (code) => {
|
|
159
|
+
clearTimeout(timer);
|
|
160
|
+
if (code !== 0) {
|
|
161
|
+
reject(new AIGenerationError(stderr, code));
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
resolve({ raw: stdout });
|
|
165
|
+
});
|
|
166
|
+
child.on("error", (err) => {
|
|
167
|
+
clearTimeout(timer);
|
|
168
|
+
reject(new AIGenerationError(err.message, null));
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=ai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SAAS,CAAC,CAAC;QAEd,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACzB,YAAY,CAAC,KAAK,CAAC,CAAC;YAEpB,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;gBACf,MAAM,CAAC,IAAI,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;gBAC5C,OAAO;YACT,CAAC;YAED,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACxB,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured content generated by AI, mapped to scaffold template tokens.
|
|
3
|
+
*/
|
|
4
|
+
export interface AIGeneratedContent {
|
|
5
|
+
productVision: string;
|
|
6
|
+
problemStatement: string;
|
|
7
|
+
successCriteria: string;
|
|
8
|
+
valueProposition: string;
|
|
9
|
+
outOfScope: string;
|
|
10
|
+
/** Formatted markdown with epic definitions. */
|
|
11
|
+
epics: string;
|
|
12
|
+
/** Formatted markdown with task slice definitions. */
|
|
13
|
+
starterTasks: string;
|
|
14
|
+
/** Definition of Done checklist. */
|
|
15
|
+
definitionOfDone: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Result of validating AI-generated content.
|
|
19
|
+
*/
|
|
20
|
+
export interface ValidationResult {
|
|
21
|
+
valid: boolean;
|
|
22
|
+
warnings: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Error thrown when the AI output cannot be parsed at all.
|
|
26
|
+
*/
|
|
27
|
+
export declare class AIParseError extends Error {
|
|
28
|
+
/** The raw unparseable output for debugging. */
|
|
29
|
+
readonly rawOutput: string;
|
|
30
|
+
constructor(rawOutput: string);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Parses raw AI output into structured AIGeneratedContent.
|
|
34
|
+
*
|
|
35
|
+
* Extracts content between section markers (`---SECTION:<NAME>---` / `---END:<NAME>---`).
|
|
36
|
+
* Missing sections receive a fallback value. If no markers are found at all,
|
|
37
|
+
* throws an AIParseError.
|
|
38
|
+
*
|
|
39
|
+
* @param raw - The raw stdout string from the Claude Code subprocess
|
|
40
|
+
* @returns Parsed and structured content ready for template token mapping
|
|
41
|
+
* @throws {AIParseError} If the output contains no recognizable section markers
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseAIOutput(raw: string): AIGeneratedContent;
|
|
44
|
+
/**
|
|
45
|
+
* Validates parsed AI-generated content for structural quality.
|
|
46
|
+
*
|
|
47
|
+
* Checks:
|
|
48
|
+
* - No section is empty or still using the fallback value
|
|
49
|
+
* - Epics section contains at least `## E1`
|
|
50
|
+
* - Starter tasks section contains at least `## [slice-001]`
|
|
51
|
+
* - Each task has "Acceptance Criteria" and "Out of Scope" headings
|
|
52
|
+
*
|
|
53
|
+
* @param content - The parsed AIGeneratedContent to validate
|
|
54
|
+
* @returns A ValidationResult indicating whether the content is valid, with warnings
|
|
55
|
+
*/
|
|
56
|
+
export declare function validateAIContent(content: AIGeneratedContent): ValidationResult;
|
|
57
|
+
//# sourceMappingURL=ai-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-parser.d.ts","sourceRoot":"","sources":["../../src/cli/ai-parser.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,gDAAgD;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,SAAS,EAAE,MAAM;CAK9B;AA2DD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CA4B7D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,gBAAgB,CA0C/E"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when the AI output cannot be parsed at all.
|
|
3
|
+
*/
|
|
4
|
+
export class AIParseError extends Error {
|
|
5
|
+
/** The raw unparseable output for debugging. */
|
|
6
|
+
rawOutput;
|
|
7
|
+
constructor(rawOutput) {
|
|
8
|
+
super("AI output is unparseable -- no section markers found");
|
|
9
|
+
this.name = "AIParseError";
|
|
10
|
+
this.rawOutput = rawOutput;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Section names used as delimiters in the AI output.
|
|
15
|
+
*/
|
|
16
|
+
const SECTION_NAMES = [
|
|
17
|
+
"PRODUCT_VISION",
|
|
18
|
+
"PROBLEM_STATEMENT",
|
|
19
|
+
"SUCCESS_CRITERIA",
|
|
20
|
+
"VALUE_PROPOSITION",
|
|
21
|
+
"OUT_OF_SCOPE",
|
|
22
|
+
"EPICS",
|
|
23
|
+
"STARTER_TASKS",
|
|
24
|
+
"DEFINITION_OF_DONE",
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* Default fallback value used when a section is missing from the AI output.
|
|
28
|
+
*/
|
|
29
|
+
const FALLBACK_VALUE = "To be defined by @meto-pm";
|
|
30
|
+
/**
|
|
31
|
+
* Maps section names to AIGeneratedContent field keys.
|
|
32
|
+
*/
|
|
33
|
+
const SECTION_TO_FIELD = {
|
|
34
|
+
PRODUCT_VISION: "productVision",
|
|
35
|
+
PROBLEM_STATEMENT: "problemStatement",
|
|
36
|
+
SUCCESS_CRITERIA: "successCriteria",
|
|
37
|
+
VALUE_PROPOSITION: "valueProposition",
|
|
38
|
+
OUT_OF_SCOPE: "outOfScope",
|
|
39
|
+
EPICS: "epics",
|
|
40
|
+
STARTER_TASKS: "starterTasks",
|
|
41
|
+
DEFINITION_OF_DONE: "definitionOfDone",
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Extracts the content between section markers for a given section name.
|
|
45
|
+
* Returns undefined if the section is not found.
|
|
46
|
+
*/
|
|
47
|
+
function extractSection(raw, sectionName) {
|
|
48
|
+
const startMarker = `---SECTION:${sectionName}---`;
|
|
49
|
+
const endMarker = `---END:${sectionName}---`;
|
|
50
|
+
const startIndex = raw.indexOf(startMarker);
|
|
51
|
+
if (startIndex === -1) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
const contentStart = startIndex + startMarker.length;
|
|
55
|
+
const endIndex = raw.indexOf(endMarker, contentStart);
|
|
56
|
+
if (endIndex === -1) {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
return raw.slice(contentStart, endIndex).trim();
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Parses raw AI output into structured AIGeneratedContent.
|
|
63
|
+
*
|
|
64
|
+
* Extracts content between section markers (`---SECTION:<NAME>---` / `---END:<NAME>---`).
|
|
65
|
+
* Missing sections receive a fallback value. If no markers are found at all,
|
|
66
|
+
* throws an AIParseError.
|
|
67
|
+
*
|
|
68
|
+
* @param raw - The raw stdout string from the Claude Code subprocess
|
|
69
|
+
* @returns Parsed and structured content ready for template token mapping
|
|
70
|
+
* @throws {AIParseError} If the output contains no recognizable section markers
|
|
71
|
+
*/
|
|
72
|
+
export function parseAIOutput(raw) {
|
|
73
|
+
let foundSections = 0;
|
|
74
|
+
const result = {
|
|
75
|
+
productVision: FALLBACK_VALUE,
|
|
76
|
+
problemStatement: FALLBACK_VALUE,
|
|
77
|
+
successCriteria: FALLBACK_VALUE,
|
|
78
|
+
valueProposition: FALLBACK_VALUE,
|
|
79
|
+
outOfScope: FALLBACK_VALUE,
|
|
80
|
+
epics: FALLBACK_VALUE,
|
|
81
|
+
starterTasks: FALLBACK_VALUE,
|
|
82
|
+
definitionOfDone: FALLBACK_VALUE,
|
|
83
|
+
};
|
|
84
|
+
for (const sectionName of SECTION_NAMES) {
|
|
85
|
+
const content = extractSection(raw, sectionName);
|
|
86
|
+
if (content !== undefined) {
|
|
87
|
+
foundSections++;
|
|
88
|
+
const fieldKey = SECTION_TO_FIELD[sectionName];
|
|
89
|
+
result[fieldKey] = content.length > 0 ? content : FALLBACK_VALUE;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (foundSections === 0) {
|
|
93
|
+
throw new AIParseError(raw);
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Validates parsed AI-generated content for structural quality.
|
|
99
|
+
*
|
|
100
|
+
* Checks:
|
|
101
|
+
* - No section is empty or still using the fallback value
|
|
102
|
+
* - Epics section contains at least `## E1`
|
|
103
|
+
* - Starter tasks section contains at least `## [slice-001]`
|
|
104
|
+
* - Each task has "Acceptance Criteria" and "Out of Scope" headings
|
|
105
|
+
*
|
|
106
|
+
* @param content - The parsed AIGeneratedContent to validate
|
|
107
|
+
* @returns A ValidationResult indicating whether the content is valid, with warnings
|
|
108
|
+
*/
|
|
109
|
+
export function validateAIContent(content) {
|
|
110
|
+
const warnings = [];
|
|
111
|
+
const fieldLabels = {
|
|
112
|
+
productVision: "Product Vision",
|
|
113
|
+
problemStatement: "Problem Statement",
|
|
114
|
+
successCriteria: "Success Criteria",
|
|
115
|
+
valueProposition: "Value Proposition",
|
|
116
|
+
outOfScope: "Out of Scope",
|
|
117
|
+
epics: "Epics",
|
|
118
|
+
starterTasks: "Starter Tasks",
|
|
119
|
+
definitionOfDone: "Definition of Done",
|
|
120
|
+
};
|
|
121
|
+
for (const [key, label] of Object.entries(fieldLabels)) {
|
|
122
|
+
const value = content[key];
|
|
123
|
+
if (value.length === 0 || value === FALLBACK_VALUE) {
|
|
124
|
+
warnings.push(`${label} section is missing or uses fallback value`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (!content.epics.includes("## E1")) {
|
|
128
|
+
warnings.push("Epics section does not contain at least ## E1");
|
|
129
|
+
}
|
|
130
|
+
if (!content.starterTasks.includes("## [slice-001]")) {
|
|
131
|
+
warnings.push("Starter Tasks section does not contain at least ## [slice-001]");
|
|
132
|
+
}
|
|
133
|
+
if (content.starterTasks !== FALLBACK_VALUE) {
|
|
134
|
+
if (!content.starterTasks.includes("Acceptance Criteria")) {
|
|
135
|
+
warnings.push("Starter Tasks are missing Acceptance Criteria headings");
|
|
136
|
+
}
|
|
137
|
+
if (!content.starterTasks.includes("Out of Scope")) {
|
|
138
|
+
warnings.push("Starter Tasks are missing Out of Scope headings");
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
valid: warnings.length === 0,
|
|
143
|
+
warnings,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=ai-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-parser.js","sourceRoot":"","sources":["../../src/cli/ai-parser.ts"],"names":[],"mappings":"AAyBA;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,gDAAgD;IACvC,SAAS,CAAS;IAE3B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C;IAEF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QACvD,MAAM,KAAK,GAAG,OAAO,CAAC,GAA+B,CAAC,CAAC;QACvD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;YACnD,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,4CAA4C,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,QAAQ,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACrD,QAAQ,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;IAClF,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,KAAK,cAAc,EAAE,CAAC;QAC5C,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC;YAC1D,QAAQ,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QAC1E,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;YACnD,QAAQ,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC;QAC5B,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import * as p from "@clack/prompts";
|
|
5
|
-
import { collectProjectBrief } from "./prompts.js";
|
|
5
|
+
import { collectDeepContent, collectProjectBrief } from "./prompts.js";
|
|
6
6
|
import { InterruptionHandler } from "./interruption.js";
|
|
7
7
|
import { buildTokenMap, renderTemplates, resolveTemplatesDir, } from "./renderer.js";
|
|
8
8
|
import { runGitHubFlow } from "./github.js";
|
|
@@ -11,6 +11,8 @@ import { runSupabaseFlow } from "./supabase.js";
|
|
|
11
11
|
import { checkWritePermission, PreflightError, runPreflightChecks, } from "./preflight.js";
|
|
12
12
|
import { DirectoryNotEmptyError, writeScaffold } from "./scaffold.js";
|
|
13
13
|
import { formatFileTree } from "./tree.js";
|
|
14
|
+
import { generateWithAI, AIGenerationTimeoutError } from "./ai-generator.js";
|
|
15
|
+
import { parseAIOutput, validateAIContent } from "./ai-parser.js";
|
|
14
16
|
/**
|
|
15
17
|
* Resolves the absolute path to the package root directory.
|
|
16
18
|
* At runtime: dist/cli/index.js -> package root is ../../
|
|
@@ -46,6 +48,7 @@ function printHelp() {
|
|
|
46
48
|
"Commands:",
|
|
47
49
|
" init Scaffold a new structured project",
|
|
48
50
|
" init --dry-run Preview files without writing to disk",
|
|
51
|
+
" init --no-ai Skip AI generation, use standard prompts",
|
|
49
52
|
"",
|
|
50
53
|
"Options:",
|
|
51
54
|
" --help, -h Show this help message",
|
|
@@ -90,7 +93,31 @@ async function main() {
|
|
|
90
93
|
if (!preflight.gitAvailable) {
|
|
91
94
|
p.log.warning("git not found -- the scaffolded project will not be initialized as a git repository.");
|
|
92
95
|
}
|
|
93
|
-
const
|
|
96
|
+
const noAIFlag = process.argv.includes("--no-ai");
|
|
97
|
+
let useAI = preflight.claudeCodeAvailable && !noAIFlag;
|
|
98
|
+
if (noAIFlag) {
|
|
99
|
+
p.log.info("AI generation disabled via --no-ai flag");
|
|
100
|
+
}
|
|
101
|
+
else if (preflight.claudeCodeAvailable) {
|
|
102
|
+
p.log.info("Claude Code detected -- AI-powered generation available");
|
|
103
|
+
const confirmAI = await p.confirm({
|
|
104
|
+
message: "Use AI to generate your project content?",
|
|
105
|
+
initialValue: true,
|
|
106
|
+
});
|
|
107
|
+
if (p.isCancel(confirmAI)) {
|
|
108
|
+
p.cancel("Project setup cancelled.");
|
|
109
|
+
interruption.uninstall();
|
|
110
|
+
process.exit(0);
|
|
111
|
+
}
|
|
112
|
+
useAI = confirmAI;
|
|
113
|
+
if (!useAI) {
|
|
114
|
+
p.log.info("Using standard prompts instead.");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
p.log.info("Claude Code not found -- using standard prompts");
|
|
119
|
+
}
|
|
120
|
+
const brief = await collectProjectBrief({ useAI });
|
|
94
121
|
const writeError = await checkWritePermission(brief.outputDirectory);
|
|
95
122
|
if (writeError !== undefined) {
|
|
96
123
|
p.log.error(writeError);
|
|
@@ -107,11 +134,73 @@ async function main() {
|
|
|
107
134
|
`Stack: ${stackLabel}`,
|
|
108
135
|
`Output: ${brief.outputDirectory}`,
|
|
109
136
|
].join("\n"), "Project Brief");
|
|
137
|
+
let aiContent;
|
|
138
|
+
if (useAI) {
|
|
139
|
+
const aiSpinner = p.spinner();
|
|
140
|
+
aiSpinner.start("Generating project content with Claude Code...");
|
|
141
|
+
const startTime = Date.now();
|
|
142
|
+
let elapsedSeconds = 0;
|
|
143
|
+
const progressTimer = setInterval(() => {
|
|
144
|
+
elapsedSeconds += 10;
|
|
145
|
+
aiSpinner.message(`Generating project content with Claude Code... (${elapsedSeconds}s)`);
|
|
146
|
+
}, 10_000);
|
|
147
|
+
try {
|
|
148
|
+
const aiResult = await generateWithAI({
|
|
149
|
+
projectName: brief.projectName,
|
|
150
|
+
description: brief.description,
|
|
151
|
+
targetUsers: brief.targetUsers,
|
|
152
|
+
techStack: brief.techStack,
|
|
153
|
+
customStack: brief.customStack,
|
|
154
|
+
});
|
|
155
|
+
clearInterval(progressTimer);
|
|
156
|
+
const totalSeconds = Math.round((Date.now() - startTime) / 1000);
|
|
157
|
+
aiContent = parseAIOutput(aiResult.raw);
|
|
158
|
+
aiSpinner.stop(`Project content generated (${totalSeconds}s)`);
|
|
159
|
+
const validation = validateAIContent(aiContent);
|
|
160
|
+
if (validation.warnings.length > 0) {
|
|
161
|
+
for (const warning of validation.warnings) {
|
|
162
|
+
p.log.warning(warning);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const epicCount = (aiContent.epics.match(/## E\d+/g) ?? []).length;
|
|
166
|
+
const taskCount = (aiContent.starterTasks.match(/## \[slice-\d+\]/g) ?? []).length;
|
|
167
|
+
const dodCustomized = aiContent.definitionOfDone !== "To be defined by @meto-pm";
|
|
168
|
+
const visionFirstLine = aiContent.productVision.split("\n")[0].trim();
|
|
169
|
+
const visionPreview = visionFirstLine.length > 80
|
|
170
|
+
? visionFirstLine.slice(0, 77) + "..."
|
|
171
|
+
: visionFirstLine;
|
|
172
|
+
const summaryLines = [
|
|
173
|
+
`Vision: ${visionPreview}`,
|
|
174
|
+
`Epics: ${epicCount}`,
|
|
175
|
+
`Tasks: ${taskCount}`,
|
|
176
|
+
`DoD: ${dodCustomized ? "Customized for stack" : "Default"}`,
|
|
177
|
+
];
|
|
178
|
+
p.note(summaryLines.join("\n"), "AI Generation Summary");
|
|
179
|
+
}
|
|
180
|
+
catch (aiError) {
|
|
181
|
+
clearInterval(progressTimer);
|
|
182
|
+
if (aiError instanceof AIGenerationTimeoutError) {
|
|
183
|
+
aiSpinner.stop("AI generation failed -- falling back to standard prompts");
|
|
184
|
+
p.log.warning(`Timed out after ${Math.round(aiError.timeoutMs / 1000)} seconds. Falling back to standard prompts.`);
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
const reason = aiError instanceof Error ? aiError.message : "Unknown error";
|
|
188
|
+
aiSpinner.stop("AI generation failed -- falling back to standard prompts");
|
|
189
|
+
p.log.warning(`AI generation failed: ${reason}. Falling back to standard prompts.`);
|
|
190
|
+
}
|
|
191
|
+
const deep = await collectDeepContent();
|
|
192
|
+
brief.problemStatement = deep.problemStatement;
|
|
193
|
+
brief.successCriteria = deep.successCriteria;
|
|
194
|
+
brief.valueProposition = deep.valueProposition;
|
|
195
|
+
brief.outOfScope = deep.outOfScope;
|
|
196
|
+
brief.codeConventions = deep.codeConventions;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
110
199
|
const s = p.spinner();
|
|
111
200
|
s.start("Rendering templates...");
|
|
112
201
|
try {
|
|
113
202
|
const templatesDir = resolveTemplatesDir();
|
|
114
|
-
const tokens = buildTokenMap(brief);
|
|
203
|
+
const tokens = buildTokenMap(brief, aiContent);
|
|
115
204
|
const renderedFiles = await renderTemplates(templatesDir, tokens);
|
|
116
205
|
if (dryRun) {
|
|
117
206
|
s.stop("Templates rendered (dry run).");
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EACL,aAAa,EACb,eAAe,EACf,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,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AAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/dist/cli/preflight.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
export interface PreflightResult {
|
|
5
5
|
/** Whether git is available on the system PATH. */
|
|
6
6
|
gitAvailable: boolean;
|
|
7
|
+
/** Whether Claude Code CLI is available on the system PATH. */
|
|
8
|
+
claudeCodeAvailable: boolean;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* Parses the major version number from a Node.js version string.
|
|
@@ -21,6 +23,11 @@ export declare function checkNodeVersion(versionString: string, minimumMajor: nu
|
|
|
21
23
|
* Resolves to true if git is found, false otherwise.
|
|
22
24
|
*/
|
|
23
25
|
export declare function checkGitAvailable(): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Checks whether Claude Code CLI is available by running `claude --version`.
|
|
28
|
+
* Resolves to true if Claude Code is found, false otherwise.
|
|
29
|
+
*/
|
|
30
|
+
export declare function checkClaudeCodeAvailable(): Promise<boolean>;
|
|
24
31
|
/**
|
|
25
32
|
* Checks whether the parent directory of the given output path exists and is writable.
|
|
26
33
|
* Returns an error message string if the check fails, or undefined if OK.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/cli/preflight.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,YAAY,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/cli/preflight.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,YAAY,EAAE,OAAO,CAAC;IACtB,+DAA+D;IAC/D,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAMnE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,GACnB,MAAM,GAAG,SAAS,CAMpB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAMpD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC,CAM3D;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAY7B;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC,CAYnE;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAI5B"}
|
package/dist/cli/preflight.js
CHANGED
|
@@ -35,6 +35,17 @@ export function checkGitAvailable() {
|
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Checks whether Claude Code CLI is available by running `claude --version`.
|
|
40
|
+
* Resolves to true if Claude Code is found, false otherwise.
|
|
41
|
+
*/
|
|
42
|
+
export function checkClaudeCodeAvailable() {
|
|
43
|
+
return new Promise((promiseResolve) => {
|
|
44
|
+
execFile("claude", ["--version"], (error) => {
|
|
45
|
+
promiseResolve(error === null);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
38
49
|
/**
|
|
39
50
|
* Checks whether the parent directory of the given output path exists and is writable.
|
|
40
51
|
* Returns an error message string if the check fails, or undefined if OK.
|
|
@@ -64,8 +75,11 @@ export async function runPreflightChecks() {
|
|
|
64
75
|
if (nodeError !== undefined) {
|
|
65
76
|
throw new PreflightError(nodeError);
|
|
66
77
|
}
|
|
67
|
-
const gitAvailable = await
|
|
68
|
-
|
|
78
|
+
const [gitAvailable, claudeCodeAvailable] = await Promise.all([
|
|
79
|
+
checkGitAvailable(),
|
|
80
|
+
checkClaudeCodeAvailable(),
|
|
81
|
+
]);
|
|
82
|
+
return { gitAvailable, claudeCodeAvailable };
|
|
69
83
|
}
|
|
70
84
|
/**
|
|
71
85
|
* Error thrown when a blocking pre-flight check fails.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.js","sourceRoot":"","sources":["../../src/cli/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"preflight.js","sourceRoot":"","sources":["../../src/cli/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAY7C;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,aAAqB;IACzD,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,aAAqB,EACrB,YAAoB;IAEpB,MAAM,KAAK,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;IACnD,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,YAAY,EAAE,CAAC;QAChD,OAAO,yBAAyB,YAAY,8BAA8B,aAAa,GAAG,CAAC;I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AE,CAAC,CAAC;IACxD,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,YAAY,EAAE,mBAAmB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC5D,iBAAiB,EAAE;QACnB,wBAAwB,EAAE;KAC3B,CAAC,CAAC;IAEH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF"}
|
package/dist/cli/prompts.d.ts
CHANGED
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import type { ProjectBrief } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Options for controlling the prompt flow.
|
|
4
|
+
*/
|
|
5
|
+
export interface CollectBriefOptions {
|
|
6
|
+
/** When true, skips deep content prompts (AI will generate those). */
|
|
7
|
+
useAI?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Deep content fields collected from the user when AI is not used.
|
|
11
|
+
*/
|
|
12
|
+
export interface DeepContentFields {
|
|
13
|
+
problemStatement: string;
|
|
14
|
+
successCriteria: string;
|
|
15
|
+
valueProposition: string;
|
|
16
|
+
outOfScope: string;
|
|
17
|
+
codeConventions: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Collects the deep content prompts (problem statement, success criteria,
|
|
21
|
+
* value proposition, out of scope, code conventions).
|
|
22
|
+
* Called during the normal static flow, or as a fallback when AI generation fails.
|
|
23
|
+
*/
|
|
24
|
+
export declare function collectDeepContent(): Promise<DeepContentFields>;
|
|
2
25
|
/**
|
|
3
26
|
* Collects the project brief from the user via interactive prompts.
|
|
27
|
+
* When `options.useAI` is true, skips the deep content prompts (problem statement,
|
|
28
|
+
* success criteria, value proposition, out of scope, code conventions) because
|
|
29
|
+
* the AI generator will produce those.
|
|
4
30
|
* Returns the completed brief. Exits the process if the user cancels.
|
|
5
31
|
*/
|
|
6
|
-
export declare function collectProjectBrief(): Promise<ProjectBrief>;
|
|
32
|
+
export declare function collectProjectBrief(options?: CollectBriefOptions): Promise<ProjectBrief>;
|
|
7
33
|
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/cli/prompts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,YAAY,CAAC;AAoC1D
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/cli/prompts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,YAAY,CAAC;AAoC1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB;AAMD;;;;GAIG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,iBAAiB,CAAC,CA2CrE;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,YAAY,CAAC,CAmGvB"}
|
package/dist/cli/prompts.js
CHANGED
|
@@ -30,11 +30,60 @@ function handleCancel(value) {
|
|
|
30
30
|
process.exit(0);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
const DEFAULT_DEFERRED = "To be defined by @meto-pm";
|
|
34
|
+
const DEFAULT_CONVENTIONS = "TypeScript strict mode, no any types, no console.log in production code";
|
|
35
|
+
/**
|
|
36
|
+
* Collects the deep content prompts (problem statement, success criteria,
|
|
37
|
+
* value proposition, out of scope, code conventions).
|
|
38
|
+
* Called during the normal static flow, or as a fallback when AI generation fails.
|
|
39
|
+
*/
|
|
40
|
+
export async function collectDeepContent() {
|
|
41
|
+
const problemInput = await p.text({
|
|
42
|
+
message: "What problem does this project solve?",
|
|
43
|
+
placeholder: "Users struggle with X because Y, leading to Z",
|
|
44
|
+
defaultValue: DEFAULT_DEFERRED,
|
|
45
|
+
});
|
|
46
|
+
handleCancel(problemInput);
|
|
47
|
+
const criteriaInput = await p.text({
|
|
48
|
+
message: "How will you measure success?",
|
|
49
|
+
placeholder: "User can do X in under Y minutes, Z% adoption in first month",
|
|
50
|
+
defaultValue: DEFAULT_DEFERRED,
|
|
51
|
+
});
|
|
52
|
+
handleCancel(criteriaInput);
|
|
53
|
+
const valueInput = await p.text({
|
|
54
|
+
message: "What is the core value proposition? (one line)",
|
|
55
|
+
placeholder: "The fastest way to do X without compromising on Y",
|
|
56
|
+
defaultValue: DEFAULT_DEFERRED,
|
|
57
|
+
});
|
|
58
|
+
handleCancel(valueInput);
|
|
59
|
+
const scopeInput = await p.text({
|
|
60
|
+
message: "What is out of scope for v1?",
|
|
61
|
+
placeholder: "Multi-tenancy, mobile app, internationalization",
|
|
62
|
+
defaultValue: DEFAULT_DEFERRED,
|
|
63
|
+
});
|
|
64
|
+
handleCancel(scopeInput);
|
|
65
|
+
const conventionsInput = await p.text({
|
|
66
|
+
message: "Any code conventions or standards?",
|
|
67
|
+
placeholder: "TypeScript strict, ESLint, Prettier, conventional commits",
|
|
68
|
+
defaultValue: DEFAULT_CONVENTIONS,
|
|
69
|
+
});
|
|
70
|
+
handleCancel(conventionsInput);
|
|
71
|
+
return {
|
|
72
|
+
problemStatement: problemInput.trim(),
|
|
73
|
+
successCriteria: criteriaInput.trim(),
|
|
74
|
+
valueProposition: valueInput.trim(),
|
|
75
|
+
outOfScope: scopeInput.trim(),
|
|
76
|
+
codeConventions: conventionsInput.trim(),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
33
79
|
/**
|
|
34
80
|
* Collects the project brief from the user via interactive prompts.
|
|
81
|
+
* When `options.useAI` is true, skips the deep content prompts (problem statement,
|
|
82
|
+
* success criteria, value proposition, out of scope, code conventions) because
|
|
83
|
+
* the AI generator will produce those.
|
|
35
84
|
* Returns the completed brief. Exits the process if the user cancels.
|
|
36
85
|
*/
|
|
37
|
-
export async function collectProjectBrief() {
|
|
86
|
+
export async function collectProjectBrief(options = {}) {
|
|
38
87
|
const projectName = await p.text({
|
|
39
88
|
message: "What is your project name?",
|
|
40
89
|
placeholder: "my-awesome-project",
|
|
@@ -92,38 +141,19 @@ export async function collectProjectBrief() {
|
|
|
92
141
|
handleCancel(customStackInput);
|
|
93
142
|
customStack = customStackInput.trim();
|
|
94
143
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const valueProposition = await p.text({
|
|
109
|
-
message: "What is the core value proposition? (one line)",
|
|
110
|
-
placeholder: "The fastest way to do X without compromising on Y",
|
|
111
|
-
defaultValue: defaultDeferred,
|
|
112
|
-
});
|
|
113
|
-
handleCancel(valueProposition);
|
|
114
|
-
const outOfScope = await p.text({
|
|
115
|
-
message: "What is out of scope for v1?",
|
|
116
|
-
placeholder: "Multi-tenancy, mobile app, internationalization",
|
|
117
|
-
defaultValue: defaultDeferred,
|
|
118
|
-
});
|
|
119
|
-
handleCancel(outOfScope);
|
|
120
|
-
const defaultConventions = "TypeScript strict mode, no any types, no console.log in production code";
|
|
121
|
-
const codeConventions = await p.text({
|
|
122
|
-
message: "Any code conventions or standards?",
|
|
123
|
-
placeholder: "TypeScript strict, ESLint, Prettier, conventional commits",
|
|
124
|
-
defaultValue: defaultConventions,
|
|
125
|
-
});
|
|
126
|
-
handleCancel(codeConventions);
|
|
144
|
+
let problemStatement = DEFAULT_DEFERRED;
|
|
145
|
+
let successCriteria = DEFAULT_DEFERRED;
|
|
146
|
+
let valueProposition = DEFAULT_DEFERRED;
|
|
147
|
+
let outOfScope = DEFAULT_DEFERRED;
|
|
148
|
+
let codeConventions = DEFAULT_CONVENTIONS;
|
|
149
|
+
if (!options.useAI) {
|
|
150
|
+
const deep = await collectDeepContent();
|
|
151
|
+
problemStatement = deep.problemStatement;
|
|
152
|
+
successCriteria = deep.successCriteria;
|
|
153
|
+
valueProposition = deep.valueProposition;
|
|
154
|
+
outOfScope = deep.outOfScope;
|
|
155
|
+
codeConventions = deep.codeConventions;
|
|
156
|
+
}
|
|
127
157
|
const outputDirectory = await p.text({
|
|
128
158
|
message: "Output directory?",
|
|
129
159
|
defaultValue: `./${projectName}`,
|
|
@@ -137,11 +167,11 @@ export async function collectProjectBrief() {
|
|
|
137
167
|
targetUsers: targetUsers.trim(),
|
|
138
168
|
techStack,
|
|
139
169
|
customStack,
|
|
140
|
-
problemStatement
|
|
141
|
-
successCriteria
|
|
142
|
-
valueProposition
|
|
143
|
-
outOfScope
|
|
144
|
-
codeConventions
|
|
170
|
+
problemStatement,
|
|
171
|
+
successCriteria,
|
|
172
|
+
valueProposition,
|
|
173
|
+
outOfScope,
|
|
174
|
+
codeConventions,
|
|
145
175
|
outputDirectory: outputDirectory.trim(),
|
|
146
176
|
};
|
|
147
177
|
}
|
package/dist/cli/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/cli/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAGpC;;GAEG;AACH,SAAS,eAAe,CAAC,KAAa;IACpC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,M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gB,CAAC;QACzC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAC7B,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;IACzC,CAAC;IAED,MAAM,eAAe,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC;QACnC,OAAO,EAAE,mBAAmB;QAC5B,YAAY,EAAE,KAAK,WAAW,EAAE;QAChC,WAAW,EAAE,KAAK,WAAW,EAAE;QAC/B,QAAQ,EAAE,eAAe;KAC1B,CAAC,CAAC;IACH,YAAY,CAAC,eAAe,CAAC,CAAC;IAE9B,OAAO;QACL,WAAW,EAAE,WAAW,CAAC,IAAI,EAAE;QAC/B,WAAW,EAAE,WAAW,CAAC,IAAI,EAAE;QAC/B,WAAW,EAAE,WAAW,CAAC,IAAI,EAAE;QAC/B,SAAS;QACT,WAAW;QACX,gBAAgB;QAChB,eAAe;QACf,gBAAgB;QAChB,UAAU;QACV,eAAe;QACf,eAAe,EAAE,eAAe,CAAC,IAAI,EAAE;KACxC,CAAC;AACJ,CAAC"}
|
package/dist/cli/renderer.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ProjectBrief } from "./types.js";
|
|
2
|
+
import type { AIGeneratedContent } from "./ai-parser.js";
|
|
2
3
|
/**
|
|
3
4
|
* Map of template tokens to their replacement values.
|
|
4
5
|
* Tokens in templates look like {{TOKEN_NAME}}.
|
|
@@ -15,11 +16,12 @@ export interface RenderedFile {
|
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Builds a token replacement map from the project brief.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* When AI-generated content is provided, it overrides the brief's static fields
|
|
20
|
+
* for PRODUCT_VISION, PROBLEM_STATEMENT, SUCCESS_CRITERIA, VALUE_PROPOSITION,
|
|
21
|
+
* OUT_OF_SCOPE, DEFINITION_OF_DONE, STARTER_EPICS, and STARTER_TASKS.
|
|
22
|
+
* PROJECT_NAME, TARGET_USERS, TECH_STACK, and CODE_CONVENTIONS always come from the brief.
|
|
21
23
|
*/
|
|
22
|
-
export declare function buildTokenMap(brief: ProjectBrief): TokenMap;
|
|
24
|
+
export declare function buildTokenMap(brief: ProjectBrief, aiContent?: AIGeneratedContent): TokenMap;
|
|
23
25
|
/**
|
|
24
26
|
* Replaces all `{{TOKEN}}` occurrences in content using the provided map.
|
|
25
27
|
* Tokens not present in the map are left untouched.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/cli/renderer.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/cli/renderer.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,YAAY,EACnB,SAAS,CAAC,EAAE,kBAAkB,GAC7B,QAAQ,CAoCV;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,MAAM,CAOvE;AAqDD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAK5C;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,QAAQ,GACf,OAAO,CAAC,YAAY,EAAE,CAAC,CAgBzB"}
|
package/dist/cli/renderer.js
CHANGED
|
@@ -3,11 +3,28 @@ import { basename, dirname, join, relative } from "node:path";
|
|
|
3
3
|
import { getDefinitionOfDone, getStackDescription, getStarterEpics, } from "./stacks.js";
|
|
4
4
|
/**
|
|
5
5
|
* Builds a token replacement map from the project brief.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* When AI-generated content is provided, it overrides the brief's static fields
|
|
7
|
+
* for PRODUCT_VISION, PROBLEM_STATEMENT, SUCCESS_CRITERIA, VALUE_PROPOSITION,
|
|
8
|
+
* OUT_OF_SCOPE, DEFINITION_OF_DONE, STARTER_EPICS, and STARTER_TASKS.
|
|
9
|
+
* PROJECT_NAME, TARGET_USERS, TECH_STACK, and CODE_CONVENTIONS always come from the brief.
|
|
9
10
|
*/
|
|
10
|
-
export function buildTokenMap(brief) {
|
|
11
|
+
export function buildTokenMap(brief, aiContent) {
|
|
12
|
+
if (aiContent !== undefined) {
|
|
13
|
+
return {
|
|
14
|
+
PROJECT_NAME: brief.projectName,
|
|
15
|
+
PRODUCT_VISION: aiContent.productVision,
|
|
16
|
+
TECH_STACK: getStackDescription(brief.techStack, brief.customStack),
|
|
17
|
+
TARGET_USERS: brief.targetUsers,
|
|
18
|
+
PROBLEM_STATEMENT: aiContent.problemStatement,
|
|
19
|
+
SUCCESS_CRITERIA: aiContent.successCriteria,
|
|
20
|
+
VALUE_PROPOSITION: aiContent.valueProposition,
|
|
21
|
+
OUT_OF_SCOPE: aiContent.outOfScope,
|
|
22
|
+
CODE_CONVENTIONS: brief.codeConventions,
|
|
23
|
+
DEFINITION_OF_DONE: aiContent.definitionOfDone,
|
|
24
|
+
STARTER_EPICS: aiContent.epics,
|
|
25
|
+
STARTER_TASKS: aiContent.starterTasks,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
11
28
|
return {
|
|
12
29
|
PROJECT_NAME: brief.projectName,
|
|
13
30
|
PRODUCT_VISION: brief.description,
|
|
@@ -20,6 +37,7 @@ export function buildTokenMap(brief) {
|
|
|
20
37
|
CODE_CONVENTIONS: brief.codeConventions,
|
|
21
38
|
DEFINITION_OF_DONE: getDefinitionOfDone(brief.techStack, brief.customStack),
|
|
22
39
|
STARTER_EPICS: getStarterEpics(brief.techStack, brief.projectName, brief.customStack),
|
|
40
|
+
STARTER_TASKS: "",
|
|
23
41
|
};
|
|
24
42
|
}
|
|
25
43
|
/**
|
package/dist/cli/renderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../src/cli/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../src/cli/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,aAAa,CAAC;AAoBrB;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAmB,EACnB,SAA8B;IAE9B,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO;YACL,YAAY,EAAE,KAAK,CAAC,WAAW;YAC/B,cAAc,EAAE,SAAS,CAAC,aAAa;YACvC,UAAU,EAAE,mBAAmB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC;YACnE,YAAY,EAAE,KAAK,C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