@iservu-inc/adf-cli 0.3.0 → 0.4.12

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.
Files changed (36) hide show
  1. package/.project/chats/{current → complete}/2025-10-03_AGENTS-MD-AND-TOOL-GENERATORS.md +82 -17
  2. package/.project/chats/complete/2025-10-03_AI-PROVIDER-INTEGRATION.md +568 -0
  3. package/.project/chats/complete/2025-10-03_FRAMEWORK-UPDATE-SYSTEM.md +497 -0
  4. package/.project/chats/complete/2025-10-04_CONFIG-COMMAND.md +503 -0
  5. package/.project/chats/current/2025-10-04_PHASE-4-1-SMART-FILTERING.md +381 -0
  6. package/.project/chats/current/SESSION-STATUS.md +168 -0
  7. package/.project/docs/AI-PROVIDER-INTEGRATION.md +600 -0
  8. package/.project/docs/FRAMEWORK-UPDATE-INTEGRATION.md +421 -0
  9. package/.project/docs/FRAMEWORK-UPDATE-SYSTEM.md +832 -0
  10. package/.project/docs/PHASE-4-2-LEARNING-SYSTEM.md +881 -0
  11. package/.project/docs/PROJECT-STRUCTURE-EXPLANATION.md +500 -0
  12. package/.project/docs/SMART-FILTERING-SYSTEM.md +385 -0
  13. package/.project/docs/architecture/SYSTEM-DESIGN.md +122 -1
  14. package/.project/docs/goals/PROJECT-VISION.md +61 -34
  15. package/CHANGELOG.md +257 -1
  16. package/README.md +476 -292
  17. package/bin/adf.js +7 -0
  18. package/lib/ai/ai-client.js +328 -0
  19. package/lib/ai/ai-config.js +398 -0
  20. package/lib/analyzers/project-analyzer.js +380 -0
  21. package/lib/commands/config.js +221 -0
  22. package/lib/commands/init.js +56 -10
  23. package/lib/filters/question-filter.js +480 -0
  24. package/lib/frameworks/interviewer.js +271 -12
  25. package/lib/frameworks/progress-tracker.js +8 -1
  26. package/lib/learning/learning-manager.js +447 -0
  27. package/lib/learning/pattern-detector.js +376 -0
  28. package/lib/learning/rule-generator.js +304 -0
  29. package/lib/learning/skip-tracker.js +260 -0
  30. package/lib/learning/storage.js +296 -0
  31. package/package.json +70 -57
  32. package/tests/learning-storage.test.js +184 -0
  33. package/tests/pattern-detector.test.js +297 -0
  34. package/tests/project-analyzer.test.js +221 -0
  35. package/tests/question-filter.test.js +297 -0
  36. package/tests/skip-tracker.test.js +198 -0
