@iservu-inc/adf-cli 0.12.12 → 0.13.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.
@@ -18,7 +18,12 @@
18
18
  "WebFetch(domain:github.com)",
19
19
  "WebFetch(domain:antigravity.google)",
20
20
  "WebSearch",
21
- "Bash(node -c:*)"
21
+ "Bash(node -c:*)",
22
+ "mcp__MCP_DOCKER__brave_web_search",
23
+ "Bash(adf guide:*)",
24
+ "WebFetch(domain:docs.windsurf.com)",
25
+ "mcp__MCP_DOCKER__resolve-library-id",
26
+ "mcp__MCP_DOCKER__get-library-docs"
22
27
  ],
23
28
  "deny": [],
24
29
  "ask": []
package/CHANGELOG.md CHANGED
@@ -5,6 +5,108 @@ 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.13.0] - 2026-01-03
9
+
10
+ ### 🚀 Major Feature - OpenCode Multi-Agent Integration
11
+
12
+ **Minor Release:** Enhanced OpenCode CLI integration with multi-provider, multi-agent support.
13
+
14
+ #### Added
15
+
16
+ **OpenCode Multi-Agent System:**
17
+ - ✨ **Complete OpenCode generator rewrite** using official configuration schema
18
+ - ✨ **Multi-provider support** - Automatically detects and configures all available AI providers from `.adf/.env`:
19
+ - Anthropic (Claude models)
20
+ - OpenAI (GPT models)
21
+ - Google Gemini (Gemini models)
22
+ - OpenRouter (100+ models)
23
+ - ✨ **Multi-agent configuration** - Creates specialized agents based on ADF framework level:
24
+ - **Rapid (PRP)**: dev, qa agents
25
+ - **Balanced (Spec-Kit)**: analyst, pm, dev, qa agents
26
+ - **Comprehensive (BMAD)**: analyst, pm, architect, sm, dev, qa agents
27
+ - ✨ **Optimal model assignment** - Each agent gets the best model for its task complexity:
28
+ - Powerful models (Sonnet/GPT-5/Gemini-2.5-Pro) → analyst, architect
29
+ - Balanced models (Haiku/GPT-4o/Gemini-1.5-Pro) → pm, dev
30
+ - Fast models (Haiku/GPT-4o-mini/Gemini-Flash) → qa, sm
31
+ - ✨ **MCP server integration** - Auto-configures filesystem access via Model Context Protocol
32
+ - ✨ **Auto-loads AGENTS.md** - References universal agent manifest and session outputs via `instructions` field
33
+ - ✨ **Tool permissions** - Agent-specific tool access (e.g., QA can't write production code)
34
+
35
+ **Incremental Deployment:**
36
+ - 📝 **Documented incremental tool deployment** - Add tools anytime with `adf deploy <tool>` without reinitializing
37
+
38
+ **Accurate Documentation:**
39
+ - 📖 **Updated OpenCode guide** with verified information from https://opencode.ai/docs
40
+ - 📖 Installation: `npm install -g opencode-ai@latest`
41
+ - 📖 Configuration schema: https://opencode.ai/config.json
42
+ - 📖 Multi-agent support highlighted in guide
43
+
44
+ #### Technical Details
45
+
46
+ **Modified Files:**
47
+ - `lib/generators/opencode-generator.js` - Complete rewrite (300+ lines)
48
+ - `getAvailableProviders()` - Detects providers from `.adf/.env`
49
+ - `generateProviderConfigurations()` - Creates provider configs with env var substitution
50
+ - `generateAgentConfigurations()` - Maps ADF agents to OpenCode agents
51
+ - `getOptimalModelForAgent()` - Selects best model per agent type
52
+ - `lib/commands/guide.js` - Updated OpenCode guide with accurate info
53
+ - `lib/commands/deploy.js` - Already integrated (no changes needed)
54
+
55
+ #### Impact
56
+ - ✅ OpenCode leverages ALL configured AI providers automatically
57
+ - ✅ Cost-effective: Each agent uses optimal model for its task
58
+ - ✅ Follows official OpenCode v1.0+ configuration standards
59
+ - ✅ Seamless integration with ADF's multi-provider AI system
60
+ - ✅ No breaking changes - existing deployments unaffected
61
+
62
+ ## [0.12.14] - 2025-12-23
63
+
64
+ ### 🐛 Fix - Windsurf Character Limit
65
+
66
+ **Patch Release:** Corrected Windsurf rule file character limit in guide.
67
+
68
+ #### Fixed
69
+
70
+ **Windsurf Guide Correction:**
71
+ - 🔧 **Fixed character limit** from 6000 to **12000 characters** per rule file
72
+ - Verified against official documentation: https://docs.windsurf.com/windsurf/cascade/memories
73
+ - Added documentation link to guide for reference
74
+
75
+ #### Impact
76
+ - ✅ Accurate character limit for `.windsurf/rules/*.md` files
77
+ - ✅ Users won't incorrectly split files at 6000 chars
78
+ - ✅ Guide now matches official Windsurf documentation
79
+
80
+ ## [0.12.13] - 2025-12-23
81
+
82
+ ### 🐛 Critical Fix - Guide System Accuracy
83
+
84
+ **Patch Release:** Fixed hallucinated information in `adf guide` command. All tool setup guides now use verified information from official documentation.
85
+
86
+ #### Fixed
87
+
88
+ **Guide System Overhaul:**
89
+ - 🔧 **Replaced all hallucinated content** with accurate information verified via official documentation
90
+ - Fixed installation commands, usage instructions, and file paths for all 9 supported tools
91
+ - All guides now reference real, working documentation and commands
92
+
93
+ **Tool-Specific Corrections:**
94
+ - **Windsurf**: Accurate `.windsurf/rules/*.md` format (6000 char limit per file)
95
+ - **Cursor**: Correct `.cursor/rules/*.mdc` format with YAML frontmatter
96
+ - **VS Code**: Verified `.github/copilot-instructions.md` usage with GitHub Copilot
97
+ - **Zed**: Accurate `settings.json` and MCP configuration details
98
+ - **Antigravity**: Correct "... → Customizations" menu instructions
99
+ - **Claude Code**: Real install script: `curl -fsSL https://claude.ai/install.sh | bash`
100
+ - **OpenCode**: GitHub repo reference, GitHub Copilot authentication requirement
101
+ - **Gemini CLI**: Correct package `@google/gemini-cli` and command `gemini` (not `gemini-cli`)
102
+ - **DeepAgent**: Correct package `@abacus-ai/cli` and command `abacusai` (not `deepagent`)
103
+
104
+ #### Impact
105
+ - ✅ Users can now trust guide information to be accurate
106
+ - ✅ Installation commands actually work as documented
107
+ - ✅ File paths and configurations match official tool documentation
108
+ - ✅ No more "command not found" errors from following guides
109
+
8
110
  ## [0.12.10] - 2025-12-23
9
111
 
10
112
  ### 🐛 Critical Bug Fixes
@@ -7,57 +7,68 @@ const TOOL_GUIDES = {
7
7
  name: 'Codeium Windsurf',
8
8
  files: [
9
9
  { path: '.windsurfrules', desc: 'Legacy rules file (deprecated)' },
10
- { path: '.windsurf/rules/*.md', desc: 'Modular rules (one per agent)' },
10
+ { path: '.windsurf/rules/*.md', desc: 'Modular rules (max 12000 chars per file)' },
11
11
  { path: '.windsurf/workflows/*.md', desc: 'Workflow definitions' },
12
12
  { path: 'AGENTS.md', desc: 'Universal agent manifest (ANDF standard)' }
13
13
  ],
14
14
  setup: [
15
- '1. Open your project in Windsurf IDE',
16
- '2. Windsurf automatically detects .windsurfrules and .windsurf/ directory',
17
- '3. Agent rules are loaded when you start a coding session',
18
- '4. Use Cmd/Ctrl+L to open AI chat with agent context'
15
+ '1. Download and install Windsurf from: https://codeium.com/windsurf',
16
+ '2. Open your project in Windsurf IDE',
17
+ '3. Create .windsurf/rules/ directory for modular rules',
18
+ '4. Each .md file in rules/ directory auto-loaded (max 12000 chars)',
19
+ '5. Rules active immediately in Cascade AI'
19
20
  ],
20
21
  usage: [
21
- '• Start coding - agents automatically follow project rules',
22
- '• Use @agents.md to reference the agent manifest',
23
- '• Access workflows via Cmd/Ctrl+K Select Workflow',
24
- '• Agents adapt based on your workflow level (rapid/balanced/comprehensive)'
22
+ '• Cmd/Ctrl+L - Open Cascade AI chat',
23
+ '• Rules from .windsurf/rules/*.md applied automatically',
24
+ '• Character limit: 12000 chars per rule file',
25
+ '• Split large agents across multiple .md files if needed',
26
+ '• Use @agents.md to reference manifest explicitly',
27
+ '• Workflows in .windsurf/workflows/ directory',
28
+ '• Docs: https://docs.windsurf.com/windsurf/cascade/memories'
25
29
  ],
26
30
  mcpServers: [],
27
31
  troubleshooting: [
28
- '• Rules not loading? Check .windsurf/rules/ contains .md files',
29
- '• Restart Windsurf if rules don\'t update',
30
- '• Check Output Windsurf for any parsing errors'
32
+ '• Rules not loading? Check each .md file is ≤12000 characters',
33
+ '• Verify .windsurf/rules/ directory exists',
34
+ '• Restart Windsurf IDE after adding new rules',
35
+ '• Check View → Output → Windsurf for parsing errors'
31
36
  ]
32
37
  },
33
38
 
34
39
  'cursor': {
35
40
  name: 'Cursor AI IDE',
36
41
  files: [
37
- { path: '.cursor/rules', desc: 'Cursor rules file (symlink to AGENTS.md)' },
38
- { path: '.cursorrules', desc: 'Deprecated - shows migration notice' },
42
+ { path: '.cursor/rules/*.mdc', desc: 'Cursor rules with YAML frontmatter' },
43
+ { path: '.cursorrules', desc: 'Legacy single-file rules (deprecated)' },
39
44
  { path: 'AGENTS.md', desc: 'Universal agent manifest' },
40
45
  { path: '.context/', desc: 'Deep context (architecture, glossary)' }
41
46
  ],
42
47
  setup: [
43
- '1. Open your project in Cursor',
44
- '2. Cursor automatically reads .cursor/rules (which links to AGENTS.md)',
45
- '3. Rules are active in all AI interactions (Cmd/Ctrl+K and Cmd/Ctrl+L)',
46
- '4. No additional setup needed!'
48
+ '1. Download and install Cursor from: https://cursor.sh',
49
+ '2. Open your project in Cursor',
50
+ '3. Create .cursor/rules/ directory',
51
+ '4. Add .mdc files with YAML frontmatter (see usage)',
52
+ '5. Rules auto-apply to Agent (Cmd/Ctrl+L) and Cmd+K'
47
53
  ],
48
54
  usage: [
49
- '• Cmd/Ctrl+K - Inline code generation with agent context',
50
- '• Cmd/Ctrl+L - Chat with AI using project rules',
51
- '• Use @AGENTS.md to explicitly reference agent instructions',
52
- '• Use @.context/memory/ for architecture details',
55
+ '• Cmd/Ctrl+K - Inline editing with rules applied',
56
+ '• Cmd/Ctrl+L - Chat (Agent) with rules applied',
57
+ '• Rules format (.mdc file):',
58
+ ' ---',
59
+ ' title: Developer Agent',
60
+ ' description: Development guidelines',
61
+ ' ---',
62
+ ' [Your agent instructions here]',
63
+ '• Use @AGENTS.md to reference manifest',
53
64
  '• Tab to accept AI suggestions'
54
65
  ],
55
66
  mcpServers: [],
56
67
  troubleshooting: [
57
- '• Rules not active? Check .cursor/rules exists',
58
- '• Verify symlink: should point to ../AGENTS.md',
59
- '• Restart Cursor if rules don\'t apply',
60
- '• Check Settings → Features → Rules enabled'
68
+ '• Rules not active? Check .cursor/rules/ directory exists',
69
+ '• Verify .mdc files have valid YAML frontmatter',
70
+ '• Restart Cursor after adding new rules',
71
+ '• Check Cursor Settings → Features → Rules enabled'
61
72
  ]
62
73
  },
63
74
 
@@ -65,103 +76,106 @@ const TOOL_GUIDES = {
65
76
  name: 'Visual Studio Code (GitHub Copilot)',
66
77
  files: [
67
78
  { path: '.github/copilot-instructions.md', desc: 'GitHub Copilot custom instructions' },
68
- { path: '.vscode/settings.json', desc: 'Custom chat participants and commands' },
79
+ { path: '.vscode/settings.json', desc: 'Workspace settings' },
69
80
  { path: 'AGENTS.md', desc: 'Universal agent manifest' },
70
81
  { path: '.context/', desc: 'Deep context directory' }
71
82
  ],
72
83
  setup: [
73
- '1. Install GitHub Copilot extension in VS Code',
74
- '2. Open your project - settings load automatically',
75
- '3. Custom instructions are read by Copilot automatically',
76
- '4. Restart VS Code to load custom chat modes'
84
+ '1. Download VS Code from: https://code.visualstudio.com',
85
+ '2. Install GitHub Copilot extension from marketplace',
86
+ '3. Create .github/copilot-instructions.md in project root',
87
+ '4. Copilot automatically reads instructions on chat start',
88
+ '5. No restart needed - instructions load per conversation'
77
89
  ],
78
90
  usage: [
79
- '• Use @workspace to include project context in Copilot chat',
91
+ '• Cmd/Ctrl+I - Inline Copilot chat',
92
+ '• Cmd/Ctrl+Shift+I - Copilot panel (sidebar)',
80
93
  '• Copilot reads .github/copilot-instructions.md automatically',
81
- '• Custom chat participants defined in settings.json:',
82
- ' - @architect - Architecture discussions',
83
- ' - @reviewer - Code review',
84
- ' - @planner - Planning and estimation',
85
- '• Inline suggestions follow your project\'s patterns'
94
+ '• Use @workspace to include entire workspace context',
95
+ ' Reference specific files: @filename.js',
96
+ ' Instructions format: Plain markdown in copilot-instructions.md',
97
+ ' Documentation: https://docs.github.com/copilot'
86
98
  ],
87
99
  mcpServers: [],
88
100
  troubleshooting: [
89
- '• Instructions not working? Check GitHub Copilot is active',
90
- '• Verify .github/copilot-instructions.md exists',
91
- '• Settings not loading? Reload VS Code window',
92
- '• Check Copilot status in bottom-right status bar'
101
+ '• Instructions not loading? Verify .github/ directory exists',
102
+ '• Check Copilot status icon in bottom-right corner',
103
+ '• Restart Copilot: Cmd/Ctrl+Shift+P "Copilot: Restart"',
104
+ '• Verify GitHub Copilot subscription is active'
93
105
  ]
94
106
  },
95
107
 
96
108
  'zed': {
97
109
  name: 'Zed Editor',
98
110
  files: [
99
- { path: '.zed/settings.json', desc: 'Zed-specific settings with MCP config' },
100
- { path: '.zed/keymap.json', desc: 'Agent switching shortcuts' },
101
- { path: '.zed/rules', desc: 'Symlink to AGENTS.md' },
111
+ { path: '.zed/settings.json', desc: 'Project-specific settings' },
102
112
  { path: 'AGENTS.md', desc: 'Universal agent manifest' },
103
- { path: '.context/', desc: 'Deep context accessible via MCP' }
113
+ { path: '.context/', desc: 'Deep context directory' }
104
114
  ],
105
115
  setup: [
106
- '1. Open your project in Zed',
107
- '2. Zed reads .zed/settings.json automatically',
108
- '3. MCP servers start automatically (project_context, archon)',
109
- '4. Use keyboard shortcuts to switch agents (Ctrl+Shift+A)'
116
+ '1. Download and install Zed from: https://zed.dev',
117
+ '2. Open your project in Zed',
118
+ '3. Create .zed/settings.json in project root (optional)',
119
+ '4. Global settings at: ~/.config/zed/settings.json',
120
+ '5. MCP servers configured in settings.json'
110
121
  ],
111
122
  usage: [
112
- '• Ctrl+Shift+A - Switch active agent',
113
- '• Ctrl+Enter - Quick agent action',
114
- '• Ctrl+Shift+L - List available tools/workflows',
115
- '• Agents access .context/ via MCP filesystem server',
116
- ' Use /assistant to interact with current agent'
123
+ '• /assistant - Open AI assistant panel',
124
+ '• Cmd/Ctrl+Enter - Submit to assistant',
125
+ '• Configure MCP servers in settings.json:',
126
+ ' {',
127
+ ' "context_servers": {',
128
+ ' "project": {',
129
+ ' "command": "npx",',
130
+ ' "args": ["@modelcontextprotocol/server-filesystem", ".context"]',
131
+ ' }',
132
+ ' }',
133
+ ' }',
134
+ '• Reference AGENTS.md manually in conversation'
117
135
  ],
118
136
  mcpServers: [
119
137
  {
120
- name: 'project_context',
121
- command: 'npx @modelcontextprotocol/server-filesystem .context',
122
- desc: 'Provides read-only access to .context/ directory'
123
- },
124
- {
125
- name: 'archon',
126
- url: 'http://archon.ad.iservu.cc:8051/mcp',
127
- desc: 'Internal API documentation and RAG (if available)'
138
+ name: 'filesystem',
139
+ command: 'npx @modelcontextprotocol/server-filesystem',
140
+ desc: 'Provides file access via MCP protocol'
128
141
  }
129
142
  ],
130
143
  troubleshooting: [
131
- '• Rules not loading? Check .zed/rules symlink exists',
132
- '• MCP servers not starting? Check Node.js is installed',
133
- '• Verify MCP config in .zed/settings.json',
134
- '• Check Zed logs: View → Debug → Show Logs'
144
+ '• MCP servers not starting? Check Node.js installed',
145
+ '• Verify settings.json syntax is valid JSON',
146
+ '• Check Zed logs: View → Debug → Developer Tools',
147
+ '• Documentation: https://zed.dev/docs'
135
148
  ]
136
149
  },
137
150
 
138
151
  'antigravity': {
139
152
  name: 'Google Antigravity',
140
153
  files: [
141
- { path: '.antigravity/agents.yaml', desc: 'Antigravity agent configuration' },
142
- { path: 'AGENTS.md', desc: 'Universal agent manifest (mounted in container)' },
154
+ { path: 'AGENTS.md', desc: 'Universal agent manifest' },
143
155
  { path: '.context/', desc: 'Deep context (architecture, glossary)' }
144
156
  ],
145
157
  setup: [
146
- '1. Open your project in Antigravity',
147
- '2. Antigravity reads .antigravity/agents.yaml',
148
- '3. AGENTS.md is mounted read-only in agent filesystem',
149
- '4. Agent automatically reads AGENTS.md on startup',
150
- '5. No additional setup needed!'
158
+ '1. Access Antigravity (Google internal tool)',
159
+ '2. Open your project or codebase',
160
+ '3. Click ... menu Customizations',
161
+ '4. Add Rules and Workflows via customization UI',
162
+ '5. Rules and workflows saved automatically'
151
163
  ],
152
164
  usage: [
153
- '• Agent has access to AGENTS.md via file system mount',
154
- '• .context/ directory accessible for architecture details',
155
- '• Use conversational commands: "follow the dev agent workflow"',
156
- '• Agent references AGENTS.md automatically for instructions',
157
- '• Switch agent modes by referencing different roles in AGENTS.md'
165
+ '• Access customizations: Click ... Customizations',
166
+ '• Rules: Add custom instructions for AI behavior',
167
+ '• Workflows: Define multi-step processes',
168
+ '• Reference project files in conversation',
169
+ '• Use "Read AGENTS.md" to access agent manifest',
170
+ '• Conversational commands: "Follow dev workflow"',
171
+ '• .context/ directory accessible for detailed docs'
158
172
  ],
159
173
  mcpServers: [],
160
174
  troubleshooting: [
161
- '• Agent not following rules? Check .antigravity/agents.yaml exists',
162
- '• Verify AGENTS.md file path in filesystem mount',
163
- '• Check agent logs for AGENTS.md read confirmation',
164
- '• Restart Antigravity session if config doesn\'t load'
175
+ '• Customizations not applying? Check ... → Customizations menu',
176
+ '• Restart Antigravity session if changes not reflected',
177
+ '• Verify rules syntax is correct in customization UI',
178
+ '• Contact Google internal support for Antigravity issues'
165
179
  ]
166
180
  },
167
181
 
@@ -169,77 +183,84 @@ const TOOL_GUIDES = {
169
183
  name: 'Claude Code CLI',
170
184
  files: [
171
185
  { path: '.framework/agents/*.md', desc: 'Agent definition files (analyst, pm, dev, qa, etc.)' },
186
+ { path: '.claude/commands/', desc: 'Custom commands directory' },
172
187
  { path: 'AGENTS.md', desc: 'Universal agent manifest' },
173
188
  { path: '.context/', desc: 'Deep context directory' }
174
189
  ],
175
190
  setup: [
176
- '1. Navigate to your project directory',
177
- '2. Run: claude-code --agents .framework/agents/',
178
- '3. Or configure in .claude/settings.json:',
179
- ' {',
180
- ' "agentsPath": ".framework/agents/"',
181
- ' }',
182
- '4. Claude Code loads agents automatically'
191
+ '1. Install Claude Code: curl -fsSL https://claude.ai/install.sh | bash',
192
+ '2. Authenticate: Follow prompts after installation',
193
+ '3. Navigate to your project directory',
194
+ '4. Custom commands in .claude/commands/ (optional)',
195
+ '5. Reference agent files manually in conversation'
183
196
  ],
184
197
  usage: [
185
198
  '• Start chat: claude-code',
186
- '• Agents are available as slash commands:',
187
- ' /dev - Switch to developer agent',
188
- ' /pm - Switch to product manager agent',
189
- ' /qa - Switch to QA engineer agent',
190
- '• Reference AGENTS.md in chat: "read AGENTS.md"',
191
- '• Access requirements: "show me .adf/sessions/*/outputs/"'
199
+ '• Interactive terminal-based chat with Claude',
200
+ ' Reference project files: "read .framework/agents/dev.md"',
201
+ ' Access AGENTS.md: "follow instructions in AGENTS.md"',
202
+ ' Custom commands: Place scripts in .claude/commands/',
203
+ '• Requirements: "show .adf/sessions/*/outputs/"',
204
+ '• Documentation: https://claude.ai/code'
192
205
  ],
193
206
  mcpServers: [
194
207
  {
195
208
  name: 'filesystem',
196
- desc: 'Can be configured to access project files',
197
- command: 'Add to .claude/settings.json MCP servers config'
209
+ desc: 'Can be configured via .claude/settings.json',
210
+ command: 'Configure MCP servers in settings file'
198
211
  }
199
212
  ],
200
213
  troubleshooting: [
201
- '• Agents not loading? Check .framework/agents/ contains .md files',
202
- '• Verify agentsPath in .claude/settings.json',
203
- '• Run: claude-code doctor to check configuration',
204
- '• Check for agent file read permissions'
214
+ '• Installation issues? Check: https://claude.ai/code',
215
+ '• Command not found? Restart terminal after install',
216
+ '• Authentication failed? Run installation script again',
217
+ '• Custom commands not working? Check .claude/commands/ permissions'
205
218
  ]
206
219
  },
207
220
 
208
221
  'opencode': {
209
222
  name: 'OpenCode CLI',
210
223
  files: [
211
- { path: '.opencode.json', desc: 'OpenCode project configuration' },
212
- { path: 'AGENTS.md', desc: 'Universal agent manifest' },
224
+ { path: '.opencode.json', desc: 'OpenCode multi-agent configuration' },
225
+ { path: 'AGENTS.md', desc: 'Universal agent manifest (auto-referenced)' },
213
226
  { path: '.context/', desc: 'Deep context directory' }
214
227
  ],
215
228
  setup: [
216
- '1. Navigate to your project directory',
217
- '2. Run: opencode init (if not already initialized)',
218
- '3. OpenCode reads .opencode.json automatically',
219
- '4. MCP filesystem server starts automatically',
220
- '5. Agents configured based on workflow level'
229
+ '1. Install: npm install -g opencode-ai@latest',
230
+ '2. Or quick install: curl -fsSL https://opencode.ai/install | bash',
231
+ '3. Authenticate: opencode (interactive provider setup)',
232
+ '4. Navigate to your project directory',
233
+ '5. OpenCode reads .opencode.json automatically'
221
234
  ],
222
235
  usage: [
223
- '• Start coding session: opencode',
224
- '• Agents automatically have project context',
225
- '• MCP provides access to all project files',
226
- '• Use natural language for tasks:',
227
- ' "Implement the login feature"',
228
- ' "Review the authentication code"',
229
- ' "Run tests and fix failures"'
236
+ '• Start session: opencode',
237
+ '• Terminal-based AI coding agent (TUI)',
238
+ '• Supports multiple AI providers (Anthropic, OpenAI, Google, OpenRouter)',
239
+ '• Multi-agent system with specialized agents:',
240
+ ' - dev (primary): Senior software engineer',
241
+ ' - analyst: Business analyst for requirements',
242
+ ' - pm: Product manager for planning',
243
+ ' - architect: Solutions architect for design',
244
+ ' - qa: QA engineer for testing',
245
+ ' - sm: Scrum master for agile workflow',
246
+ '• Configuration schema: https://opencode.ai/config.json',
247
+ '• Auto-loads AGENTS.md and session outputs',
248
+ '• Documentation: https://opencode.ai/docs'
230
249
  ],
231
250
  mcpServers: [
232
251
  {
233
- name: 'filesystem',
234
- command: 'npx -y @modelcontextprotocol/server-filesystem',
235
- desc: 'Provides full project file access'
252
+ name: 'project_filesystem',
253
+ desc: 'Provides project file access via MCP protocol',
254
+ command: 'npx -y @modelcontextprotocol/server-filesystem'
236
255
  }
237
256
  ],
238
257
  troubleshooting: [
239
- '• Config not loading? Check .opencode.json syntax',
240
- '• MCP errors? Ensure npx is available',
241
- '• Verify Node.js version >= 18.0.0',
242
- '• Run: opencode --version to check installation'
258
+ '• Command not found? Restart terminal after install',
259
+ '• Config errors? Validate against: https://opencode.ai/config.json',
260
+ '• Provider auth issues? Run: opencode (interactive setup)',
261
+ '• Check version: opencode --version',
262
+ '• Documentation: https://opencode.ai/docs',
263
+ '• GitHub: https://github.com/anomalyco/opencode/issues'
243
264
  ]
244
265
  },
245
266
 
@@ -251,26 +272,26 @@ const TOOL_GUIDES = {
251
272
  { path: '.context/', desc: 'Deep context directory' }
252
273
  ],
253
274
  setup: [
254
- '1. Install Gemini CLI: npm install -g @google/generative-ai-cli',
255
- '2. Configure API key: export GOOGLE_API_KEY=your_key',
256
- '3. Navigate to your project directory',
257
- '4. Gemini CLI automatically detects GEMINI.md'
275
+ '1. Install Gemini CLI: npm install -g @google/gemini-cli',
276
+ '2. Configure API key: gemini auth (interactive setup)',
277
+ '3. Or set manually: export GOOGLE_API_KEY=your_key',
278
+ '4. Navigate to your project directory',
279
+ '5. Start CLI: gemini (not gemini-cli)'
258
280
  ],
259
281
  usage: [
260
- '• Start session: gemini-cli',
261
- '• Gemini reads GEMINI.md automatically for context',
262
- '• Reference project docs:',
263
- ' "Read the requirements in .adf/sessions/"',
264
- ' "Follow the workflow defined in GEMINI.md"',
265
- '• Use for code generation, review, and planning',
266
- '• Agent adapts based on your workflow level'
282
+ '• Start session: gemini',
283
+ '• Interactive chat interface with Google Gemini models',
284
+ '• Reference project files: gemini --file path/to/file',
285
+ ' Use GEMINI.md for project context (reference manually)',
286
+ ' Access requirements: "Read .adf/sessions/*/outputs/"',
287
+ '• Documentation: https://geminicli.com'
267
288
  ],
268
289
  mcpServers: [],
269
290
  troubleshooting: [
270
- '• GEMINI.md not detected? Check file exists in project root',
271
- '• API key issues? Verify GOOGLE_API_KEY is set',
272
- '• Check Gemini CLI version: gemini-cli --version',
273
- '• Review GEMINI.md for correct formatting'
291
+ '• Command not found? Verify npm global install path in PATH',
292
+ '• API key issues? Run: gemini auth',
293
+ '• Check installation: gemini --version',
294
+ '• Documentation: https://geminicli.com/docs'
274
295
  ]
275
296
  },
