@iservu-inc/adf-cli 0.1.6 → 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 +115 -0
- package/jest.config.js +20 -0
- 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/package.json +10 -5
- 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
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
# ADF CLI - Quality-Based Progress Tracking & Resume Capability
|
|
2
|
+
|
|
3
|
+
**Date:** 2025-10-03
|
|
4
|
+
**Status:** In Progress
|
|
5
|
+
**Current Phase:** Option A - Core System Implementation
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Project Overview
|
|
10
|
+
|
|
11
|
+
Building **@iservu-inc/adf-cli** - An AI-driven conversational requirements gathering CLI tool for software development projects.
|
|
12
|
+
|
|
13
|
+
### Core Purpose
|
|
14
|
+
|
|
15
|
+
Transform complex framework methodologies (PRP, BMAD, Spec-Kit, Context Engineering) into an intelligent interview system that:
|
|
16
|
+
- Asks 4 initial discovery questions
|
|
17
|
+
- Conducts AI-driven deep dive conversations
|
|
18
|
+
- Measures **quality of information** rather than quantity of answers
|
|
19
|
+
- Never loses user data (triple-redundant saves)
|
|
20
|
+
- Supports resume capability for long interviews
|
|
21
|
+
- Generates framework-specific outputs for AI agents
|
|
22
|
+
- Integrates with IDE tools (Windsurf, Cursor, VS Code)
|
|
23
|
+
|
|
24
|
+
### Three Framework Workflows
|
|
25
|
+
|
|
26
|
+
1. **RAPID (PRP)**: Product Requirement Prompt - 5-15 min, 20 questions
|
|
27
|
+
2. **BALANCED (PRP + Spec-Kit)**: Hybrid approach - 30-60 min, 50 questions
|
|
28
|
+
3. **COMPREHENSIVE (BMAD)**: Full BMAD Framework - 1-2+ hours, 100+ questions
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## User's Core Requirements
|
|
33
|
+
|
|
34
|
+
### Critical Imperatives (Direct Quotes)
|
|
35
|
+
|
|
36
|
+
> "Use your exceptional and powerful experience to integrate the best approach possible that will deliver a flawless user experience without errors or failing, and provide the user experience flexibility to ensure all of the users' effort doesn't ever go to waste because we failed to save his/her replies properly (imperative importance)."
|
|
37
|
+
|
|
38
|
+
> "Don't focus so much on the specific number of questions but rather in the quality of the gathered information through user responses. A user might answer 3 questions so deeply and thoroughly that it generates equivalent information details to 20 questions answered by another user, so use the quality of answers as a gauge of progress rather than a set number of question that need to be answered."
|
|
39
|
+
|
|
40
|
+
> "The tool integration is a critical component of this framework becoming a successful aid in project planning and development."
|
|
41
|
+
|
|
42
|
+
### Key Paradigm Shifts
|
|
43
|
+
|
|
44
|
+
1. **Quality over Quantity**: 3 thorough answers = 20 shallow answers
|
|
45
|
+
2. **Information Richness**: Progress measured by depth, not count
|
|
46
|
+
3. **Never Lose Data**: Triple-redundant saves with emergency fallbacks
|
|
47
|
+
4. **Resume Anywhere**: Save/quit/resume exactly where user left off
|
|
48
|
+
5. **Tool Integration**: Custom agents, rules, workflows for each IDE
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Implementation Plan
|
|
53
|
+
|
|
54
|
+
### Option A: Core System (Current Phase)
|
|
55
|
+
|
|
56
|
+
- [x] Build progress tracker with quality-based metrics
|
|
57
|
+
- [x] Implement triple-redundant auto-save with fail-safes
|
|
58
|
+
- [x] Create answer quality analyzer
|
|
59
|
+
- [x] Integrate quality analyzer into interviewer
|
|
60
|
+
- [ ] **IN PROGRESS**: Integrate resume capability in init
|
|
61
|
+
- [ ] Test with edge cases and failures
|
|
62
|
+
|
|
63
|
+
### Option B: Tool Integrations (Next Phase)
|
|
64
|
+
|
|
65
|
+
- [ ] Research Windsurf customization (.windsurfrules, workflows, memories, slash commands, Flow)
|
|
66
|
+
- [ ] Research Cursor customization (.cursor/rules, custom modes, MCP, hooks, notepads)
|
|
67
|
+
- [ ] Research VS Code customization (.github/copilot-instructions.md, chat modes, .claude/commands)
|
|
68
|
+
- [ ] Build tool-specific generators from framework outputs
|
|
69
|
+
- [ ] Enhance deploy command for each tool
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Technical Architecture
|
|
74
|
+
|
|
75
|
+
### File Structure
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
lib/
|
|
79
|
+
├── commands/
|
|
80
|
+
│ └── init.js # Entry point with resume capability
|
|
81
|
+
├── frameworks/
|
|
82
|
+
│ ├── interviewer.js # AI-driven conversational interview engine
|
|
83
|
+
│ ├── progress-tracker.js # Quality-based progress with triple saves
|
|
84
|
+
│ ├── answer-quality-analyzer.js # Quality scoring system
|
|
85
|
+
│ ├── session-manager.js # Resume/list/delete sessions
|
|
86
|
+
│ ├── questions.js # Question database for all frameworks
|
|
87
|
+
│ └── output-generators.js # Transform Q&A into framework docs
|
|
88
|
+
└── utils/
|
|
89
|
+
└── project-detector.js # Detect project type
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Data Persistence Strategy
|
|
93
|
+
|
|
94
|
+
**Triple-Redundant Saves:**
|
|
95
|
+
1. Main progress file: `_progress.json`
|
|
96
|
+
2. Backup file: `_progress.backup.json`
|
|
97
|
+
3. Append-only log: `_progress-log.md`
|
|
98
|
+
4. Emergency fallback: `_emergency-{timestamp}.json` (if all else fails)
|
|
99
|
+
|
|
100
|
+
**Auto-save triggers:**
|
|
101
|
+
- After every answer
|
|
102
|
+
- After block completion/skip
|
|
103
|
+
- On user quit
|
|
104
|
+
- On any major state change
|
|
105
|
+
|
|
106
|
+
### Quality Scoring System
|
|
107
|
+
|
|
108
|
+
**Metrics (0-100):**
|
|
109
|
+
- Word count: up to 30 points (50+ words = max)
|
|
110
|
+
- Keyword presence: up to 20 points
|
|
111
|
+
- Required elements: up to 25 points (platform, tech, user interaction, etc.)
|
|
112
|
+
- Detail level: up to 15 points (bullets, examples, multiple sentences)
|
|
113
|
+
- Technical depth: up to 10 points (tech stack, versions, tools)
|
|
114
|
+
|
|
115
|
+
**Thresholds:**
|
|
116
|
+
- `qualityScore >= 70`: Comprehensive answer
|
|
117
|
+
- `qualityScore >= 85`: Can skip follow-up questions
|
|
118
|
+
|
|
119
|
+
**Information Richness:**
|
|
120
|
+
```javascript
|
|
121
|
+
informationRichness = (completionFactor * 0.4) + (qualityFactor * 0.6) * 100
|
|
122
|
+
```
|
|
123
|
+
Weighted toward quality (60%) over completion (40%)
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Current Work Session
|
|
128
|
+
|
|
129
|
+
### Last Completed
|
|
130
|
+
|
|
131
|
+
1. **progress-tracker.js**:
|
|
132
|
+
- Added quality metrics (informationRichness, averageAnswerQuality, comprehensiveAnswers)
|
|
133
|
+
- Implemented `saveWithBackup()` with triple saves + emergency fallback
|
|
134
|
+
- Updated `displayProgress()` to show richness instead of just counts
|
|
135
|
+
- Added framework parameter to constructor
|
|
136
|
+
|
|
137
|
+
2. **answer-quality-analyzer.js**:
|
|
138
|
+
- Built complete quality scoring system
|
|
139
|
+
- Detects platform, technology, user interaction, problems, metrics, file paths, data structures, API endpoints
|
|
140
|
+
- Provides feedback messages based on quality
|
|
141
|
+
|
|
142
|
+
3. **interviewer.js**:
|
|
143
|
+
- Integrated AnswerQualityAnalyzer
|
|
144
|
+
- Calls quality analysis after each answer
|
|
145
|
+
- Shows quality feedback to user
|
|
146
|
+
- Tracks answers with quality metrics via progressTracker
|
|
147
|
+
- Skips follow-ups if quality score >= 85
|
|
148
|
+
- Initialized progress tracker in start() method
|
|
149
|
+
- Track block start/complete/skip
|
|
150
|
+
- Re-analyze combined answers after follow-ups
|
|
151
|
+
|
|
152
|
+
### Currently Working On
|
|
153
|
+
|
|
154
|
+
**File:** `init.js`
|
|
155
|
+
**Task:** Integrate resume capability
|
|
156
|
+
|
|
157
|
+
**What I just did:**
|
|
158
|
+
- Imported SessionManager
|
|
159
|
+
- Added session resume check at the start of init()
|
|
160
|
+
- If resumable session exists, prompt user to resume or start new
|
|
161
|
+
- If resuming, pass existingSession to Interviewer constructor
|
|
162
|
+
- Updated ProgressTracker to accept and store framework parameter
|
|
163
|
+
|
|
164
|
+
**Next Steps:**
|
|
165
|
+
1. Update interviewer.js to pass framework to ProgressTracker constructor
|
|
166
|
+
2. Test complete flow: start → quit → resume
|
|
167
|
+
3. Test quality-based progress display
|
|
168
|
+
4. Test emergency save recovery
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Tool Integration Specifications
|
|
173
|
+
|
|
174
|
+
### Windsurf Customizations
|
|
175
|
+
|
|
176
|
+
**Files to generate:**
|
|
177
|
+
- `.windsurfrules` - Custom rules and workflows
|
|
178
|
+
- `.windsurfrules/memories/` - AI memories
|
|
179
|
+
- `.windsurfrules/slash-commands/` - Custom commands
|
|
180
|
+
- Cascade workflows
|
|
181
|
+
- Flow system integration
|
|
182
|
+
|
|
183
|
+
### Cursor Customizations
|
|
184
|
+
|
|
185
|
+
**Files to generate:**
|
|
186
|
+
- `.cursorrules` or `.cursor/rules` - Custom rules
|
|
187
|
+
- `.cursor/commands/` - Custom commands
|
|
188
|
+
- `.cursor/modes/` - Custom chat modes
|
|
189
|
+
- MCP (Model Context Protocol) integration
|
|
190
|
+
- Hooks for various events
|
|
191
|
+
- Notepads for persistent context
|
|
192
|
+
|
|
193
|
+
### VS Code Customizations
|
|
194
|
+
|
|
195
|
+
**Files to generate:**
|
|
196
|
+
- `.github/copilot-instructions.md` - GitHub Copilot instructions
|
|
197
|
+
- Custom chat modes for Copilot
|
|
198
|
+
- `.claude/commands/` - Claude commands
|
|
199
|
+
- Language Model Tools API integration
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Question Categories & Phases
|
|
204
|
+
|
|
205
|
+
### PRP Framework (20 questions, 5 phases)
|
|
206
|
+
|
|
207
|
+
1. **Goal Definition** (4 questions)
|
|
208
|
+
- What feature/product are you building?
|
|
209
|
+
- Who are the users?
|
|
210
|
+
- What problem does it solve?
|
|
211
|
+
- What does success look like?
|
|
212
|
+
|
|
213
|
+
2. **Business Justification** (3 questions)
|
|
214
|
+
- Why build this now?
|
|
215
|
+
- What's the business value?
|
|
216
|
+
- What are the risks of not building?
|
|
217
|
+
|
|
218
|
+
3. **Contextual Intelligence** (5 questions)
|
|
219
|
+
- Technology stack?
|
|
220
|
+
- Platform (web/mobile/desktop)?
|
|
221
|
+
- User interaction patterns?
|
|
222
|
+
- Data requirements?
|
|
223
|
+
- Integration points?
|
|
224
|
+
|
|
225
|
+
4. **Implementation Blueprint** (5 questions)
|
|
226
|
+
- File structure?
|
|
227
|
+
- Core components?
|
|
228
|
+
- Data flow?
|
|
229
|
+
- API endpoints?
|
|
230
|
+
- Edge cases?
|
|
231
|
+
|
|
232
|
+
5. **Validation** (3 questions)
|
|
233
|
+
- Success criteria?
|
|
234
|
+
- Testing approach?
|
|
235
|
+
- Metrics to track?
|
|
236
|
+
|
|
237
|
+
### Balanced Framework (50 questions)
|
|
238
|
+
|
|
239
|
+
All PRP questions PLUS:
|
|
240
|
+
|
|
241
|
+
6. **Constitution** (6 questions)
|
|
242
|
+
- Project principles
|
|
243
|
+
- Constraints
|
|
244
|
+
- Non-negotiables
|
|
245
|
+
|
|
246
|
+
7. **Detailed Specification** (10 questions)
|
|
247
|
+
- Detailed user flows
|
|
248
|
+
- Edge cases
|
|
249
|
+
- Error handling
|
|
250
|
+
|
|
251
|
+
8. **Technical Planning** (8 questions)
|
|
252
|
+
- Architecture decisions
|
|
253
|
+
- Performance considerations
|
|
254
|
+
- Security requirements
|
|
255
|
+
|
|
256
|
+
9. **Task Breakdown** (7 questions)
|
|
257
|
+
- Implementation phases
|
|
258
|
+
- Dependencies
|
|
259
|
+
- Timeline estimates
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Progress Tracking Examples
|
|
264
|
+
|
|
265
|
+
### Old Approach (Question Count)
|
|
266
|
+
```
|
|
267
|
+
Progress: 3/20 questions answered (15%)
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### New Approach (Information Richness)
|
|
271
|
+
```
|
|
272
|
+
📊 Information Richness: ✨ 75% | Avg Quality: 82%
|
|
273
|
+
Blocks: 2/5 (40%) | Questions: 3 | Words: 450
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**Why this matters:** User gave 3 comprehensive answers worth more than 10 shallow answers.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Error Recovery & Edge Cases
|
|
281
|
+
|
|
282
|
+
### Scenarios to Handle
|
|
283
|
+
|
|
284
|
+
1. **Application crash mid-answer**: Emergency save with timestamped file
|
|
285
|
+
2. **Corrupted main progress file**: Load from backup
|
|
286
|
+
3. **User force-quits**: Next run detects incomplete session, offers resume
|
|
287
|
+
4. **Network/disk issues during save**: Try backup, then emergency file
|
|
288
|
+
5. **User edits progress file manually**: Validate on load, warn if corrupted
|
|
289
|
+
|
|
290
|
+
### Testing Checklist
|
|
291
|
+
|
|
292
|
+
- [ ] Start interview → answer 3 questions → quit → resume → verify state
|
|
293
|
+
- [ ] Force crash during answer → restart → verify recovery
|
|
294
|
+
- [ ] Delete main progress file → verify backup loads
|
|
295
|
+
- [ ] Answer with high quality (>85) → verify follow-up skipped
|
|
296
|
+
- [ ] Answer with low quality (<50) → verify follow-up triggered
|
|
297
|
+
- [ ] Complete full interview → verify all outputs generated
|
|
298
|
+
- [ ] Multiple parallel sessions → verify isolation
|
|
299
|
+
- [ ] Resume wrong session → verify correct context loaded
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Known Issues & Fixes
|
|
304
|
+
|
|
305
|
+
### v0.1.3 - v0.1.6
|
|
306
|
+
|
|
307
|
+
1. **deployNow scope issue**: Variable declared in if-else block, referenced outside
|
|
308
|
+
- **Fix**: Declared in outer scope
|
|
309
|
+
|
|
310
|
+
2. **Hardcoded version**: context.json showed "0.1.01" instead of package version
|
|
311
|
+
- **Fix**: Import package.json, use `packageJson.version`
|
|
312
|
+
|
|
313
|
+
3. **Step numbering jump**: Showed 1, 2, 4 (missing 3)
|
|
314
|
+
- **Fix**: Conditional rendering based on deployment
|
|
315
|
+
|
|
316
|
+
4. **Fundamental misunderstanding**: Built template copier instead of interview system
|
|
317
|
+
- **Fix**: Complete architectural redesign
|
|
318
|
+
|
|
319
|
+
5. **Wrong framework understanding**: Generic requirements vs framework executor
|
|
320
|
+
- **Fix**: Studied actual framework repos, rebuilt question sets
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Next Session TODO
|
|
325
|
+
|
|
326
|
+
1. **Complete Option A**:
|
|
327
|
+
- Finish resume capability integration
|
|
328
|
+
- Update interviewer.js to pass framework to ProgressTracker
|
|
329
|
+
- Test complete flow with all edge cases
|
|
330
|
+
- Verify emergency recovery works
|
|
331
|
+
|
|
332
|
+
2. **Start Option B**:
|
|
333
|
+
- Deep dive into Windsurf customization docs
|
|
334
|
+
- Deep dive into Cursor customization docs
|
|
335
|
+
- Deep dive into VS Code/Copilot customization docs
|
|
336
|
+
- Design tool-specific output generators
|
|
337
|
+
- Update deploy command to handle new outputs
|
|
338
|
+
|
|
339
|
+
3. **Documentation**:
|
|
340
|
+
- Write user guide for resume capability
|
|
341
|
+
- Document quality scoring system
|
|
342
|
+
- Create troubleshooting guide for data recovery
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Git Commit History (Recent)
|
|
347
|
+
|
|
348
|
+
- Added answer quality analyzer
|
|
349
|
+
- Enhanced progress tracker with quality metrics
|
|
350
|
+
- Integrated quality analyzer into interviewer
|
|
351
|
+
- Added triple-redundant saves with emergency fallback
|
|
352
|
+
- Integrated session manager for resume capability
|
|
353
|
+
- Updated init.js to prompt for resume
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## User Feedback Highlights
|
|
358
|
+
|
|
359
|
+
### What User Loves
|
|
360
|
+
- Quality-over-quantity approach
|
|
361
|
+
- Never losing data
|
|
362
|
+
- Flexibility to save/resume
|
|
363
|
+
- Framework-specific outputs
|
|
364
|
+
- Tool integration vision
|
|
365
|
+
|
|
366
|
+
### What User Emphasized
|
|
367
|
+
- **Imperative**: Never lose user data
|
|
368
|
+
- **Critical**: Tool integration is make-or-break
|
|
369
|
+
- **Key**: Quality of answers matters more than count
|
|
370
|
+
- **Important**: Flawless user experience, no errors
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## References
|
|
375
|
+
|
|
376
|
+
### Framework Repositories
|
|
377
|
+
- [PRP Framework](https://github.com/wirasm/prp-framework)
|
|
378
|
+
- [BMAD Framework](https://github.com/example/bmad)
|
|
379
|
+
- [Spec-Kit](https://github.com/example/spec-kit)
|
|
380
|
+
- [Context Engineering](https://github.com/example/context-engineering)
|
|
381
|
+
|
|
382
|
+
### Tool Documentation
|
|
383
|
+
- Windsurf: Custom rules, workflows, Flow system
|
|
384
|
+
- Cursor: .cursorrules, MCP, custom modes
|
|
385
|
+
- VS Code: Copilot instructions, chat modes, Language Model API
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## Session Metadata
|
|
390
|
+
|
|
391
|
+
**Project Path:** `D:\Documents\GitHub\adf-cli`
|
|
392
|
+
**Package Name:** `@iservu-inc/adf-cli`
|
|
393
|
+
**Current Version:** 0.1.6
|
|
394
|
+
**Node Version:** (from package.json)
|
|
395
|
+
**Platform:** win32
|
|
396
|
+
|
|
397
|
+
**Chat Started:** 2025-10-03
|
|
398
|
+
**Last Updated:** 2025-10-03
|
|
399
|
+
**Estimated Completion:** Option A: 1-2 hours | Option B: 4-6 hours
|