agentic-kdd 2.1.5 → 2.1.7
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 +48 -7
- package/package.json +1 -1
- package/src/grafo.cjs +2 -1
package/bin/akdd.js
CHANGED
|
@@ -7,26 +7,50 @@ const { graph } = require('../src/graph');
|
|
|
7
7
|
const { dashboard } = require('../src/dashboard');
|
|
8
8
|
const { analyze } = require('../src/analyze');
|
|
9
9
|
const pkg = require('../package.json');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const { execSync } = require('child_process');
|
|
10
12
|
|
|
11
13
|
const args = process.argv.slice(2);
|
|
12
14
|
const command = args[0];
|
|
15
|
+
const arg1 = args[1];
|
|
13
16
|
|
|
14
17
|
const HELP = `
|
|
15
18
|
Agentic KDD v${pkg.version}
|
|
16
19
|
Autonomous development pipeline with Knowledge-Driven Development
|
|
17
20
|
|
|
18
21
|
Usage:
|
|
19
|
-
akdd init
|
|
20
|
-
akdd update
|
|
21
|
-
akdd
|
|
22
|
-
akdd
|
|
23
|
-
akdd
|
|
24
|
-
akdd
|
|
22
|
+
akdd init Install Agentic KDD in the current project
|
|
23
|
+
akdd update Update agents (memory stays intact)
|
|
24
|
+
akdd analyze Analyze project code and auto-build knowledge graph
|
|
25
|
+
akdd graph Sync memory + show graph stats
|
|
26
|
+
akdd sync Sync memory files to SQLite graph
|
|
27
|
+
akdd stats Show graph stats and HIGH rules
|
|
28
|
+
akdd metricas Show agent KPIs (Goal Attainment, Autonomy, etc.)
|
|
29
|
+
akdd semantico Semantic search in knowledge graph (needs API key)
|
|
30
|
+
akdd dashboard Open visual dashboard in browser
|
|
31
|
+
akdd --version Show version
|
|
32
|
+
akdd --help Show this help
|
|
25
33
|
|
|
26
34
|
After init, open the project in Cursor or Claude Code and type:
|
|
27
35
|
aa: [your task]
|
|
28
36
|
`;
|
|
29
37
|
|
|
38
|
+
function runGrafo(cmd, extra) {
|
|
39
|
+
const grafo = path.join(process.cwd(), '.agentic', 'grafo', 'grafo.cjs');
|
|
40
|
+
const fs = require('fs');
|
|
41
|
+
if (!fs.existsSync(grafo)) {
|
|
42
|
+
console.log('\n grafo.cjs not found. Run akdd update first.\n');
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const out = execSync(`node "${grafo}" ${cmd}${extra?' '+extra:''}`, {
|
|
47
|
+
stdio: 'inherit', cwd: process.cwd()
|
|
48
|
+
});
|
|
49
|
+
} catch(e) {
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
30
54
|
switch (command) {
|
|
31
55
|
case 'init':
|
|
32
56
|
init();
|
|
@@ -34,9 +58,26 @@ switch (command) {
|
|
|
34
58
|
case 'update':
|
|
35
59
|
update();
|
|
36
60
|
break;
|
|
61
|
+
case 'analyze':
|
|
62
|
+
case 'analizar':
|
|
63
|
+
analyze();
|
|
64
|
+
break;
|
|
37
65
|
case 'graph':
|
|
38
66
|
graph();
|
|
39
67
|
break;
|
|
68
|
+
case 'sync':
|
|
69
|
+
runGrafo('sync');
|
|
70
|
+
break;
|
|
71
|
+
case 'stats':
|
|
72
|
+
runGrafo('stats');
|
|
73
|
+
break;
|
|
74
|
+
case 'metricas':
|
|
75
|
+
runGrafo('metricas');
|
|
76
|
+
break;
|
|
77
|
+
case 'semantico':
|
|
78
|
+
if (!arg1) { console.log('\n Uso: akdd semantico "tu query"\n'); break; }
|
|
79
|
+
runGrafo('semantico', `"${arg1}"`);
|
|
80
|
+
break;
|
|
40
81
|
case 'dashboard':
|
|
41
82
|
dashboard();
|
|
42
83
|
break;
|
|
@@ -53,4 +94,4 @@ switch (command) {
|
|
|
53
94
|
console.log(`\n Unknown command: ${command}`);
|
|
54
95
|
console.log(' Run akdd --help for usage\n');
|
|
55
96
|
process.exit(1);
|
|
56
|
-
}
|
|
97
|
+
}
|
package/package.json
CHANGED
package/src/grafo.cjs
CHANGED
|
@@ -557,7 +557,6 @@ switch(cmd) {
|
|
|
557
557
|
console.log('Uso: node grafo.cjs [sync|query|stats|metricas|ciclo|semantico|snapshot|analizar]');
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
-
module.exports = { sincronizar, consultar, stats, metricas, registrarCiclo, buscarSemantico, snapshotMemoria, analizarProyecto };
|
|
561
560
|
|
|
562
561
|
// ─── ANÁLISIS AUTOMÁTICO DEL PROYECTO ────────────────────────────────────────
|
|
563
562
|
// Recorre el código real y construye el grafo sin esperar ciclos aa:
|
|
@@ -902,3 +901,5 @@ Razón: Inferido del código — verificar con el equipo\n`;
|
|
|
902
901
|
fs.writeFileSync(decisionesPath, decisionesContent);
|
|
903
902
|
} catch(e) {}
|
|
904
903
|
}
|
|
904
|
+
|
|
905
|
+
module.exports = { sincronizar, consultar, stats, metricas, registrarCiclo, buscarSemantico, snapshotMemoria, analizarProyecto };
|