@iservu-inc/adf-cli 0.1.5 ā 0.2.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/current/2025-10-03_ADF-CLI-QUALITY-BASED-PROGRESS-AND-RESUME.md +399 -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/CHANGELOG.md +253 -0
- package/README.md +50 -11
- package/jest.config.js +20 -0
- package/lib/commands/init.js +41 -111
- 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/package.json +10 -5
- package/test-scenarios.sh +134 -0
- package/tests/answer-quality-analyzer.test.js +173 -0
- package/tests/progress-tracker.test.js +205 -0
- package/tests/session-manager.test.js +162 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@iservu-inc/adf-cli` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.2.0] - 2025-10-03
|
|
11
|
+
|
|
12
|
+
### š MAJOR RELEASE: Quality-Based Progress Tracking & Resume Capability
|
|
13
|
+
|
|
14
|
+
This is a **paradigm shift** in how ADF CLI measures progress. Instead of counting questions, we now measure **information richness** - recognizing that 3 thorough answers can be worth more than 20 shallow ones.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
**Quality-Based Progress System:**
|
|
19
|
+
- Information Richness Score (0-100%) - weighted metric combining completion and quality
|
|
20
|
+
- Real-time answer quality analysis with 0-100 scoring
|
|
21
|
+
- Quality metrics tracking: word count, keywords, required elements, detail level, technical depth
|
|
22
|
+
- Automatic follow-up question skipping for high-quality answers (score >= 85)
|
|
23
|
+
- Quality feedback displayed to users after each answer
|
|
24
|
+
|
|
25
|
+
**Resume Capability:**
|
|
26
|
+
- Full session save/quit/resume from exact point of interruption
|
|
27
|
+
- Session Manager to detect and list resumable sessions
|
|
28
|
+
- User prompted to resume or start new on `adf init`
|
|
29
|
+
- All context preserved: answers, transcript, quality metrics, current block
|
|
30
|
+
|
|
31
|
+
**Triple-Redundant Auto-Save:**
|
|
32
|
+
- Main progress file: `_progress.json`
|
|
33
|
+
- Backup file: `_progress.backup.json`
|
|
34
|
+
- Append-only log: `_progress-log.md`
|
|
35
|
+
- Emergency fallback: `_emergency-{timestamp}.json` (if all else fails)
|
|
36
|
+
- Auto-save after every answer, block completion, and state change
|
|
37
|
+
|
|
38
|
+
**Comprehensive Testing:**
|
|
39
|
+
- 33 unit tests with 78% code coverage
|
|
40
|
+
- Test coverage: 78% statements, 63% branches, 77% functions, 79% lines
|
|
41
|
+
- Tests for quality analyzer, progress tracker, session manager
|
|
42
|
+
- Emergency recovery scenarios tested
|
|
43
|
+
|
|
44
|
+
**Project Documentation:**
|
|
45
|
+
- Complete `.project/` documentation structure
|
|
46
|
+
- Chat history tracking (current and completed)
|
|
47
|
+
- Architecture documentation (system design, data flow)
|
|
48
|
+
- Framework methodologies documentation
|
|
49
|
+
- Tool integrations specification
|
|
50
|
+
- Project vision and goals
|
|
51
|
+
|
|
52
|
+
### New Files
|
|
53
|
+
|
|
54
|
+
- `lib/frameworks/answer-quality-analyzer.js` - Comprehensive quality scoring engine
|
|
55
|
+
- `lib/frameworks/progress-tracker.js` - Real-time progress with quality metrics
|
|
56
|
+
- `lib/frameworks/session-manager.js` - Session listing and resume prompts
|
|
57
|
+
- `tests/answer-quality-analyzer.test.js` - 16 unit tests
|
|
58
|
+
- `tests/progress-tracker.test.js` - 12 unit tests
|
|
59
|
+
- `tests/session-manager.test.js` - 5 unit tests
|
|
60
|
+
- `jest.config.js` - Jest testing configuration
|
|
61
|
+
- `.project/chats/` - Chat history tracking
|
|
62
|
+
- `.project/docs/` - Complete project documentation
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
**Interviewer Engine:**
|
|
67
|
+
- Integrated quality analyzer - evaluates every answer
|
|
68
|
+
- Auto-save after each answer with quality metrics
|
|
69
|
+
- Block start/complete/skip tracking
|
|
70
|
+
- Quality feedback display to users
|
|
71
|
+
- Smart follow-up skipping based on quality
|
|
72
|
+
|
|
73
|
+
**Init Command:**
|
|
74
|
+
- Session resume detection on startup
|
|
75
|
+
- Prompts user to resume or start new
|
|
76
|
+
- Framework parameter tracking for resume
|
|
77
|
+
|
|
78
|
+
**Progress Display:**
|
|
79
|
+
- Old: `"3/20 questions (15%)"`
|
|
80
|
+
- New: `"š Information Richness: ⨠75% | Avg Quality: 82%"`
|
|
81
|
+
- Shows blocks, questions, words, and quality metrics
|
|
82
|
+
- Emoji indicators for richness levels (š ⨠š« ā)
|
|
83
|
+
|
|
84
|
+
### Quality Scoring System
|
|
85
|
+
|
|
86
|
+
**Metrics (0-100 total):**
|
|
87
|
+
- Word count: up to 30 points (50+ words = max)
|
|
88
|
+
- Keyword presence: up to 20 points
|
|
89
|
+
- Required elements: up to 25 points (platform, tech, user interaction, etc.)
|
|
90
|
+
- Detail level: up to 15 points (bullets, examples, multiple sentences)
|
|
91
|
+
- Technical depth: up to 10 points (tech stack, versions, tools)
|
|
92
|
+
|
|
93
|
+
**Thresholds:**
|
|
94
|
+
- Score >= 70: Comprehensive answer
|
|
95
|
+
- Score >= 85: Can skip follow-up questions
|
|
96
|
+
|
|
97
|
+
**Information Richness Formula:**
|
|
98
|
+
```
|
|
99
|
+
informationRichness = (completionFactor * 0.4) + (qualityFactor * 0.6) * 100
|
|
100
|
+
```
|
|
101
|
+
Weighted 60% toward quality, 40% toward completion.
|
|
102
|
+
|
|
103
|
+
### Breaking Changes
|
|
104
|
+
|
|
105
|
+
None - fully backward compatible with v0.1.x
|
|
106
|
+
|
|
107
|
+
### Technical Debt Addressed
|
|
108
|
+
|
|
109
|
+
- Bulletproof data persistence (zero data loss)
|
|
110
|
+
- Comprehensive error recovery
|
|
111
|
+
- Test coverage for core components
|
|
112
|
+
- Project documentation structure
|
|
113
|
+
|
|
114
|
+
### Next Steps
|
|
115
|
+
|
|
116
|
+
- **Option B (Phase 2)**: IDE Tool Integrations
|
|
117
|
+
- Windsurf customizations (.windsurfrules, memories, workflows)
|
|
118
|
+
- Cursor customizations (.cursorrules, modes, MCP, hooks)
|
|
119
|
+
- VS Code customizations (copilot-instructions, chat modes, tools API)
|
|
120
|
+
|
|
121
|
+
### Migration Guide
|
|
122
|
+
|
|
123
|
+
No migration needed. Existing sessions from v0.1.x will continue to work. New features will be available for new sessions created with v0.2.0.
|
|
124
|
+
|
|
125
|
+
## [0.1.6] - 2025-10-02
|
|
126
|
+
|
|
127
|
+
### Fixed
|
|
128
|
+
- Fixed step numbering in init success message
|
|
129
|
+
- Steps now number correctly (1, 2, 3) when deployment is completed
|
|
130
|
+
- Steps number correctly (1, 2, 3, 4) when deployment is skipped
|
|
131
|
+
- Eliminated confusing jump from step 2 to step 4
|
|
132
|
+
|
|
133
|
+
### Documentation
|
|
134
|
+
- Updated README.md with comprehensive usage examples
|
|
135
|
+
- Added context.json structure documentation
|
|
136
|
+
- Added documentation about local file paths feature
|
|
137
|
+
- Added detailed "What Gets Installed" section with complete directory structure
|
|
138
|
+
|
|
139
|
+
## [0.1.5] - 2025-10-02
|
|
140
|
+
|
|
141
|
+
### Added
|
|
142
|
+
- New question in init workflow: "Do you have local documentation files to include?"
|
|
143
|
+
- Allows users to specify local file paths (e.g., `./docs/`, `./README.md`)
|
|
144
|
+
- Added `documentationFiles` array to context.json structure
|
|
145
|
+
- Complements existing `documentationUrls` field
|
|
146
|
+
|
|
147
|
+
### Changed
|
|
148
|
+
- Init workflow now collects both remote URLs and local file paths for documentation
|
|
149
|
+
- Enhanced context.json to track local documentation references
|
|
150
|
+
|
|
151
|
+
## [0.1.4] - 2025-10-02
|
|
152
|
+
|
|
153
|
+
### Fixed
|
|
154
|
+
- Fixed context.json to use actual CLI version instead of hardcoded "0.1.01"
|
|
155
|
+
- Now dynamically reads version from package.json
|
|
156
|
+
- context.json correctly reflects which version of CLI was used to initialize
|
|
157
|
+
|
|
158
|
+
### Changed
|
|
159
|
+
- Updated `project-detector.js` to import package.json for version tracking
|
|
160
|
+
|
|
161
|
+
## [0.1.3] - 2025-10-02
|
|
162
|
+
|
|
163
|
+
### Fixed
|
|
164
|
+
- Fixed critical `ReferenceError` in init command
|
|
165
|
+
- `deployNow` variable was referenced outside its scope
|
|
166
|
+
- Caused initialization to crash after displaying success message
|
|
167
|
+
- Properly scoped variable to fix error
|
|
168
|
+
|
|
169
|
+
### Changed
|
|
170
|
+
- Improved variable scoping in init.js for better reliability
|
|
171
|
+
|
|
172
|
+
## [0.1.2] - 2025-10-02
|
|
173
|
+
|
|
174
|
+
### Documentation
|
|
175
|
+
- Updated README.md with correct package name throughout
|
|
176
|
+
- Fixed all installation command references to use `@iservu-inc/adf-cli`
|
|
177
|
+
- Updated 8 instances of package name in documentation
|
|
178
|
+
|
|
179
|
+
## [0.1.1] - 2025-10-02
|
|
180
|
+
|
|
181
|
+
### Fixed
|
|
182
|
+
- Fixed update command to check correct package name on npm registry
|
|
183
|
+
- Was checking `@iservu/adf-cli` instead of `@iservu-inc/adf-cli`
|
|
184
|
+
- Updated npm registry URLs in update.js
|
|
185
|
+
|
|
186
|
+
## [0.1.0] - 2025-10-02
|
|
187
|
+
|
|
188
|
+
### Added
|
|
189
|
+
- Initial release of AgentDevFramework CLI tool
|
|
190
|
+
- Three workflow levels:
|
|
191
|
+
- Level 1: Rapid Development (PRP) - 5-15 min planning
|
|
192
|
+
- Level 2: Specification-Driven (Balanced) - 30-60 min planning
|
|
193
|
+
- Level 3: BMAD Comprehensive - 1-2+ hour planning
|
|
194
|
+
- Interactive `adf init` command with intelligent workflow recommendations
|
|
195
|
+
- Support for multiple development tools:
|
|
196
|
+
- Windsurf, Cursor, VS Code, VS Code Insider
|
|
197
|
+
- Kiro, Trae, Claude Code, Gemini CLI, Codex CLI
|
|
198
|
+
- `adf deploy` command for deploying to development tools
|
|
199
|
+
- `adf update` command for checking and installing CLI updates
|
|
200
|
+
- Automatic project type detection (new vs existing)
|
|
201
|
+
- Documentation URL collection during initialization
|
|
202
|
+
- Agent deployment based on workflow level:
|
|
203
|
+
- Rapid: dev, qa
|
|
204
|
+
- Balanced: analyst, pm, dev, qa
|
|
205
|
+
- Comprehensive: analyst, pm, architect, sm, dev, qa
|
|
206
|
+
- Template copying and configuration generation
|
|
207
|
+
- Environment template creation (.env.template)
|
|
208
|
+
- Framework memory and constitution files
|
|
209
|
+
- MCP configuration support
|
|
210
|
+
|
|
211
|
+
### Commands
|
|
212
|
+
- `adf init [--rapid|--balanced|--comprehensive] [--tool <tool>]` - Initialize framework
|
|
213
|
+
- `adf deploy [tool] [--list]` - Deploy to development tool
|
|
214
|
+
- `adf update [--check]` - Update CLI to latest version
|
|
215
|
+
- `adf --version` - Show CLI version
|
|
216
|
+
- `adf --help` - Show help information
|
|
217
|
+
|
|
218
|
+
### Project Structure
|
|
219
|
+
Creates isolated `.adf/` directory with:
|
|
220
|
+
- context.json - Workflow configuration
|
|
221
|
+
- scripts/ - Helper scripts
|
|
222
|
+
- shared/ - Templates, agents, MCP configs, memory files
|
|
223
|
+
|
|
224
|
+
Deploys to `.framework/` directory with:
|
|
225
|
+
- agents/ - Deployed agent definition files
|
|
226
|
+
|
|
227
|
+
Creates tool-specific configuration files:
|
|
228
|
+
- .windsurfrules, .cursorrules, .vscode/settings.json, etc.
|
|
229
|
+
|
|
230
|
+
## Package Naming History
|
|
231
|
+
|
|
232
|
+
### Scope Change
|
|
233
|
+
- Original name: `@iservu/adf-cli` (failed to publish - scope mismatch)
|
|
234
|
+
- Updated to: `@iservu-inc/adf-cli` (matches npm username `iservu-inc`)
|
|
235
|
+
- First successful publish: v0.1.0
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Links
|
|
240
|
+
|
|
241
|
+
- [npm Package](https://www.npmjs.com/package/@iservu-inc/adf-cli)
|
|
242
|
+
- [GitHub Repository](https://github.com/iServU/adf-cli)
|
|
243
|
+
- [Issue Tracker](https://github.com/iServU/adf-cli/issues)
|
|
244
|
+
|
|
245
|
+
## Release Notes Format
|
|
246
|
+
|
|
247
|
+
### Types of Changes
|
|
248
|
+
- **Added** for new features
|
|
249
|
+
- **Changed** for changes in existing functionality
|
|
250
|
+
- **Deprecated** for soon-to-be removed features
|
|
251
|
+
- **Removed** for now removed features
|
|
252
|
+
- **Fixed** for any bug fixes
|
|
253
|
+
- **Security** for vulnerability fixes
|
package/README.md
CHANGED
|
@@ -26,6 +26,13 @@ Initialize AgentDevFramework in your current project:
|
|
|
26
26
|
adf init
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
The interactive init process will:
|
|
30
|
+
1. Detect if this is a new or existing project
|
|
31
|
+
2. Ask questions to recommend the best workflow level
|
|
32
|
+
3. Optionally collect documentation URLs (e.g., API docs, design docs)
|
|
33
|
+
4. Optionally collect local documentation file paths (e.g., `./docs/`, `./README.md`)
|
|
34
|
+
5. Offer to deploy to your preferred development tool
|
|
35
|
+
|
|
29
36
|
#### Workflow Selection Options
|
|
30
37
|
|
|
31
38
|
Skip interactive questions and specify workflow directly:
|
|
@@ -109,22 +116,48 @@ When you run `adf init`, the following structure is created in your project:
|
|
|
109
116
|
```
|
|
110
117
|
your-project/
|
|
111
118
|
āāā .adf/ # Framework files (isolated)
|
|
112
|
-
ā āāā
|
|
113
|
-
ā
|
|
114
|
-
ā
|
|
115
|
-
ā
|
|
116
|
-
ā
|
|
117
|
-
ā
|
|
118
|
-
ā
|
|
119
|
-
|
|
120
|
-
ā
|
|
121
|
-
ā āāā context.json # Your workflow configuration
|
|
119
|
+
ā āāā context.json # Your workflow configuration
|
|
120
|
+
ā āāā scripts/ # Helper scripts
|
|
121
|
+
ā āāā shared/ # Templates, agents, and resources
|
|
122
|
+
ā āāā agents/ # Agent definition files
|
|
123
|
+
ā āāā templates/ # PRP, BMAD, Spec-Kit templates
|
|
124
|
+
ā āāā mcp/ # MCP configurations
|
|
125
|
+
ā āāā memory/ # Framework memory/constitution
|
|
126
|
+
āāā .framework/ # Deployment directory
|
|
127
|
+
ā āāā agents/ # Deployed agent files for your tool
|
|
122
128
|
āāā .env.template # Environment variables template
|
|
129
|
+
āāā .[tool]rules # Tool-specific config (e.g., .windsurfrules)
|
|
123
130
|
āāā [your existing files] # Completely untouched!
|
|
124
131
|
```
|
|
125
132
|
|
|
126
133
|
**Important:** Your `package.json` and existing project files remain completely untouched.
|
|
127
134
|
|
|
135
|
+
### context.json Structure
|
|
136
|
+
|
|
137
|
+
The `.adf/context.json` file contains your workflow configuration:
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"version": "0.1.6",
|
|
142
|
+
"workflow": "rapid",
|
|
143
|
+
"projectType": "existing",
|
|
144
|
+
"documentationUrls": [
|
|
145
|
+
"https://api.example.com/docs"
|
|
146
|
+
],
|
|
147
|
+
"documentationFiles": [
|
|
148
|
+
"./docs/",
|
|
149
|
+
"./README.md"
|
|
150
|
+
],
|
|
151
|
+
"createdAt": "2025-10-02T...",
|
|
152
|
+
"agents": ["dev", "qa"],
|
|
153
|
+
"templates": {
|
|
154
|
+
"prp": ["prp_story.md", "prp_task.md"],
|
|
155
|
+
"bmad": false,
|
|
156
|
+
"specKit": false
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
128
161
|
## Workflow Levels
|
|
129
162
|
|
|
130
163
|
### Level 1: Rapid Development (PRP)
|
|
@@ -211,7 +244,13 @@ When we release updates to the framework:
|
|
|
211
244
|
|
|
212
245
|
## Version History
|
|
213
246
|
|
|
214
|
-
|
|
247
|
+
See [CHANGELOG.md](./CHANGELOG.md) for detailed version history.
|
|
248
|
+
|
|
249
|
+
**Latest:** v0.1.6
|
|
250
|
+
- Fixed step numbering in init success message
|
|
251
|
+
- Added local documentation files collection
|
|
252
|
+
- Dynamic version tracking in context.json
|
|
253
|
+
- Improved error handling
|
|
215
254
|
|
|
216
255
|
## Troubleshooting
|
|
217
256
|
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
testEnvironment: 'node',
|
|
3
|
+
testMatch: ['**/tests/**/*.test.js'],
|
|
4
|
+
collectCoverageFrom: [
|
|
5
|
+
'lib/frameworks/answer-quality-analyzer.js',
|
|
6
|
+
'lib/frameworks/progress-tracker.js',
|
|
7
|
+
'lib/frameworks/session-manager.js',
|
|
8
|
+
'!lib/**/*.test.js',
|
|
9
|
+
'!**/node_modules/**'
|
|
10
|
+
],
|
|
11
|
+
coverageThreshold: {
|
|
12
|
+
global: {
|
|
13
|
+
branches: 60,
|
|
14
|
+
functions: 70,
|
|
15
|
+
lines: 70,
|
|
16
|
+
statements: 70
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
testTimeout: 10000
|
|
20
|
+
};
|
package/lib/commands/init.js
CHANGED
|
@@ -5,18 +5,33 @@ const chalk = require('chalk');
|
|
|
5
5
|
const ora = require('ora');
|
|
6
6
|
const {
|
|
7
7
|
detectProjectType,
|
|
8
|
-
getWorkflowRecommendation
|
|
9
|
-
generateContextFile
|
|
8
|
+
getWorkflowRecommendation
|
|
10
9
|
} = require('../utils/project-detector');
|
|
11
|
-
const
|
|
10
|
+
const Interviewer = require('../frameworks/interviewer');
|
|
11
|
+
const SessionManager = require('../frameworks/session-manager');
|
|
12
12
|
const { deployToTool } = require('./deploy');
|
|
13
13
|
|
|
14
14
|
async function init(options) {
|
|
15
|
-
console.log(chalk.cyan.bold('\nš AgentDevFramework
|
|
15
|
+
console.log(chalk.cyan.bold('\nš AgentDevFramework - Software Development Requirements\n'));
|
|
16
16
|
|
|
17
17
|
const cwd = process.cwd();
|
|
18
18
|
const adfDir = path.join(cwd, '.adf');
|
|
19
19
|
|
|
20
|
+
// Check for resumable sessions FIRST (before asking to overwrite)
|
|
21
|
+
const sessionManager = new SessionManager(cwd);
|
|
22
|
+
const existingSession = await sessionManager.promptToResume();
|
|
23
|
+
|
|
24
|
+
if (existingSession) {
|
|
25
|
+
// Resume existing session
|
|
26
|
+
const interviewer = new Interviewer(existingSession.progress.framework || 'balanced', cwd, existingSession);
|
|
27
|
+
const sessionPath = await interviewer.start();
|
|
28
|
+
|
|
29
|
+
console.log(chalk.green.bold('\n⨠Requirements gathering complete!\n'));
|
|
30
|
+
console.log(chalk.cyan(`š Session saved to: ${sessionPath}\n`));
|
|
31
|
+
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
20
35
|
// Check if already initialized
|
|
21
36
|
if (await fs.pathExists(adfDir)) {
|
|
22
37
|
const { overwrite } = await inquirer.prompt([
|
|
@@ -41,132 +56,59 @@ async function init(options) {
|
|
|
41
56
|
const projectType = await detectProjectType(cwd);
|
|
42
57
|
spinner.succeed(`Project type: ${chalk.green(projectType.type)}`);
|
|
43
58
|
|
|
44
|
-
// Determine workflow
|
|
59
|
+
// Determine workflow/framework
|
|
45
60
|
let workflow;
|
|
46
61
|
|
|
47
62
|
if (options.rapid) {
|
|
48
63
|
workflow = 'rapid';
|
|
49
|
-
console.log(chalk.blue('
|
|
64
|
+
console.log(chalk.blue('\nUsing: PRP Framework (Rapid Development) - from --rapid flag'));
|
|
50
65
|
} else if (options.balanced) {
|
|
51
66
|
workflow = 'balanced';
|
|
52
|
-
console.log(chalk.blue('
|
|
67
|
+
console.log(chalk.blue('\nUsing: PRP + Spec-Kit (Balanced) - from --balanced flag'));
|
|
53
68
|
} else if (options.comprehensive) {
|
|
54
69
|
workflow = 'comprehensive';
|
|
55
|
-
console.log(chalk.blue('
|
|
70
|
+
console.log(chalk.blue('\nUsing: BMAD Framework (Comprehensive) - from --comprehensive flag'));
|
|
56
71
|
} else {
|
|
57
72
|
// Interactive workflow selection
|
|
58
73
|
workflow = await getWorkflowRecommendation(projectType);
|
|
59
74
|
}
|
|
60
75
|
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
type: 'confirm',
|
|
65
|
-
name: 'hasDocs',
|
|
66
|
-
message: 'Do you have documentation URLs to include?',
|
|
67
|
-
default: false
|
|
68
|
-
}
|
|
69
|
-
]);
|
|
76
|
+
// Create .adf directory
|
|
77
|
+
await fs.ensureDir(adfDir);
|
|
70
78
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const { urls } = await inquirer.prompt([
|
|
74
|
-
{
|
|
75
|
-
type: 'input',
|
|
76
|
-
name: 'urls',
|
|
77
|
-
message: 'Enter documentation URLs (comma-separated):',
|
|
78
|
-
filter: (input) => input.split(',').map(url => url.trim()).filter(Boolean)
|
|
79
|
-
}
|
|
80
|
-
]);
|
|
81
|
-
documentationUrls = urls;
|
|
82
|
-
}
|
|
79
|
+
// Start AI-guided interview
|
|
80
|
+
console.log(chalk.gray('\n' + 'ā'.repeat(60)) + '\n');
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
{
|
|
87
|
-
type: 'confirm',
|
|
88
|
-
name: 'hasLocalDocs',
|
|
89
|
-
message: 'Do you have local documentation files to include? (use "." as the project root folder & add like so "./docs/")',
|
|
90
|
-
default: false
|
|
91
|
-
}
|
|
92
|
-
]);
|
|
82
|
+
const interviewer = new Interviewer(workflow, cwd);
|
|
83
|
+
const sessionPath = await interviewer.start();
|
|
93
84
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
name: 'files',
|
|
100
|
-
message: 'Enter local documentation paths (comma-separated, e.g., ./docs/, ./README.md):',
|
|
101
|
-
filter: (input) => input.split(',').map(file => file.trim()).filter(Boolean)
|
|
102
|
-
}
|
|
103
|
-
]);
|
|
104
|
-
documentationFiles = files;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Copy framework templates
|
|
108
|
-
const copySpinner = ora('Copying framework files...').start();
|
|
109
|
-
await copyTemplates(cwd);
|
|
110
|
-
copySpinner.succeed('Framework files copied to .adf/');
|
|
111
|
-
|
|
112
|
-
// Generate context file
|
|
113
|
-
const context = generateContextFile({
|
|
114
|
-
workflow,
|
|
115
|
-
projectType: projectType.type,
|
|
116
|
-
documentationUrls,
|
|
117
|
-
documentationFiles,
|
|
118
|
-
timestamp: new Date().toISOString()
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
await fs.writeJson(path.join(adfDir, 'context.json'), context, { spaces: 2 });
|
|
122
|
-
console.log(chalk.green('ā Created .adf/context.json'));
|
|
123
|
-
|
|
124
|
-
// Copy .env.template to project root
|
|
125
|
-
const envTemplateSrc = path.join(__dirname, '../templates/.env.template');
|
|
126
|
-
const envTemplateDest = path.join(cwd, '.env.template');
|
|
127
|
-
|
|
128
|
-
if (await fs.pathExists(envTemplateSrc)) {
|
|
129
|
-
await fs.copy(envTemplateSrc, envTemplateDest);
|
|
130
|
-
console.log(chalk.green('ā Created .env.template'));
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Deploy to tool if specified
|
|
134
|
-
let deployNow = false;
|
|
85
|
+
// Show next steps
|
|
86
|
+
console.log(chalk.cyan('š Next Steps:\n'));
|
|
87
|
+
console.log(chalk.gray(` 1. Review your requirements: ${sessionPath}/outputs/`));
|
|
88
|
+
console.log(chalk.gray(` 2. Share the output files with your AI coding assistant`));
|
|
89
|
+
console.log(chalk.gray(` 3. Start building based on the detailed requirements\n`));
|
|
135
90
|
|
|
91
|
+
// Optional: Deploy to tool
|
|
136
92
|
if (options.tool) {
|
|
137
93
|
console.log('');
|
|
138
94
|
await deployToTool(options.tool, { silent: false });
|
|
139
|
-
deployNow = true;
|
|
140
95
|
} else {
|
|
141
|
-
|
|
142
|
-
const response = await inquirer.prompt([
|
|
96
|
+
const { deployNow } = await inquirer.prompt([
|
|
143
97
|
{
|
|
144
98
|
type: 'confirm',
|
|
145
99
|
name: 'deployNow',
|
|
146
|
-
message: 'Deploy to a development tool
|
|
147
|
-
default:
|
|
100
|
+
message: 'Deploy framework to a development tool?',
|
|
101
|
+
default: false
|
|
148
102
|
}
|
|
149
103
|
]);
|
|
150
104
|
|
|
151
|
-
deployNow = response.deployNow;
|
|
152
|
-
|
|
153
105
|
if (deployNow) {
|
|
154
106
|
const { tool } = await inquirer.prompt([
|
|
155
107
|
{
|
|
156
108
|
type: 'list',
|
|
157
109
|
name: 'tool',
|
|
158
|
-
message: 'Select
|
|
159
|
-
choices: [
|
|
160
|
-
'windsurf',
|
|
161
|
-
'cursor',
|
|
162
|
-
'vscode',
|
|
163
|
-
'vscode-insider',
|
|
164
|
-
'kiro',
|
|
165
|
-
'trae',
|
|
166
|
-
'claude-code',
|
|
167
|
-
'gemini-cli',
|
|
168
|
-
'codex-cli'
|
|
169
|
-
]
|
|
110
|
+
message: 'Select tool:',
|
|
111
|
+
choices: ['windsurf', 'cursor', 'vscode', 'claude-code', 'gemini-cli']
|
|
170
112
|
}
|
|
171
113
|
]);
|
|
172
114
|
|
|
@@ -175,19 +117,7 @@ async function init(options) {
|
|
|
175
117
|
}
|
|
176
118
|
}
|
|
177
119
|
|
|
178
|
-
|
|
179
|
-
console.log(chalk.green.bold('\n⨠Initialization complete!\n'));
|
|
180
|
-
|
|
181
|
-
console.log(chalk.cyan('Next steps:'));
|
|
182
|
-
console.log(chalk.gray(' 1. Review .adf/context.json'));
|
|
183
|
-
console.log(chalk.gray(' 2. Copy .env.template to .env and configure'));
|
|
184
|
-
if (!deployNow) {
|
|
185
|
-
console.log(chalk.gray(' 3. Run "adf deploy <tool>" to deploy to your editor'));
|
|
186
|
-
}
|
|
187
|
-
console.log(chalk.gray(' 4. Check documentation: .adf/shared/templates/\n'));
|
|
188
|
-
|
|
189
|
-
console.log(chalk.blue(`Workflow: ${workflow === 'rapid' ? 'Level 1 (Rapid)' : workflow === 'balanced' ? 'Level 2 (Balanced)' : 'Level 3 (Comprehensive)'}`));
|
|
190
|
-
console.log(chalk.gray('Run "adf deploy --list" to see available tools\n'));
|
|
120
|
+
console.log(chalk.green.bold('\nā
All done! Happy coding! š\n'));
|
|
191
121
|
}
|
|
192
122
|
|
|
193
123
|
module.exports = init;
|