276
297
 
@@ -282,24 +303,26 @@ const TOOL_GUIDES = {
282
303
  { path: 'AGENTS.md', desc: 'Universal agent manifest' }
283
304
  ],
284
305
  setup: [
285
- '1. Install DeepAgent: pip install deepagent',
286
- '2. Navigate to your project directory',
287
- '3. Run: deepagent init (loads .deepagent/ config)',
288
- '4. Agents are loaded automatically'
306
+ '1. Install Abacus.ai CLI: npm install -g @abacus-ai/cli',
307
+ '2. Authenticate: abacusai login',
308
+ '3. Navigate to your project directory',
309
+ '4. DeepAgent configurations in .deepagent/ directory',
310
+ '5. Use command: abacusai (not deepagent)'
289
311
  ],
290
312
  usage: [
291
- '• Start session: deepagent',
292
- '• Switch agents: deepagent --agent dev',
293
- '• Agents read their .md files for instructions',
294
- '• Use natural language for development tasks',
295
- '• DeepAgent follows workflow level automatically'
313
+ '• Start session: abacusai',
314
+ '• Terminal/CLI interface for Abacus.ai platform',
315
+ '• Access DeepAgent features via CLI commands',
316
+ '• Agent markdown files can be referenced manually',
317
+ '• Check available commands: abacusai --help',
318
+ '• Documentation: https://abacus.ai/docs'
296
319
  ],
