@iservu-inc/adf-cli 0.12.9 → 0.12.11

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.
@@ -17,7 +17,8 @@
17
17
  "WebFetch(domain:openrouter.ai)",
18
18
  "WebFetch(domain:github.com)",
19
19
  "WebFetch(domain:antigravity.google)",
20
- "WebSearch"
20
+ "WebSearch",
21
+ "Bash(node -c:*)"
21
22
  ],
22
23
  "deny": [],
23
24
  "ask": []
package/CHANGELOG.md CHANGED
@@ -5,6 +5,155 @@ 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.10] - 2025-12-23
9
+
10
+ ### 🐛 Critical Bug Fixes
11
+
12
+ **Patch Release:** Two critical bug fixes for deployment and AI provider error handling.
13
+
14
+ #### Fixed
15
+
16
+ **Deployment Error Fix:**
17
+ - 🔧 **Fixed EISDIR error** when deploying to directory-based tools (claude-code, deepagent, generic)
18
+ - Error: `EISDIR: illegal operation on a directory, open '.framework/agents'`
19
+ - Root cause: Attempting to write file to directory path
20
+ - Solution: Skip generic config writing for tools with directory-based configs (ending with `/`)
21
+ - These tools use dedicated generators that handle file creation properly
22
+
23
+ **AI Provider Error Handling:**
24
+ - 🔧 **Improved rate limit error detection** for Google Gemini models
25
+ - Now distinguishes between rate limit/quota errors vs model availability issues
26
+ - Clear messaging for quota exceeded scenarios with actionable solutions:
27
+ - Try different model with available quota
28
+ - Wait for quota reset
29
+ - Upgrade to paid tier
30
+ - Use different AI provider
31
+ - Added **Google Gemini free tier model recommendations**:
32
+ - `gemini-1.5-flash` (fastest, lowest quota usage) - Recommended
33
+ - `gemini-1.5-flash-8b` (ultra-fast, minimal quota)
34
+ - `gemini-2.0-flash-exp` (newer, experimental)
35
+ - Warns about Pro models (gemini-pro, gemini-2.5-pro) potentially exceeding free tier quota
36
+
37
+ #### Technical Details
38
+
39
+ **Modified Files:**
40
+ - `lib/commands/deploy.js` - Skip config writing for directory-based tools
41
+ - `lib/ai/ai-config.js` - Enhanced error detection and messaging for rate limits
42
+
43
+ #### Impact
44
+ - ✅ Deployment now succeeds for all 11 supported tools
45
+ - ✅ Users get clear guidance when hitting API rate limits
46
+ - ✅ Reduces confusion about model availability vs quota issues
47
+
48
+ ## [0.12.9] - 2025-12-23
49
+
50
+ ### 🚀 Multi-Tool Expansion & AI Provider Robustness
51
+
52
+ **MAJOR ENHANCEMENTS:** Expanded deployment support to 4 additional CLI tools and significantly improved AI provider reliability with comprehensive model verification and parameter compatibility fixes.
53
+
54
+ #### What's New
55
+
56
+ **New CLI Tool Support:**
57
+ - **OpenCode CLI** - Complete generator with JSON configuration
58
+ - Output: `.opencode.json` with project config, agents, and MCP servers
59
+ - Model selection: Anthropic Claude models based on framework complexity
60
+ - MCP integration: Filesystem server for project access
61
+ - Auto-compacting and debug configuration
62
+
63
+ - **Google Gemini CLI** - Markdown-based project context
64
+ - Output: `GEMINI.md` with structured project information
65
+ - Role-specific agent guidance
66
+ - Build/test/lint command reference
67
+ - Development guidelines and security standards
68
+
69
+ - **DeepAgent (Abacus.ai)** - Agent markdown deployment
70
+ - Output: `.deepagent/agents/*.md` + `.deepagent/README.md`
71
+ - Similar to Claude Code but for DeepAgent CLI
72
+ - Project overview and workflow documentation
73
+ - Per-agent markdown files with role-specific instructions
74
+
75
+ - **Zed Editor Support Verified** - Confirmed full 253-line generator integration
76
+ - MCP server configuration (project_context, archon)
77
+ - AGENTS.md symlink support (`.zed/rules -> ../AGENTS.md`)
78
+ - Agent-specific keymap configuration
79
+ - Model selection based on framework complexity
80
+
81
+ **AI Provider Improvements:**
82
+
83
+ **Model Verification System:**
84
+ - ✅ **Test Before Save** - All models now tested with actual API request before configuration
85
+ - ✅ **Clear Error Messages** - Detailed failure reasons when models don't work
86
+ - ✅ **Retry Option** - Easy retry with different model on failure
87
+ - ✅ **Operational Status** - Distinguishes between "listed" and "operational" models
88
+
89
+ **Google Gemini Fixes:**
90
+ - 🔧 Fixed API key validation (`genAI.listModels is not a function` error)
91
+ - 🔧 Implemented dynamic model fetching via REST API (`/v1beta/models` endpoint)
92
+ - 🔧 Updated validation model from deprecated `gemini-pro` to `gemini-1.5-flash`
93
+ - 🔧 Filters models by `generateContent` support capability
94
+
95
+ **Anthropic Model Expansion:**
96
+ - 📊 Expanded from 3 to 11 models with comprehensive coverage
97
+ - 📊 Added Claude 4.5 series (Sonnet, Opus)
98
+ - 📊 Added Claude 3.5 series (Sonnet variants, Haiku)
99
+ - 📊 Added Claude 3 series (Opus, Sonnet, Haiku)
100
+ - 📊 Added Claude 2 series (2.1, 2.0, Instant)
101
+ - 📊 Attempts dynamic fetch from API with fallback to curated list
102
+
103
+ **OpenAI & OpenRouter Parameter Compatibility:**
104
+ - 🔧 Fixed parameter compatibility for newer models (GPT-5, o-series)
105
+ - 🔧 Updated regex pattern from `/^(o\d|gpt-5)/` to `/^(o1|o3|gpt-5)/i`
106
+ - 🔧 Uses `max_completion_tokens` for reasoning models instead of `max_tokens`
107
+ - 🔧 Automatic retry with fallback parameters on 400 errors
108
+ - ✅ Confirmed working with `gpt-5.2-chat-latest` and other GPT-5 models
109
+
110
+ **Enhanced Help System:**
111
+ - 📚 Comprehensive `--help` documentation for all commands
112
+ - 📚 Quick Start section with step-by-step workflow
113
+ - 📚 Detailed command breakdowns (init, deploy, config, update)
114
+ - 📚 Tool-by-tool deployment guide with output locations
115
+ - 📚 Performance mode explanations (Fast/Balanced/Comprehensive)
116
+ - 📚 AI provider setup instructions with API key links
117
+ - 📚 Configuration categories with feature descriptions
118
+ - 📚 Examples for common workflows
119
+
120
+ #### Technical Details
121
+
122
+ **New Files:**
123
+ - `lib/generators/opencode-generator.js` - OpenCode CLI configuration generator (120+ lines)
124
+ - `lib/generators/gemini-cli-generator.js` - Gemini CLI markdown generator (150+ lines)
125
+ - `lib/generators/deepagent-generator.js` - DeepAgent configuration generator (145+ lines)
126
+
127
+ **Modified Files:**
128
+ - `lib/ai/ai-client.js` - Parameter compatibility fixes for newer models
129
+ - `lib/ai/ai-config.js` - Model verification, Google Gemini fixes, Anthropic expansion
130
+ - `bin/adf.js` - Comprehensive help system enhancements (300+ lines of documentation)
131
+ - `lib/commands/deploy.js` - Added new tool registrations and deployment cases
132
+ - `lib/generators/index.js` - Export new generators
133
+
134
+ **Deployment Support Summary:**
135
+ - **IDEs (6):** Windsurf, Cursor, VS Code, Zed, Antigravity, VS Code Insider
136
+ - **CLI Tools (5):** Claude Code, OpenCode, Gemini CLI, DeepAgent, Generic
137
+ - **Total Tools:** 11 deployment targets
138
+
139
+ #### Bug Fixes
140
+ - Fixed: OpenRouter models listed but not operational (added verification)
141
+ - Fixed: OpenAI GPT-5 models parameter incompatibility (`max_tokens` vs `max_completion_tokens`)
142
+ - Fixed: Google Gemini API validation failure (`listModels` method error)
143
+ - Fixed: Anthropic incomplete model listing (3 models → 11 models)
144
+ - Fixed: Model testing skipped during configuration process
145
+
146
+ #### Keywords Added
147
+ - `opencode` - OpenCode CLI support
148
+ - `gemini-cli` - Google Gemini CLI support
149
+ - `deepagent` - Abacus.ai DeepAgent support
150
+
151
+ #### Backward Compatibility
152
+ - ✅ **100% Backward Compatible** - All changes are additive
153
+ - ✅ All existing deployments continue to work
154
+ - ✅ No breaking changes to API or CLI commands
155
+ - ✅ Existing configurations automatically benefit from improved verification
156
+
8
157
  ## [0.12.0] - 2025-12-22
