@iservu-inc/adf-cli 0.12.10 → 0.12.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.
- package/CHANGELOG.md +40 -0
- package/README.md +9 -5
- package/bin/adf.js +72 -0
- package/lib/commands/guide.js +426 -0
- package/lib/generators/tool-config-generator.js +110 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,46 @@ 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
|
+
|
|
8
48
|
## [0.12.9] - 2025-12-23
|
|
9
49
|
|
|
10
50
|
### 🚀 Multi-Tool Expansion & AI Provider Robustness
|
package/README.md
CHANGED
|
@@ -501,16 +501,20 @@ When we release updates to the framework:
|
|
|
501
501
|
|
|
502
502
|
See [CHANGELOG.md](./CHANGELOG.md) for detailed version history.
|
|
503
503
|
|
|
504
|
-
**Latest:** v0.12.
|
|
505
|
-
- **
|
|
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
|
|
506
513
|
- Added 4 new CLI tools: OpenCode, Gemini CLI, DeepAgent, verified Zed support
|
|
507
514
|
- Comprehensive AI provider improvements with model verification
|
|
508
515
|
- Fixed Google Gemini API integration and expanded Anthropic models (3 → 11)
|
|
509
516
|
- Enhanced help system with detailed documentation
|
|
510
517
|
- OpenAI/OpenRouter parameter compatibility for GPT-5 and o-series models
|
|
511
|
-
- All models now tested before configuration save
|
|
512
|
-
|
|
513
|
-
**Previous Releases:**
|
|
514
518
|
- **v0.12.0 (2025-12-22)** - ANDF Standard Implementation
|
|
515
519
|
- Complete AGENTS.md standard compliance with YAML frontmatter
|
|
516
520
|
- .context/ directory support with architecture and glossary generation
|
package/bin/adf.js
CHANGED
|
@@ -20,6 +20,7 @@ const initCommand = require('../lib/commands/init');
|
|
|
20
20
|
const deployCommand = require('../lib/commands/deploy');
|
|
21
21
|
const updateCommand = require('../lib/commands/update');
|
|
22
22
|
const configCommand = require('../lib/commands/config');
|
|
23
|
+
const guideCommand = require('../lib/commands/guide');
|
|
23
24
|
|
|
24
25
|
const program = new Command();
|
|
25
26
|
|
|
@@ -41,6 +42,9 @@ ${chalk.cyan.bold('Quick Start:')}
|
|
|
41
42
|
${chalk.gray('3. Deploy to your AI coding assistant')}
|
|
42
43
|
$ adf deploy
|
|
43
44
|
|
|
45
|
+
${chalk.gray('4. Get setup instructions for your tool')}
|
|
46
|
+
$ adf guide <tool>
|
|
47
|
+
|
|
44
48
|
${chalk.cyan.bold('What is ADF?')}
|
|
45
49
|
AgentDevFramework (ADF) is an AI-assisted development framework that helps
|
|
46
50
|
you gather requirements through intelligent AI-guided interviews. It supports
|
|
@@ -61,9 +65,14 @@ ${chalk.cyan.bold('Getting Help:')}
|
|
|
61
65
|
${chalk.gray('# Detailed help for specific commands')}
|
|
62
66
|
$ adf init --help
|
|
63
67
|
$ adf deploy --help
|
|
68
|
+
$ adf guide --help
|
|
64
69
|
$ adf config --help
|
|
65
70
|
$ adf update --help
|
|
66
71
|
|
|
72
|
+
${chalk.gray('# Get tool-specific setup guides')}
|
|
73
|
+
$ adf guide windsurf
|
|
74
|
+
$ adf guide claude-code
|
|
75
|
+
|
|
67
76
|
${chalk.gray('# Check version and install path')}
|
|
68
77
|
$ adf --version
|
|
69
78
|
|
|
@@ -304,6 +313,69 @@ ${chalk.cyan.bold('Backwards Compatibility:')}
|
|
|
304
313
|
`)
|
|
305
314
|
.action(updateCommand);
|
|
306
315
|
|
|
316
|
+
// adf guide
|
|
317
|
+
program
|
|
318
|
+
.command('guide [tool]')
|
|
319
|
+
.description('Show setup guide for deployed tools')
|
|
320
|
+
.addHelpText('after', `
|
|
321
|
+
${chalk.cyan.bold('Description:')}
|
|
322
|
+
Get detailed setup and usage instructions for AI tools after deployment.
|
|
323
|
+
Shows what files were generated, how to configure the tool, and how to start using it.
|
|
324
|
+
|
|
325
|
+
${chalk.cyan.bold('Command Syntax:')}
|
|
326
|
+
${chalk.white('adf guide [tool]')}
|
|
327
|
+
|
|
328
|
+
${chalk.yellow('[tool]')} - (Optional) Tool name
|
|
329
|
+
If omitted, shows list of available guides
|
|
330
|
+
|
|
331
|
+
${chalk.cyan.bold('Available Tools:')}
|
|
332
|
+
${chalk.yellow('windsurf')} - Codeium Windsurf IDE
|
|
333
|
+
${chalk.yellow('cursor')} - Cursor AI IDE
|
|
334
|
+
${chalk.yellow('vscode')} - Visual Studio Code with GitHub Copilot
|
|
335
|
+
${chalk.yellow('zed')} - Zed Editor
|
|
336
|
+
${chalk.yellow('antigravity')} - Google Antigravity
|
|
337
|
+
${chalk.yellow('claude-code')} - Claude Code CLI
|
|
338
|
+
${chalk.yellow('opencode')} - OpenCode CLI
|
|
339
|
+
${chalk.yellow('gemini-cli')} - Google Gemini CLI
|
|
340
|
+
${chalk.yellow('deepagent')} - Abacus.ai DeepAgent
|
|
341
|
+
|
|
342
|
+
${chalk.cyan.bold('What You\'ll Learn:')}
|
|
343
|
+
• Which files were generated and what they do
|
|
344
|
+
• How to configure the tool to use ADF outputs
|
|
345
|
+
• How to start coding with AI assistance
|
|
346
|
+
• MCP server setup (if applicable)
|
|
347
|
+
• Keyboard shortcuts and workflows
|
|
348
|
+
• Troubleshooting common issues
|
|
349
|
+
|
|
350
|
+
${chalk.cyan.bold('Examples:')}
|
|
351
|
+
${chalk.gray('# List all available guides')}
|
|
352
|
+
$ adf guide
|
|
353
|
+
|
|
354
|
+
${chalk.gray('# Get Windsurf setup instructions')}
|
|
355
|
+
$ adf guide windsurf
|
|
356
|
+
|
|
357
|
+
${chalk.gray('# Learn how to use Claude Code CLI')}
|
|
358
|
+
$ adf guide claude-code
|
|
359
|
+
|
|
360
|
+
${chalk.gray('# See Gemini CLI integration steps')}
|
|
361
|
+
$ adf guide gemini-cli
|
|
362
|
+
|
|
363
|
+
${chalk.cyan.bold('Workflow:')}
|
|
364
|
+
1. Run ${chalk.white('adf init')} to gather requirements
|
|
365
|
+
2. Run ${chalk.white('adf deploy <tool>')} to deploy configurations
|
|
366
|
+
3. Run ${chalk.white('adf guide <tool>')} to learn how to use the tool
|
|
367
|
+
4. Start coding with AI assistance!
|
|
368
|
+
|
|
369
|
+
${chalk.cyan.bold('What\'s in a Guide:')}
|
|
370
|
+
• 📁 Generated files with status check (✓ exists / ✗ missing)
|
|
371
|
+
• ⚙️ Step-by-step setup instructions
|
|
372
|
+
• 🔌 MCP server configuration (if applicable)
|
|
373
|
+
• 🚀 Usage examples and workflows
|
|
374
|
+
• 🔧 Troubleshooting tips
|
|
375
|
+
• 📖 Quick reference links
|
|
376
|
+
`)
|
|
377
|
+
.action(guideCommand);
|
|
378
|
+
|
|
307
379
|
// adf config
|
|
308
380
|
program
|
|
309
381
|
.command('config')
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
|
|
5
|
+
const TOOL_GUIDES = {
|
|
6
|
+
'windsurf': {
|
|
7
|
+
name: 'Codeium Windsurf',
|
|
8
|
+
files: [
|
|
9
|
+
{ path: '.windsurfrules', desc: 'Legacy rules file (deprecated)' },
|
|
10
|
+
{ path: '.windsurf/rules/*.md', desc: 'Modular rules (one per agent)' },
|
|
11
|
+
{ path: '.windsurf/workflows/*.md', desc: 'Workflow definitions' },
|
|
12
|
+
{ path: 'AGENTS.md', desc: 'Universal agent manifest (ANDF standard)' }
|
|
13
|
+
],
|
|
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'
|
|
19
|
+
],
|
|
20
|
+
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)'
|
|
25
|
+
],
|
|
26
|
+
mcpServers: [],
|
|
27
|
+
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'
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
'cursor': {
|
|
35
|
+
name: 'Cursor AI IDE',
|
|
36
|
+
files: [
|
|
37
|
+
{ path: '.cursor/rules', desc: 'Cursor rules file (symlink to AGENTS.md)' },
|
|
38
|
+
{ path: '.cursorrules', desc: 'Deprecated - shows migration notice' },
|
|
39
|
+
{ path: 'AGENTS.md', desc: 'Universal agent manifest' },
|
|
40
|
+
{ path: '.context/', desc: 'Deep context (architecture, glossary)' }
|
|
41
|
+
],
|
|
42
|
+
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!'
|
|
47
|
+
],
|
|
48
|
+
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',
|
|
53
|
+
'• Tab to accept AI suggestions'
|
|
54
|
+
],
|
|
55
|
+
mcpServers: [],
|
|
56
|
+
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'
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
'vscode': {
|
|
65
|
+
name: 'Visual Studio Code (GitHub Copilot)',
|
|
66
|
+
files: [
|
|
67
|
+
{ path: '.github/copilot-instructions.md', desc: 'GitHub Copilot custom instructions' },
|
|
68
|
+
{ path: '.vscode/settings.json', desc: 'Custom chat participants and commands' },
|
|
69
|
+
{ path: 'AGENTS.md', desc: 'Universal agent manifest' },
|
|
70
|
+
{ path: '.context/', desc: 'Deep context directory' }
|
|
71
|
+
],
|
|
72
|
+
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'
|
|
77
|
+
],
|
|
78
|
+
usage: [
|
|
79
|
+
'• Use @workspace to include project context in Copilot chat',
|
|
80
|
+
'• 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'
|
|
86
|
+
],
|
|
87
|
+
mcpServers: [],
|
|
88
|
+
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'
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
'zed': {
|
|
97
|
+
name: 'Zed Editor',
|
|
98
|
+
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' },
|
|
102
|
+
{ path: 'AGENTS.md', desc: 'Universal agent manifest' },
|
|
103
|
+
{ path: '.context/', desc: 'Deep context accessible via MCP' }
|
|
104
|
+
],
|
|
105
|
+
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)'
|
|
110
|
+
],
|
|
111
|
+
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'
|
|
117
|
+
],
|
|
118
|
+
mcpServers: [
|
|
119
|
+
{
|
|
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)'
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
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'
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
'antigravity': {
|
|
139
|
+
name: 'Google Antigravity',
|
|
140
|
+
files: [
|
|
141
|
+
{ path: '.antigravity/agents.yaml', desc: 'Antigravity agent configuration' },
|
|
142
|
+
{ path: 'AGENTS.md', desc: 'Universal agent manifest (mounted in container)' },
|
|
143
|
+
{ path: '.context/', desc: 'Deep context (architecture, glossary)' }
|
|
144
|
+
],
|
|
145
|
+
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!'
|
|
151
|
+
],
|
|
152
|
+
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'
|
|
158
|
+
],
|
|
159
|
+
mcpServers: [],
|
|
160
|
+
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'
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
'claude-code': {
|
|
169
|
+
name: 'Claude Code CLI',
|
|
170
|
+
files: [
|
|
171
|
+
{ path: '.framework/agents/*.md', desc: 'Agent definition files (analyst, pm, dev, qa, etc.)' },
|
|
172
|
+
{ path: 'AGENTS.md', desc: 'Universal agent manifest' },
|
|
173
|
+
{ path: '.context/', desc: 'Deep context directory' }
|
|
174
|
+
],
|
|
175
|
+
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'
|
|
183
|
+
],
|
|
184
|
+
usage: [
|
|
185
|
+
'• 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/"'
|
|
192
|
+
],
|
|
193
|
+
mcpServers: [
|
|
194
|
+
{
|
|
195
|
+
name: 'filesystem',
|
|
196
|
+
desc: 'Can be configured to access project files',
|
|
197
|
+
command: 'Add to .claude/settings.json MCP servers config'
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
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'
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
'opencode': {
|
|
209
|
+
name: 'OpenCode CLI',
|
|
210
|
+
files: [
|
|
211
|
+
{ path: '.opencode.json', desc: 'OpenCode project configuration' },
|
|
212
|
+
{ path: 'AGENTS.md', desc: 'Universal agent manifest' },
|
|
213
|
+
{ path: '.context/', desc: 'Deep context directory' }
|
|
214
|
+
],
|
|
215
|
+
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'
|
|
221
|
+
],
|
|
222
|
+
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"'
|
|
230
|
+
],
|
|
231
|
+
mcpServers: [
|
|
232
|
+
{
|
|
233
|
+
name: 'filesystem',
|
|
234
|
+
command: 'npx -y @modelcontextprotocol/server-filesystem',
|
|
235
|
+
desc: 'Provides full project file access'
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
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'
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
'gemini-cli': {
|
|
247
|
+
name: 'Google Gemini CLI',
|
|
248
|
+
files: [
|
|
249
|
+
{ path: 'GEMINI.md', desc: 'Project context and instructions for Gemini' },
|
|
250
|
+
{ path: 'AGENTS.md', desc: 'Universal agent manifest' },
|
|
251
|
+
{ path: '.context/', desc: 'Deep context directory' }
|
|
252
|
+
],
|
|
253
|
+
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'
|
|
258
|
+
],
|
|
259
|
+
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'
|
|
267
|
+
],
|
|
268
|
+
mcpServers: [],
|
|
269
|
+
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'
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
|
|
277
|
+
'deepagent': {
|
|
278
|
+
name: 'Abacus.ai DeepAgent',
|
|
279
|
+
files: [
|
|
280
|
+
{ path: '.deepagent/agents/*.md', desc: 'Agent markdown files' },
|
|
281
|
+
{ path: '.deepagent/README.md', desc: 'Project overview and usage' },
|
|
282
|
+
{ path: 'AGENTS.md', desc: 'Universal agent manifest' }
|
|
283
|
+
],
|
|
284
|
+
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'
|
|
289
|
+
],
|
|
290
|
+
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'
|
|
296
|
+
],
|
|
297
|
+
mcpServers: [],
|
|
298
|
+
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'
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
async function guide(tool, options) {
|
|
308
|
+
const cwd = process.cwd();
|
|
309
|
+
|
|
310
|
+
// If no tool specified, show available guides
|
|
311
|
+
if (!tool) {
|
|
312
|
+
console.log(chalk.cyan.bold('\n📚 ADF Tool Setup Guides\n'));
|
|
313
|
+
console.log(chalk.gray('Get detailed setup and usage instructions for deployed tools.\n'));
|
|
314
|
+
|
|
315
|
+
console.log(chalk.yellow('Available Guides:'));
|
|
316
|
+
console.log('');
|
|
317
|
+
|
|
318
|
+
for (const [key, toolInfo] of Object.entries(TOOL_GUIDES)) {
|
|
319
|
+
console.log(chalk.green(` adf guide ${key.padEnd(15)}`), chalk.gray(`- ${toolInfo.name}`));
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
console.log('');
|
|
323
|
+
console.log(chalk.cyan('Usage:'));
|
|
324
|
+
console.log(chalk.white(' adf guide <tool>'));
|
|
325
|
+
console.log('');
|
|
326
|
+
console.log(chalk.cyan('Examples:'));
|
|
327
|
+
console.log(chalk.gray(' $ adf guide windsurf'));
|
|
328
|
+
console.log(chalk.gray(' $ adf guide claude-code'));
|
|
329
|
+
console.log(chalk.gray(' $ adf guide gemini-cli'));
|
|
330
|
+
console.log('');
|
|
331
|
+
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Get tool guide
|
|
336
|
+
const toolGuide = TOOL_GUIDES[tool];
|
|
337
|
+
if (!toolGuide) {
|
|
338
|
+
console.error(chalk.red(`\n❌ No guide available for "${tool}"`));
|
|
339
|
+
console.log(chalk.yellow('\nRun "adf guide" to see available guides.\n'));
|
|
340
|
+
process.exit(1);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// Display guide
|
|
344
|
+
console.log(chalk.cyan.bold(`\n📚 ${toolGuide.name} Setup Guide\n`));
|
|
345
|
+
console.log(chalk.gray('━'.repeat(60)) + '\n');
|
|
346
|
+
|
|
347
|
+
// Check what files exist
|
|
348
|
+
console.log(chalk.yellow.bold('📁 Generated Files:\n'));
|
|
349
|
+
for (const file of toolGuide.files) {
|
|
350
|
+
const exists = await checkFileExists(cwd, file.path);
|
|
351
|
+
const status = exists ? chalk.green('✓') : chalk.red('✗');
|
|
352
|
+
console.log(` ${status} ${chalk.white(file.path)}`);
|
|
353
|
+
console.log(chalk.gray(` ${file.desc}`));
|
|
354
|
+
}
|
|
355
|
+
console.log('');
|
|
356
|
+
|
|
357
|
+
// Setup instructions
|
|
358
|
+
console.log(chalk.yellow.bold('⚙️ Setup Instructions:\n'));
|
|
359
|
+
for (const step of toolGuide.setup) {
|
|
360
|
+
console.log(chalk.gray(` ${step}`));
|
|
361
|
+
}
|
|
362
|
+
console.log('');
|
|
363
|
+
|
|
364
|
+
// MCP Servers (if applicable)
|
|
365
|
+
if (toolGuide.mcpServers && toolGuide.mcpServers.length > 0) {
|
|
366
|
+
console.log(chalk.yellow.bold('🔌 MCP Servers:\n'));
|
|
367
|
+
for (const server of toolGuide.mcpServers) {
|
|
368
|
+
console.log(chalk.cyan(` • ${server.name}`));
|
|
369
|
+
console.log(chalk.gray(` ${server.desc}`));
|
|
370
|
+
if (server.command) {
|
|
371
|
+
console.log(chalk.gray(` Command: ${server.command}`));
|
|
372
|
+
}
|
|
373
|
+
if (server.url) {
|
|
374
|
+
console.log(chalk.gray(` URL: ${server.url}`));
|
|
375
|
+
}
|
|
376
|
+
console.log('');
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// Usage instructions
|
|
381
|
+
console.log(chalk.yellow.bold('🚀 Usage:\n'));
|
|
382
|
+
for (const instruction of toolGuide.usage) {
|
|
383
|
+
console.log(chalk.gray(` ${instruction}`));
|
|
384
|
+
}
|
|
385
|
+
console.log('');
|
|
386
|
+
|
|
387
|
+
// Troubleshooting
|
|
388
|
+
console.log(chalk.yellow.bold('🔧 Troubleshooting:\n'));
|
|
389
|
+
for (const tip of toolGuide.troubleshooting) {
|
|
390
|
+
console.log(chalk.gray(` ${tip}`));
|
|
391
|
+
}
|
|
392
|
+
console.log('');
|
|
393
|
+
|
|
394
|
+
// Quick reference
|
|
395
|
+
console.log(chalk.gray('━'.repeat(60)) + '\n');
|
|
396
|
+
console.log(chalk.cyan.bold('📖 Quick Reference:\n'));
|
|
397
|
+
console.log(chalk.gray(` Requirements: .adf/sessions/*/outputs/`));
|
|
398
|
+
console.log(chalk.gray(` Universal agent config: AGENTS.md`));
|
|
399
|
+
console.log(chalk.gray(` Deep context: .context/memory/`));
|
|
400
|
+
console.log('');
|
|
401
|
+
|
|
402
|
+
console.log(chalk.cyan('Need more help?'));
|
|
403
|
+
console.log(chalk.gray(' • Documentation: https://github.com/iservu/adf-cli#readme'));
|
|
404
|
+
console.log(chalk.gray(' • Issues: https://github.com/iservu/adf-cli/issues'));
|
|
405
|
+
console.log('');
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Check if file/pattern exists
|
|
410
|
+
*/
|
|
411
|
+
async function checkFileExists(cwd, filePath) {
|
|
412
|
+
// Handle glob patterns
|
|
413
|
+
if (filePath.includes('*')) {
|
|
414
|
+
const dir = path.dirname(filePath);
|
|
415
|
+
const dirPath = path.join(cwd, dir);
|
|
416
|
+
if (!await fs.pathExists(dirPath)) return false;
|
|
417
|
+
|
|
418
|
+
const files = await fs.readdir(dirPath);
|
|
419
|
+
return files.length > 0;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// Regular file
|
|
423
|
+
return await fs.pathExists(path.join(cwd, filePath));
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
module.exports = guide;
|
|
@@ -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
|
*/
|