297
320
  mcpServers: [],
298
321
  troubleshooting: [
299
- '• Agents not loading? Check .deepagent/agents/ directory',
300
- '• Verify agent .md files are present',
301
- '• Check DeepAgent version: deepagent --version',
302
- '• Review .deepagent/README.md for setup info'
322
+ '• Command not found? Verify npm global install: npm list -g @abacus-ai/cli',
323
+ '• Authentication issues? Run: abacusai login',
324
+ '• Check CLI version: abacusai --version',
325
+ '• Documentation: https://abacus.ai/docs'
303
326
  ]
304
327
  }
305
328
  };
@@ -4,12 +4,18 @@ const ToolConfigGenerator = require('./tool-config-generator');
4
4
 
5
5
  /**
6
6
  * Generator for OpenCode CLI configurations
7
- * Creates .opencode.json with project-specific configuration
7
+ * Creates .opencode.json with multi-agent, multi-provider configuration
8
+ *
9
+ * OpenCode Configuration Reference:
10
+ * - Schema: https://opencode.ai/config.json
11
+ * - Docs: https://opencode.ai/docs/
12
+ * - Multi-provider support: Anthropic, OpenAI, Google Gemini, OpenRouter
13
+ * - Multi-agent support: Specialized agents for different tasks
8
14
  */
