@iservu-inc/adf-cli 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.context/memory/architecture.md +1 -1
  2. package/.context/memory/glossary.md +1 -1
  3. package/CLAUDE.md +4 -4
  4. package/README.md +1 -1
  5. package/lib/analysis/heuristic-gap-analyzer.js +4 -4
  6. package/lib/analysis/synthesis-engine.js +5 -5
  7. package/lib/commands/deploy.js +14 -0
  8. package/lib/commands/guide.js +32 -0
  9. package/lib/commands/init.js +544 -458
  10. package/lib/frameworks/output-generators.js +54 -147
  11. package/lib/frameworks/progress-tracker.js +16 -0
  12. package/lib/frameworks/questions.js +156 -464
  13. package/lib/frameworks/session-manager.js +56 -0
  14. package/lib/generators/a2a-generator.js +289 -0
  15. package/lib/generators/index.js +11 -0
  16. package/lib/learning/analytics-view.js +5 -5
  17. package/lib/learning/analytics.js +22 -6
  18. package/lib/templates/scripts/analyze-docs.js +11 -11
  19. package/lib/templates/scripts/build.js +1 -1
  20. package/lib/templates/scripts/check-framework-updates.js +1 -1
  21. package/lib/templates/scripts/init.js +1 -1
  22. package/lib/templates/shared/agents/analyst.md +1 -1
  23. package/lib/templates/shared/agents/architect.md +1 -1
  24. package/lib/templates/shared/agents/dev.md +1 -1
  25. package/lib/templates/shared/agents/pm.md +2 -2
  26. package/lib/templates/shared/agents/qa.md +1 -1
  27. package/lib/templates/shared/agents/sm.md +3 -3
  28. package/lib/templates/shared/memory/constitution.md +2 -2
  29. package/lib/templates/shared/templates/README.md +13 -13
  30. package/lib/templates/shared/templates/prd-template.md +1 -1
  31. package/lib/utils/context-extractor.js +3 -3
  32. package/lib/utils/framework-detector.js +1 -1
  33. package/lib/utils/tool-feature-registry.js +6 -0
  34. package/package.json +1 -1
  35. package/tests/a2a-generator.test.js +288 -0
  36. package/tests/analytics-view.test.js +12 -10
  37. package/tests/context-extractor.test.js +2 -2
  38. package/tests/decay-manager.test.js +22 -19
  39. package/tests/deploy.test.js +7 -3
  40. package/tests/dynamic-question-generator.test.js +2 -2
  41. package/tests/framework-detector.test.js +3 -3
  42. package/tests/heuristic-gap-analyzer.test.js +5 -5
  43. package/tests/pattern-decay.test.js +34 -52
  44. package/tests/session-manager.test.js +125 -0
@@ -24,7 +24,7 @@ ADF CLI is a Node.js-based command-line tool designed to orchestrate AI-assisted
24
24
  - **Decay Manager:** Applies time-based decay to pattern confidence to ensure freshness.
25
25
 
26
26
  ### 5. Generators (`lib/generators/`)
27
- - **Artifact Generators:** Create PRP, BMAD, and Spec-Kit documents.
27
+ - **Artifact Generators:** Create PRP, BMAD, and OpenSpec documents.
28
28
  - **Tool Config Generators:** Produce tool-specific configurations (e.g., `.windsurfrules`, `opencode.json`, `AGENTS.md`).
29
29
 
30
30
  ## Data Storage
@@ -7,7 +7,7 @@
7
7
  - **Track:** A unit of work or feature development path (e.g., a feature, bug fix, or chore).
8
8
  - **PRP (Product Requirements Prompt):** A framework for "Rapid" requirements gathering.
9
9
  - **BMAD (Business, Marketing, Architecture, Design):** A comprehensive framework for large-scale project planning.
10
- - **Spec-Kit:** A balanced framework generating specifications and plans.
10
+ - **OpenSpec:** A balanced framework generating specifications and plans.
11
11
  - **Agent-Native:** A repository structure optimized for reading by AI agents (e.g., `AGENTS.md`, `.context/`).
12
12
  - **Learning System:** The ADF subsystem that tracks user behavior (skips, answers) to adapt future interviews.
13
13
  - **Pattern Decay:** The algorithm that reduces confidence in learned patterns over time to prevent stale assumptions.