9
158
 
10
159
  ### 🎯 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,33 @@ 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.10 (2025-12-23)
505
+ - **Critical Bug Fixes (v0.12.10)** - Patch release
506
+ - Fixed EISDIR deployment error for directory-based tools
507
+ - Improved rate limit error detection for Gemini models
508
+ - Added free tier model recommendations for Google Gemini
509
+ - Clear messaging for quota vs availability issues
510
+
511
+ **Previous Releases:**
512
+ - **v0.12.9 (2025-12-23)** - Multi-Tool Expansion & AI Provider Robustness
513
+ - Added 4 new CLI tools: OpenCode, Gemini CLI, DeepAgent, verified Zed support
514
+ - Comprehensive AI provider improvements with model verification
515
+ - Fixed Google Gemini API integration and expanded Anthropic models (3 → 11)
516
+ - Enhanced help system with detailed documentation
517
+ - OpenAI/OpenRouter parameter compatibility for GPT-5 and o-series models
518
+ - **v0.12.0 (2025-12-22)** - ANDF Standard Implementation
519
+ - Complete AGENTS.md standard compliance with YAML frontmatter
520
+ - .context/ directory support with architecture and glossary generation
521
+ - Zed Editor and Google Antigravity full generator support
522
+ - MCP integration and agent configuration
523
+
524
+ - **v0.10.0 (2025-10-27)** - Pattern Decay Algorithm
500
525
  - Time-based exponential decay for inactive patterns
