agentic-kdd 2.1.6 → 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 CHANGED
@@ -7,27 +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 Install Agentic KDD in the current project
20
- akdd update Update to the latest version (keeps your memory intact)
21
- akdd graph Show knowledge graph stats and sync memory
22
- akdd dashboard Open visual knowledge graph dashboard in browser
23
- akdd analyze Analyze project code and auto-build knowledge graph
24
- akdd --version Show version
25
- akdd --help Show this help
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
26
33
 
27
34
  After init, open the project in Cursor or Claude Code and type:
28
35
  aa: [your task]
29
36
  `;
30
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
+
31
54
  switch (command) {
32
55
  case 'init':
33
56
  init();
@@ -35,16 +58,29 @@ switch (command) {
35
58
  case 'update':
36
59
  update();
37
60
  break;
61
+ case 'analyze':
62
+ case 'analizar':
63
+ analyze();
64
+ break;
38
65
  case 'graph':
39
66
  graph();
40
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;
41
81
  case 'dashboard':
42
82
  dashboard();
43
83
  break;
44
- case 'analyze':
45
- case 'analizar':
46
- analyze();
47
- break;
48
84
  case '--version':
49
85
  case '-v':
50
86
  console.log(pkg.version);
@@ -58,4 +94,4 @@ switch (command) {
58
94
  console.log(`\n Unknown command: ${command}`);
59
95
  console.log(' Run akdd --help for usage\n');
60
96
  process.exit(1);
61
- }
97
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-kdd",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "Autonomous development pipeline with KDD — aa: · ag: · audit: · Visual Dashboard. Works with Cursor and Claude Code.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
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 };