package/CLAUDE.md CHANGED
@@ -8,7 +8,7 @@ ADF CLI (`@iservu-inc/adf-cli`) is a Node.js CLI tool for AgentDevFramework - an
8
8
 
9
9
  **Key Features:**
10
10
  - Multi-provider AI integration for intelligent requirements gathering
11
- - Three workflow levels: Rapid (PRP), Balanced (Spec-Kit), Comprehensive (BMAD)
11
+ - Three workflow levels: Rapid (PRP), Balanced (OpenSpec), Comprehensive (BMAD)
12
12
  - Learning system that adapts to user preferences over time with pattern decay
13
13
  - Dynamic question pipeline that extracts knowledge and reorders questions
14
14
  - Smart question filtering based on project context
@@ -143,7 +143,7 @@ project-root/
143
143
  │ │ └── stats.json # Statistics
144
144
  │ └── shared/ # Framework templates & agents
145
145
  │ ├── agents/ # Agent definitions (PM, Dev, QA, etc.)
146
- │ ├── templates/ # PRP, BMAD, Spec-Kit templates
146
+ │ ├── templates/ # PRP, BMAD, OpenSpec templates
147
147
  │ └── memory/ # Framework memory
148
148
  └── .framework/ # Deployed to development tool
149
149
  └── agents/ # Tool-specific agent files
@@ -226,7 +226,7 @@ Three workflow tiers with different agents and templates:
226
226
  - Questions: 20 core questions
227
227
  - Output: `prp.md` (single document)
228
228
 
229
- **Level 2: Balanced (Spec-Kit)**
229
+ **Level 2: Balanced (OpenSpec)**
230
230
  - Agents: analyst, pm, dev, qa
231
231
  - Templates: Full PRP suite, spec templates
232
232
  - Questions: 30+ questions
@@ -250,7 +250,7 @@ Each tool has a generator that transforms session outputs into tool-specific con
250
250
 
251
251
  **Deployment Flow:**
252
252
  1. Find latest completed session
253
- 2. Load session outputs (PRP/BMAD/Spec-Kit)
253
+ 2. Load session outputs (PRP/BMAD/OpenSpec)
254
254
  3. Generate tool-specific config
255
255
  4. Write to project root (`.windsurfrules`, `.cursorrules`, etc.)
256
256
  5. Copy agent files to `.framework/agents/` if needed
package/README.md CHANGED
@@ -405,7 +405,7 @@ The `.adf/context.json` file contains your workflow configuration:
405
405
  "templates": {
406
406
  "prp": ["prp_story.md", "prp_task.md"],
407
407
  "bmad": false,
408
- "specKit": false
408
+ "openSpec": false
409
409
  }
410
410
  }