501
526
  - Confidence-based decay rates (high/medium/low)
502
527
  - Automatic pattern cleanup and renewal system
503
528
  - 40+ comprehensive tests for decay functionality
504
- - Pattern metadata tracking (timestamps, renewal counts)
505
- - Removal history and analytics
506
529
 
507
- **Previous Release:** v0.9.1 (2025-10-05)
530
+ - **v0.9.1 (2025-10-05)** - AI Analysis Settings
508
531
  - **AI Analysis Settings (v0.9.0)** - Performance modes and configurable AI features
509
532
  - Three performance modes: Fast, Balanced, Comprehensive
510
533
  - Five individually configurable AI features
@@ -600,13 +600,19 @@ async function configureAIProvider(projectPath = process.cwd()) {
600
600
  // Fetch available models (only after successful validation)
601
601
  const availableModels = await fetchAvailableModels(selectedProvider, apiKey);
602
602
 
603
- // Show helpful tip about model selection
603
+ // Show helpful tips about model selection
604
604
  if (selectedProvider.id === 'openrouter' && availableModels.length > 50) {
605
605
  console.log(chalk.gray('\n💡 Tip: Recommended models for best compatibility:'));
606
606
  console.log(chalk.gray(' • anthropic/claude-sonnet-4-5'));
607
607
  console.log(chalk.gray(' • openai/gpt-4-turbo'));
608
608
  console.log(chalk.gray(' • google/gemini-pro-1.5'));
609
609
  console.log(chalk.yellow(' ⚠️ Free models may require specific privacy settings\n'));
610
+ } else if (selectedProvider.id === 'google') {
611
+ console.log(chalk.gray('\n💡 Tip: Recommended models for free tier:'));
612
+ console.log(chalk.gray(' • gemini-1.5-flash (fastest, lowest quota usage)'));
613
+ console.log(chalk.gray(' • gemini-1.5-flash-8b (ultra-fast, minimal quota)'));
614
+ console.log(chalk.gray(' • gemini-2.0-flash-exp (newer, experimental)'));
615
+ console.log(chalk.yellow(' ⚠️ Pro models (gemini-pro, gemini-2.5-pro) may exceed free tier quota\n'));
610
616
  }
611
617
 
612
618
  // Model selection with autocomplete
@@ -651,19 +657,41 @@ async function configureAIProvider(projectPath = process.cwd()) {
651
657
  modelTestSpinner.succeed(chalk.green(`Model ${model} verified successfully`));
652
658
  } catch (error) {
653
659
  modelTestSpinner.fail(chalk.red(`Model ${model} test failed`));
654
- console.log(chalk.red(`\nError: ${error.message}\n`));
655
- console.log(chalk.yellow('⚠️ This model appears to be listed but not operational.'));
656
- console.log(chalk.gray('Possible reasons:'));
657
- console.log(chalk.gray(' Model requires higher API tier or special access'));
658
- console.log(chalk.gray(' • Model is experimental or in preview'));
659
- console.log(chalk.gray(' Model has specific parameter requirements'));
660
- console.log(chalk.gray(' • Provider-side issue or rate limiting\n'));
660
+
661
+ // Check if this is a rate limit error
662
+ const isRateLimit = error.message.includes('429') ||
663
+ error.message.includes('Too Many Requests') ||
664
+ error.message.includes('quota') ||
665
+ error.message.includes('rate limit');
666
+
667
+ if (isRateLimit) {
668
+ console.log(chalk.yellow('\n⚠️ Rate Limit / Quota Exceeded'));
669
+ console.log(chalk.gray('\nThis model is operational but you\'ve exceeded your API quota.'));
670
+ console.log(chalk.gray('Common causes:'));
671
+ console.log(chalk.gray(' • Free tier daily/hourly limits reached'));
672
+ console.log(chalk.gray(' • Too many recent requests'));
673
+ console.log(chalk.gray(' • Model requires paid API tier\n'));
674
+
675
+ console.log(chalk.cyan('Solutions:'));
676
+ console.log(chalk.gray(' 1. Select a different model with available quota'));
677
+ console.log(chalk.gray(' 2. Wait for quota reset (usually hourly or daily)'));
678
+ console.log(chalk.gray(' 3. Upgrade to paid tier at: https://ai.google.dev/pricing'));
679
+ console.log(chalk.gray(' 4. Use a different AI provider (OpenAI, Anthropic, etc.)\n'));
680
+ } else {
681
+ console.log(chalk.red(`\nError: ${error.message}\n`));
682
+ console.log(chalk.yellow('⚠️ This model appears to be listed but not operational.'));
683
+ console.log(chalk.gray('Possible reasons:'));
684
+ console.log(chalk.gray(' • Model requires higher API tier or special access'));
685
+ console.log(chalk.gray(' • Model is experimental or in preview'));
686
+ console.log(chalk.gray(' • Model has specific parameter requirements'));
687
+ console.log(chalk.gray(' • Provider-side issue\n'));
688
+ }
661
689
 
662
690
  const { retry } = await inquirer.prompt([
663
691
  {
664
692
  type: 'confirm',
665
693
  name: 'retry',
666
- message: 'Try selecting a different model?',
694
+ message: isRateLimit ? 'Try selecting a different model?' : 'Try selecting a different model?',
667
695
  default: true
668
696
  }
669
697
  ]);
@@ -241,8 +241,9 @@ async function deployToTool(tool, options = {}) {
241
241
  }
242
242
 
243
243
  // Copy tool-specific config (simplified)
244
+ // Skip for directory-based tools (claude-code, deepagent, generic) - they use dedicated generators
244
245
  const toolConfig = TOOLS[tool];
245
- if (toolConfig) {
246
+ if (toolConfig && !toolConfig.configFile.endsWith('/')) {
246
247
  const configPath = path.join(cwd, toolConfig.configFile);
247
248
  const configDir = path.dirname(configPath);
248
249
 
@@ -177,6 +177,116 @@ class ToolConfigGenerator {
177
177
  await fs.ensureDir(path.join(this.projectPath, dirPath));
178
178
  }
179
179
 
180
+ /**
181
+ * Get project context (name, commands, directories)
182
+ */
183
+ async getProjectContext() {
184
+ const context = {
185
+ name: this.getProjectName(),
186
+ overview: '',
187
+ buildCommand: 'npm run build',
188
+ testCommand: 'npm test',
189
+ lintCommand: 'npm run lint',
190
+ sourceDir: 'src/',
191
+ testDir: 'tests/',
192
+ docsDir: 'docs/'
193
+ };
194
+
195
+ // Try to extract overview from outputs
196
+ if (this.outputs.constitution) {
197
+ const overview = this.extractSection(this.outputs.constitution, 'overview');
198
+ if (overview) context.overview = overview;
199
+ } else if (this.outputs.prd) {
200
+ const overview = this.extractSection(this.outputs.prd, 'overview');
201
+ if (overview) context.overview = overview;
202
+ } else if (this.outputs.prp) {
203
+ const overview = this.extractSection(this.outputs.prp, 'overview');
204
+ if (overview) context.overview = overview;
205
+ }
206
+
207
+ // Try to read package.json for accurate commands
208
+ try {
209
+ const packageJsonPath = path.join(this.projectPath, 'package.json');
210
+ if (await fs.pathExists(packageJsonPath)) {
211
+ const packageJson = await fs.readJson(packageJsonPath);
212
+ if (packageJson.scripts) {
213
+ if (packageJson.scripts.build) context.buildCommand = 'npm run build';
214
+ if (packageJson.scripts.test) context.testCommand = 'npm test';
215
+ if (packageJson.scripts.lint) context.lintCommand = 'npm run lint';
216
+ }
217
+ }
218
+ } catch (error) {
219
+ // Ignore, use defaults
220
+ }
221
+
222
+ return context;
223
+ }
224
+
225
+ /**
226
+ * Get framework-specific context
227
+ */
228
+ async getFrameworkContext() {
229
+ const context = {
230
+ type: this.framework,
231
+ keyPoints: ''
232
+ };
233
+
234
+ // Extract key points from outputs
235
+ if (this.outputs.constitution) {
236
+ context.keyPoints = this.extractSection(this.outputs.constitution, 'key principles');
237
+ } else if (this.outputs.prd) {
238
+ context.keyPoints = this.extractSection(this.outputs.prd, 'key requirements');
239
+ }
240
+
241
+ return context;
242
+ }
243
+
244
+ /**
245
+ * Get summary of generated outputs
246
+ */
247
+ async getOutputSummary() {
248
+ const files = Object.keys(this.outputs);
249
+ if (files.length === 0) return null;
250
+
251
+ return `Generated outputs: ${files.map(f => `${f}.md`).join(', ')}`;
252
+ }
253
+
254
+ /**
255
+ * Deploy agent files to target directory
256
+ */
257
+ async deployAgentFiles(targetDir) {
258
+ const agentsList = this.getAgentsList();
259
+ const deployedFiles = [];
260
+
261
+ for (const agent of agentsList) {
262
+ const srcAgent = path.join(__dirname, '../templates/shared/agents', `${agent}.md`);
263
+ const destAgent = path.join(targetDir, `${agent}.md`);
264
+
265
+ if (await fs.pathExists(srcAgent)) {
266
+ await fs.copy(srcAgent, destAgent);
267
+ deployedFiles.push(destAgent);
268
+ }
269
+ }
270
+
271
+ return deployedFiles;
272
+ }
273
+
274
+ /**
275
+ * Get list of agents based on framework
276
+ */
277
+ getAgentsList() {
278
+ switch (this.framework) {
279
+ case 'rapid':
280
+ return ['dev', 'qa'];
281
+ case 'balanced':
282
+ return ['analyst', 'pm', 'dev', 'qa'];
283
+ case 'comprehensive':
284
+ return ['analyst', 'pm', 'architect', 'sm', 'dev', 'qa'];
285
+ default:
286
+ return ['dev', 'qa'];
287
+ }
288
+ }
289
+
180
290
  /**
181
291
  * Generate all configurations (override in subclasses)
182
292
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iservu-inc/adf-cli",
3
- "version": "0.12.9",
3
+ "version": "0.12.11",
4
4
  "description": "CLI tool for AgentDevFramework - AI-assisted development framework with multi-provider AI support",
5
5
  "main": "index.js",
6
6
  "bin": {