@iservu-inc/adf-cli 0.12.0 → 0.12.10

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.
@@ -2,17 +2,23 @@
2
2
  "permissions": {
3
3
  "allow": [
4
4
  "Bash(npm test:*)",
5
- "Bash(git commit -m \"$(cat <<''EOF''\ndocs: Update documentation for v0.10.0 release\n\n- Updated CHANGELOG.md with comprehensive v0.10.0 entry\n * Pattern Decay Algorithm documentation\n * Technical implementation details\n * Use cases and examples\n * Test coverage information\n \n- Updated README.md version history\n * Added v0.10.0 as latest release\n * Pattern decay feature highlights\n \n- Updated SESSION-STATUS.md\n * Current version: v0.10.0\n * Latest achievements and test coverage\n * Phase 6 status\n \n- Fixed test export issues in pattern-detector.js\n * Added standalone function exports for testing\n * Fixed applyDecayToStoredPatterns return value\n \n- Fixed decay-manager.js config handling\n * Use default config when decayConfig not initialized\n * Prevents null reference errors in tests\n\nTest Status: 231/239 passing (96.7%)\n- Core decay functionality fully working\n- 8 edge case failures in Date mocking (to fix in v0.10.1)\n\nšŸ¤– Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\nEOF\n)\")",
6
- "Bash(npm publish)",
7
- "mcp__archon__find_projects",
8
- "mcp__archon__find_tasks",
5
+ "Bash(npm publish:*)",
9
6
  "Bash(npm view:*)",
7
+ "Bash(npm config:*)",
10
8
  "Bash(git add:*)",
11
9
  "Bash(git commit:*)",
12
10
  "Bash(git tag:*)",
13
11
  "Bash(git push:*)",
14
- "Bash(npm publish:*)",
15
- "Bash(npm config set:*)"
12
+ "mcp__archon__find_projects",
13
+ "mcp__archon__find_tasks",
14
+ "Bash(adf doctor:*)",
15
+ "Bash(adf --help:*)",
16
+ "Bash(claude doctor)",
17
+ "WebFetch(domain:openrouter.ai)",
18
+ "WebFetch(domain:github.com)",
19
+ "WebFetch(domain:antigravity.google)",
20
+ "WebSearch",
21
+ "Bash(node -c:*)"
16
22
  ],
17
23
  "deny": [],
18
24
  "ask": []
package/CHANGELOG.md CHANGED
@@ -5,6 +5,115 @@ 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
+ ## [0.12.9] - 2025-12-23
9
+
10
+ ### šŸš€ Multi-Tool Expansion & AI Provider Robustness
11
+
12
+ **MAJOR ENHANCEMENTS:** Expanded deployment support to 4 additional CLI tools and significantly improved AI provider reliability with comprehensive model verification and parameter compatibility fixes.
13
+
14
+ #### What's New
15
+
16
+ **New CLI Tool Support:**
17
+ - **OpenCode CLI** - Complete generator with JSON configuration
18
+ - Output: `.opencode.json` with project config, agents, and MCP servers
19
+ - Model selection: Anthropic Claude models based on framework complexity
20
+ - MCP integration: Filesystem server for project access
21
+ - Auto-compacting and debug configuration
22
+
23
+ - **Google Gemini CLI** - Markdown-based project context
24
+ - Output: `GEMINI.md` with structured project information
25
+ - Role-specific agent guidance
26
+ - Build/test/lint command reference
27
+ - Development guidelines and security standards
28
+
29
+ - **DeepAgent (Abacus.ai)** - Agent markdown deployment
30
+ - Output: `.deepagent/agents/*.md` + `.deepagent/README.md`
31
+ - Similar to Claude Code but for DeepAgent CLI
32
+ - Project overview and workflow documentation
33
+ - Per-agent markdown files with role-specific instructions
34
+
35
+ - **Zed Editor Support Verified** - Confirmed full 253-line generator integration
36
+ - MCP server configuration (project_context, archon)
37
+ - AGENTS.md symlink support (`.zed/rules -> ../AGENTS.md`)
38
+ - Agent-specific keymap configuration
39
+ - Model selection based on framework complexity
40
+
41
+ **AI Provider Improvements:**
42
+
43
+ **Model Verification System:**
44
+ - āœ… **Test Before Save** - All models now tested with actual API request before configuration
45
+ - āœ… **Clear Error Messages** - Detailed failure reasons when models don't work
46
+ - āœ… **Retry Option** - Easy retry with different model on failure
47
+ - āœ… **Operational Status** - Distinguishes between "listed" and "operational" models
48
+
49
+ **Google Gemini Fixes:**
50
+ - šŸ”§ Fixed API key validation (`genAI.listModels is not a function` error)
51
+ - šŸ”§ Implemented dynamic model fetching via REST API (`/v1beta/models` endpoint)
52
+ - šŸ”§ Updated validation model from deprecated `gemini-pro` to `gemini-1.5-flash`
53
+ - šŸ”§ Filters models by `generateContent` support capability
54
+
55
+ **Anthropic Model Expansion:**
56
+ - šŸ“Š Expanded from 3 to 11 models with comprehensive coverage
57
+ - šŸ“Š Added Claude 4.5 series (Sonnet, Opus)
58
+ - šŸ“Š Added Claude 3.5 series (Sonnet variants, Haiku)
59
+ - šŸ“Š Added Claude 3 series (Opus, Sonnet, Haiku)
60
+ - šŸ“Š Added Claude 2 series (2.1, 2.0, Instant)
61
+ - šŸ“Š Attempts dynamic fetch from API with fallback to curated list
62
+
63
+ **OpenAI & OpenRouter Parameter Compatibility:**
64
+ - šŸ”§ Fixed parameter compatibility for newer models (GPT-5, o-series)
65
+ - šŸ”§ Updated regex pattern from `/^(o\d|gpt-5)/` to `/^(o1|o3|gpt-5)/i`
66
+ - šŸ”§ Uses `max_completion_tokens` for reasoning models instead of `max_tokens`
67
+ - šŸ”§ Automatic retry with fallback parameters on 400 errors
68
+ - āœ… Confirmed working with `gpt-5.2-chat-latest` and other GPT-5 models
69
+
70
+ **Enhanced Help System:**
71
+ - šŸ“š Comprehensive `--help` documentation for all commands
72
+ - šŸ“š Quick Start section with step-by-step workflow
73
+ - šŸ“š Detailed command breakdowns (init, deploy, config, update)
74
+ - šŸ“š Tool-by-tool deployment guide with output locations
75
+ - šŸ“š Performance mode explanations (Fast/Balanced/Comprehensive)
76
+ - šŸ“š AI provider setup instructions with API key links
77
+ - šŸ“š Configuration categories with feature descriptions
78
+ - šŸ“š Examples for common workflows
79
+
80
+ #### Technical Details
81
+
82
+ **New Files:**
83
+ - `lib/generators/opencode-generator.js` - OpenCode CLI configuration generator (120+ lines)
84
+ - `lib/generators/gemini-cli-generator.js` - Gemini CLI markdown generator (150+ lines)
85
+ - `lib/generators/deepagent-generator.js` - DeepAgent configuration generator (145+ lines)
86
+
87
+ **Modified Files:**
88
+ - `lib/ai/ai-client.js` - Parameter compatibility fixes for newer models
89
+ - `lib/ai/ai-config.js` - Model verification, Google Gemini fixes, Anthropic expansion
90
+ - `bin/adf.js` - Comprehensive help system enhancements (300+ lines of documentation)
91
+ - `lib/commands/deploy.js` - Added new tool registrations and deployment cases
92
+ - `lib/generators/index.js` - Export new generators
93
+
94
+ **Deployment Support Summary:**
95
+ - **IDEs (6):** Windsurf, Cursor, VS Code, Zed, Antigravity, VS Code Insider
96
+ - **CLI Tools (5):** Claude Code, OpenCode, Gemini CLI, DeepAgent, Generic
97
+ - **Total Tools:** 11 deployment targets
98
+
99
+ #### Bug Fixes
100
+ - Fixed: OpenRouter models listed but not operational (added verification)
101
+ - Fixed: OpenAI GPT-5 models parameter incompatibility (`max_tokens` vs `max_completion_tokens`)
102
+ - Fixed: Google Gemini API validation failure (`listModels` method error)
103
+ - Fixed: Anthropic incomplete model listing (3 models → 11 models)
104
+ - Fixed: Model testing skipped during configuration process
105
+
106
+ #### Keywords Added
107
+ - `opencode` - OpenCode CLI support
108
+ - `gemini-cli` - Google Gemini CLI support
109
+ - `deepagent` - Abacus.ai DeepAgent support
110
+
111
+ #### Backward Compatibility
112
+ - āœ… **100% Backward Compatible** - All changes are additive
113
+ - āœ… All existing deployments continue to work
114
+ - āœ… No breaking changes to API or CLI commands
115
+ - āœ… Existing configurations automatically benefit from improved verification
116
+
8
117
  ## [0.12.0] - 2025-12-22
9
118
 
10
119
  ### šŸŽÆ Agent-Native Development Framework (ANDF) Standard Implementation
package/README.md CHANGED
@@ -98,15 +98,21 @@ adf deploy --list
98
98
  ```
99
99
 
100
100
  **Supported Tools:**
101
- - windsurf
102
- - cursor
103
- - vscode
104
- - vscode-insider
105
- - kiro
106
- - trae
107
- - claude-code
108
- - gemini-cli
109
- - codex-cli
101
+
102
+ **IDEs:**
103
+ - windsurf - Codeium Windsurf IDE
104
+ - cursor - Cursor AI IDE
105
+ - vscode - Visual Studio Code
106
+ - vscode-insider - VS Code Insider
107
+ - zed - Zed Editor
108
+ - antigravity - Google Antigravity
109
+
110
+ **CLI Tools:**
111
+ - claude-code - Anthropic Claude Code CLI
112
+ - opencode - OpenCode CLI
113
+ - gemini-cli - Google Gemini CLI
114
+ - deepagent - Abacus.ai DeepAgent
115
+ - generic - Generic AI tools
110
116
 
111
117
  ### Update CLI
112
118
 
@@ -495,16 +501,29 @@ When we release updates to the framework:
495
501
 
496
502
  See [CHANGELOG.md](./CHANGELOG.md) for detailed version history.
497
503
 
498
- **Latest:** v0.10.0 (2025-10-27)
499
- - **Pattern Decay Algorithm (v0.10.0)** - Phase 6: Advanced Learning Features
504
+ **Latest:** v0.12.9 (2025-12-23)
505
+ - **Multi-Tool Expansion & AI Provider Robustness (v0.12.9)**
506
+ - Added 4 new CLI tools: OpenCode, Gemini CLI, DeepAgent, verified Zed support
507
+ - Comprehensive AI provider improvements with model verification
508
+ - Fixed Google Gemini API integration and expanded Anthropic models (3 → 11)
509
+ - Enhanced help system with detailed documentation
510
+ - OpenAI/OpenRouter parameter compatibility for GPT-5 and o-series models
511
+ - All models now tested before configuration save
512
+
513
+ **Previous Releases:**
514
+ - **v0.12.0 (2025-12-22)** - ANDF Standard Implementation
515
+ - Complete AGENTS.md standard compliance with YAML frontmatter
516
+ - .context/ directory support with architecture and glossary generation
517
+ - Zed Editor and Google Antigravity full generator support
518
+ - MCP integration and agent configuration
519
+
520
+ - **v0.10.0 (2025-10-27)** - Pattern Decay Algorithm
500
521
  - Time-based exponential decay for inactive patterns
501
522
  - Confidence-based decay rates (high/medium/low)
502
523
  - Automatic pattern cleanup and renewal system
503
524
  - 40+ comprehensive tests for decay functionality
504
- - Pattern metadata tracking (timestamps, renewal counts)
505
- - Removal history and analytics
506
525
 
507
- **Previous Release:** v0.9.1 (2025-10-05)
526
+ - **v0.9.1 (2025-10-05)** - AI Analysis Settings
508
527
  - **AI Analysis Settings (v0.9.0)** - Performance modes and configurable AI features
509
528
  - Three performance modes: Fast, Balanced, Comprehensive
510
529
  - Five individually configurable AI features
package/bin/adf.js CHANGED
@@ -29,7 +29,68 @@ program
29
29
  .addHelpText('before', () => {
30
30
  const adfInstallPath = path.resolve(__dirname, '..');
31
31
  return `\n${chalk.cyan.bold('ADF CLI')} ${chalk.gray(`v${packageJson.version}`)}\n${chalk.gray('Install Path:')} ${chalk.white(adfInstallPath)}\n`;
32
- });
32
+ })
33
+ .addHelpText('after', `
34
+ ${chalk.cyan.bold('Quick Start:')}
35
+ ${chalk.gray('1. Configure your AI provider')}
36
+ $ adf config
37
+
38
+ ${chalk.gray('2. Initialize a project with AI-guided interview')}
39
+ $ adf init
40
+
41
+ ${chalk.gray('3. Deploy to your AI coding assistant')}
42
+ $ adf deploy
43
+
44
+ ${chalk.cyan.bold('What is ADF?')}
45
+ AgentDevFramework (ADF) is an AI-assisted development framework that helps
46
+ you gather requirements through intelligent AI-guided interviews. It supports
47
+ multiple AI providers and workflow levels, from rapid prototyping to
48
+ comprehensive enterprise documentation.
49
+
50
+ ${chalk.cyan.bold('Key Features:')}
51
+ • ${chalk.yellow('Multi-Provider AI')} - Anthropic, OpenAI, Google, OpenRouter
52
+ • ${chalk.yellow('3 Workflow Levels')} - Rapid (PRP), Balanced (Spec-Kit), Comprehensive (BMAD)
53
+ • ${chalk.yellow('Smart Filtering')} - AI-powered question filtering based on context
54
+ • ${chalk.yellow('Learning System')} - Adapts to your preferences over time
55
+ • ${chalk.yellow('Session Resume')} - Pause and resume interviews anytime
56
+ • ${chalk.yellow('Multi-Tool Deploy')} - 10+ IDEs and CLI tools supported
57
+ ${chalk.gray('IDEs:')} Windsurf, Cursor, VS Code, Zed, Antigravity
58
+ ${chalk.gray('CLI:')} Claude Code, OpenCode, Gemini CLI, DeepAgent
59
+
60
+ ${chalk.cyan.bold('Getting Help:')}
61
+ ${chalk.gray('# Detailed help for specific commands')}
62
+ $ adf init --help
63
+ $ adf deploy --help
64
+ $ adf config --help
65
+ $ adf update --help
66
+
67
+ ${chalk.gray('# Check version and install path')}
68
+ $ adf --version
69
+
70
+ ${chalk.cyan.bold('Common Workflows:')}
71
+ ${chalk.yellow('Quick Prototype:')}
72
+ $ adf init --rapid --tool windsurf
73
+
74
+ ${chalk.yellow('Standard Project:')}
75
+ $ adf config ${chalk.gray('# Configure AI provider once')}
76
+ $ adf init --balanced ${chalk.gray('# Run interview')}
77
+ $ adf deploy cursor ${chalk.gray('# Deploy to Cursor')}
78
+
79
+ ${chalk.yellow('Enterprise Project:')}
80
+ $ adf config ${chalk.gray('# Configure with comprehensive mode')}
81
+ $ adf init --comprehensive
82
+ $ adf deploy vscode ${chalk.gray('# Deploy to multiple tools')}
83
+ $ adf deploy claude-code
84
+
85
+ ${chalk.cyan.bold('Documentation & Support:')}
86
+ • GitHub: https://github.com/iservu/adf-cli
87
+ • Issues: https://github.com/iservu/adf-cli/issues
88
+ • Docs: https://github.com/iservu/adf-cli#readme
89
+
90
+ ${chalk.cyan.bold('Learn More:')}
91
+ Run any command with ${chalk.white('--help')} for detailed information:
92
+ ${chalk.gray('$ adf <command> --help')}
93
+ `);
33
94
 
34
95
  // adf init
35
96
  program
@@ -39,6 +100,51 @@ program
39
100
  .option('--balanced', 'Skip questions, use Level 2 (Balanced)')
40
101
  .option('--comprehensive', 'Skip questions, use Level 3 (Comprehensive)')
41
102
  .option('--tool <tool>', 'Specify deployment tool (windsurf, cursor, etc.)')
103
+ .addHelpText('after', `
104
+ ${chalk.cyan.bold('Description:')}
105
+ Start an interactive AI-guided interview to gather project requirements.
106
+ The interview uses AI to analyze your answers and generate comprehensive
107
+ documentation based on your chosen workflow level.
108
+
109
+ ${chalk.cyan.bold('Workflow Levels:')}
110
+ ${chalk.yellow('Rapid (PRP)')} - 20 core questions, fast setup
111
+ Agents: dev, qa
112
+ Output: prp.md
113
+ Best for: Quick prototypes, MVPs
114
+
115
+ ${chalk.yellow('Balanced (Spec-Kit)')} - 30+ questions, detailed specs
116
+ Agents: analyst, pm, dev, qa
117
+ Output: constitution.md, specification.md, plan.md, tasks.md
118
+ Best for: Standard projects with clear requirements
119
+
120
+ ${chalk.yellow('Comprehensive (BMAD)')} - 40+ questions, full documentation
121
+ Agents: analyst, pm, architect, sm, dev, qa
122
+ Output: prd.md, architecture.md, stories.md
123
+ Best for: Enterprise projects, complex systems
124
+
125
+ ${chalk.cyan.bold('Examples:')}
126
+ ${chalk.gray('# Interactive mode - choose workflow interactively')}
127
+ $ adf init
128
+
129
+ ${chalk.gray('# Quick start with Rapid workflow')}
130
+ $ adf init --rapid
131
+
132
+ ${chalk.gray('# Balanced workflow deployed to Windsurf')}
133
+ $ adf init --balanced --tool windsurf
134
+
135
+ ${chalk.gray('# Comprehensive workflow for enterprise project')}
136
+ $ adf init --comprehensive
137
+
138
+ ${chalk.cyan.bold('Features:')}
139
+ • AI-powered question filtering based on project context
140
+ • Answer quality analysis and suggestions
141
+ • Session resume capability (Ctrl+C to pause)
142
+ • Learning system that adapts to your preferences
143
+ • Multi-provider AI support (Anthropic, OpenAI, Google, OpenRouter)
144
+
145
+ ${chalk.cyan.bold('Output Directory:')}
146
+ All outputs saved to: ${chalk.white('.adf/sessions/{timestamp}_{workflow}/')}
147
+ `)
42
148
  .action(initCommand);
43
149
 
44
150
  // adf deploy
@@ -46,6 +152,96 @@ program
46
152
  .command('deploy [tool]')
47
153
  .description('Deploy framework to specified tool')
48
154
  .option('-l, --list', 'List available deployment tools')
155
+ .addHelpText('after', `
156
+ ${chalk.cyan.bold('Description:')}
157
+ Deploy ADF framework outputs to your AI coding assistant or IDE.
158
+ Converts session outputs (PRD, specs, stories) into tool-specific
159
+ configuration files and agent definitions.
160
+
161
+ ${chalk.cyan.bold('Command Syntax:')}
162
+ ${chalk.white('adf deploy [tool]')}
163
+
164
+ ${chalk.yellow('[tool]')} - (Optional) Target tool name
165
+ If omitted, you'll be prompted to select interactively
166
+ Supported: windsurf, cursor, vscode, claude-code, zed, generic
167
+
168
+ ${chalk.cyan.bold('Supported Tools:')}
169
+ ${chalk.white.bold('IDEs:')}
170
+ ${chalk.yellow('windsurf')} - Codeium Windsurf IDE
171
+ Output: .windsurfrules
172
+
173
+ ${chalk.yellow('cursor')} - Cursor AI IDE
174
+ Output: .cursorrules
175
+
176
+ ${chalk.yellow('vscode')} - Visual Studio Code
177
+ Output: .vscode/settings.json, .github/copilot-instructions.md
178
+
179
+ ${chalk.yellow('zed')} - Zed Editor
180
+ Output: .zed/settings.json, .zed/rules (symlink to AGENTS.md)
181
+
182
+ ${chalk.yellow('antigravity')} - Google Antigravity IDE
183
+ Output: .antigravity/agents.yaml
184
+
185
+ ${chalk.white.bold('CLI Tools:')}
186
+ ${chalk.yellow('claude-code')} - Anthropic Claude Code CLI
187
+ Output: .framework/agents/*.md
188
+
189
+ ${chalk.yellow('opencode')} - OpenCode CLI
190
+ Output: .opencode.json (JSON config with agents & MCP)
191
+
192
+ ${chalk.yellow('gemini-cli')} - Google Gemini CLI
193
+ Output: GEMINI.md (project context markdown)
194
+
195
+ ${chalk.yellow('deepagent')} - Abacus.ai DeepAgent CLI
196
+ Output: .deepagent/agents/*.md, .deepagent/README.md
197
+
198
+ ${chalk.white.bold('Generic:')}
199
+ ${chalk.yellow('generic')} - Generic AI tools (agent markdown files)
200
+ Output: .framework/agents/*.md
201
+
202
+ ${chalk.cyan.bold('Examples:')}
203
+ ${chalk.gray('# List available tools')}
204
+ $ adf deploy --list
205
+
206
+ ${chalk.gray('# Interactive tool selection')}
207
+ $ adf deploy
208
+
209
+ ${chalk.gray('# Deploy to specific tool')}
210
+ $ adf deploy windsurf
211
+
212
+ ${chalk.gray('# Deploy to multiple tools (run multiple times)')}
213
+ $ adf deploy cursor
214
+ $ adf deploy vscode
215
+
216
+ ${chalk.cyan.bold('How It Works:')}
217
+ 1. Finds latest completed interview session
218
+ 2. Loads session outputs (PRD, architecture, stories, etc.)
219
+ 3. Transforms outputs into tool-specific format
220
+ 4. Writes configuration files to project root
221
+ 5. Deploys agent definitions (if applicable)
222
+
223
+ ${chalk.cyan.bold('Requirements:')}
224
+ • Must have completed at least one 'adf init' session
225
+ • Session must have generated outputs
226
+ • Outputs located in: .adf/sessions/{timestamp}_{workflow}/outputs/
227
+
228
+ ${chalk.cyan.bold('Output Files by Tool:')}
229
+ ${chalk.white.bold('IDEs:')}
230
+ Windsurf: ${chalk.white('.windsurfrules')}
231
+ Cursor: ${chalk.white('.cursorrules')}
232
+ VS Code: ${chalk.white('.vscode/settings.json + .github/copilot-instructions.md')}
233
+ Zed: ${chalk.white('.zed/settings.json + .zed/rules')}
234
+ Antigravity: ${chalk.white('.antigravity/agents.yaml')}
235
+
236
+ ${chalk.white.bold('CLI Tools:')}
237
+ Claude Code: ${chalk.white('.framework/agents/*.md')}
238
+ OpenCode: ${chalk.white('.opencode.json')}
239
+ Gemini CLI: ${chalk.white('GEMINI.md')}
240
+ DeepAgent: ${chalk.white('.deepagent/agents/*.md + .deepagent/README.md')}
241
+
242
+ ${chalk.white.bold('Generic:')}
243
+ Generic: ${chalk.white('.framework/agents/*.md')}
244
+ `)
49
245
  .action(deployCommand);
50
246
 
51
247
  // adf update
@@ -53,12 +249,154 @@ program
53
249
  .command('update')
54
250
  .description('Check for CLI updates and update to latest version')
55
251
  .option('--check', 'Only check for updates, don\'t install')
252
+ .addHelpText('after', `
253
+ ${chalk.cyan.bold('Description:')}
254
+ Check for new versions of ADF CLI and update to the latest release.
255
+ Compares your current version with the latest published on npm registry.
256
+
257
+ ${chalk.cyan.bold('Command Syntax:')}
258
+ ${chalk.white('adf update [options]')}
259
+
260
+ ${chalk.cyan.bold('Options:')}
261
+ ${chalk.yellow('--check')} - Check for updates without installing
262
+ Shows version comparison and changelog preview
263
+ No modifications made to your installation
264
+
265
+ ${chalk.cyan.bold('Examples:')}
266
+ ${chalk.gray('# Check if updates are available')}
267
+ $ adf update --check
268
+
269
+ ${chalk.gray('# Update to latest version')}
270
+ $ adf update
271
+
272
+ ${chalk.gray('# Check current version')}
273
+ $ adf --version
274
+
275
+ ${chalk.cyan.bold('Update Process:')}
276
+ 1. Fetches latest version info from npm registry
277
+ 2. Compares with your installed version
278
+ 3. Shows changelog and new features
279
+ 4. Prompts for confirmation (if installing)
280
+ 5. Downloads and installs latest version
281
+ 6. Verifies successful installation
282
+
283
+ ${chalk.cyan.bold('Installation Methods:')}
284
+ ${chalk.yellow('Global Install')} (recommended)
285
+ $ npm install -g @iservu-inc/adf-cli
286
+ Updates system-wide installation
287
+
288
+ ${chalk.yellow('Local Development')} (npm link)
289
+ $ cd adf-cli && git pull && npm link
290
+ Updates linked development version
291
+
292
+ ${chalk.cyan.bold('What Gets Updated:')}
293
+ • Core CLI functionality
294
+ • AI provider integrations (Anthropic, OpenAI, Google, OpenRouter)
295
+ • Interview question sets
296
+ • Output generators and templates
297
+ • Bug fixes and performance improvements
298
+
299
+ ${chalk.cyan.bold('Backwards Compatibility:')}
300
+ • Existing .adf directories are preserved
301
+ • Sessions and learning data remain intact
302
+ • API keys and configurations are not affected
303
+ • May require re-running 'adf deploy' for new features
304
+ `)
56
305
  .action(updateCommand);
57
306
 
58
307
  // adf config
59
308
  program
60
309
  .command('config')
61
310
  .description('Configure ADF settings (AI provider, etc.)')
311
+ .addHelpText('after', `
312
+ ${chalk.cyan.bold('Description:')}
313
+ Interactive configuration wizard for ADF settings.
314
+ Configure AI providers, analysis settings, and learning system preferences.
315
+
316
+ ${chalk.cyan.bold('Configuration Categories:')}
317
+ ${chalk.yellow('1. AI Provider Setup')}
318
+ Configure which AI provider to use for interviews
319
+ • Select provider (Anthropic, OpenAI, Google, OpenRouter)
320
+ • Enter/validate API key
321
+ • Choose model from dynamically fetched list
322
+ • Test connection before saving
323
+
324
+ ${chalk.yellow('2. Analysis Settings')}
325
+ Control AI analysis features and performance
326
+ • Performance Mode: Fast / Balanced / Comprehensive
327
+ • Answer Quality Analysis: ON / OFF
328
+ • Smart Question Filtering: ON / OFF
329
+ • Question Reordering: ON / OFF
330
+ • Context Extraction: ON / OFF
331
+
332
+ ${chalk.yellow('3. Learning System')}
333
+ Manage skip pattern detection and auto-filtering
334
+ • Enable/Disable learning system
335
+ • View detected patterns and rules
336
+ • Manage learned preferences
337
+ • Export analytics to JSON/CSV
338
+ • Configure decay thresholds
339
+
340
+ ${chalk.cyan.bold('AI Providers Supported:')}
341
+ ${chalk.yellow('Anthropic Claude')}
342
+ Models: claude-sonnet-4-5, claude-opus-4-5, claude-3-5-sonnet, etc.
343
+ API Key: Get from https://console.anthropic.com/
344
+ Format: sk-ant-...
345
+
346
+ ${chalk.yellow('OpenAI GPT')}
347
+ Models: gpt-5.2-chat, gpt-4o, o1, o3, etc. (116+ models)
348
+ API Key: Get from https://platform.openai.com/api-keys
349
+ Format: sk-...
350
+
351
+ ${chalk.yellow('Google Gemini')}
352
+ Models: gemini-2.0-flash, gemini-1.5-pro, gemini-1.5-flash, etc.
353
+ API Key: Get from https://aistudio.google.com/app/apikey
354
+ Format: (varies)
355
+
356
+ ${chalk.yellow('OpenRouter')}
357
+ Models: 100+ models from multiple providers
358
+ API Key: Get from https://openrouter.ai/keys
359
+ Format: sk-or-...
360
+
361
+ ${chalk.cyan.bold('Examples:')}
362
+ ${chalk.gray('# Open configuration menu')}
363
+ $ adf config
364
+
365
+ ${chalk.gray('# After configuration, verify with:')}
366
+ $ cat .adf/.env
367
+ $ adf init
368
+
369
+ ${chalk.cyan.bold('Performance Modes:')}
370
+ ${chalk.yellow('Fast')} - Minimal AI calls (~0.5s per answer)
371
+ Answer quality: OFF
372
+ Smart filtering: OFF
373
+ Best for: Quick interviews, testing
374
+
375
+ ${chalk.yellow('Balanced')} - Moderate AI usage (~2-3s per answer)
376
+ Answer quality: ON
377
+ Smart filtering: ON
378
+ Best for: Most projects (recommended)
379
+
380
+ ${chalk.yellow('Comprehensive')} - Full AI analysis (~4-6s per answer)
381
+ All features: ON
382
+ Context extraction: ON
383
+ Question reordering: ON
384
+ Best for: Critical projects, detailed requirements
385
+
386
+ ${chalk.cyan.bold('Storage Locations:')}
387
+ API Keys: ${chalk.white('.adf/.env')} ${chalk.gray('(gitignored)')}
388
+ Analysis Config: ${chalk.white('.adf/analysis-config.json')}
389
+ Learning Data: ${chalk.white('.adf/learning/')}
390
+ Active Provider: ${chalk.white('.adf/.env')} ${chalk.gray('(ADF_CURRENT_PROVIDER)')}
391
+ Active Model: ${chalk.white('.adf/.env')} ${chalk.gray('(ADF_CURRENT_MODEL)')}
392
+
393
+ ${chalk.cyan.bold('Security Notes:')}
394
+ • API keys stored in .adf/.env (automatically gitignored)
395
+ • Never committed to version control
396
+ • Keys validated before saving
397
+ • Models tested for operational status
398
+ • All data stored locally on your machine
399
+ `)
62
400
  .action(configCommand);
63
401
 
64
402
  // Handle unknown commands