agentic-kdd 2.2.13 → 3.0.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.
- package/bin/akdd.js +174 -117
- package/package.json +8 -3
package/bin/akdd.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const { init }
|
|
5
|
-
const { update }
|
|
6
|
-
const { graph }
|
|
4
|
+
const { init } = require('../src/init');
|
|
5
|
+
const { update } = require('../src/update');
|
|
6
|
+
const { graph } = require('../src/graph');
|
|
7
7
|
const { dashboard } = require('../src/dashboard');
|
|
8
|
-
const { analyze }
|
|
9
|
-
const pkg
|
|
8
|
+
const { analyze } = require('../src/analyze');
|
|
9
|
+
const pkg = require('../package.json');
|
|
10
10
|
const path = require('path');
|
|
11
|
-
const fs
|
|
11
|
+
const fs = require('fs');
|
|
12
12
|
const { execSync } = require('child_process');
|
|
13
13
|
|
|
14
14
|
const args = process.argv.slice(2);
|
|
@@ -18,92 +18,113 @@ const arg2 = args[2];
|
|
|
18
18
|
|
|
19
19
|
const HELP = `
|
|
20
20
|
Agentic KDD v${pkg.version}
|
|
21
|
-
Autonomous development pipeline
|
|
21
|
+
Autonomous development pipeline — one developer, full-department output.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Setup:
|
|
24
24
|
akdd init Install Agentic KDD in the current project
|
|
25
25
|
akdd update Update agents + engine (memory stays intact)
|
|
26
|
-
akdd
|
|
26
|
+
akdd health System health check — what's configured, what's missing
|
|
27
|
+
akdd health --fix Auto-fix common issues
|
|
28
|
+
|
|
29
|
+
Memory & Knowledge:
|
|
27
30
|
akdd sync Sync memory files to SQLite graph
|
|
28
|
-
akdd graph Sync
|
|
31
|
+
akdd graph Sync + show graph stats
|
|
29
32
|
akdd stats Show graph stats and HIGH rules
|
|
30
|
-
akdd coala Show CoALA memory stats (
|
|
31
|
-
akdd
|
|
32
|
-
akdd
|
|
33
|
-
akdd impacto Show impact of touching a module/file
|
|
33
|
+
akdd coala Show CoALA memory stats (4 layers)
|
|
34
|
+
akdd buscar Hybrid search across all memory layers
|
|
35
|
+
akdd impacto Semantic impact of a module/entity
|
|
34
36
|
akdd decay Apply temporal decay to stale patterns
|
|
35
|
-
akdd
|
|
37
|
+
akdd audit Memory audit — stale entries, contradictions, proposals
|
|
38
|
+
akdd forget <id> Forget a memory entry with documented reason
|
|
39
|
+
|
|
40
|
+
AST & Impact Analysis:
|
|
41
|
+
akdd ast Index project AST (symbols, imports, call graph, PageRank)
|
|
42
|
+
akdd ast stats Show AST index stats
|
|
43
|
+
akdd ast symbols <f> Show symbols in a file
|
|
44
|
+
akdd ast-impact <f> Full impact analysis of a file/module
|
|
45
|
+
akdd why <entity> Explain why something exists (causal chain)
|
|
46
|
+
|
|
47
|
+
Specs & Autonomy:
|
|
48
|
+
akdd spec list List all module specs
|
|
49
|
+
akdd spec <module> Show spec status + next wave
|
|
50
|
+
akdd spec create <m> Create feature spec for a module
|
|
51
|
+
akdd spec create <m> --bugfix Create bugfix spec
|
|
52
|
+
|
|
53
|
+
Knowledge Base:
|
|
54
|
+
akdd adr Ingest ADRs from docs/adr/
|
|
55
|
+
akdd knowledge Ingest gotchas/conventions from docs/
|
|
56
|
+
|
|
57
|
+
Metrics & Observability:
|
|
58
|
+
akdd metrics Project KPIs — success rate, rework, autonomy score
|
|
59
|
+
akdd metrics trend Show trend of last 10 cycles
|
|
60
|
+
akdd trail Recent decision trails (what changed and why)
|
|
61
|
+
akdd trail <ciclo_id> Full trail of a specific cycle
|
|
62
|
+
akdd trail why <f> Why does this file/entity exist?
|
|
36
63
|
|
|
37
64
|
Intelligence v2.2:
|
|
38
|
-
akdd git-context Analyze git diff + risk assessment
|
|
39
|
-
akdd predict
|
|
40
|
-
akdd embed-status
|
|
41
|
-
akdd embed-install Install local embeddings (~23MB,
|
|
42
|
-
akdd
|
|
43
|
-
akdd ci-
|
|
44
|
-
akdd ci-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
65
|
+
akdd git-context Analyze git diff + risk assessment
|
|
66
|
+
akdd predict Predictive risk patterns from episodic memory
|
|
67
|
+
akdd embed-status Local embeddings status
|
|
68
|
+
akdd embed-install Install local embeddings (~23MB, offline)
|
|
69
|
+
akdd jina-install Install jina-v2-code embeddings (~500MB, code-optimized)
|
|
70
|
+
akdd ci-install Install GitHub Actions CI/CD workflow
|
|
71
|
+
akdd ci-status Show last CI/CD reports
|
|
72
|
+
|
|
73
|
+
Dashboard:
|
|
74
|
+
akdd dashboard Open visual dashboard in browser
|
|
75
|
+
|
|
76
|
+
MCP Server (Cursor / Claude Code):
|
|
77
|
+
node .agentic/grafo/mcp-server.cjs
|
|
78
|
+
See: github.com/Adrianlpz211/Agentic-KDD-MCP
|
|
79
|
+
|
|
80
|
+
akdd --version / akdd --help
|
|
51
81
|
`;
|
|
52
82
|
|
|
53
83
|
function findGrafo() {
|
|
54
84
|
const p = path.join(process.cwd(), '.agentic', 'grafo', 'grafo.cjs');
|
|
55
|
-
if (!fs.existsSync(p)) {
|
|
56
|
-
console.log('\n grafo.cjs not found. Run: akdd update\n');
|
|
57
|
-
process.exit(1);
|
|
58
|
-
}
|
|
85
|
+
if (!fs.existsSync(p)) { console.log('\n grafo.cjs not found. Run: akdd update\n'); process.exit(1); }
|
|
59
86
|
return p;
|
|
60
87
|
}
|
|
61
88
|
|
|
62
89
|
function runGrafo(cmd, extra) {
|
|
63
90
|
const grafo = findGrafo();
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
} catch(e) { process.exit(1); }
|
|
91
|
+
const fullCmd = extra ? `node "${grafo}" ${cmd} ${extra}` : `node "${grafo}" ${cmd}`;
|
|
92
|
+
try { execSync(fullCmd, { stdio: 'inherit', cwd: process.cwd() }); }
|
|
93
|
+
catch(e) { process.exit(e.status || 1); }
|
|
69
94
|
}
|
|
70
95
|
|
|
71
|
-
function
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
96
|
+
function runModule(name, cmd, extra) {
|
|
97
|
+
const p = path.join(process.cwd(), '.agentic', 'grafo', name);
|
|
98
|
+
if (!fs.existsSync(p)) { console.log(`\n ${name} not found. Run: akdd update\n`); process.exit(1); }
|
|
99
|
+
const fullCmd = [
|
|
100
|
+
`node "${p}"`,
|
|
101
|
+
cmd || '',
|
|
102
|
+
extra || ''
|
|
103
|
+
].join(' ').trim().replace(/\s+/g,' ');
|
|
104
|
+
try { execSync(fullCmd, { stdio: 'inherit', cwd: process.cwd() }); }
|
|
105
|
+
catch(e) { process.exit(e.status || 1); }
|
|
78
106
|
}
|
|
79
107
|
|
|
80
108
|
switch (command) {
|
|
81
109
|
|
|
82
|
-
|
|
83
|
-
case '
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
case 'update':
|
|
87
|
-
update(); break;
|
|
88
|
-
|
|
89
|
-
case 'analyze':
|
|
90
|
-
case 'analizar':
|
|
91
|
-
analyze(); break;
|
|
110
|
+
case 'init': init(); break;
|
|
111
|
+
case 'update': update(); break;
|
|
112
|
+
case 'analyze': analyze(); break;
|
|
92
113
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
case 'stats':
|
|
100
|
-
runGrafo('stats'); break;
|
|
101
|
-
|
|
102
|
-
case 'coala':
|
|
103
|
-
runGrafo('coala'); break;
|
|
114
|
+
// ── v3.0: Health ────────────────────────────────────────────────────────
|
|
115
|
+
case 'health': {
|
|
116
|
+
const fixFlag = args.includes('--fix') ? '--fix' : '';
|
|
117
|
+
runModule('health-check.cjs', fixFlag);
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
104
120
|
|
|
105
|
-
|
|
106
|
-
runGrafo('
|
|
121
|
+
// ── Core memory ────────────────────────────────────────────────────────
|
|
122
|
+
case 'sync': runGrafo('sync'); break;
|
|
123
|
+
case 'graph': graph(); break;
|
|
124
|
+
case 'stats': runGrafo('stats'); break;
|
|
125
|
+
case 'coala': runGrafo('coala'); break;
|
|
126
|
+
case 'metricas': runGrafo('metricas'); break;
|
|
127
|
+
case 'decay': runGrafo('decay'); break;
|
|
107
128
|
|
|
108
129
|
case 'buscar':
|
|
109
130
|
if (!arg1) { console.log('\n Uso: akdd buscar "query" [area]\n'); break; }
|
|
@@ -115,81 +136,117 @@ switch (command) {
|
|
|
115
136
|
runGrafo('impacto', `"${arg1}"`);
|
|
116
137
|
break;
|
|
117
138
|
|
|
118
|
-
|
|
119
|
-
|
|
139
|
+
// ── v3.0: Memory Audit ─────────────────────────────────────────────────
|
|
140
|
+
case 'audit': runModule('memory-audit.cjs', 'report'); break;
|
|
120
141
|
|
|
121
|
-
case '
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
case 'git-context': {
|
|
127
|
-
if (args.includes('--install-hook')) {
|
|
128
|
-
runGrafo('git-context', '--install-hook');
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
runGrafo('git-context');
|
|
142
|
+
case 'forget': {
|
|
143
|
+
if (!arg1) { console.log('\n Uso: akdd forget <id> "<razón>"\n'); break; }
|
|
144
|
+
const reason = args.slice(2).join(' ');
|
|
145
|
+
if (!reason) { console.log('\n Uso: akdd forget <id> "<razón>"\n'); break; }
|
|
146
|
+
runModule('memory-audit.cjs', 'forget', `${arg1} "${reason}"`);
|
|
132
147
|
break;
|
|
133
148
|
}
|
|
134
149
|
|
|
135
|
-
|
|
136
|
-
|
|
150
|
+
// ── v3.0: AST ──────────────────────────────────────────────────────────
|
|
151
|
+
case 'ast': {
|
|
152
|
+
const sub = arg1 || 'index';
|
|
153
|
+
const tgt = arg2 || '';
|
|
154
|
+
if (sub === 'stats') runModule('ast-indexer.cjs', 'stats');
|
|
155
|
+
else if (sub === 'symbols') {
|
|
156
|
+
if (!tgt) { console.log('\n Uso: akdd ast symbols <archivo>\n'); break; }
|
|
157
|
+
runModule('ast-indexer.cjs', 'symbols', `"${tgt}"`);
|
|
158
|
+
} else {
|
|
159
|
+
runModule('ast-indexer.cjs', 'index', tgt);
|
|
160
|
+
}
|
|
137
161
|
break;
|
|
138
162
|
}
|
|
139
163
|
|
|
140
|
-
case '
|
|
141
|
-
|
|
164
|
+
case 'ast-impact':
|
|
165
|
+
if (!arg1) { console.log('\n Uso: akdd ast-impact <archivo_o_módulo>\n'); break; }
|
|
166
|
+
runModule('impact-analyzer.cjs', 'analyze', `"${arg1}"`);
|
|
142
167
|
break;
|
|
143
|
-
}
|
|
144
168
|
|
|
145
|
-
case '
|
|
146
|
-
|
|
169
|
+
case 'why':
|
|
170
|
+
if (!arg1) { console.log('\n Uso: akdd why <archivo_o_entidad>\n'); break; }
|
|
171
|
+
runModule('decision-trail.cjs', 'why', `"${arg1}"`);
|
|
147
172
|
break;
|
|
148
|
-
}
|
|
149
173
|
|
|
150
|
-
|
|
151
|
-
|
|
174
|
+
// ── v3.0: Specs ────────────────────────────────────────────────────────
|
|
175
|
+
case 'spec': {
|
|
176
|
+
const sub = arg1;
|
|
177
|
+
const mod = arg2;
|
|
178
|
+
if (!sub || sub === 'list') runModule('spec-manager.cjs', 'list');
|
|
179
|
+
else if (sub === 'create') {
|
|
180
|
+
if (!mod) { console.log('\n Uso: akdd spec create <módulo> [--bugfix]\n'); break; }
|
|
181
|
+
runModule('spec-manager.cjs', 'create', `"${mod}"${args.includes('--bugfix') ? ' --bugfix' : ''}`);
|
|
182
|
+
}
|
|
183
|
+
else if (sub === 'waves') { if (!mod) { console.log('\n Uso: akdd spec waves <módulo>\n'); break; } runModule('spec-manager.cjs', 'waves', `"${mod}"`); }
|
|
184
|
+
else if (sub === 'validate') { if (!mod) { console.log('\n Uso: akdd spec validate <módulo>\n'); break; } runModule('spec-manager.cjs', 'validate', `"${mod}"`); }
|
|
185
|
+
else runModule('spec-manager.cjs', 'status', `"${sub}"`);
|
|
152
186
|
break;
|
|
153
187
|
}
|
|
154
188
|
|
|
155
|
-
case '
|
|
156
|
-
|
|
189
|
+
case 'spec-create':
|
|
190
|
+
if (!arg1) { console.log('\n Uso: akdd spec-create <módulo> [--bugfix]\n'); break; }
|
|
191
|
+
runModule('spec-manager.cjs', 'create', `"${arg1}"${args.includes('--bugfix') ? ' --bugfix' : ''}`);
|
|
157
192
|
break;
|
|
158
|
-
}
|
|
159
193
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
194
|
+
// ── v3.0: Knowledge ────────────────────────────────────────────────────
|
|
195
|
+
case 'adr':
|
|
196
|
+
runModule('adr-ingestor.cjs', 'ingest', arg1 || 'docs/adr');
|
|
197
|
+
break;
|
|
164
198
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
199
|
+
case 'knowledge':
|
|
200
|
+
runModule('knowledge-ingestor.cjs', 'ingest', arg1 || '');
|
|
201
|
+
break;
|
|
168
202
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
203
|
+
// ── v3.0: Metrics ──────────────────────────────────────────────────────
|
|
204
|
+
case 'metrics':
|
|
205
|
+
runModule('metrics.cjs', arg1 || 'summary');
|
|
206
|
+
break;
|
|
173
207
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
208
|
+
// ── v3.0: Decision Trail ───────────────────────────────────────────────
|
|
209
|
+
case 'trail': {
|
|
210
|
+
if (!arg1) runModule('decision-trail.cjs', 'recent', '5');
|
|
211
|
+
else if (arg1 === 'why') { if (!arg2) { console.log('\n Uso: akdd trail why <entidad>\n'); break; } runModule('decision-trail.cjs', 'why', `"${arg2}"`); }
|
|
212
|
+
else if (arg1 === 'timeline'){ if (!arg2) { console.log('\n Uso: akdd trail timeline <módulo>\n'); break; } runModule('decision-trail.cjs', 'timeline', `"${arg2}"`); }
|
|
213
|
+
else runModule('decision-trail.cjs', 'ciclo', `"${arg1}"`);
|
|
179
214
|
break;
|
|
180
215
|
}
|
|
181
216
|
|
|
182
|
-
// ──
|
|
183
|
-
case '
|
|
184
|
-
|
|
185
|
-
|
|
217
|
+
// ── Dashboard ──────────────────────────────────────────────────────────
|
|
218
|
+
case 'dashboard': dashboard(); break;
|
|
219
|
+
|
|
220
|
+
// ── v2.2: Intelligence ─────────────────────────────────────────────────
|
|
221
|
+
case 'git-context': runGrafo('git-context', args.includes('--install-hook') ? '--install-hook' : ''); break;
|
|
222
|
+
case 'predict': runGrafo('predict'); break;
|
|
223
|
+
case 'embed-status': runGrafo('embed-status'); break;
|
|
224
|
+
case 'embed-install': runGrafo('embed-install'); break;
|
|
225
|
+
|
|
226
|
+
case 'jina-install':
|
|
227
|
+
runModule('embeddings.cjs', 'install-jina');
|
|
186
228
|
break;
|
|
187
229
|
|
|
188
|
-
case '
|
|
189
|
-
case '-
|
|
190
|
-
|
|
191
|
-
|
|
230
|
+
case 'ci-install': runGrafo('ci-install'); break;
|
|
231
|
+
case 'ci-status': runGrafo('ci-status'); break;
|
|
232
|
+
|
|
233
|
+
case 'ci-report': {
|
|
234
|
+
const grafo = path.join(process.cwd(), '.agentic', 'grafo', 'grafo.cjs');
|
|
235
|
+
if (!fs.existsSync(grafo)) { process.exit(0); }
|
|
236
|
+
const esExito = args.includes('--success');
|
|
237
|
+
const outIdx = args.indexOf('--output');
|
|
238
|
+
const outFile = outIdx >= 0 ? args[outIdx + 1] : null;
|
|
239
|
+
const flags = [esExito ? '--success' : '', outFile ? `--output "${outFile}"` : ''].filter(Boolean).join(' ');
|
|
240
|
+
try { execSync(`node "${grafo}" ci-report ${flags}`, { stdio: 'inherit', cwd: process.cwd(), timeout: 60000 }); }
|
|
241
|
+
catch(e) { process.exit(0); }
|
|
192
242
|
break;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
case '--version': case '-v':
|
|
246
|
+
console.log(pkg.version); break;
|
|
247
|
+
|
|
248
|
+
case '--help': case '-h': case undefined:
|
|
249
|
+
console.log(HELP); break;
|
|
193
250
|
|
|
194
251
|
default:
|
|
195
252
|
console.log(`\n Unknown command: ${command}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-kdd",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Autonomous development pipeline
|
|
3
|
+
"version": "3.0.1",
|
|
4
|
+
"description": "Autonomous development pipeline — aa: · ag: · audit: · AST graph · Harness · Specs · Impact analysis · Decision trail · Metrics · MCP server. Works with Cursor and Claude Code.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"akdd": "bin/akdd.js"
|
|
@@ -21,7 +21,12 @@
|
|
|
21
21
|
"knowledge-driven",
|
|
22
22
|
"agentic",
|
|
23
23
|
"sqlite",
|
|
24
|
-
"dashboard"
|
|
24
|
+
"dashboard",
|
|
25
|
+
"mcp",
|
|
26
|
+
"ast",
|
|
27
|
+
"harness",
|
|
28
|
+
"specs",
|
|
29
|
+
"memory"
|
|
25
30
|
],
|
|
26
31
|
"author": "Adrianlpz211",
|
|
27
32
|
"license": "MIT",
|