9
15
  class OpenCodeGenerator extends ToolConfigGenerator {
10
16
  /**
11
17
  * Generate OpenCode configuration
12
- * @returns {Object} Generated file path
18
+ * @returns {Object} Generated file paths
13
19
  */
14
20
  async generate() {
15
21
  await this.initialize();
@@ -19,134 +25,288 @@ class OpenCodeGenerator extends ToolConfigGenerator {
19
25
  // Generate configuration
20
26
  const config = await this.generateConfig();
21
27
 
28
+ // Write with proper JSON formatting (no schema in JSON, only comments)
22
29
  await fs.writeJson(configPath, config, { spaces: 2 });
23
30
 
24
31
  return { config: configPath };
25
32
  }
26
33
 
27
34
  /**
28
- * Generate .opencode.json configuration
35
+ * Generate .opencode.json configuration following official OpenCode schema
36
+ * Reference: https://opencode.ai/docs/config
29
37
  */
30
38
  async generateConfig() {
31
39
  const projectContext = await this.getProjectContext();
32
- const frameworkContext = await this.getFrameworkContext();
40
+ const providers = await this.getAvailableProviders();
41
+ const agents = await this.generateAgentConfigurations(providers);
33
42
 
34
- return {
35
- data: {
36
- directory: ".opencode"
43
+ const config = {
44
+ "$schema": "https://opencode.ai/config.json",
45
+
46
+ // Provider configurations (Anthropic, OpenAI, Google, OpenRouter, etc.)
47
+ "provider": await this.generateProviderConfigurations(providers),
48
+
49
+ // Default model (use the most powerful available)
50
+ "model": this.getDefaultModel(providers),
51
+
52
+ // Agent configurations (mapped from ADF framework)
53
+ "agent": agents,
54
+
55
+ // Default agent for primary interactions
56
+ "default_agent": this.getDefaultAgent(),
57
+
58
+ // Global tool permissions
59
+ "tools": {
60
+ "write": true,
61
+ "edit": true,
62
+ "bash": true,
63
+ "webfetch": true,
64
+ "patch": true
37
65
  },
38
- agents: {
39
- coder: {
40
- model: this.getCoderModel(),
41
- maxTokens: 8000
66
+
67
+ // Permission settings (ask for destructive operations)
68
+ "permission": {
69
+ "edit": "allow",
70
+ "bash": {
71
+ "git push": "ask",
72
+ "rm -rf": "ask",
73
+ "*": "allow"
42
74
  },
43
- task: {
44
- model: this.getTaskModel(),
45
- maxTokens: 4000
46
- }
47
- },
48
- systemPrompt: this.generateSystemPrompt(projectContext, frameworkContext),
49
- projectContext: {
50
- framework: this.getFrameworkName(),
51
- session: this.getSessionId(),
52
- outputsPath: `.adf/sessions/${this.getSessionId()}/outputs/`
75
+ "webfetch": "allow"
53
76
  },
54
- mcpServers: {
55
- filesystem: {
56
- command: "npx",
57
- args: ["-y", "@modelcontextprotocol/server-filesystem", this.projectPath],
58
- env: {}
77
+
78
+ // Instructions - reference AGENTS.md and session outputs
79
+ "instructions": [
80
+ "AGENTS.md",
81
+ `.adf/sessions/${this.getSessionId()}/outputs/*.md`
82
+ ],
83
+
84
+ // MCP servers for filesystem access
85
+ "mcp": {
86
+ "project_filesystem": {
87
+ "type": "local",
88
+ "command": ["npx", "-y", "@modelcontextprotocol/server-filesystem", this.projectPath],
89
+ "enabled": true
59
90
  }
60
91
  },
61
- debug: false,
62
- autoCompact: true
92
+
93
+ // Server configuration for 'opencode serve'
94
+ "server": {
95
+ "port": 4096,
96
+ "hostname": "localhost"
97
+ },
98
+
99
+ // Auto-update enabled
100
+ "autoupdate": true
63
101
  };
102
+
103
+ return config;
64
104
  }
65
105
 
66
106
  /**
67
- * Generate system prompt for OpenCode
107
+ * Detect available AI providers from .adf/.env
108
+ * Returns array of provider IDs that have API keys configured
68
109
  */
69
- generateSystemPrompt(projectContext, frameworkContext) {
70
- const agentRole = this.getAgentRole();
110
+ async getAvailableProviders() {
111
+ const envPath = path.join(this.projectPath, '.adf', '.env');
112
+ const providers = [];
113
+
114
+ if (await fs.pathExists(envPath)) {
115
+ const envContent = await fs.readFile(envPath, 'utf-8');
116
+ const lines = envContent.split('\n');
117
+
118
+ for (const line of lines) {
119
+ if (line.includes('ANTHROPIC_API_KEY=') && !line.startsWith('#')) {
120
+ providers.push('anthropic');
121
+ }
122
+ if (line.includes('OPENAI_API_KEY=') && !line.startsWith('#')) {
123
+ providers.push('openai');
124
+ }
125
+ if ((line.includes('GEMINI_API_KEY=') || line.includes('GOOGLE_API_KEY=')) && !line.startsWith('#')) {
126
+ providers.push('google');
127
+ }
128
+ if (line.includes('OPENROUTER_API_KEY=') && !line.startsWith('#')) {
129
+ providers.push('openrouter');
130
+ }
131
+ }
132
+ }
133
+
134
+ // Default to Anthropic if no providers found
135
+ return providers.length > 0 ? providers : ['anthropic'];
136
+ }
137
+
138
+ /**
139
+ * Generate provider configurations for OpenCode
140
+ * Reference: https://opencode.ai/docs/providers
141
+ */
142
+ async generateProviderConfigurations(providers) {
143
+ const config = {};
144
+
145
+ if (providers.includes('anthropic')) {
146
+ config.anthropic = {
147
+ "options": {
148
+ "apiKey": "{env:ANTHROPIC_API_KEY}"
149
+ },
150
+ "models": {}
151
+ };
152
+ }
71
153
 
72
- return `You are ${agentRole} for the ${projectContext.name} project.
154
+ if (providers.includes('openai')) {
155
+ config.openai = {
156
+ "options": {
157
+ "apiKey": "{env:OPENAI_API_KEY}"
158
+ },
159
+ "models": {}
160
+ };
161
+ }
73
162
 
74
- FRAMEWORK: ${this.getFrameworkName()}
163
+ if (providers.includes('google')) {
164
+ config.google = {
165
+ "options": {
166
+ "apiKey": "{env:GEMINI_API_KEY}"
167
+ },
168
+ "models": {}
169
+ };
170
+ }
75
171
 
76
- PROJECT OVERVIEW:
77
- ${projectContext.overview || 'AI-assisted development project'}
172
+ if (providers.includes('openrouter')) {
173
+ config.openrouter = {
174
+ "options": {
175
+ "apiKey": "{env:OPENROUTER_API_KEY}"
176
+ },
177
+ "models": {}
178
+ };
179
+ }
78
180
 
79
- KEY REQUIREMENTS:
80
- ${frameworkContext.keyPoints || '- Follow project structure\n- Maintain code quality\n- Write comprehensive tests'}
181
+ return config;
182
+ }
81
183
 
82
- OPERATIONAL RULES:
83
- 1. Read project documentation in .adf/sessions/${this.getSessionId()}/outputs/
84
- 2. Follow the workflow level: ${this.framework}
85
- 3. All code changes must pass tests
86
- 4. Never commit secrets or API keys
87
- 5. Follow conventional commits format
184
+ /**
185
+ * Generate agent configurations based on ADF framework level
186
+ * Reference: https://opencode.ai/docs/agents
187
+ */
188
+ async generateAgentConfigurations(providers) {
189
+ const agents = {};
190
+ const agentsList = this.getAgentsList();
88
191
 
89
- BUILD & TEST:
90
- - Build: ${projectContext.buildCommand || 'npm run build'}
91
- - Test: ${projectContext.testCommand || 'npm test'}
92
- - Lint: ${projectContext.lintCommand || 'npm run lint'}
192
+ // Map ADF agents to OpenCode agents with optimal models
193
+ for (const agentName of agentsList) {
194
+ const agentConfig = this.getAgentConfig(agentName, providers);
195
+ agents[agentName] = agentConfig;
196
+ }
93
197
 
94
- Generated by ADF CLI v${this.getADFVersion()}`;
198
+ return agents;
95
199
  }
96
200
 
97
201
  /**
98
- * Get agent role based on framework
202
+ * Get configuration for a specific agent
99
203
  */
100
- getAgentRole() {
101
- const roles = {
102
- 'rapid': 'a Rapid Development Engineer',
103
- 'balanced': 'a Senior Software Engineer',
104
- 'comprehensive': 'a Principal Solutions Architect'
204
+ getAgentConfig(agentName, providers) {
205
+ const agentDescriptions = {
206
+ 'analyst': 'Business analyst for requirements and specifications',
207
+ 'pm': 'Product manager for planning and prioritization',
208
+ 'architect': 'Solutions architect for system design and architecture decisions',
209
+ 'sm': 'Scrum master for agile workflow and team coordination',
210
+ 'dev': 'Senior software engineer for implementation and coding',
211
+ 'qa': 'QA engineer for testing and quality assurance'
212
+ };
213
+
214
+ const config = {
215
+ "description": agentDescriptions[agentName] || 'AI coding assistant',
216
+ "mode": agentName === 'dev' ? 'primary' : 'subagent',
217
+ "model": this.getOptimalModelForAgent(agentName, providers)
105
218
  };
106
- return roles[this.framework] || 'an AI Coding Assistant';
219
+
220
+ // Agent-specific tool permissions
221
+ if (agentName === 'qa') {
222
+ config.tools = {
223
+ "write": false, // QA shouldn't write production code
224
+ "bash": true // Can run tests
225
+ };
226
+ } else if (agentName === 'architect' || agentName === 'analyst') {
227
+ config.tools = {
228
+ "write": false, // Analysis/design agents don't write code
229
+ "edit": false,
230
+ "bash": false
231
+ };
232
+ }
233
+
234
+ return config;
107
235
  }
108
236
 
109
237
  /**
110
- * Get model for coder agent based on framework
238
+ * Get optimal model for each agent type based on task complexity
111
239
  */
112
- getCoderModel() {
113
- const models = {
114
- 'rapid': 'anthropic/claude-3-5-sonnet-20241022',
115
- 'balanced': 'anthropic/claude-sonnet-4-5-20250929',
116
- 'comprehensive': 'anthropic/claude-opus-4-5-20251101'
240
+ getOptimalModelForAgent(agentName, providers) {
241
+ // Model selection strategy:
242
+ // - Powerful models: analyst, architect (deep thinking required)
243
+ // - Balanced models: pm, dev (main implementation)
244
+ // - Fast models: qa, sm (routine tasks)
245
+
246
+ const modelTiers = {
247
+ powerful: this.getPowerfulModel(providers),
248
+ balanced: this.getBalancedModel(providers),
249
+ fast: this.getFastModel(providers)
250
+ };
251
+
252
+ const agentModelMap = {
253
+ 'analyst': modelTiers.powerful,
254
+ 'architect': modelTiers.powerful,
255
+ 'pm': modelTiers.balanced,
256
+ 'dev': modelTiers.balanced,
257
+ 'qa': modelTiers.fast,
258
+ 'sm': modelTiers.fast
117
259
  };
118
- return models[this.framework] || 'anthropic/claude-3-5-sonnet-20241022';
260
+
261
+ return agentModelMap[agentName] || modelTiers.balanced;
119
262
  }
120
263
 
121
264
  /**
122
- * Get model for task agent
265
+ * Get the most powerful model from available providers
123
266
  */
124
- getTaskModel() {
125
- return 'anthropic/claude-3-5-haiku-20241022';
267
+ getPowerfulModel(providers) {
268
+ if (providers.includes('anthropic')) return 'anthropic/claude-sonnet-4-5-20250929';
269
+ if (providers.includes('openai')) return 'openai/gpt-5';
270
+ if (providers.includes('google')) return 'google/gemini-2.5-pro';
271
+ if (providers.includes('openrouter')) return 'openrouter/anthropic/claude-sonnet-4';
272
+ return 'anthropic/claude-sonnet-4-5-20250929'; // Default
126
273
  }
127
274
 
128
275
  /**
129
- * Get framework display name
276
+ * Get a balanced model from available providers
130
277
  */
131
- getFrameworkName() {
132
- const names = {
133
- 'rapid': 'Rapid Development (PRP)',
134
- 'balanced': 'Balanced (Specification-Driven)',
135
- 'comprehensive': 'BMAD Comprehensive (Enterprise)'
136
- };
137
- return names[this.framework] || this.framework;
278
+ getBalancedModel(providers) {
279
+ if (providers.includes('anthropic')) return 'anthropic/claude-haiku-4-5-20250514';
280
+ if (providers.includes('openai')) return 'openai/gpt-4o';
281
+ if (providers.includes('google')) return 'google/gemini-1.5-pro';
282
+ if (providers.includes('openrouter')) return 'openrouter/anthropic/claude-haiku-4';
283
+ return 'anthropic/claude-haiku-4-5-20250514'; // Default
138
284
  }
139
285
 
140
286
  /**
141
- * Get ADF CLI version
287
+ * Get the fastest/cheapest model from available providers
142
288
  */
143
- getADFVersion() {
144
- try {
145
- const packageJson = require('../../package.json');
146
- return packageJson.version;
147
- } catch (error) {
148
- return '0.12.0';
149
- }
289
+ getFastModel(providers) {
290
+ if (providers.includes('anthropic')) return 'anthropic/claude-haiku-4-5-20250514';
291
+ if (providers.includes('openai')) return 'openai/gpt-4o-mini';
292
+ if (providers.includes('google')) return 'google/gemini-1.5-flash';
293
+ if (providers.includes('openrouter')) return 'openrouter/google/gemini-flash-1.5';
294
+ return 'anthropic/claude-haiku-4-5-20250514'; // Default
295
+ }
296
+
297
+ /**
298
+ * Get default model for OpenCode
299
+ */
300
+ getDefaultModel(providers) {
301
+ return this.getBalancedModel(providers);
302
+ }
303
+
304
+ /**
305
+ * Get default agent based on framework
306
+ */
307
+ getDefaultAgent() {
308
+ // Default to 'dev' agent as primary interaction point
309
+ return 'dev';
150
310
  }
151
311
  }
152
312
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iservu-inc/adf-cli",
3
- "version": "0.12.12",
3
+ "version": "0.13.0",
4
4
  "description": "CLI tool for AgentDevFramework - AI-assisted development framework with multi-provider AI support",
5
5
  "main": "index.js",
6
6
  "bin": {