411
411
  ```
@@ -9,10 +9,10 @@ class HeuristicGapAnalyzer {
9
9
  static get FIELD_MAPPING() {
10
10
  return {
11
11
  name: { id: 'prp-1', required: ['rapid', 'balanced', 'comprehensive'] },
12
- overview: { id: 'prp-3', required: ['rapid', 'balanced', 'comprehensive'] },
13
- techStack: { id: 'prp-8', required: ['rapid', 'balanced', 'comprehensive'] },
14
- proposedChanges: { id: 'bal-28', required: ['balanced', 'comprehensive'] },
15
- architecture: { id: 'bal-37', required: ['balanced', 'comprehensive'] }
12
+ overview: { id: 'prp-2', required: ['rapid', 'balanced', 'comprehensive'] },
13
+ techStack: { id: 'prp-5', required: ['rapid', 'balanced', 'comprehensive'] },
14
+ proposedChanges: { id: 'bal-15', required: ['balanced', 'comprehensive'] },
15
+ architecture: { id: 'bal-19', required: ['balanced', 'comprehensive'] }
16
16
  };
17
17
  }
18
18
 
@@ -86,17 +86,17 @@ class SynthesisEngine {
86
86
  }
87
87
 
88
88
  if (synthesizedContext.overview) {
89
- answers['prp-3'] = {
89
+ answers['prp-2'] = {
90
90
  text: synthesizedContext.overview,
91
91
  quality: { qualityScore: 80, isComprehensive: true },
92
92
  timestamp: now.toISOString()
93
93
  };
94
94
  // Backward compatibility for old tests
95
- answers['project-overview'] = answers['prp-3'];
95
+ answers['project-overview'] = answers['prp-2'];
96
96
  }
97
97
 
98
98
  if (synthesizedContext.techStack) {
99
- answers['prp-8'] = {
99
+ answers['prp-5'] = {
100
100
  text: synthesizedContext.techStack,
101
101
  quality: { qualityScore: 80, isComprehensive: true },
102
102
  timestamp: now.toISOString()
@@ -104,7 +104,7 @@ class SynthesisEngine {
104
104
  }
105
105
 
106
106
  if (synthesizedContext.architecture) {
107
- answers['bal-37'] = {
107
+ answers['bal-19'] = {
108
108
  text: synthesizedContext.architecture,
109
109
  quality: { qualityScore: 80, isComprehensive: true },
110
110
  timestamp: now.toISOString()
@@ -112,7 +112,7 @@ class SynthesisEngine {
112
112
  }
113
113
 
114
114
  if (synthesizedContext.proposedChanges) {
115
- answers['bal-28'] = {
115
+ answers['bal-15'] = {
116
116
  text: synthesizedContext.proposedChanges,
117
117
  quality: { qualityScore: 80, isComprehensive: true },
118
118
  timestamp: now.toISOString()
@@ -159,6 +159,20 @@ async function deployToTool(tool, options = {}) {
159
159
  console.warn(chalk.yellow(`\n⚠️ Warning: Could not generate AGENTS.md: ${error.message}`));
160
160
  }
161
161
 
162
+ // Generate A2A agent cards (if not already present)
163
+ const a2aDir = path.join(cwd, '.a2a');
164
+ if (!await fs.pathExists(a2aDir)) {
165
+ try {
166
+ const { generateA2A } = require('../generators');
167
+ await generateA2A(sessionPath, cwd, framework);
168
+ if (!options.silent && !spinner) {
169
+ console.log(chalk.green('✓ Generated A2A agent cards'));
170
+ }
171
+ } catch (error) {
172
+ console.warn(chalk.yellow(`⚠ Could not generate A2A cards: ${error.message}`));
173
+ }
174
+ }
175
+
162
176
  // Generate tool-specific configurations
163
177
  if (spinner) spinner.text = `Generating ${TOOLS[tool]?.name || tool} configurations...`;
164
178
 
@@ -295,6 +295,38 @@ const TOOL_GUIDES = {
295
295
  ]
296
296
  },
297
297
 
298
+ 'a2a': {
299
+ name: 'A2A (Agent-to-Agent) Protocol',
300
+ files: [
301
+ { path: '.a2a/agent-card.json', desc: 'Combined discovery card with all agent skills' },
302
+ { path: '.a2a/agents/*.json', desc: 'Individual agent cards (dev, qa, pm, etc.)' },
303
+ { path: 'AGENTS.md', desc: 'Universal agent manifest' }
304
+ ],
305
+ setup: [
306
+ '1. A2A cards are auto-generated during `adf init`',
307
+ '2. Cards are also created as fallback during `adf deploy <tool>`',
308
+ '3. No additional setup required — cards follow the A2A protocol spec',
309
+ '4. Individual agent cards are in .a2a/agents/',
310
+ '5. Combined discovery card at .a2a/agent-card.json'
311
+ ],
312
+ usage: [
313
+ '• A2A cards enable interoperability with any A2A-compatible tool',
314
+ '• Combined card (.a2a/agent-card.json) lists all agents and skills',
315
+ '• Individual cards (.a2a/agents/<name>.json) per agent role',
316
+ '• Skills are derived from agent markdown frontmatter',
317
+ '• Cards include MCP tool references from agent definitions',
318
+ '• Protocol version: 0.3 (JSONRPC binding)',
319
+ '• Spec: https://google.github.io/A2A/'
320
+ ],
321
+ mcpServers: [],
322
+ troubleshooting: [
323
+ '• Cards not generated? Run `adf init` or `adf deploy <tool>`',
324
+ '• Missing agents? Check workflow level (rapid=2, balanced=4, comprehensive=6)',
325
+ '• Regenerate by deleting .a2a/ directory and running deploy again',
326
+ '• Validate JSON: cat .a2a/agent-card.json | python -m json.tool'
327
+ ]
328
+ },
329
+
298
330
  'deepagent': {
299
331
  name: 'Abacus.ai DeepAgent',
300
332
  files: [