@iservu-inc/adf-cli 0.1.6 → 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/.project/chats/complete/2025-10-03_ADF-CLI-QUALITY-BASED-PROGRESS-AND-RESUME.md +399 -0
- package/.project/chats/current/2025-10-03_AGENTS-MD-AND-TOOL-GENERATORS.md +699 -0
- package/.project/docs/architecture/SYSTEM-DESIGN.md +369 -0
- package/.project/docs/frameworks/FRAMEWORK-METHODOLOGIES.md +449 -0
- package/.project/docs/goals/PROJECT-VISION.md +112 -0
- package/.project/docs/tool-integrations/IDE-CUSTOMIZATIONS.md +578 -0
- package/.project/docs/tool-integrations/RESEARCH-FINDINGS.md +828 -0
- package/CHANGELOG.md +292 -0
- package/jest.config.js +20 -0
- package/lib/commands/deploy.js +122 -3
- package/lib/commands/init.js +41 -113
- package/lib/frameworks/answer-quality-analyzer.js +216 -0
- package/lib/frameworks/interviewer.js +447 -0
- package/lib/frameworks/output-generators.js +345 -0
- package/lib/frameworks/progress-tracker.js +239 -0
- package/lib/frameworks/questions.js +664 -0
- package/lib/frameworks/session-manager.js +100 -0
- package/lib/generators/agents-md-generator.js +388 -0
- package/lib/generators/cursor-generator.js +374 -0
- package/lib/generators/index.js +98 -0
- package/lib/generators/tool-config-generator.js +188 -0
- package/lib/generators/vscode-generator.js +403 -0
- package/lib/generators/windsurf-generator.js +596 -0
- package/package.json +10 -5
- package/tests/agents-md-generator.test.js +245 -0
- package/tests/answer-quality-analyzer.test.js +173 -0
- package/tests/cursor-generator.test.js +326 -0
- package/tests/progress-tracker.test.js +205 -0
- package/tests/session-manager.test.js +162 -0
- package/tests/vscode-generator.test.js +436 -0
- package/tests/windsurf-generator.test.js +320 -0
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
const ToolConfigGenerator = require('./tool-config-generator');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generator for Windsurf (Codeium) configuration files
|
|
6
|
+
* Creates .windsurfrules, rules, and workflows
|
|
7
|
+
*
|
|
8
|
+
* File limits: 12,000 characters per rule file
|
|
9
|
+
* See: https://docs.windsurf.com/
|
|
10
|
+
*/
|
|
11
|
+
class WindsurfGenerator extends ToolConfigGenerator {
|
|
12
|
+
/**
|
|
13
|
+
* Generate all Windsurf configuration files
|
|
14
|
+
*/
|
|
15
|
+
async generate() {
|
|
16
|
+
await this.initialize();
|
|
17
|
+
|
|
18
|
+
const generated = {
|
|
19
|
+
legacy: [],
|
|
20
|
+
rules: [],
|
|
21
|
+
workflows: []
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Generate .windsurfrules (legacy compatibility)
|
|
25
|
+
const legacyPath = await this.generateLegacyRules();
|
|
26
|
+
generated.legacy.push(legacyPath);
|
|
27
|
+
|
|
28
|
+
// Generate .windsurf/rules/*.md (modern)
|
|
29
|
+
const rulesPaths = await this.generateModernRules();
|
|
30
|
+
generated.rules.push(...rulesPaths);
|
|
31
|
+
|
|
32
|
+
// Generate .windsurf/workflows/*.md
|
|
33
|
+
const workflowsPaths = await this.generateWorkflows();
|
|
34
|
+
generated.workflows.push(...workflowsPaths);
|
|
35
|
+
|
|
36
|
+
return generated;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Generate .windsurfrules (legacy format, still supported)
|
|
41
|
+
*/
|
|
42
|
+
async generateLegacyRules() {
|
|
43
|
+
const content = this.framework === 'rapid' ?
|
|
44
|
+
this.generateLegacyPRP() :
|
|
45
|
+
this.framework === 'balanced' ?
|
|
46
|
+
this.generateLegacyBalanced() :
|
|
47
|
+
this.generateLegacyBMAD();
|
|
48
|
+
|
|
49
|
+
return await this.writeToProject('.windsurfrules', content);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
generateLegacyPRP() {
|
|
53
|
+
const projectName = this.getProjectName();
|
|
54
|
+
const sections = this.outputs.sections || {};
|
|
55
|
+
|
|
56
|
+
return `# ${projectName} - Windsurf Rules
|
|
57
|
+
|
|
58
|
+
## Project Goal
|
|
59
|
+
|
|
60
|
+
${sections['1._goal_definition'] || sections['goal_definition'] || 'See prp.md for details'}
|
|
61
|
+
|
|
62
|
+
## Tech Stack
|
|
63
|
+
|
|
64
|
+
${this.extractTechStack(sections)}
|
|
65
|
+
|
|
66
|
+
## Implementation Blueprint
|
|
67
|
+
|
|
68
|
+
${sections['4._implementation_blueprint'] || sections['implementation_blueprint'] || 'See prp.md for implementation details'}
|
|
69
|
+
|
|
70
|
+
## Success Criteria
|
|
71
|
+
|
|
72
|
+
${sections['5._validation'] || sections['validation'] || 'See prp.md for validation criteria'}
|
|
73
|
+
|
|
74
|
+
## AI Behavior
|
|
75
|
+
|
|
76
|
+
- Always reference the full PRP: \`.adf/sessions/${this.getSessionId()}/outputs/prp.md\`
|
|
77
|
+
- Follow the implementation blueprint exactly as specified
|
|
78
|
+
- Validate against success criteria before marking complete
|
|
79
|
+
- Ask clarifying questions if requirements are unclear
|
|
80
|
+
- Maintain consistency with the tech stack
|
|
81
|
+
|
|
82
|
+
## Code Generation Rules
|
|
83
|
+
|
|
84
|
+
- Use the specified tech stack
|
|
85
|
+
- Follow the file structure in the implementation blueprint
|
|
86
|
+
- Include error handling
|
|
87
|
+
- Write tests for new functionality
|
|
88
|
+
- Document complex logic
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
*Generated by ADF CLI v${this.getADFVersion()} from PRP framework*
|
|
93
|
+
`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
generateLegacyBalanced() {
|
|
97
|
+
const projectName = this.getProjectName();
|
|
98
|
+
const constitution = this.outputs.constitution || '';
|
|
99
|
+
const specification = this.outputs.specification || '';
|
|
100
|
+
|
|
101
|
+
const principles = this.extractSection(constitution, 'Core Principles');
|
|
102
|
+
const constraints = this.extractSection(constitution, 'Constraints');
|
|
103
|
+
|
|
104
|
+
return `# ${projectName} - Windsurf Rules
|
|
105
|
+
|
|
106
|
+
## Core Principles
|
|
107
|
+
|
|
108
|
+
${principles || 'Follow best practices'}
|
|
109
|
+
|
|
110
|
+
## Constraints
|
|
111
|
+
|
|
112
|
+
${constraints || 'No specific constraints'}
|
|
113
|
+
|
|
114
|
+
## Tech Stack
|
|
115
|
+
|
|
116
|
+
${this.extractSection(this.outputs.plan || '', 'Technology Stack') || 'See technical plan'}
|
|
117
|
+
|
|
118
|
+
## Architecture
|
|
119
|
+
|
|
120
|
+
${this.extractSection(specification, 'Architecture') || 'See specification.md'}
|
|
121
|
+
|
|
122
|
+
## AI Behavior
|
|
123
|
+
|
|
124
|
+
**Before implementing:**
|
|
125
|
+
1. Review constitution: \`.adf/sessions/${this.getSessionId()}/outputs/constitution.md\`
|
|
126
|
+
2. Check specification: \`.adf/sessions/${this.getSessionId()}/outputs/specification.md\`
|
|
127
|
+
3. Consult technical plan: \`.adf/sessions/${this.getSessionId()}/outputs/plan.md\`
|
|
128
|
+
|
|
129
|
+
**Never violate:**
|
|
130
|
+
- The core principles
|
|
131
|
+
- The constraints
|
|
132
|
+
|
|
133
|
+
**Always follow:**
|
|
134
|
+
- Architecture patterns from specification
|
|
135
|
+
- Code standards from technical plan
|
|
136
|
+
- Task breakdown from tasks.md
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
*Generated by ADF CLI v${this.getADFVersion()} from Balanced framework*
|
|
141
|
+
`;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
generateLegacyBMAD() {
|
|
145
|
+
const projectName = this.getProjectName();
|
|
146
|
+
const prd = this.outputs.prd || '';
|
|
147
|
+
|
|
148
|
+
return `# ${projectName} - Windsurf Rules
|
|
149
|
+
|
|
150
|
+
## Product Overview
|
|
151
|
+
|
|
152
|
+
${this.extractSection(prd, 'Executive Summary') || this.extractSection(prd, 'Overview')}
|
|
153
|
+
|
|
154
|
+
## Technical Requirements
|
|
155
|
+
|
|
156
|
+
${this.extractSection(prd, 'Technical Requirements') || 'See PRD for details'}
|
|
157
|
+
|
|
158
|
+
## Architecture
|
|
159
|
+
|
|
160
|
+
${this.extractSection(this.outputs.architecture || '', 'System Overview') || 'See architecture.md'}
|
|
161
|
+
|
|
162
|
+
## AI Behavior
|
|
163
|
+
|
|
164
|
+
**Before implementing:**
|
|
165
|
+
1. Read the PRD: \`.adf/sessions/${this.getSessionId()}/outputs/prd.md\`
|
|
166
|
+
2. Study the architecture: \`.adf/sessions/${this.getSessionId()}/outputs/architecture.md\`
|
|
167
|
+
3. Review user stories: \`.adf/sessions/${this.getSessionId()}/outputs/stories.md\`
|
|
168
|
+
|
|
169
|
+
**Always:**
|
|
170
|
+
- Implement user stories as specified
|
|
171
|
+
- Follow architectural patterns
|
|
172
|
+
- Write comprehensive tests
|
|
173
|
+
- Consider scalability and performance
|
|
174
|
+
- Handle errors gracefully
|
|
175
|
+
|
|
176
|
+
**Never:**
|
|
177
|
+
- Deviate from architectural decisions without discussion
|
|
178
|
+
- Skip tests
|
|
179
|
+
- Commit sensitive data
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
*Generated by ADF CLI v${this.getADFVersion()} from BMAD framework*
|
|
184
|
+
`;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Generate .windsurf/rules/*.md (modern format)
|
|
189
|
+
*/
|
|
190
|
+
async generateModernRules() {
|
|
191
|
+
await this.ensureDir('.windsurf/rules');
|
|
192
|
+
|
|
193
|
+
const paths = [];
|
|
194
|
+
|
|
195
|
+
// Project context rule
|
|
196
|
+
paths.push(await this.generateProjectContextRule());
|
|
197
|
+
|
|
198
|
+
// Architecture rule (if available)
|
|
199
|
+
if (this.outputs.architecture || this.outputs.specification || this.outputs.sections) {
|
|
200
|
+
paths.push(await this.generateArchitectureRule());
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Coding standards rule (if available)
|
|
204
|
+
if (this.outputs.plan || this.outputs.specification) {
|
|
205
|
+
paths.push(await this.generateCodingStandardsRule());
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return paths;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
async generateProjectContextRule() {
|
|
212
|
+
const projectName = this.getProjectName();
|
|
213
|
+
|
|
214
|
+
let content;
|
|
215
|
+
if (this.framework === 'rapid') {
|
|
216
|
+
const sections = this.outputs.sections || {};
|
|
217
|
+
content = `# Project Context - ${projectName}
|
|
218
|
+
|
|
219
|
+
## Goal
|
|
220
|
+
|
|
221
|
+
${sections['1._goal_definition'] || sections['goal_definition'] || 'Software development project'}
|
|
222
|
+
|
|
223
|
+
## Tech Stack
|
|
224
|
+
|
|
225
|
+
${this.extractTechStack(sections)}
|
|
226
|
+
|
|
227
|
+
## Context Intelligence
|
|
228
|
+
|
|
229
|
+
${sections['3._contextual_intelligence'] || sections['contextual_intelligence'] || 'See PRP for details'}
|
|
230
|
+
|
|
231
|
+
## Full Context
|
|
232
|
+
|
|
233
|
+
All requirements are documented in: \`.adf/sessions/${this.getSessionId()}/outputs/prp.md\`
|
|
234
|
+
|
|
235
|
+
Read this file before implementing any features.
|
|
236
|
+
`;
|
|
237
|
+
} else if (this.framework === 'balanced') {
|
|
238
|
+
content = `# Project Context - ${projectName}
|
|
239
|
+
|
|
240
|
+
## Overview
|
|
241
|
+
|
|
242
|
+
${this.extractSection(this.outputs.specification || '', 'Overview') || 'See specification'}
|
|
243
|
+
|
|
244
|
+
## Core Principles
|
|
245
|
+
|
|
246
|
+
${this.extractSection(this.outputs.constitution || '', 'Core Principles') || 'Follow best practices'}
|
|
247
|
+
|
|
248
|
+
## Tech Stack
|
|
249
|
+
|
|
250
|
+
${this.extractSection(this.outputs.plan || '', 'Technology Stack') || 'See technical plan'}
|
|
251
|
+
|
|
252
|
+
## Full Context
|
|
253
|
+
|
|
254
|
+
Review these files before implementing:
|
|
255
|
+
- Constitution: \`.adf/sessions/${this.getSessionId()}/outputs/constitution.md\`
|
|
256
|
+
- Specification: \`.adf/sessions/${this.getSessionId()}/outputs/specification.md\`
|
|
257
|
+
- Technical Plan: \`.adf/sessions/${this.getSessionId()}/outputs/plan.md\`
|
|
258
|
+
`;
|
|
259
|
+
} else {
|
|
260
|
+
content = `# Project Context - ${projectName}
|
|
261
|
+
|
|
262
|
+
## Product Overview
|
|
263
|
+
|
|
264
|
+
${this.extractSection(this.outputs.prd || '', 'Executive Summary') || 'See PRD'}
|
|
265
|
+
|
|
266
|
+
## Goals
|
|
267
|
+
|
|
268
|
+
${this.extractSection(this.outputs.prd || '', 'Goals and Objectives') || 'See PRD'}
|
|
269
|
+
|
|
270
|
+
## Full Context
|
|
271
|
+
|
|
272
|
+
Review these files before implementing:
|
|
273
|
+
- PRD: \`.adf/sessions/${this.getSessionId()}/outputs/prd.md\`
|
|
274
|
+
- Architecture: \`.adf/sessions/${this.getSessionId()}/outputs/architecture.md\`
|
|
275
|
+
- User Stories: \`.adf/sessions/${this.getSessionId()}/outputs/stories.md\`
|
|
276
|
+
`;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return await this.writeToProject('.windsurf/rules/project-context.md', content);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
async generateArchitectureRule() {
|
|
283
|
+
const projectName = this.getProjectName();
|
|
284
|
+
|
|
285
|
+
let content;
|
|
286
|
+
if (this.framework === 'rapid') {
|
|
287
|
+
const sections = this.outputs.sections || {};
|
|
288
|
+
content = `# Architecture - ${projectName}
|
|
289
|
+
|
|
290
|
+
## Implementation Blueprint
|
|
291
|
+
|
|
292
|
+
${sections['4._implementation_blueprint'] || sections['implementation_blueprint'] || 'See PRP'}
|
|
293
|
+
|
|
294
|
+
## Reference
|
|
295
|
+
|
|
296
|
+
Full implementation details: \`.adf/sessions/${this.getSessionId()}/outputs/prp.md\`
|
|
297
|
+
`;
|
|
298
|
+
} else if (this.framework === 'balanced') {
|
|
299
|
+
content = `# Architecture - ${projectName}
|
|
300
|
+
|
|
301
|
+
${this.extractSection(this.outputs.specification || '', 'Architecture') || 'See specification'}
|
|
302
|
+
|
|
303
|
+
## Technical Decisions
|
|
304
|
+
|
|
305
|
+
${this.extractSection(this.outputs.plan || '', 'Architecture') || 'See technical plan'}
|
|
306
|
+
|
|
307
|
+
## Reference
|
|
308
|
+
|
|
309
|
+
Full architecture: \`.adf/sessions/${this.getSessionId()}/outputs/specification.md\`
|
|
310
|
+
`;
|
|
311
|
+
} else {
|
|
312
|
+
content = `# Architecture - ${projectName}
|
|
313
|
+
|
|
314
|
+
${this.extractSection(this.outputs.architecture || '', 'System Overview') || 'See architecture.md'}
|
|
315
|
+
|
|
316
|
+
## Components
|
|
317
|
+
|
|
318
|
+
${this.extractSection(this.outputs.architecture || '', 'Components') || 'See architecture.md'}
|
|
319
|
+
|
|
320
|
+
## Reference
|
|
321
|
+
|
|
322
|
+
Full architecture: \`.adf/sessions/${this.getSessionId()}/outputs/architecture.md\`
|
|
323
|
+
`;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return await this.writeToProject('.windsurf/rules/architecture.md', content);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
async generateCodingStandardsRule() {
|
|
330
|
+
const projectName = this.getProjectName();
|
|
331
|
+
|
|
332
|
+
let content;
|
|
333
|
+
if (this.framework === 'rapid') {
|
|
334
|
+
content = `# Coding Standards - ${projectName}
|
|
335
|
+
|
|
336
|
+
## General Guidelines
|
|
337
|
+
|
|
338
|
+
- Follow the tech stack specifications
|
|
339
|
+
- Write clean, readable code
|
|
340
|
+
- Include error handling
|
|
341
|
+
- Add tests for new features
|
|
342
|
+
- Document complex logic
|
|
343
|
+
|
|
344
|
+
## Reference
|
|
345
|
+
|
|
346
|
+
See implementation blueprint in: \`.adf/sessions/${this.getSessionId()}/outputs/prp.md\`
|
|
347
|
+
`;
|
|
348
|
+
} else if (this.framework === 'balanced') {
|
|
349
|
+
content = `# Coding Standards - ${projectName}
|
|
350
|
+
|
|
351
|
+
${this.extractSection(this.outputs.plan || '', 'Code Style') || this.extractSection(this.outputs.plan || '', 'Coding Standards') || ''}
|
|
352
|
+
|
|
353
|
+
## Principles to Follow
|
|
354
|
+
|
|
355
|
+
${this.extractSection(this.outputs.constitution || '', 'Core Principles') || 'Follow best practices'}
|
|
356
|
+
|
|
357
|
+
## Reference
|
|
358
|
+
|
|
359
|
+
Full standards: \`.adf/sessions/${this.getSessionId()}/outputs/plan.md\`
|
|
360
|
+
`;
|
|
361
|
+
} else {
|
|
362
|
+
content = `# Coding Standards - ${projectName}
|
|
363
|
+
|
|
364
|
+
${this.extractSection(this.outputs.prd || '', 'Code Quality') || ''}
|
|
365
|
+
|
|
366
|
+
## Best Practices
|
|
367
|
+
|
|
368
|
+
- Write comprehensive tests
|
|
369
|
+
- Handle errors gracefully
|
|
370
|
+
- Document public APIs
|
|
371
|
+
- Follow architectural patterns
|
|
372
|
+
- Consider performance and scalability
|
|
373
|
+
|
|
374
|
+
## Reference
|
|
375
|
+
|
|
376
|
+
Full requirements: \`.adf/sessions/${this.getSessionId()}/outputs/prd.md\`
|
|
377
|
+
`;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return await this.writeToProject('.windsurf/rules/coding-standards.md', content);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Generate .windsurf/workflows/*.md
|
|
385
|
+
*/
|
|
386
|
+
async generateWorkflows() {
|
|
387
|
+
await this.ensureDir('.windsurf/workflows');
|
|
388
|
+
|
|
389
|
+
const paths = [];
|
|
390
|
+
|
|
391
|
+
// Review requirements workflow
|
|
392
|
+
paths.push(await this.generateReviewWorkflow());
|
|
393
|
+
|
|
394
|
+
// Implement story workflow (for Balanced/BMAD)
|
|
395
|
+
if (this.framework === 'balanced' || this.framework === 'comprehensive') {
|
|
396
|
+
paths.push(await this.generateImplementWorkflow());
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
return paths;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
async generateReviewWorkflow() {
|
|
403
|
+
let content;
|
|
404
|
+
|
|
405
|
+
if (this.framework === 'rapid') {
|
|
406
|
+
content = `# Review Requirements
|
|
407
|
+
|
|
408
|
+
Use this workflow to review requirements before implementing.
|
|
409
|
+
|
|
410
|
+
## Steps
|
|
411
|
+
|
|
412
|
+
1. Read the full PRP: \`.adf/sessions/${this.getSessionId()}/outputs/prp.md\`
|
|
413
|
+
2. Understand the goal and business justification
|
|
414
|
+
3. Review the tech stack and contextual intelligence
|
|
415
|
+
4. Study the implementation blueprint
|
|
416
|
+
5. Note the success criteria
|
|
417
|
+
|
|
418
|
+
## Questions to Ask
|
|
419
|
+
|
|
420
|
+
- What is the core feature being built?
|
|
421
|
+
- Who are the users?
|
|
422
|
+
- What problem does this solve?
|
|
423
|
+
- What are the technical constraints?
|
|
424
|
+
- How will success be measured?
|
|
425
|
+
`;
|
|
426
|
+
} else if (this.framework === 'balanced') {
|
|
427
|
+
content = `# Review Requirements
|
|
428
|
+
|
|
429
|
+
Use this workflow to review requirements before implementing.
|
|
430
|
+
|
|
431
|
+
## Steps
|
|
432
|
+
|
|
433
|
+
1. Read the constitution: \`.adf/sessions/${this.getSessionId()}/outputs/constitution.md\`
|
|
434
|
+
- Note core principles and constraints
|
|
435
|
+
2. Read the specification: \`.adf/sessions/${this.getSessionId()}/outputs/specification.md\`
|
|
436
|
+
- Understand what needs to be built
|
|
437
|
+
3. Review the technical plan: \`.adf/sessions/${this.getSessionId()}/outputs/plan.md\`
|
|
438
|
+
- Understand architectural decisions
|
|
439
|
+
4. Check tasks: \`.adf/sessions/${this.getSessionId()}/outputs/tasks.md\`
|
|
440
|
+
- See implementation breakdown
|
|
441
|
+
|
|
442
|
+
## Questions to Ask
|
|
443
|
+
|
|
444
|
+
- What are the non-negotiable constraints?
|
|
445
|
+
- What architectural patterns should I follow?
|
|
446
|
+
- What are the acceptance criteria?
|
|
447
|
+
- Are there any dependencies?
|
|
448
|
+
`;
|
|
449
|
+
} else {
|
|
450
|
+
content = `# Review Requirements
|
|
451
|
+
|
|
452
|
+
Use this workflow to review requirements before implementing.
|
|
453
|
+
|
|
454
|
+
## Steps
|
|
455
|
+
|
|
456
|
+
1. Read the PRD: \`.adf/sessions/${this.getSessionId()}/outputs/prd.md\`
|
|
457
|
+
- Understand product vision and goals
|
|
458
|
+
2. Study the architecture: \`.adf/sessions/${this.getSessionId()}/outputs/architecture.md\`
|
|
459
|
+
- Know the system design
|
|
460
|
+
3. Review user stories: \`.adf/sessions/${this.getSessionId()}/outputs/stories.md\`
|
|
461
|
+
- Understand user needs
|
|
462
|
+
|
|
463
|
+
## Questions to Ask
|
|
464
|
+
|
|
465
|
+
- What user problem are we solving?
|
|
466
|
+
- What are the technical requirements?
|
|
467
|
+
- What are the performance/scalability needs?
|
|
468
|
+
- What are the security considerations?
|
|
469
|
+
- How does this fit in the overall architecture?
|
|
470
|
+
`;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
return await this.writeToProject('.windsurf/workflows/review-requirements.md', content);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
async generateImplementWorkflow() {
|
|
477
|
+
let content;
|
|
478
|
+
|
|
479
|
+
if (this.framework === 'balanced') {
|
|
480
|
+
content = `# Implement Feature
|
|
481
|
+
|
|
482
|
+
Use this workflow when implementing a feature.
|
|
483
|
+
|
|
484
|
+
## Steps
|
|
485
|
+
|
|
486
|
+
1. Review the specification for this feature
|
|
487
|
+
2. Check the technical plan for architecture patterns
|
|
488
|
+
3. Review the task breakdown
|
|
489
|
+
4. Plan your implementation approach
|
|
490
|
+
5. Write tests first (TDD)
|
|
491
|
+
6. Implement following architecture patterns
|
|
492
|
+
7. Verify against acceptance criteria
|
|
493
|
+
8. Run tests and linter
|
|
494
|
+
9. Create pull request
|
|
495
|
+
|
|
496
|
+
## Checklist
|
|
497
|
+
|
|
498
|
+
- [ ] Read relevant sections of specification.md
|
|
499
|
+
- [ ] Understand architectural patterns from plan.md
|
|
500
|
+
- [ ] Review task breakdown
|
|
501
|
+
- [ ] Write failing tests
|
|
502
|
+
- [ ] Implement feature
|
|
503
|
+
- [ ] All tests pass
|
|
504
|
+
- [ ] Code follows standards
|
|
505
|
+
- [ ] Acceptance criteria met
|
|
506
|
+
|
|
507
|
+
## Reference Files
|
|
508
|
+
|
|
509
|
+
- Specification: \`.adf/sessions/${this.getSessionId()}/outputs/specification.md\`
|
|
510
|
+
- Plan: \`.adf/sessions/${this.getSessionId()}/outputs/plan.md\`
|
|
511
|
+
- Tasks: \`.adf/sessions/${this.getSessionId()}/outputs/tasks.md\`
|
|
512
|
+
`;
|
|
513
|
+
} else {
|
|
514
|
+
content = `# Implement User Story
|
|
515
|
+
|
|
516
|
+
Use this workflow when implementing a user story.
|
|
517
|
+
|
|
518
|
+
## Steps
|
|
519
|
+
|
|
520
|
+
1. Find the user story in stories.md
|
|
521
|
+
2. Read the acceptance criteria
|
|
522
|
+
3. Review the architecture for component location
|
|
523
|
+
4. Check the PRD for technical requirements
|
|
524
|
+
5. Plan your implementation
|
|
525
|
+
6. Write tests first (TDD)
|
|
526
|
+
7. Implement the story
|
|
527
|
+
8. Verify against acceptance criteria
|
|
528
|
+
9. Run full test suite
|
|
529
|
+
10. Create pull request
|
|
530
|
+
|
|
531
|
+
## Checklist
|
|
532
|
+
|
|
533
|
+
- [ ] User story identified and understood
|
|
534
|
+
- [ ] Acceptance criteria clear
|
|
535
|
+
- [ ] Architecture reviewed
|
|
536
|
+
- [ ] Tests written and failing
|
|
537
|
+
- [ ] Implementation complete
|
|
538
|
+
- [ ] All acceptance criteria met
|
|
539
|
+
- [ ] All tests pass
|
|
540
|
+
- [ ] Code quality checks pass
|
|
541
|
+
|
|
542
|
+
## Reference Files
|
|
543
|
+
|
|
544
|
+
- User Stories: \`.adf/sessions/${this.getSessionId()}/outputs/stories.md\`
|
|
545
|
+
- Architecture: \`.adf/sessions/${this.getSessionId()}/outputs/architecture.md\`
|
|
546
|
+
- PRD: \`.adf/sessions/${this.getSessionId()}/outputs/prd.md\`
|
|
547
|
+
`;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
return await this.writeToProject('.windsurf/workflows/implement-feature.md', content);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Extract tech stack from PRP sections
|
|
555
|
+
*/
|
|
556
|
+
extractTechStack(sections) {
|
|
557
|
+
const contextualIntelligence = sections['3._contextual_intelligence'] ||
|
|
558
|
+
sections['contextual_intelligence'] || '';
|
|
559
|
+
|
|
560
|
+
// Look for tech stack mentions
|
|
561
|
+
const lines = contextualIntelligence.split('\n');
|
|
562
|
+
const techLines = [];
|
|
563
|
+
let inTechSection = false;
|
|
564
|
+
|
|
565
|
+
for (const line of lines) {
|
|
566
|
+
if (line.toLowerCase().includes('tech') ||
|
|
567
|
+
line.toLowerCase().includes('stack') ||
|
|
568
|
+
line.toLowerCase().includes('technology')) {
|
|
569
|
+
inTechSection = true;
|
|
570
|
+
}
|
|
571
|
+
if (inTechSection && line.trim()) {
|
|
572
|
+
techLines.push(line);
|
|
573
|
+
if (techLines.length > 10) break; // Limit lines
|
|
574
|
+
}
|
|
575
|
+
if (line.startsWith('##') && inTechSection && techLines.length > 0) {
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
return techLines.length > 0 ? techLines.join('\n') : 'See framework outputs for tech stack';
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Get ADF CLI version
|
|
585
|
+
*/
|
|
586
|
+
getADFVersion() {
|
|
587
|
+
try {
|
|
588
|
+
const packageJson = require('../../package.json');
|
|
589
|
+
return packageJson.version;
|
|
590
|
+
} catch (error) {
|
|
591
|
+
return '0.3.0';
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
module.exports = WindsurfGenerator;
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iservu-inc/adf-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "CLI tool for AgentDevFramework - AI-assisted development framework",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"adf": "bin/adf.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"test": "
|
|
10
|
+
"test": "jest --coverage",
|
|
11
|
+
"test:watch": "jest --watch"
|
|
11
12
|
},
|
|
12
13
|
"keywords": [
|
|
13
14
|
"cli",
|
|
@@ -28,11 +29,11 @@
|
|
|
28
29
|
"author": "iServU",
|
|
29
30
|
"license": "MIT",
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"inquirer": "^8.2.5",
|
|
32
32
|
"chalk": "^4.1.2",
|
|
33
|
-
"
|
|
33
|
+
"commander": "^11.1.0",
|
|
34
34
|
"fs-extra": "^11.2.0",
|
|
35
|
-
"
|
|
35
|
+
"inquirer": "^8.2.5",
|
|
36
|
+
"ora": "^5.4.1"
|
|
36
37
|
},
|
|
37
38
|
"engines": {
|
|
38
39
|
"node": ">=18.0.0",
|
|
@@ -48,5 +49,9 @@
|
|
|
48
49
|
"homepage": "https://github.com/iservu/adf-cli#readme",
|
|
49
50
|
"publishConfig": {
|
|
50
51
|
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^24.6.2",
|
|
55
|
+
"jest": "^30.2.0"
|
|
51
56
|
}
|
|
52
57
|
}
|