vibe-fabric 0.1.0 → 0.3.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 +6 -0
- package/dist/cli/commands/init.d.ts +59 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +659 -3
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/repo/create.d.ts +35 -0
- package/dist/cli/commands/repo/create.d.ts.map +1 -0
- package/dist/cli/commands/repo/create.js +333 -0
- package/dist/cli/commands/repo/create.js.map +1 -0
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +31 -12
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/planning.d.ts +72 -0
- package/dist/core/planning.d.ts.map +1 -0
- package/dist/core/planning.js +610 -0
- package/dist/core/planning.js.map +1 -0
- package/dist/core/repo/framework.d.ts +4 -0
- package/dist/core/repo/framework.d.ts.map +1 -1
- package/dist/core/repo/framework.js +6 -0
- package/dist/core/repo/framework.js.map +1 -1
- package/dist/core/state.d.ts +71 -0
- package/dist/core/state.d.ts.map +1 -0
- package/dist/core/state.js +218 -0
- package/dist/core/state.js.map +1 -0
- package/dist/core/status.d.ts.map +1 -1
- package/dist/core/status.js +17 -11
- package/dist/core/status.js.map +1 -1
- package/dist/types/config.d.ts +122 -10
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +26 -2
- package/dist/types/config.js.map +1 -1
- package/dist/types/planning.d.ts +286 -0
- package/dist/types/planning.d.ts.map +1 -0
- package/dist/types/planning.js +49 -0
- package/dist/types/planning.js.map +1 -0
- package/dist/types/runner.d.ts +14 -14
- package/dist/types/state.d.ts +640 -0
- package/dist/types/state.d.ts.map +1 -0
- package/dist/types/state.js +59 -0
- package/dist/types/state.js.map +1 -0
- package/dist/types/status.d.ts +3 -0
- package/dist/types/status.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Planning functionality for new project workflow
|
|
3
|
+
*
|
|
4
|
+
* Handles project description capture, Claude tech stack recommendations,
|
|
5
|
+
* and planned repository management.
|
|
6
|
+
*/
|
|
7
|
+
import { mkdir, writeFile, readFile, readdir, rm, stat } from 'fs/promises';
|
|
8
|
+
import { existsSync } from 'fs';
|
|
9
|
+
import path from 'path';
|
|
10
|
+
import { spawn } from 'child_process';
|
|
11
|
+
import { stringify as tomlStringify } from '@iarna/toml';
|
|
12
|
+
import { saveConfig, loadConfig } from './config.js';
|
|
13
|
+
/**
|
|
14
|
+
* Directory structure for planned repos
|
|
15
|
+
*/
|
|
16
|
+
const PLANNED_REPO_MARKER = '.planned';
|
|
17
|
+
const REPO_CONFIG_FILE = 'repo-config.toml';
|
|
18
|
+
/**
|
|
19
|
+
* Tech stack recommendation prompt template
|
|
20
|
+
*/
|
|
21
|
+
const RECOMMEND_STRUCTURE_PROMPT = `You are an expert software architect helping plan a new software project.
|
|
22
|
+
|
|
23
|
+
## Project Description
|
|
24
|
+
|
|
25
|
+
{DESCRIPTION}
|
|
26
|
+
|
|
27
|
+
## Your Task
|
|
28
|
+
|
|
29
|
+
Based on the project description, recommend:
|
|
30
|
+
1. An optimal repository structure (monorepo vs multi-repo)
|
|
31
|
+
2. A tech stack for each repository
|
|
32
|
+
3. Key features each repository should implement
|
|
33
|
+
|
|
34
|
+
## Guidelines
|
|
35
|
+
|
|
36
|
+
- For small projects (1-2 major features): Consider a monorepo or single repo
|
|
37
|
+
- For larger projects: Split by domain (frontend/backend/services)
|
|
38
|
+
- Choose technologies that are:
|
|
39
|
+
- Modern and well-maintained
|
|
40
|
+
- Appropriate for the project scale
|
|
41
|
+
- Have good developer experience
|
|
42
|
+
- Work well together
|
|
43
|
+
|
|
44
|
+
## Output Format
|
|
45
|
+
|
|
46
|
+
Respond with ONLY a valid JSON object (no markdown, no explanation) matching this structure:
|
|
47
|
+
|
|
48
|
+
{
|
|
49
|
+
"description": "Brief summary of the recommendation",
|
|
50
|
+
"repos": [
|
|
51
|
+
{
|
|
52
|
+
"alias": "repo-alias",
|
|
53
|
+
"name": "repo-name",
|
|
54
|
+
"description": "What this repo does",
|
|
55
|
+
"visibility": "private",
|
|
56
|
+
"techStack": {
|
|
57
|
+
"language": "typescript",
|
|
58
|
+
"runtime": "node",
|
|
59
|
+
"framework": "express",
|
|
60
|
+
"database": "postgresql",
|
|
61
|
+
"extras": ["redis", "docker"]
|
|
62
|
+
},
|
|
63
|
+
"structure": {
|
|
64
|
+
"type": "backend",
|
|
65
|
+
"features": ["api", "auth", "database"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"rationale": "Explanation of why this structure was chosen"
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
## Structure Types
|
|
73
|
+
|
|
74
|
+
Valid structure types: "frontend", "backend", "fullstack", "library", "monorepo", "cli", "service"
|
|
75
|
+
|
|
76
|
+
Now analyze the project and provide your recommendation as JSON:`;
|
|
77
|
+
/**
|
|
78
|
+
* Create the prompt for Claude with project description
|
|
79
|
+
*/
|
|
80
|
+
export function createRecommendationPrompt(description) {
|
|
81
|
+
const descriptionText = `
|
|
82
|
+
Summary: ${description.summary}
|
|
83
|
+
${description.goals?.length ? `\nGoals:\n${description.goals.map((g) => `- ${g}`).join('\n')}` : ''}
|
|
84
|
+
${description.constraints?.length ? `\nConstraints:\n${description.constraints.map((c) => `- ${c}`).join('\n')}` : ''}
|
|
85
|
+
${description.targetUsers ? `\nTarget Users: ${description.targetUsers}` : ''}
|
|
86
|
+
`.trim();
|
|
87
|
+
return RECOMMEND_STRUCTURE_PROMPT.replace('{DESCRIPTION}', descriptionText);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Spawn Claude to get project recommendations
|
|
91
|
+
* Returns the parsed recommendation or null on failure
|
|
92
|
+
*/
|
|
93
|
+
export async function getClaudeRecommendation(_projectPath, description) {
|
|
94
|
+
const prompt = createRecommendationPrompt(description);
|
|
95
|
+
try {
|
|
96
|
+
// Spawn Claude with the prompt using -p flag for print mode
|
|
97
|
+
const result = await new Promise((resolve, reject) => {
|
|
98
|
+
const claude = spawn('claude', ['-p', prompt], {
|
|
99
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
100
|
+
// Set a reasonable timeout via shell
|
|
101
|
+
timeout: 120000, // 2 minutes
|
|
102
|
+
});
|
|
103
|
+
let stdout = '';
|
|
104
|
+
let stderr = '';
|
|
105
|
+
claude.stdout.on('data', (data) => {
|
|
106
|
+
stdout += data.toString();
|
|
107
|
+
});
|
|
108
|
+
claude.stderr.on('data', (data) => {
|
|
109
|
+
stderr += data.toString();
|
|
110
|
+
});
|
|
111
|
+
claude.on('close', (code) => {
|
|
112
|
+
if (code === 0) {
|
|
113
|
+
resolve(stdout);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
const errorMsg = stderr.trim() || 'Unknown error';
|
|
117
|
+
reject(new Error(`Claude exited with code ${code}: ${errorMsg}`));
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
claude.on('error', (err) => {
|
|
121
|
+
reject(new Error(`Failed to spawn Claude: ${err.message}`));
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
// Parse the JSON response - look for the outermost valid JSON object
|
|
125
|
+
const jsonMatch = result.match(/\{[\s\S]*\}/);
|
|
126
|
+
if (!jsonMatch) {
|
|
127
|
+
throw new Error('No JSON found in Claude response. Raw output: ' + result.slice(0, 200));
|
|
128
|
+
}
|
|
129
|
+
const recommendation = JSON.parse(jsonMatch[0]);
|
|
130
|
+
// Validate the recommendation structure
|
|
131
|
+
if (!validateRecommendation(recommendation)) {
|
|
132
|
+
throw new Error('Invalid recommendation structure from Claude');
|
|
133
|
+
}
|
|
134
|
+
return recommendation;
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
// Re-throw with more context
|
|
138
|
+
if (error instanceof Error) {
|
|
139
|
+
throw error;
|
|
140
|
+
}
|
|
141
|
+
throw new Error(`Unexpected error: ${String(error)}`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Create planned repo directory structure
|
|
146
|
+
*/
|
|
147
|
+
export async function createPlannedRepo(projectPath, repo) {
|
|
148
|
+
const repoDir = path.join(projectPath, 'repos', repo.alias);
|
|
149
|
+
// Create directory
|
|
150
|
+
await mkdir(repoDir, { recursive: true });
|
|
151
|
+
// Create .planned marker
|
|
152
|
+
const markerPath = path.join(repoDir, PLANNED_REPO_MARKER);
|
|
153
|
+
await writeFile(markerPath, `Created: ${new Date().toISOString()}\n`, 'utf-8');
|
|
154
|
+
// Create repo-config.toml
|
|
155
|
+
const configPath = path.join(repoDir, REPO_CONFIG_FILE);
|
|
156
|
+
const config = {
|
|
157
|
+
repo: {
|
|
158
|
+
name: repo.name,
|
|
159
|
+
description: repo.description,
|
|
160
|
+
visibility: repo.visibility || 'private',
|
|
161
|
+
},
|
|
162
|
+
'tech-stack': {
|
|
163
|
+
language: repo.techStack.language,
|
|
164
|
+
runtime: repo.techStack.runtime,
|
|
165
|
+
framework: repo.techStack.framework,
|
|
166
|
+
database: repo.techStack.database,
|
|
167
|
+
extras: repo.techStack.extras,
|
|
168
|
+
},
|
|
169
|
+
structure: {
|
|
170
|
+
type: repo.structure.type,
|
|
171
|
+
features: repo.structure.features,
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
// Filter out undefined values
|
|
175
|
+
const cleanConfig = JSON.parse(JSON.stringify(config));
|
|
176
|
+
const tomlContent = tomlStringify(cleanConfig);
|
|
177
|
+
await writeFile(configPath, tomlContent, 'utf-8');
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Add planned repos to config
|
|
181
|
+
*/
|
|
182
|
+
export async function addPlannedReposToConfig(projectPath, repos) {
|
|
183
|
+
const config = await loadConfig(projectPath);
|
|
184
|
+
if (!config) {
|
|
185
|
+
throw new Error('Failed to load project configuration');
|
|
186
|
+
}
|
|
187
|
+
for (const repo of repos) {
|
|
188
|
+
// Check for duplicate alias
|
|
189
|
+
const existing = config.repos.find((r) => r.alias === repo.alias);
|
|
190
|
+
if (existing) {
|
|
191
|
+
continue; // Skip duplicates
|
|
192
|
+
}
|
|
193
|
+
const repoEntry = {
|
|
194
|
+
alias: repo.alias,
|
|
195
|
+
name: repo.name,
|
|
196
|
+
url: '',
|
|
197
|
+
owner: '',
|
|
198
|
+
branch: 'main',
|
|
199
|
+
type: 'github',
|
|
200
|
+
status: 'planned',
|
|
201
|
+
addedAt: new Date().toISOString(),
|
|
202
|
+
frameworkInjected: false,
|
|
203
|
+
description: repo.description,
|
|
204
|
+
};
|
|
205
|
+
config.repos.push(repoEntry);
|
|
206
|
+
}
|
|
207
|
+
await saveConfig(projectPath, config);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Check if a repo is planned (has .planned marker)
|
|
211
|
+
*/
|
|
212
|
+
export async function isPlannedRepo(projectPath, alias) {
|
|
213
|
+
const markerPath = path.join(projectPath, 'repos', alias, PLANNED_REPO_MARKER);
|
|
214
|
+
return existsSync(markerPath);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Get all planned repos from project
|
|
218
|
+
*/
|
|
219
|
+
export async function getPlannedRepos(projectPath) {
|
|
220
|
+
const reposDir = path.join(projectPath, 'repos');
|
|
221
|
+
if (!existsSync(reposDir)) {
|
|
222
|
+
return [];
|
|
223
|
+
}
|
|
224
|
+
const plannedRepos = [];
|
|
225
|
+
const entries = await readdir(reposDir);
|
|
226
|
+
for (const entry of entries) {
|
|
227
|
+
const entryPath = path.join(reposDir, entry);
|
|
228
|
+
const entryStat = await stat(entryPath);
|
|
229
|
+
if (!entryStat.isDirectory())
|
|
230
|
+
continue;
|
|
231
|
+
const markerPath = path.join(entryPath, PLANNED_REPO_MARKER);
|
|
232
|
+
if (!existsSync(markerPath))
|
|
233
|
+
continue;
|
|
234
|
+
const configPath = path.join(entryPath, REPO_CONFIG_FILE);
|
|
235
|
+
if (!existsSync(configPath))
|
|
236
|
+
continue;
|
|
237
|
+
try {
|
|
238
|
+
const content = await readFile(configPath, 'utf-8');
|
|
239
|
+
const { parse } = await import('@iarna/toml');
|
|
240
|
+
const parsed = parse(content);
|
|
241
|
+
const repo = parsed['repo'];
|
|
242
|
+
const techStack = parsed['tech-stack'];
|
|
243
|
+
const structure = parsed['structure'];
|
|
244
|
+
if (repo && techStack && structure) {
|
|
245
|
+
plannedRepos.push({
|
|
246
|
+
alias: entry,
|
|
247
|
+
name: repo['name'] || entry,
|
|
248
|
+
description: repo['description'] || '',
|
|
249
|
+
visibility: repo['visibility'] || 'private',
|
|
250
|
+
techStack: {
|
|
251
|
+
language: techStack['language'] || 'unknown',
|
|
252
|
+
runtime: techStack['runtime'],
|
|
253
|
+
framework: techStack['framework'],
|
|
254
|
+
database: techStack['database'],
|
|
255
|
+
extras: techStack['extras'],
|
|
256
|
+
},
|
|
257
|
+
structure: {
|
|
258
|
+
type: structure['type'] || 'backend',
|
|
259
|
+
features: structure['features'] || [],
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
// Skip repos with invalid config
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return plannedRepos;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Remove planned marker and update config when repo is created
|
|
272
|
+
*/
|
|
273
|
+
export async function markRepoAsCreated(projectPath, alias, url, owner) {
|
|
274
|
+
// Remove .planned marker
|
|
275
|
+
const markerPath = path.join(projectPath, 'repos', alias, PLANNED_REPO_MARKER);
|
|
276
|
+
await rm(markerPath, { force: true });
|
|
277
|
+
// Update config
|
|
278
|
+
const config = await loadConfig(projectPath);
|
|
279
|
+
if (!config) {
|
|
280
|
+
throw new Error('Failed to load project configuration');
|
|
281
|
+
}
|
|
282
|
+
const repoIndex = config.repos.findIndex((r) => r.alias === alias);
|
|
283
|
+
if (repoIndex === -1) {
|
|
284
|
+
throw new Error(`Repo ${alias} not found in configuration`);
|
|
285
|
+
}
|
|
286
|
+
const existingRepo = config.repos[repoIndex];
|
|
287
|
+
if (!existingRepo) {
|
|
288
|
+
throw new Error(`Repo ${alias} not found in configuration`);
|
|
289
|
+
}
|
|
290
|
+
config.repos[repoIndex] = {
|
|
291
|
+
alias: existingRepo.alias,
|
|
292
|
+
name: existingRepo.name,
|
|
293
|
+
branch: existingRepo.branch,
|
|
294
|
+
type: existingRepo.type,
|
|
295
|
+
status: 'active',
|
|
296
|
+
frameworkInjected: existingRepo.frameworkInjected,
|
|
297
|
+
url,
|
|
298
|
+
owner,
|
|
299
|
+
addedAt: existingRepo.addedAt,
|
|
300
|
+
description: existingRepo.description,
|
|
301
|
+
};
|
|
302
|
+
await saveConfig(projectPath, config);
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Validate recommendation structure
|
|
306
|
+
*/
|
|
307
|
+
export function validateRecommendation(rec) {
|
|
308
|
+
if (typeof rec !== 'object' || rec === null)
|
|
309
|
+
return false;
|
|
310
|
+
const obj = rec;
|
|
311
|
+
if (typeof obj['description'] !== 'string')
|
|
312
|
+
return false;
|
|
313
|
+
if (typeof obj['rationale'] !== 'string')
|
|
314
|
+
return false;
|
|
315
|
+
if (!Array.isArray(obj['repos']))
|
|
316
|
+
return false;
|
|
317
|
+
for (const repo of obj['repos']) {
|
|
318
|
+
if (typeof repo !== 'object' || repo === null)
|
|
319
|
+
return false;
|
|
320
|
+
const r = repo;
|
|
321
|
+
if (typeof r['alias'] !== 'string')
|
|
322
|
+
return false;
|
|
323
|
+
if (typeof r['name'] !== 'string')
|
|
324
|
+
return false;
|
|
325
|
+
if (typeof r['description'] !== 'string')
|
|
326
|
+
return false;
|
|
327
|
+
if (typeof r['techStack'] !== 'object')
|
|
328
|
+
return false;
|
|
329
|
+
if (typeof r['structure'] !== 'object')
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
return true;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Format tech stack for display
|
|
336
|
+
*/
|
|
337
|
+
export function formatTechStack(techStack) {
|
|
338
|
+
const parts = [techStack.language];
|
|
339
|
+
if (techStack.runtime)
|
|
340
|
+
parts.push(techStack.runtime);
|
|
341
|
+
if (techStack.framework)
|
|
342
|
+
parts.push(techStack.framework);
|
|
343
|
+
if (techStack.database)
|
|
344
|
+
parts.push(techStack.database);
|
|
345
|
+
return parts.join(' + ');
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Format repo structure for display
|
|
349
|
+
*/
|
|
350
|
+
export function formatRepoStructure(structure) {
|
|
351
|
+
return `${structure.type} (${structure.features.join(', ')})`;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Requirement capture prompt template
|
|
355
|
+
*/
|
|
356
|
+
const REQUIREMENT_CAPTURE_PROMPT = `You are helping capture initial requirements for a new software project.
|
|
357
|
+
|
|
358
|
+
## Project Context
|
|
359
|
+
|
|
360
|
+
{PROJECT_DESCRIPTION}
|
|
361
|
+
|
|
362
|
+
## Planned Repositories
|
|
363
|
+
|
|
364
|
+
{PLANNED_REPOS}
|
|
365
|
+
|
|
366
|
+
## Your Task
|
|
367
|
+
|
|
368
|
+
Based on the project description and planned structure, help identify:
|
|
369
|
+
1. Core user stories (3-5 key ones)
|
|
370
|
+
2. Essential features for MVP
|
|
371
|
+
3. Technical requirements and constraints
|
|
372
|
+
4. Non-functional requirements (performance, security, etc.)
|
|
373
|
+
|
|
374
|
+
## Output Format
|
|
375
|
+
|
|
376
|
+
Respond with ONLY valid JSON (no markdown, no explanation) matching this structure:
|
|
377
|
+
|
|
378
|
+
{
|
|
379
|
+
"userStories": [
|
|
380
|
+
{"id": "US-1", "title": "...", "description": "As a..., I want..., so that..."}
|
|
381
|
+
],
|
|
382
|
+
"features": [
|
|
383
|
+
{"name": "...", "description": "...", "priority": "must-have|should-have|nice-to-have"}
|
|
384
|
+
],
|
|
385
|
+
"technicalRequirements": ["..."],
|
|
386
|
+
"nonFunctionalRequirements": ["..."]
|
|
387
|
+
}`;
|
|
388
|
+
/**
|
|
389
|
+
* Create the prompt for requirement capture
|
|
390
|
+
*/
|
|
391
|
+
export function createRequirementCapturePrompt(description, repos) {
|
|
392
|
+
const descriptionText = `
|
|
393
|
+
Summary: ${description.summary}
|
|
394
|
+
${description.goals?.length ? `\nGoals:\n${description.goals.map((g) => `- ${g}`).join('\n')}` : ''}
|
|
395
|
+
${description.constraints?.length ? `\nConstraints:\n${description.constraints.map((c) => `- ${c}`).join('\n')}` : ''}
|
|
396
|
+
${description.targetUsers ? `\nTarget Users: ${description.targetUsers}` : ''}
|
|
397
|
+
`.trim();
|
|
398
|
+
const reposText = repos
|
|
399
|
+
.map((r) => `- ${r.name} (${r.structure.type}): ${r.description}\n Stack: ${formatTechStack(r.techStack)}`)
|
|
400
|
+
.join('\n');
|
|
401
|
+
return REQUIREMENT_CAPTURE_PROMPT.replace('{PROJECT_DESCRIPTION}', descriptionText).replace('{PLANNED_REPOS}', reposText);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Spawn Claude to capture requirements
|
|
405
|
+
* Returns the parsed requirements or null on failure
|
|
406
|
+
*/
|
|
407
|
+
export async function captureRequirementsWithClaude(description, repos) {
|
|
408
|
+
const prompt = createRequirementCapturePrompt(description, repos);
|
|
409
|
+
try {
|
|
410
|
+
// Spawn Claude with the prompt using -p flag for print mode
|
|
411
|
+
const result = await new Promise((resolve, reject) => {
|
|
412
|
+
const claude = spawn('claude', ['-p', prompt], {
|
|
413
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
414
|
+
timeout: 120000, // 2 minutes
|
|
415
|
+
});
|
|
416
|
+
let stdout = '';
|
|
417
|
+
let stderr = '';
|
|
418
|
+
claude.stdout.on('data', (data) => {
|
|
419
|
+
stdout += data.toString();
|
|
420
|
+
});
|
|
421
|
+
claude.stderr.on('data', (data) => {
|
|
422
|
+
stderr += data.toString();
|
|
423
|
+
});
|
|
424
|
+
claude.on('close', (code) => {
|
|
425
|
+
if (code === 0) {
|
|
426
|
+
resolve(stdout);
|
|
427
|
+
}
|
|
428
|
+
else {
|
|
429
|
+
const errorMsg = stderr.trim() || 'Unknown error';
|
|
430
|
+
reject(new Error(`Claude exited with code ${code}: ${errorMsg}`));
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
claude.on('error', (err) => {
|
|
434
|
+
reject(new Error(`Failed to spawn Claude: ${err.message}`));
|
|
435
|
+
});
|
|
436
|
+
});
|
|
437
|
+
// Parse the JSON response
|
|
438
|
+
const jsonMatch = result.match(/\{[\s\S]*\}/);
|
|
439
|
+
if (!jsonMatch) {
|
|
440
|
+
throw new Error('No JSON found in Claude response');
|
|
441
|
+
}
|
|
442
|
+
const requirements = JSON.parse(jsonMatch[0]);
|
|
443
|
+
// Validate the requirements structure
|
|
444
|
+
if (!validateRequirements(requirements)) {
|
|
445
|
+
throw new Error('Invalid requirements structure from Claude');
|
|
446
|
+
}
|
|
447
|
+
return requirements;
|
|
448
|
+
}
|
|
449
|
+
catch (error) {
|
|
450
|
+
if (error instanceof Error) {
|
|
451
|
+
throw error;
|
|
452
|
+
}
|
|
453
|
+
throw new Error(`Unexpected error: ${String(error)}`);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Validate requirements structure
|
|
458
|
+
*/
|
|
459
|
+
export function validateRequirements(req) {
|
|
460
|
+
if (typeof req !== 'object' || req === null)
|
|
461
|
+
return false;
|
|
462
|
+
const obj = req;
|
|
463
|
+
if (!Array.isArray(obj['userStories']))
|
|
464
|
+
return false;
|
|
465
|
+
if (!Array.isArray(obj['features']))
|
|
466
|
+
return false;
|
|
467
|
+
if (!Array.isArray(obj['technicalRequirements']))
|
|
468
|
+
return false;
|
|
469
|
+
if (!Array.isArray(obj['nonFunctionalRequirements']))
|
|
470
|
+
return false;
|
|
471
|
+
// Validate user stories
|
|
472
|
+
for (const story of obj['userStories']) {
|
|
473
|
+
if (typeof story !== 'object' || story === null)
|
|
474
|
+
return false;
|
|
475
|
+
const s = story;
|
|
476
|
+
if (typeof s['id'] !== 'string')
|
|
477
|
+
return false;
|
|
478
|
+
if (typeof s['title'] !== 'string')
|
|
479
|
+
return false;
|
|
480
|
+
if (typeof s['description'] !== 'string')
|
|
481
|
+
return false;
|
|
482
|
+
}
|
|
483
|
+
// Validate features
|
|
484
|
+
for (const feature of obj['features']) {
|
|
485
|
+
if (typeof feature !== 'object' || feature === null)
|
|
486
|
+
return false;
|
|
487
|
+
const f = feature;
|
|
488
|
+
if (typeof f['name'] !== 'string')
|
|
489
|
+
return false;
|
|
490
|
+
if (typeof f['description'] !== 'string')
|
|
491
|
+
return false;
|
|
492
|
+
if (!['must-have', 'should-have', 'nice-to-have'].includes(f['priority'])) {
|
|
493
|
+
return false;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return true;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Generate a draft PRD markdown from captured requirements
|
|
500
|
+
*/
|
|
501
|
+
export function generateDraftPrd(projectName, description, requirements) {
|
|
502
|
+
const lines = [];
|
|
503
|
+
lines.push(`# ${projectName} - Requirements (Draft)`);
|
|
504
|
+
lines.push('');
|
|
505
|
+
lines.push('> **Status:** Draft - Generated during project initialization');
|
|
506
|
+
lines.push(`> **Generated:** ${new Date().toISOString().split('T')[0]}`);
|
|
507
|
+
lines.push('');
|
|
508
|
+
lines.push('---');
|
|
509
|
+
lines.push('');
|
|
510
|
+
// Overview
|
|
511
|
+
lines.push('## Overview');
|
|
512
|
+
lines.push('');
|
|
513
|
+
lines.push(description.summary);
|
|
514
|
+
lines.push('');
|
|
515
|
+
if (description.goals?.length) {
|
|
516
|
+
lines.push('### Goals');
|
|
517
|
+
lines.push('');
|
|
518
|
+
for (const goal of description.goals) {
|
|
519
|
+
lines.push(`- ${goal}`);
|
|
520
|
+
}
|
|
521
|
+
lines.push('');
|
|
522
|
+
}
|
|
523
|
+
if (description.constraints?.length) {
|
|
524
|
+
lines.push('### Constraints');
|
|
525
|
+
lines.push('');
|
|
526
|
+
for (const constraint of description.constraints) {
|
|
527
|
+
lines.push(`- ${constraint}`);
|
|
528
|
+
}
|
|
529
|
+
lines.push('');
|
|
530
|
+
}
|
|
531
|
+
if (description.targetUsers) {
|
|
532
|
+
lines.push('### Target Users');
|
|
533
|
+
lines.push('');
|
|
534
|
+
lines.push(description.targetUsers);
|
|
535
|
+
lines.push('');
|
|
536
|
+
}
|
|
537
|
+
// User Stories
|
|
538
|
+
lines.push('---');
|
|
539
|
+
lines.push('');
|
|
540
|
+
lines.push('## User Stories');
|
|
541
|
+
lines.push('');
|
|
542
|
+
for (const story of requirements.userStories) {
|
|
543
|
+
lines.push(`### ${story.id}: ${story.title}`);
|
|
544
|
+
lines.push('');
|
|
545
|
+
lines.push(story.description);
|
|
546
|
+
lines.push('');
|
|
547
|
+
}
|
|
548
|
+
// Features
|
|
549
|
+
lines.push('---');
|
|
550
|
+
lines.push('');
|
|
551
|
+
lines.push('## Features');
|
|
552
|
+
lines.push('');
|
|
553
|
+
const mustHave = requirements.features.filter((f) => f.priority === 'must-have');
|
|
554
|
+
const shouldHave = requirements.features.filter((f) => f.priority === 'should-have');
|
|
555
|
+
const niceToHave = requirements.features.filter((f) => f.priority === 'nice-to-have');
|
|
556
|
+
if (mustHave.length > 0) {
|
|
557
|
+
lines.push('### Must-Have');
|
|
558
|
+
lines.push('');
|
|
559
|
+
for (const feature of mustHave) {
|
|
560
|
+
lines.push(`- **${feature.name}**: ${feature.description}`);
|
|
561
|
+
}
|
|
562
|
+
lines.push('');
|
|
563
|
+
}
|
|
564
|
+
if (shouldHave.length > 0) {
|
|
565
|
+
lines.push('### Should-Have');
|
|
566
|
+
lines.push('');
|
|
567
|
+
for (const feature of shouldHave) {
|
|
568
|
+
lines.push(`- **${feature.name}**: ${feature.description}`);
|
|
569
|
+
}
|
|
570
|
+
lines.push('');
|
|
571
|
+
}
|
|
572
|
+
if (niceToHave.length > 0) {
|
|
573
|
+
lines.push('### Nice-to-Have');
|
|
574
|
+
lines.push('');
|
|
575
|
+
for (const feature of niceToHave) {
|
|
576
|
+
lines.push(`- **${feature.name}**: ${feature.description}`);
|
|
577
|
+
}
|
|
578
|
+
lines.push('');
|
|
579
|
+
}
|
|
580
|
+
// Technical Requirements
|
|
581
|
+
lines.push('---');
|
|
582
|
+
lines.push('');
|
|
583
|
+
lines.push('## Technical Requirements');
|
|
584
|
+
lines.push('');
|
|
585
|
+
for (const req of requirements.technicalRequirements) {
|
|
586
|
+
lines.push(`- ${req}`);
|
|
587
|
+
}
|
|
588
|
+
lines.push('');
|
|
589
|
+
// Non-Functional Requirements
|
|
590
|
+
lines.push('---');
|
|
591
|
+
lines.push('');
|
|
592
|
+
lines.push('## Non-Functional Requirements');
|
|
593
|
+
lines.push('');
|
|
594
|
+
for (const req of requirements.nonFunctionalRequirements) {
|
|
595
|
+
lines.push(`- ${req}`);
|
|
596
|
+
}
|
|
597
|
+
lines.push('');
|
|
598
|
+
return lines.join('\n');
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Save draft PRD to project
|
|
602
|
+
*/
|
|
603
|
+
export async function saveDraftPrd(projectPath, projectName, description, requirements) {
|
|
604
|
+
const prdContent = generateDraftPrd(projectName, description, requirements);
|
|
605
|
+
const prdPath = path.join(projectPath, 'docs', 'prd', 'requirements-draft.md');
|
|
606
|
+
await mkdir(path.dirname(prdPath), { recursive: true });
|
|
607
|
+
await writeFile(prdPath, prdContent, 'utf-8');
|
|
608
|
+
return prdPath;
|
|
609
|
+
}
|
|
610
|
+
//# sourceMappingURL=planning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planning.js","sourceRoot":"","sources":["../../src/core/planning.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,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,MAAM,EAAE,KAAK,EAAE,uBAAuB,CAAC,CAAC;IAE/E,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,MAAM,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAE9C,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -35,4 +35,8 @@ export declare function getInjectionSummary(missingFiles: string[]): {
|
|
|
35
35
|
claudeFiles: string[];
|
|
36
36
|
totalFiles: number;
|
|
37
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Get all framework file paths for injection into a new repo
|
|
40
|
+
*/
|
|
41
|
+
export declare function getFrameworkFilesForInjection(): string[];
|
|
38
42
|
//# sourceMappingURL=framework.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../../../src/core/repo/framework.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;IACxC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,MAAe,GACtB,OAAO,CAAC,wBAAwB,CAAC,CA8BnC;AAyBD;;GAEG;AACH,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CA+EnC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG;IAC3D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CASA;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,EAAE,CAExD"}
|
|
@@ -139,4 +139,10 @@ export function getInjectionSummary(missingFiles) {
|
|
|
139
139
|
totalFiles: missingFiles.length,
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Get all framework file paths for injection into a new repo
|
|
144
|
+
*/
|
|
145
|
+
export function getFrameworkFilesForInjection() {
|
|
146
|
+
return getFrameworkFilePaths();
|
|
147
|
+
}
|
|
142
148
|
//# sourceMappingURL=framework.js.map
|