agentic-kdd 2.1.11 → 2.2.13
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 +132 -49
- package/package.json +2 -2
package/bin/akdd.js
CHANGED
|
@@ -8,106 +8,189 @@ const { dashboard } = require('../src/dashboard');
|
|
|
8
8
|
const { analyze } = require('../src/analyze');
|
|
9
9
|
const pkg = require('../package.json');
|
|
10
10
|
const path = require('path');
|
|
11
|
+
const fs = require('fs');
|
|
11
12
|
const { execSync } = require('child_process');
|
|
12
13
|
|
|
13
|
-
const args
|
|
14
|
+
const args = process.argv.slice(2);
|
|
14
15
|
const command = args[0];
|
|
15
|
-
const arg1
|
|
16
|
+
const arg1 = args[1];
|
|
17
|
+
const arg2 = args[2];
|
|
16
18
|
|
|
17
19
|
const HELP = `
|
|
18
20
|
Agentic KDD v${pkg.version}
|
|
19
21
|
Autonomous development pipeline with Knowledge-Driven Development
|
|
20
22
|
|
|
21
23
|
Usage:
|
|
22
|
-
akdd init
|
|
23
|
-
akdd update
|
|
24
|
-
akdd analyze
|
|
25
|
-
akdd
|
|
26
|
-
akdd
|
|
27
|
-
akdd stats
|
|
28
|
-
akdd coala
|
|
29
|
-
akdd metricas
|
|
30
|
-
akdd buscar
|
|
31
|
-
akdd impacto
|
|
32
|
-
akdd
|
|
33
|
-
akdd
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
akdd
|
|
24
|
+
akdd init Install Agentic KDD in the current project
|
|
25
|
+
akdd update Update agents + engine (memory stays intact)
|
|
26
|
+
akdd analyze Analyze project code and auto-build knowledge graph
|
|
27
|
+
akdd sync Sync memory files to SQLite graph
|
|
28
|
+
akdd graph Sync memory + show graph stats
|
|
29
|
+
akdd stats Show graph stats and HIGH rules
|
|
30
|
+
akdd coala Show CoALA memory stats (procedural + episodic + semantic)
|
|
31
|
+
akdd metricas Show agent KPIs (Goal Attainment, Autonomy, etc.)
|
|
32
|
+
akdd buscar Hybrid search across all 3 memory layers
|
|
33
|
+
akdd impacto Show impact of touching a module/file
|
|
34
|
+
akdd decay Apply temporal decay to stale patterns
|
|
35
|
+
akdd dashboard Open visual dashboard in browser
|
|
36
|
+
|
|
37
|
+
Intelligence v2.2:
|
|
38
|
+
akdd git-context Analyze git diff + risk assessment from episodic memory
|
|
39
|
+
akdd predict Show predictive patterns detected from episodic memory
|
|
40
|
+
akdd embed-status Check local embeddings status (all-MiniLM-L6-v2)
|
|
41
|
+
akdd embed-install Install local embeddings (~23MB, 100% offline)
|
|
42
|
+
akdd ci-install Install GitHub Actions workflow for auto CI/CD memory
|
|
43
|
+
akdd ci-status Show last CI/CD reports stored in memory
|
|
44
|
+
akdd ci-report Report CI result to memory (called by CI workflow)
|
|
45
|
+
|
|
46
|
+
akdd --version Show version
|
|
47
|
+
akdd --help Show this help
|
|
37
48
|
|
|
38
49
|
After init, open the project in Cursor or Claude Code and type:
|
|
39
50
|
aa: [your task]
|
|
40
51
|
`;
|
|
41
52
|
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
console.log('\n grafo.cjs not found. Run akdd update first.\n');
|
|
53
|
+
function findGrafo() {
|
|
54
|
+
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');
|
|
47
57
|
process.exit(1);
|
|
48
58
|
}
|
|
59
|
+
return p;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function runGrafo(cmd, extra) {
|
|
63
|
+
const grafo = findGrafo();
|
|
49
64
|
try {
|
|
50
|
-
|
|
65
|
+
execSync(`node "${grafo}" ${cmd}${extra ? ' ' + extra : ''}`, {
|
|
51
66
|
stdio: 'inherit', cwd: process.cwd()
|
|
52
67
|
});
|
|
53
|
-
} catch(e) {
|
|
54
|
-
|
|
55
|
-
|
|
68
|
+
} catch(e) { process.exit(1); }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function runGrafoPipe(cmd, extra) {
|
|
72
|
+
const grafo = findGrafo();
|
|
73
|
+
try {
|
|
74
|
+
return execSync(`node "${grafo}" ${cmd}${extra ? ' ' + extra : ''}`, {
|
|
75
|
+
stdio: 'pipe', cwd: process.cwd()
|
|
76
|
+
}).toString();
|
|
77
|
+
} catch(e) { return ''; }
|
|
56
78
|
}
|
|
57
79
|
|
|
58
80
|
switch (command) {
|
|
81
|
+
|
|
82
|
+
// ── Comandos existentes ─────────────────────────────────────────────────────
|
|
59
83
|
case 'init':
|
|
60
|
-
init();
|
|
61
|
-
|
|
84
|
+
init(); break;
|
|
85
|
+
|
|
62
86
|
case 'update':
|
|
63
|
-
update();
|
|
64
|
-
|
|
87
|
+
update(); break;
|
|
88
|
+
|
|
65
89
|
case 'analyze':
|
|
66
90
|
case 'analizar':
|
|
67
|
-
analyze();
|
|
68
|
-
|
|
91
|
+
analyze(); break;
|
|
92
|
+
|
|
69
93
|
case 'graph':
|
|
70
|
-
graph();
|
|
71
|
-
|
|
94
|
+
graph(); break;
|
|
95
|
+
|
|
72
96
|
case 'sync':
|
|
73
|
-
runGrafo('sync');
|
|
74
|
-
|
|
97
|
+
runGrafo('sync'); break;
|
|
98
|
+
|
|
75
99
|
case 'stats':
|
|
76
|
-
runGrafo('stats');
|
|
77
|
-
|
|
100
|
+
runGrafo('stats'); break;
|
|
101
|
+
|
|
78
102
|
case 'coala':
|
|
79
|
-
runGrafo('coala');
|
|
80
|
-
|
|
103
|
+
runGrafo('coala'); break;
|
|
104
|
+
|
|
81
105
|
case 'metricas':
|
|
82
|
-
runGrafo('metricas');
|
|
83
|
-
|
|
84
|
-
case 'semantico':
|
|
85
|
-
if (!arg1) { console.log('\n Uso: akdd semantico "tu query"\n'); break; }
|
|
86
|
-
runGrafo('semantico', `"${arg1}"`);
|
|
87
|
-
break;
|
|
106
|
+
runGrafo('metricas'); break;
|
|
107
|
+
|
|
88
108
|
case 'buscar':
|
|
89
109
|
if (!arg1) { console.log('\n Uso: akdd buscar "query" [area]\n'); break; }
|
|
90
110
|
runGrafo('buscar', `"${arg1}"${arg2 ? ' ' + arg2 : ''}`);
|
|
91
111
|
break;
|
|
112
|
+
|
|
92
113
|
case 'impacto':
|
|
93
114
|
if (!arg1) { console.log('\n Uso: akdd impacto "NombreModulo"\n'); break; }
|
|
94
115
|
runGrafo('impacto', `"${arg1}"`);
|
|
95
116
|
break;
|
|
117
|
+
|
|
96
118
|
case 'decay':
|
|
97
|
-
runGrafo('decay');
|
|
98
|
-
|
|
119
|
+
runGrafo('decay'); break;
|
|
120
|
+
|
|
99
121
|
case 'dashboard':
|
|
100
|
-
dashboard();
|
|
122
|
+
dashboard(); break;
|
|
123
|
+
|
|
124
|
+
// ── v2.2: Intelligence features ────────────────────────────────────────────
|
|
125
|
+
|
|
126
|
+
case 'git-context': {
|
|
127
|
+
if (args.includes('--install-hook')) {
|
|
128
|
+
runGrafo('git-context', '--install-hook');
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
runGrafo('git-context');
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
case 'predict': {
|
|
136
|
+
runGrafo('predict');
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
case 'embed-status': {
|
|
141
|
+
runGrafo('embed-status');
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
case 'embed-install': {
|
|
146
|
+
runGrafo('embed-install');
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
case 'ci-install': {
|
|
151
|
+
runGrafo('ci-install');
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
case 'ci-status': {
|
|
156
|
+
runGrafo('ci-status');
|
|
101
157
|
break;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
case 'ci-report': {
|
|
161
|
+
// Llamado por GitHub Actions — no interrumpir el CI si falla
|
|
162
|
+
const grafo = path.join(process.cwd(), '.agentic', 'grafo', 'grafo.cjs');
|
|
163
|
+
if (!fs.existsSync(grafo)) { process.exit(0); }
|
|
164
|
+
|
|
165
|
+
const esExito = args.includes('--success');
|
|
166
|
+
const outputIdx = args.indexOf('--output');
|
|
167
|
+
const outputFile = outputIdx >= 0 ? args[outputIdx + 1] : null;
|
|
168
|
+
|
|
169
|
+
const flags = [
|
|
170
|
+
esExito ? '--success' : '',
|
|
171
|
+
outputFile ? `--output "${outputFile}"` : ''
|
|
172
|
+
].filter(Boolean).join(' ');
|
|
173
|
+
|
|
174
|
+
try {
|
|
175
|
+
execSync(`node "${grafo}" ci-report ${flags}`, {
|
|
176
|
+
stdio: 'inherit', cwd: process.cwd(), timeout: 60000
|
|
177
|
+
});
|
|
178
|
+
} catch(e) { process.exit(0); } // no fallar el CI
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ── Meta ────────────────────────────────────────────────────────────────────
|
|
102
183
|
case '--version':
|
|
103
184
|
case '-v':
|
|
104
185
|
console.log(pkg.version);
|
|
105
186
|
break;
|
|
187
|
+
|
|
106
188
|
case '--help':
|
|
107
189
|
case '-h':
|
|
108
190
|
case undefined:
|
|
109
191
|
console.log(HELP);
|
|
110
192
|
break;
|
|
193
|
+
|
|
111
194
|
default:
|
|
112
195
|
console.log(`\n Unknown command: ${command}`);
|
|
113
196
|
console.log(' Run akdd --help for usage\n');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-kdd",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Autonomous development pipeline with KDD — aa: · ag: · audit: ·
|
|
3
|
+
"version": "2.2.13",
|
|
4
|
+
"description": "Autonomous development pipeline with KDD — aa: · ag: · audit: · Git Context · Prediction · Local Embeddings · CI/CD. Works with Cursor and Claude Code.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"akdd": "bin/akdd.js"
|