@iservu-inc/adf-cli 0.12.12 → 0.14.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.
- package/.claude/settings.local.json +6 -1
- package/.context/memory/architecture.md +40 -0
- package/.context/memory/glossary.md +19 -0
- package/.project/docs/VERSIONING-GUIDE.md +127 -0
- package/AGENTS.md +53 -0
- package/CHANGELOG.md +149 -0
- package/bin/adf.js +10 -0
- package/conductor/archive/context_synthesis_20260112/metadata.json +8 -0
- package/conductor/archive/context_synthesis_20260112/plan.md +40 -0
- package/conductor/archive/context_synthesis_20260112/spec.md +43 -0
- package/conductor/archive/verify_opencode_20260111/metadata.json +8 -0
- package/conductor/archive/verify_opencode_20260111/plan.md +34 -0
- package/conductor/archive/verify_opencode_20260111/spec.md +25 -0
- package/conductor/code_styleguides/javascript.md +51 -0
- package/conductor/product-guidelines.md +26 -0
- package/conductor/product.md +25 -0
- package/conductor/setup_state.json +1 -0
- package/conductor/tech-stack.md +28 -0
- package/conductor/tracks/bootstrap_agents_20260111/metadata.json +8 -0
- package/conductor/tracks/bootstrap_agents_20260111/plan.md +17 -0
- package/conductor/tracks/bootstrap_agents_20260111/spec.md +27 -0
- package/conductor/tracks.md +9 -0
- package/conductor/workflow.md +333 -0
- package/lib/analysis/ai-gap-analyzer.js +66 -0
- package/lib/analysis/dynamic-question-generator.js +55 -0
- package/lib/analysis/heuristic-gap-analyzer.js +45 -0
- package/lib/analysis/synthesis-engine.js +142 -0
- package/lib/commands/deploy.js +28 -2
- package/lib/commands/guide.js +173 -150
- package/lib/commands/tools.js +38 -0
- package/lib/generators/codex-cli-generator.js +41 -0
- package/lib/generators/index.js +33 -0
- package/lib/generators/kiro-generator.js +49 -0
- package/lib/generators/opencode-generator.js +332 -153
- package/lib/generators/trae-generator.js +34 -0
- package/lib/templates/scripts/analyze-framework-updates.js +361 -0
- package/lib/templates/scripts/build.js +608 -0
- package/lib/templates/scripts/check-framework-updates.js +118 -0
- package/lib/templates/scripts/config-helpers.js +1 -1
- package/lib/templates/scripts/deploy.js +13 -28
- package/lib/templates/scripts/init.js +110 -220
- package/lib/templates/scripts/postinstall.js +13 -0
- package/lib/templates/scripts/update-frameworks.js +28 -0
- package/lib/templates/scripts/validate-env.js +428 -0
- package/lib/templates/scripts/validate-mcp.js +471 -0
- package/lib/templates/scripts/validate.js +482 -0
- package/lib/templates/shared/agents/analyst.md +1 -1
- package/lib/templates/shared/agents/architect.md +13 -17
- package/lib/templates/shared/agents/dev.md +2 -2
- package/lib/templates/shared/agents/pm.md +1 -1
- package/lib/templates/shared/agents/qa.md +1 -1
- package/lib/templates/shared/agents/sm.md +2 -2
- package/lib/templates/shared/templates/README.md +2 -2
- package/lib/templates/shared/templates/openspec-proposal.md +2 -2
- package/lib/templates/shared/templates/prd-template.md +1 -1
- package/lib/templates/shared/templates/story-template.md +1 -1
- package/lib/utils/context-extractor.js +157 -0
- package/lib/utils/framework-detector.js +54 -0
- package/lib/utils/tool-feature-registry.js +102 -0
- package/package.json +1 -1
- package/tests/ai-gap-analyzer.test.js +38 -0
- package/tests/codex-cli-generator.test.js +29 -0
- package/tests/context-extractor.test.js +70 -0
- package/tests/deploy-integration.test.js +36 -0
- package/tests/deploy.test.js +57 -0
- package/tests/dynamic-question-generator.test.js +29 -0
- package/tests/framework-detector.test.js +55 -0
- package/tests/heuristic-gap-analyzer.test.js +46 -0
- package/tests/kiro-trae-generators.test.js +43 -0
- package/tests/opencode-generator.test.js +113 -0
- package/tests/synthesis-engine.test.js +52 -0
- package/tests/tool-feature-registry.test.js +23 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
const fs = require('fs-extra');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const uuid = require('uuid');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Synthesis Engine
|
|
7
|
+
* Merges extracted context from multiple frameworks into a unified ADF session.
|
|
8
|
+
* Handles "Session Chain" versioning.
|
|
9
|
+
*/
|
|
10
|
+
class SynthesisEngine {
|
|
11
|
+
/**
|
|
12
|
+
* Merges an array of context objects into a single synthesized context.
|
|
13
|
+
* @param {Object[]} contexts - Array of context objects from ContextExtractor.
|
|
14
|
+
* @returns {Object} Synthesized context.
|
|
15
|
+
*/
|
|
16
|
+
static merge(contexts) {
|
|
17
|
+
const synthesized = {
|
|
18
|
+
name: '',
|
|
19
|
+
version: '',
|
|
20
|
+
overview: '',
|
|
21
|
+
techStack: '',
|
|
22
|
+
architecture: '',
|
|
23
|
+
proposedChanges: ''
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
for (const ctx of contexts) {
|
|
27
|
+
if (ctx.name) synthesized.name = ctx.name;
|
|
28
|
+
if (ctx.version) synthesized.version = ctx.version;
|
|
29
|
+
|
|
30
|
+
if (ctx.overview) {
|
|
31
|
+
synthesized.overview += (synthesized.overview ? '\n\n' : '') + ctx.overview;
|
|
32
|
+
}
|
|
33
|
+
if (ctx.techStack) {
|
|
34
|
+
synthesized.techStack += (synthesized.techStack ? '\n\n' : '') + ctx.techStack;
|
|
35
|
+
}
|
|
36
|
+
if (ctx.architecture) {
|
|
37
|
+
synthesized.architecture += (synthesized.architecture ? '\n\n' : '') + ctx.architecture;
|
|
38
|
+
}
|
|
39
|
+
if (ctx.proposedChanges) {
|
|
40
|
+
synthesized.proposedChanges += (synthesized.proposedChanges ? '\n\n' : '') + ctx.proposedChanges;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return synthesized;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Creates a new augmented session with the synthesized context.
|
|
49
|
+
* @param {string} projectDir - The project directory.
|
|
50
|
+
* @param {Object} synthesizedContext - The output of merge().
|
|
51
|
+
* @param {string} framework - The framework level (rapid, balanced, comprehensive).
|
|
52
|
+
* @returns {Promise<string>} The path to the new session directory.
|
|
53
|
+
*/
|
|
54
|
+
static async createAugmentedSession(projectDir, synthesizedContext, framework = 'balanced') {
|
|
55
|
+
const adfDir = path.join(projectDir, '.adf');
|
|
56
|
+
const sessionsDir = path.join(adfDir, 'sessions');
|
|
57
|
+
await fs.ensureDir(sessionsDir);
|
|
58
|
+
|
|
59
|
+
// Generate Session ID: YYYY-MM-DD_augmentation_vX
|
|
60
|
+
const now = new Date();
|
|
61
|
+
const dateStr = now.toISOString().split('T')[0];
|
|
62
|
+
const baseId = `${dateStr}_augmentation`;
|
|
63
|
+
|
|
64
|
+
let version = 1;
|
|
65
|
+
let sessionId = `${baseId}_v${version}`;
|
|
66
|
+
|
|
67
|
+
while (await fs.pathExists(path.join(sessionsDir, sessionId))) {
|
|
68
|
+
version++;
|
|
69
|
+
sessionId = `${baseId}_v${version}`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const sessionPath = path.join(sessionsDir, sessionId);
|
|
73
|
+
await fs.ensureDir(sessionPath);
|
|
74
|
+
|
|
75
|
+
// Map synthesized context to question IDs
|
|
76
|
+
const answers = {};
|
|
77
|
+
|
|
78
|
+
if (synthesizedContext.name) {
|
|
79
|
+
answers['prp-1'] = {
|
|
80
|
+
text: synthesizedContext.name,
|
|
81
|
+
quality: { qualityScore: 80, isComprehensive: true },
|
|
82
|
+
timestamp: now.toISOString()
|
|
83
|
+
};
|
|
84
|
+
// Backward compatibility for old tests
|
|
85
|
+
answers['project-name'] = answers['prp-1'];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (synthesizedContext.overview) {
|
|
89
|
+
answers['prp-3'] = {
|
|
90
|
+
text: synthesizedContext.overview,
|
|
91
|
+
quality: { qualityScore: 80, isComprehensive: true },
|
|
92
|
+
timestamp: now.toISOString()
|
|
93
|
+
};
|
|
94
|
+
// Backward compatibility for old tests
|
|
95
|
+
answers['project-overview'] = answers['prp-3'];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (synthesizedContext.techStack) {
|
|
99
|
+
answers['prp-8'] = {
|
|
100
|
+
text: synthesizedContext.techStack,
|
|
101
|
+
quality: { qualityScore: 80, isComprehensive: true },
|
|
102
|
+
timestamp: now.toISOString()
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (synthesizedContext.architecture) {
|
|
107
|
+
answers['bal-37'] = {
|
|
108
|
+
text: synthesizedContext.architecture,
|
|
109
|
+
quality: { qualityScore: 80, isComprehensive: true },
|
|
110
|
+
timestamp: now.toISOString()
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (synthesizedContext.proposedChanges) {
|
|
115
|
+
answers['bal-28'] = {
|
|
116
|
+
text: synthesizedContext.proposedChanges,
|
|
117
|
+
quality: { qualityScore: 80, isComprehensive: true },
|
|
118
|
+
timestamp: now.toISOString()
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const progress = {
|
|
123
|
+
sessionId,
|
|
124
|
+
framework,
|
|
125
|
+
status: 'in-progress',
|
|
126
|
+
startedAt: now.toISOString(),
|
|
127
|
+
lastUpdated: now.toISOString(),
|
|
128
|
+
totalBlocks: 0, // Will be set by Interviewer
|
|
129
|
+
completedBlocks: [],
|
|
130
|
+
skippedBlocks: [],
|
|
131
|
+
totalQuestionsAnswered: Object.keys(answers).length,
|
|
132
|
+
answers,
|
|
133
|
+
canResume: true
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
await fs.writeJson(path.join(sessionPath, '_progress.json'), progress, { spaces: 2 });
|
|
137
|
+
|
|
138
|
+
return sessionPath;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
module.exports = SynthesisEngine;
|
package/lib/commands/deploy.js
CHANGED
|
@@ -11,7 +11,10 @@ const {
|
|
|
11
11
|
generateAntigravity,
|
|
12
12
|
generateOpenCode,
|
|
13
13
|
generateGeminiCLI,
|
|
14
|
-
generateDeepAgent
|
|
14
|
+
generateDeepAgent,
|
|
15
|
+
generateKiro,
|
|
16
|
+
generateTrae,
|
|
17
|
+
generateCodexCLI
|
|
15
18
|
} = require('../generators');
|
|
16
19
|
const ContextManager = require('../utils/context-manager');
|
|
17
20
|
|
|
@@ -23,12 +26,15 @@ const TOOLS = {
|
|
|
23
26
|
'vscode-insider': { name: 'VS Code Insider', configFile: '.vscode-insider/settings.json' },
|
|
24
27
|
zed: { name: 'Zed Editor', configFile: '.zed/settings.json' },
|
|
25
28
|
antigravity: { name: 'Google Antigravity', configFile: '.antigravity/agents.yaml' },
|
|
29
|
+
kiro: { name: 'Kiro', configFile: '.kiro/' },
|
|
30
|
+
trae: { name: 'Trae', configFile: '.trae/config.json' },
|
|
26
31
|
|
|
27
32
|
// CLI Tools
|
|
28
33
|
'claude-code': { name: 'Claude Code', configFile: '.framework/agents/' },
|
|
29
34
|
'opencode': { name: 'OpenCode CLI', configFile: '.opencode.json' },
|
|
30
35
|
'gemini-cli': { name: 'Gemini CLI', configFile: 'GEMINI.md' },
|
|
31
36
|
'deepagent': { name: 'DeepAgent (Abacus.ai)', configFile: '.deepagent/agents/' },
|
|
37
|
+
'codex-cli': { name: 'Codex CLI', configFile: '.codex/config.toml' },
|
|
32
38
|
|
|
33
39
|
// Generic
|
|
34
40
|
generic: { name: 'Generic AI Tools', configFile: '.framework/agents/' }
|
|
@@ -202,7 +208,7 @@ async function deployToTool(tool, options = {}) {
|
|
|
202
208
|
generatedFiles = await generateOpenCode(sessionPath, cwd, framework);
|
|
203
209
|
if (!options.silent && !spinner) {
|
|
204
210
|
console.log(chalk.green('✓ Generated OpenCode CLI configurations'));
|
|
205
|
-
console.log(chalk.gray(` -
|
|
211
|
+
console.log(chalk.gray(` - opencode.json (project config, agents, MCP servers)`));
|
|
206
212
|
}
|
|
207
213
|
} else if (tool === 'gemini-cli') {
|
|
208
214
|
generatedFiles = await generateGeminiCLI(sessionPath, cwd, framework);
|
|
@@ -217,6 +223,26 @@ async function deployToTool(tool, options = {}) {
|
|
|
217
223
|
console.log(chalk.gray(` - .deepagent/agents/ (agent markdown files)`));
|
|
218
224
|
console.log(chalk.gray(` - .deepagent/README.md (project overview)`));
|
|
219
225
|
}
|
|
226
|
+
} else if (tool === 'kiro') {
|
|
227
|
+
generatedFiles = await generateKiro(sessionPath, cwd, framework);
|
|
228
|
+
if (!options.silent && !spinner) {
|
|
229
|
+
console.log(chalk.green('✓ Generated Kiro configurations'));
|
|
230
|
+
console.log(chalk.gray(` - .kiro/product.md`));
|
|
231
|
+
console.log(chalk.gray(` - .kiro/technical.md`));
|
|
232
|
+
}
|
|
233
|
+
} else if (tool === 'trae') {
|
|
234
|
+
generatedFiles = await generateTrae(sessionPath, cwd, framework);
|
|
235
|
+
if (!options.silent && !spinner) {
|
|
236
|
+
console.log(chalk.green('✓ Generated Trae configurations'));
|
|
237
|
+
console.log(chalk.gray(` - .trae/config.json`));
|
|
238
|
+
}
|
|
239
|
+
} else if (tool === 'codex-cli') {
|
|
240
|
+
generatedFiles = await generateCodexCLI(sessionPath, cwd, framework);
|
|
241
|
+
if (!options.silent && !spinner) {
|
|
242
|
+
console.log(chalk.green('✓ Generated Codex CLI configurations'));
|
|
243
|
+
console.log(chalk.gray(` - .codex/config.toml`));
|
|
244
|
+
console.log(chalk.gray(` - .codex/instructions.md`));
|
|
245
|
+
}
|
|
220
246
|
}
|
|
221
247
|
} catch (error) {
|
|
222
248
|
console.warn(chalk.yellow(`\n⚠️ Warning: Could not generate ${TOOLS[tool]?.name || tool} configurations: ${error.message}`));
|