package/CHANGELOG.md CHANGED
@@ -5,7 +5,263 @@ All notable changes to `@iservu-inc/adf-cli` will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.4.12] - 2025-10-04
9
+
10
+ ### 🧠 Learning System (Phase 4.2)
11
+
12
+ **Intelligent Behavior Learning:**
13
+ - Automatically tracks skip and answer patterns during interviews
14
+ - Learns from your behavior across multiple sessions
15
+ - Generates learned rules from high-confidence patterns (≥75%)
16
+ - Applies learned preferences in future interviews with user approval
17
+ - Privacy-first design with all data stored locally in `.adf/learning/`
18
+
19
+ **Pattern Detection:**
20
+ - **Consistent Skip Patterns** - Questions you repeatedly skip (3+ sessions, 75%+ confidence)
21
+ - **Category Patterns** - Categories you frequently skip (≥80% skip rate)
22
+ - **Framework Patterns** - Framework-specific skip preferences (e.g., routing questions for Next.js)
23
+ - **User Preferences** - Answer style patterns (brief vs detailed answers)
24
+
25
+ **Learning Management CLI:**
26
+ - New **Learning System** option in `adf config` command
27
+ - **View Skip History** - Most skipped questions and categories across all sessions
28
+ - **Review Patterns** - View detected patterns by confidence level (high/medium/low)
29
+ - **Manage Rules** - Enable, disable, or remove individual learned rules
30
+ - **Settings** - Configure learning system behavior:
31
+ - Enable/disable learning system
32
+ - Toggle tracking, pattern detection, and filter application
33
+ - Adjust confidence thresholds (minSessionsForPattern, minConfidenceForAutoFilter)
34
+ - Reset to defaults
35
+ - **Clear Data** - Delete all learning data with confirmation prompt
36
+
37
+ **User Control & Privacy:**
38
+ - Multiple control layers:
39
+ - System-level: Enable/disable entire learning system
40
+ - Feature-level: Toggle tracking, detection, and filtering separately
41
+ - Rule-level: Enable/disable individual learned rules
42
+ - Session-level: Approve learned preferences before each interview
43
+ - Transparent explanations for all patterns and rules
44
+ - Preview of rules before applying them
45
+ - No external data transmission - all data stays local
46
+
47
+ **Technical Implementation:**
48
+ - New `lib/learning/storage.js` - Atomic file writes with data persistence
49
+ - New `lib/learning/skip-tracker.js` - Session-based skip and answer tracking
50
+ - New `lib/learning/pattern-detector.js` - Pattern detection algorithms
51
+ - New `lib/learning/rule-generator.js` - Rule generation and application
52
+ - New `lib/learning/learning-manager.js` - CLI interface for learning management
53
+ - Enhanced `lib/filters/question-filter.js` - Learned rule application
54
+ - Enhanced `lib/frameworks/interviewer.js` - Full learning system integration
55
+ - Enhanced `lib/commands/config.js` - Learning System menu integration
56
+ - Comprehensive test coverage (50 new tests, 120 total tests passing)
57
+
58
+ **Learning Data Structure:**
59
+ - `skip-history.json` - Skip events from all sessions
60
+ - `answer-history.json` - Answer metadata from all sessions
61
+ - `patterns.json` - Detected patterns with confidence scores
62
+ - `learned-rules.json` - Active learned rules
63
+ - `config.json` - Learning system settings
64
+ - `stats.json` - Learning statistics
65
+
66
+ **Interview Integration:**
67
+ - Shows learning status at interview start (e.g., "Learning: 3 learned rules active")
68
+ - Prompts user to apply learned preferences with rule preview
69
+ - Displays learning-based skips in filtering summary
70
+ - Records all skip and answer events with metadata
71
+ - Detects patterns and updates rules after interview completion
72
+ - Shows pattern detection results to user
73
+
74
+ **Impact:**
75
+ - Reduces repetitive manual skipping across sessions
76
+ - Improves interview efficiency based on your actual behavior
77
+ - Learns your preferences without explicit configuration
78
+ - Maintains user control and transparency
79
+ - Zero privacy concerns with local-only storage
80
+
81
+ ### 🎯 Smart Question Filtering (Phase 4.1)
82
+
83
+ **Intelligent Context-Aware Filtering:**
84
+ - Automatically analyzes your project before starting the interview
85
+ - Detects project type (CLI tool, API server, web app, library, fullstack)
86
+ - Identifies frameworks (React, Vue, Angular, Express, NestJS, Django, etc.)
87
+ - Scans package.json, README, and file structure for context
88
+ - Calculates confidence score (0-100%) for analysis accuracy
89
+
90
+ **Smart Filtering Features:**
91
+ - Skips irrelevant questions based on project type
92
+ - CLI tools: Skips UI/UX, responsive design, browser questions
93
+ - API servers: Skips frontend, styling, browser questions
94
+ - Libraries: Skips deployment, hosting, server questions
95
+ - Framework-specific filtering (e.g., React projects skip Angular questions)
96
+ - Question relevance scoring (0-100) for intelligent filtering
97
+ - Time estimation: Shows minutes saved by skipping irrelevant questions
98
+
99
+ **User Control:**
100
+ - User can enable/disable smart filtering (default: enabled if confidence ≥ 50%)
101
+ - Shows project analysis before filtering (type, frameworks, confidence)
102
+ - Displays filtering summary (questions kept/skipped, time saved)
103
+ - Fully optional - gracefully degrades if AI not configured
104
+ - Can still manually skip questions with "skip" keyword
105
+
106
+ **Technical Implementation:**
107
+ - New `lib/analyzers/project-analyzer.js` - Project context analysis
108
+ - New `lib/filters/question-filter.js` - Smart filtering logic
109
+ - Integrated into interviewer workflow with user prompts
110
+ - Comprehensive test coverage (84 tests, all passing)
111
+
112
+ **Impact:**
113
+ - Reduces interview time by 40-60% for specialized projects
114
+ - Better user experience with relevant questions only
115
+ - Maintains answer quality while saving time
116
+ - Transparent filtering with clear explanations
117
+
118
+ ## [0.3.6] - 2025-10-04
119
+
120
+ ### ⚙️ New Configuration Command
121
+
122
+ **New `adf config` command:**
123
+ - Centralized configuration management with category-based menu
124
+ - **AI Provider Setup** as first configuration category
125
+ - Green ✓ status indicators for configured items
126
+ - Yellow ○ indicators for unconfigured items
127
+ - Shows current provider name when already configured
128
+ - Easy reconfiguration - run anytime to switch providers or models
129
+ - Extensible design for future configuration categories
130
+
131
+ **AI Configuration Made Optional:**
132
+ - AI configuration now optional during `adf init`
133
+ - Prompt: "Configure AI provider now? (Enables intelligent follow-up questions)"
134
+ - Can skip and configure later with `adf config`
135
+ - Helpful reminder: "💡 You can configure AI later by running: adf config"
136
+ - Interview works with or without AI (graceful degradation)
137
+
138
+ ### 🎯 UX Improvements
139
+
140
+ **User Experience Enhancements:**
141
+ - Added visible "skip" instruction hint to every question
142
+ - Displays `(Type "skip" to skip remaining questions in this block)` below each question
143
+ - Prevents user frustration by making escape route obvious
144
+ - Users no longer need to guess how to skip questions
145
+
146
+ - Improved deployment messaging for clarity
147
+ - Changed confusing "Next Steps" to clear "Requirements Complete!"
148
+ - New prompt: "Automatically deploy to your IDE? (I'll configure everything for you)"
149
+ - Default changed to Yes to encourage automation
150
+ - Removed misleading manual steps that made deployment seem manual
151
+ - Emphasizes that adf-cli does ALL the work automatically
152
+
153
+ **Impact:**
154
+ - More flexible configuration workflow
155
+ - Better user guidance throughout interview process
156
+ - Clearer expectations about automated deployment
157
+ - Reduced confusion and frustration
158
+
159
+ ## [0.3.5] - 2025-10-04
160
+
161
+ ### 🔧 Enhanced AI Configuration
162
+
163
+ **API Key Persistence (.env):**
164
+ - API keys now saved to `.adf/.env` file (project-local, gitignored)
165
+ - Automatic loading on subsequent runs
166
+ - No need to set environment variables manually
167
+ - Multiple provider keys supported in same file
168
+ - Secure storage with clear warnings
169
+
170
+ **Dynamic Model Fetching:**
171
+ - **OpenAI**: Fetches real models from your account API
172
+ - **OpenRouter**: Fetches 100+ available models dynamically
173
+ - **Anthropic/Google**: Uses curated default models
174
+ - Graceful fallback to defaults if API call fails
175
+
176
+ **Autocomplete Model Selection:**
177
+ - Type to filter models in real-time (e.g., type "gpt-4" to see only GPT-4 models)
178
+ - Arrow keys navigate filtered results
179
+ - Shows 10 models at a time for easy browsing
180
+ - Enter to select highlighted model
181
+
182
+ **New Dependencies:**
183
+ - `inquirer-autocomplete-prompt@2.0.1` - Autocomplete functionality
184
+ - `dotenv@17.2.3` - .env file management
185
+ - `node-fetch@2.7.0` - API calls for model fetching
186
+
187
+ **User Experience:**
188
+ ```
189
+ First time:
190
+ ? Enter your API key: [hidden]
191
+ ✓ API key saved to: .adf/.env
192
+ ⠹ Fetching available models...
193
+ ? Select model (type to filter): |
194
+
195
+ Next time (same project):
196
+ ✓ Detected API keys for: Anthropic Claude
197
+ ✓ Using API key from .env file
198
+ ```
199
+
200
+ ## [0.3.4] - 2025-10-04
201
+
202
+ ### 🤖 Multi-Provider AI Integration
203
+
204
+ **Major Enhancement: 4 AI Provider Support**
205
+
206
+ This is a **paradigm shift** - AI connectivity is now **REQUIRED** before the interview starts, enabling real-time answer analysis and intelligent follow-ups.
207
+
208
+ **Supported Providers:**
209
+ - **Anthropic Claude** (Sonnet 4.5, Claude 3.5, Opus)
210
+ - **OpenAI GPT** (GPT-4-turbo, GPT-4o, GPT-4, GPT-3.5-turbo)
211
+ - **Google Gemini** (2.0-flash-exp, 1.5-pro, 1.5-flash)
212
+ - **OpenRouter** (Multi-model access to 100+ models)
213
+
214
+ **AI-Powered Features:**
215
+
216
+ 1. **Real-Time Answer Quality Analysis**
217
+ - AI evaluates every answer for specificity, completeness, clarity, technical depth
218
+ - Provides 0-100 quality score instantly
219
+ - Shows suggestions for improvement
220
+ - Identifies missing elements
221
+
222
+ 2. **Intelligent Follow-Up Questions**
223
+ - AI generates contextual follow-ups based on answer quality
224
+ - Questions are specific to what's missing, not generic
225
+ - Adapts to user's knowledge level and project context
226
+ - Fallback to heuristic follow-ups if AI unavailable
227
+
228
+ 3. **Provider Configuration Wizard**
229
+ - Interactive provider selection
230
+ - API key validation with format checking
231
+ - Model selection per provider
232
+ - Connection testing before interview starts
233
+ - Secure API key handling (never committed)
234
+
235
+ **New Files:**
236
+ - `lib/ai/ai-config.js` - Provider configuration and setup
237
+ - `lib/ai/ai-client.js` - Unified AI client for all providers
238
+
239
+ **New Dependencies:**
240
+ - `@anthropic-ai/sdk@0.32.0` - Anthropic Claude support
241
+ - `@google/generative-ai@0.21.0` - Google Gemini support
242
+ - `openai@4.73.0` - OpenAI GPT support
243
+
244
+ **Interview Flow Changes:**
245
+ ```
246
+ OLD:
247
+ 1. Detect project type
248
+ 2. Select framework
249
+ 3. Start interview
250
+
251
+ NEW:
252
+ 1. Detect project type
253
+ 2. Select framework
254
+ 3. Configure AI Provider (REQUIRED)
255
+ - Select provider
256
+ - Enter API key
257
+ - Test connection
258
+ 4. Start AI-guided interview with real-time analysis
259
+ ```
260
+
261
+ **Graceful Degradation:**
262
+ - If AI analysis fails, automatically falls back to heuristic scoring
263
+ - Interview never blocked by AI issues
264
+ - Clear error messages with troubleshooting guidance
9
265
 
10
266
  ## [0.3.0] - 2025-10-03
11
267