agile-context-engineering 0.2.2 → 0.3.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/CHANGELOG.md +82 -0
- package/LICENSE +51 -51
- package/README.md +324 -323
- package/agents/ace-research-synthesizer.md +228 -228
- package/agents/ace-technical-application-architect.md +28 -0
- package/agents/ace-wiki-mapper.md +445 -334
- package/agile-context-engineering/src/ace-tools.test.js +1089 -1089
- package/agile-context-engineering/templates/_command.md +53 -53
- package/agile-context-engineering/templates/_workflow.xml +16 -16
- package/agile-context-engineering/templates/product/product-backlog.xml +231 -231
- package/agile-context-engineering/templates/product/story-integration-solution.xml +1 -0
- package/agile-context-engineering/templates/product/story-wiki.xml +4 -0
- package/agile-context-engineering/templates/wiki/coding-standards.xml +38 -0
- package/agile-context-engineering/templates/wiki/decizions.xml +115 -115
- package/agile-context-engineering/templates/wiki/guide.xml +137 -137
- package/agile-context-engineering/templates/wiki/module-discovery.xml +174 -174
- package/agile-context-engineering/templates/wiki/pattern.xml +159 -159
- package/agile-context-engineering/templates/wiki/system-architecture.xml +254 -254
- package/agile-context-engineering/templates/wiki/system-cross-cutting.xml +197 -197
- package/agile-context-engineering/templates/wiki/system.xml +381 -381
- package/agile-context-engineering/templates/wiki/walkthrough.xml +255 -0
- package/agile-context-engineering/templates/wiki/wiki-readme.xml +297 -276
- package/agile-context-engineering/utils/questioning.xml +110 -110
- package/agile-context-engineering/workflows/execute-story.xml +1219 -1145
- package/agile-context-engineering/workflows/help.xml +540 -540
- package/agile-context-engineering/workflows/init-coding-standards.xml +386 -386
- package/agile-context-engineering/workflows/map-story.xml +1046 -797
- package/agile-context-engineering/workflows/map-subsystem.xml +2 -1
- package/agile-context-engineering/workflows/map-walkthrough.xml +457 -0
- package/agile-context-engineering/workflows/plan-feature.xml +1495 -1495
- package/agile-context-engineering/workflows/plan-story.xml +36 -1
- package/agile-context-engineering/workflows/research-integration-solution.xml +1 -0
- package/agile-context-engineering/workflows/research-story-wiki.xml +2 -1
- package/agile-context-engineering/workflows/research-technical-solution.xml +1 -0
- package/agile-context-engineering/workflows/review-story.xml +281 -281
- package/agile-context-engineering/workflows/update.xml +238 -207
- package/bin/install.js +8 -0
- package/commands/ace/execute-story.md +1 -0
- package/commands/ace/help.md +93 -93
- package/commands/ace/init-coding-standards.md +83 -83
- package/commands/ace/map-story.md +165 -156
- package/commands/ace/map-subsystem.md +140 -138
- package/commands/ace/map-system.md +92 -92
- package/commands/ace/map-walkthrough.md +127 -0
- package/commands/ace/plan-feature.md +89 -89
- package/commands/ace/plan-story.md +15 -1
- package/commands/ace/review-story.md +109 -109
- package/commands/ace/update.md +56 -54
- package/hooks/ace-check-update.js +62 -62
- package/hooks/ace-statusline.js +89 -89
- package/package.json +4 -3
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Check for ACE updates in background, write result to cache
|
|
3
|
-
// Called by SessionStart hook - runs once per session
|
|
4
|
-
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
const path = require('path');
|
|
7
|
-
const os = require('os');
|
|
8
|
-
const { spawn } = require('child_process');
|
|
9
|
-
|
|
10
|
-
const homeDir = os.homedir();
|
|
11
|
-
const cwd = process.cwd();
|
|
12
|
-
const cacheDir = path.join(homeDir, '.claude', 'cache');
|
|
13
|
-
const cacheFile = path.join(cacheDir, 'ace-update-check.json');
|
|
14
|
-
|
|
15
|
-
// VERSION file locations (check project first, then global)
|
|
16
|
-
const projectVersionFile = path.join(cwd, '.claude', 'agile-context-engineering', 'VERSION');
|
|
17
|
-
const globalVersionFile = path.join(homeDir, '.claude', 'agile-context-engineering', 'VERSION');
|
|
18
|
-
|
|
19
|
-
// Ensure cache directory exists
|
|
20
|
-
if (!fs.existsSync(cacheDir)) {
|
|
21
|
-
fs.mkdirSync(cacheDir, { recursive: true });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Run check in background (spawn detached process, windowsHide prevents console flash)
|
|
25
|
-
const child = spawn(process.execPath, ['-e', `
|
|
26
|
-
const fs = require('fs');
|
|
27
|
-
const { execSync } = require('child_process');
|
|
28
|
-
|
|
29
|
-
const cacheFile = ${JSON.stringify(cacheFile)};
|
|
30
|
-
const projectVersionFile = ${JSON.stringify(projectVersionFile)};
|
|
31
|
-
const globalVersionFile = ${JSON.stringify(globalVersionFile)};
|
|
32
|
-
|
|
33
|
-
// Check project directory first (local install), then global
|
|
34
|
-
let installed = '0.0.0';
|
|
35
|
-
try {
|
|
36
|
-
if (fs.existsSync(projectVersionFile)) {
|
|
37
|
-
installed = fs.readFileSync(projectVersionFile, 'utf8').trim();
|
|
38
|
-
} else if (fs.existsSync(globalVersionFile)) {
|
|
39
|
-
installed = fs.readFileSync(globalVersionFile, 'utf8').trim();
|
|
40
|
-
}
|
|
41
|
-
} catch (e) {}
|
|
42
|
-
|
|
43
|
-
let latest = null;
|
|
44
|
-
try {
|
|
45
|
-
latest = execSync('npm view agile-context-engineering version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
|
|
46
|
-
} catch (e) {}
|
|
47
|
-
|
|
48
|
-
const result = {
|
|
49
|
-
update_available: latest && installed !== latest,
|
|
50
|
-
installed,
|
|
51
|
-
latest: latest || 'unknown',
|
|
52
|
-
checked: Math.floor(Date.now() / 1000)
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
fs.writeFileSync(cacheFile, JSON.stringify(result));
|
|
56
|
-
`], {
|
|
57
|
-
stdio: 'ignore',
|
|
58
|
-
windowsHide: true,
|
|
59
|
-
detached: true
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
child.unref();
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Check for ACE updates in background, write result to cache
|
|
3
|
+
// Called by SessionStart hook - runs once per session
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const os = require('os');
|
|
8
|
+
const { spawn } = require('child_process');
|
|
9
|
+
|
|
10
|
+
const homeDir = os.homedir();
|
|
11
|
+
const cwd = process.cwd();
|
|
12
|
+
const cacheDir = path.join(homeDir, '.claude', 'cache');
|
|
13
|
+
const cacheFile = path.join(cacheDir, 'ace-update-check.json');
|
|
14
|
+
|
|
15
|
+
// VERSION file locations (check project first, then global)
|
|
16
|
+
const projectVersionFile = path.join(cwd, '.claude', 'agile-context-engineering', 'VERSION');
|
|
17
|
+
const globalVersionFile = path.join(homeDir, '.claude', 'agile-context-engineering', 'VERSION');
|
|
18
|
+
|
|
19
|
+
// Ensure cache directory exists
|
|
20
|
+
if (!fs.existsSync(cacheDir)) {
|
|
21
|
+
fs.mkdirSync(cacheDir, { recursive: true });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Run check in background (spawn detached process, windowsHide prevents console flash)
|
|
25
|
+
const child = spawn(process.execPath, ['-e', `
|
|
26
|
+
const fs = require('fs');
|
|
27
|
+
const { execSync } = require('child_process');
|
|
28
|
+
|
|
29
|
+
const cacheFile = ${JSON.stringify(cacheFile)};
|
|
30
|
+
const projectVersionFile = ${JSON.stringify(projectVersionFile)};
|
|
31
|
+
const globalVersionFile = ${JSON.stringify(globalVersionFile)};
|
|
32
|
+
|
|
33
|
+
// Check project directory first (local install), then global
|
|
34
|
+
let installed = '0.0.0';
|
|
35
|
+
try {
|
|
36
|
+
if (fs.existsSync(projectVersionFile)) {
|
|
37
|
+
installed = fs.readFileSync(projectVersionFile, 'utf8').trim();
|
|
38
|
+
} else if (fs.existsSync(globalVersionFile)) {
|
|
39
|
+
installed = fs.readFileSync(globalVersionFile, 'utf8').trim();
|
|
40
|
+
}
|
|
41
|
+
} catch (e) {}
|
|
42
|
+
|
|
43
|
+
let latest = null;
|
|
44
|
+
try {
|
|
45
|
+
latest = execSync('npm view agile-context-engineering version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
|
|
46
|
+
} catch (e) {}
|
|
47
|
+
|
|
48
|
+
const result = {
|
|
49
|
+
update_available: latest && installed !== latest,
|
|
50
|
+
installed,
|
|
51
|
+
latest: latest || 'unknown',
|
|
52
|
+
checked: Math.floor(Date.now() / 1000)
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
fs.writeFileSync(cacheFile, JSON.stringify(result));
|
|
56
|
+
`], {
|
|
57
|
+
stdio: 'ignore',
|
|
58
|
+
windowsHide: true,
|
|
59
|
+
detached: true
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
child.unref();
|
package/hooks/ace-statusline.js
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Claude Code Statusline - ACE Edition
|
|
3
|
-
// Shows: update indicator | model | current task | directory | context usage
|
|
4
|
-
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
const path = require('path');
|
|
7
|
-
const os = require('os');
|
|
8
|
-
|
|
9
|
-
// Read JSON from stdin
|
|
10
|
-
let input = '';
|
|
11
|
-
process.stdin.setEncoding('utf8');
|
|
12
|
-
process.stdin.on('data', chunk => input += chunk);
|
|
13
|
-
process.stdin.on('end', () => {
|
|
14
|
-
try {
|
|
15
|
-
const data = JSON.parse(input);
|
|
16
|
-
const model = data.model?.display_name || 'Claude';
|
|
17
|
-
const dir = data.workspace?.current_dir || process.cwd();
|
|
18
|
-
const session = data.session_id || '';
|
|
19
|
-
const remaining = data.context_window?.remaining_percentage;
|
|
20
|
-
|
|
21
|
-
// Context window display (shows USED percentage scaled to 80% limit)
|
|
22
|
-
// Claude Code enforces an 80% context limit, so we scale to show 100% at that point
|
|
23
|
-
let ctx = '';
|
|
24
|
-
if (remaining != null) {
|
|
25
|
-
const rem = Math.round(remaining);
|
|
26
|
-
const rawUsed = Math.max(0, Math.min(100, 100 - rem));
|
|
27
|
-
// Scale: 80% real usage = 100% displayed
|
|
28
|
-
const used = Math.min(100, Math.round((rawUsed / 80) * 100));
|
|
29
|
-
|
|
30
|
-
// Build progress bar (10 segments)
|
|
31
|
-
const filled = Math.floor(used / 10);
|
|
32
|
-
const bar = '\u2588'.repeat(filled) + '\u2591'.repeat(10 - filled);
|
|
33
|
-
|
|
34
|
-
// Color based on scaled usage
|
|
35
|
-
if (used < 63) {
|
|
36
|
-
ctx = ` \x1b[32m${bar} ${used}%\x1b[0m`;
|
|
37
|
-
} else if (used < 81) {
|
|
38
|
-
ctx = ` \x1b[33m${bar} ${used}%\x1b[0m`;
|
|
39
|
-
} else if (used < 95) {
|
|
40
|
-
ctx = ` \x1b[38;5;208m${bar} ${used}%\x1b[0m`;
|
|
41
|
-
} else {
|
|
42
|
-
ctx = ` \x1b[5;31m\u{1F480} ${bar} ${used}%\x1b[0m`;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Current task from todos
|
|
47
|
-
let task = '';
|
|
48
|
-
const homeDir = os.homedir();
|
|
49
|
-
const todosDir = path.join(homeDir, '.claude', 'todos');
|
|
50
|
-
if (session && fs.existsSync(todosDir)) {
|
|
51
|
-
try {
|
|
52
|
-
const files = fs.readdirSync(todosDir)
|
|
53
|
-
.filter(f => f.startsWith(session) && f.includes('-agent-') && f.endsWith('.json'))
|
|
54
|
-
.map(f => ({ name: f, mtime: fs.statSync(path.join(todosDir, f)).mtime }))
|
|
55
|
-
.sort((a, b) => b.mtime - a.mtime);
|
|
56
|
-
|
|
57
|
-
if (files.length > 0) {
|
|
58
|
-
try {
|
|
59
|
-
const todos = JSON.parse(fs.readFileSync(path.join(todosDir, files[0].name), 'utf8'));
|
|
60
|
-
const inProgress = todos.find(t => t.status === 'in_progress');
|
|
61
|
-
if (inProgress) task = inProgress.activeForm || '';
|
|
62
|
-
} catch (e) {}
|
|
63
|
-
}
|
|
64
|
-
} catch (e) {}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// ACE update available?
|
|
68
|
-
let aceUpdate = '';
|
|
69
|
-
const cacheFile = path.join(homeDir, '.claude', 'cache', 'ace-update-check.json');
|
|
70
|
-
if (fs.existsSync(cacheFile)) {
|
|
71
|
-
try {
|
|
72
|
-
const cache = JSON.parse(fs.readFileSync(cacheFile, 'utf8'));
|
|
73
|
-
if (cache.update_available) {
|
|
74
|
-
aceUpdate = '\x1b[33m\u2B06 /ace:update\x1b[0m \u2502 ';
|
|
75
|
-
}
|
|
76
|
-
} catch (e) {}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Output
|
|
80
|
-
const dirname = path.basename(dir);
|
|
81
|
-
if (task) {
|
|
82
|
-
process.stdout.write(`${aceUpdate}\x1b[2m${model}\x1b[0m \u2502 \x1b[1m${task}\x1b[0m \u2502 \x1b[2m${dirname}\x1b[0m${ctx}`);
|
|
83
|
-
} else {
|
|
84
|
-
process.stdout.write(`${aceUpdate}\x1b[2m${model}\x1b[0m \u2502 \x1b[2m${dirname}\x1b[0m${ctx}`);
|
|
85
|
-
}
|
|
86
|
-
} catch (e) {
|
|
87
|
-
// Silent fail - don't break statusline on parse errors
|
|
88
|
-
}
|
|
89
|
-
});
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Claude Code Statusline - ACE Edition
|
|
3
|
+
// Shows: update indicator | model | current task | directory | context usage
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const os = require('os');
|
|
8
|
+
|
|
9
|
+
// Read JSON from stdin
|
|
10
|
+
let input = '';
|
|
11
|
+
process.stdin.setEncoding('utf8');
|
|
12
|
+
process.stdin.on('data', chunk => input += chunk);
|
|
13
|
+
process.stdin.on('end', () => {
|
|
14
|
+
try {
|
|
15
|
+
const data = JSON.parse(input);
|
|
16
|
+
const model = data.model?.display_name || 'Claude';
|
|
17
|
+
const dir = data.workspace?.current_dir || process.cwd();
|
|
18
|
+
const session = data.session_id || '';
|
|
19
|
+
const remaining = data.context_window?.remaining_percentage;
|
|
20
|
+
|
|
21
|
+
// Context window display (shows USED percentage scaled to 80% limit)
|
|
22
|
+
// Claude Code enforces an 80% context limit, so we scale to show 100% at that point
|
|
23
|
+
let ctx = '';
|
|
24
|
+
if (remaining != null) {
|
|
25
|
+
const rem = Math.round(remaining);
|
|
26
|
+
const rawUsed = Math.max(0, Math.min(100, 100 - rem));
|
|
27
|
+
// Scale: 80% real usage = 100% displayed
|
|
28
|
+
const used = Math.min(100, Math.round((rawUsed / 80) * 100));
|
|
29
|
+
|
|
30
|
+
// Build progress bar (10 segments)
|
|
31
|
+
const filled = Math.floor(used / 10);
|
|
32
|
+
const bar = '\u2588'.repeat(filled) + '\u2591'.repeat(10 - filled);
|
|
33
|
+
|
|
34
|
+
// Color based on scaled usage
|
|
35
|
+
if (used < 63) {
|
|
36
|
+
ctx = ` \x1b[32m${bar} ${used}%\x1b[0m`;
|
|
37
|
+
} else if (used < 81) {
|
|
38
|
+
ctx = ` \x1b[33m${bar} ${used}%\x1b[0m`;
|
|
39
|
+
} else if (used < 95) {
|
|
40
|
+
ctx = ` \x1b[38;5;208m${bar} ${used}%\x1b[0m`;
|
|
41
|
+
} else {
|
|
42
|
+
ctx = ` \x1b[5;31m\u{1F480} ${bar} ${used}%\x1b[0m`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Current task from todos
|
|
47
|
+
let task = '';
|
|
48
|
+
const homeDir = os.homedir();
|
|
49
|
+
const todosDir = path.join(homeDir, '.claude', 'todos');
|
|
50
|
+
if (session && fs.existsSync(todosDir)) {
|
|
51
|
+
try {
|
|
52
|
+
const files = fs.readdirSync(todosDir)
|
|
53
|
+
.filter(f => f.startsWith(session) && f.includes('-agent-') && f.endsWith('.json'))
|
|
54
|
+
.map(f => ({ name: f, mtime: fs.statSync(path.join(todosDir, f)).mtime }))
|
|
55
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
56
|
+
|
|
57
|
+
if (files.length > 0) {
|
|
58
|
+
try {
|
|
59
|
+
const todos = JSON.parse(fs.readFileSync(path.join(todosDir, files[0].name), 'utf8'));
|
|
60
|
+
const inProgress = todos.find(t => t.status === 'in_progress');
|
|
61
|
+
if (inProgress) task = inProgress.activeForm || '';
|
|
62
|
+
} catch (e) {}
|
|
63
|
+
}
|
|
64
|
+
} catch (e) {}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ACE update available?
|
|
68
|
+
let aceUpdate = '';
|
|
69
|
+
const cacheFile = path.join(homeDir, '.claude', 'cache', 'ace-update-check.json');
|
|
70
|
+
if (fs.existsSync(cacheFile)) {
|
|
71
|
+
try {
|
|
72
|
+
const cache = JSON.parse(fs.readFileSync(cacheFile, 'utf8'));
|
|
73
|
+
if (cache.update_available) {
|
|
74
|
+
aceUpdate = '\x1b[33m\u2B06 /ace:update\x1b[0m \u2502 ';
|
|
75
|
+
}
|
|
76
|
+
} catch (e) {}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Output
|
|
80
|
+
const dirname = path.basename(dir);
|
|
81
|
+
if (task) {
|
|
82
|
+
process.stdout.write(`${aceUpdate}\x1b[2m${model}\x1b[0m \u2502 \x1b[1m${task}\x1b[0m \u2502 \x1b[2m${dirname}\x1b[0m${ctx}`);
|
|
83
|
+
} else {
|
|
84
|
+
process.stdout.write(`${aceUpdate}\x1b[2m${model}\x1b[0m \u2502 \x1b[2m${dirname}\x1b[0m${ctx}`);
|
|
85
|
+
}
|
|
86
|
+
} catch (e) {
|
|
87
|
+
// Silent fail - don't break statusline on parse errors
|
|
88
|
+
}
|
|
89
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agile-context-engineering",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "ACE - Agile Context Engineering: A spec-driven development system for Claude Code and Crush (formerly OpenCode) with Agile workflows",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"commands",
|
|
13
13
|
"agents",
|
|
14
14
|
"hooks",
|
|
15
|
-
"agile-context-engineering"
|
|
15
|
+
"agile-context-engineering",
|
|
16
|
+
"CHANGELOG.md"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
18
19
|
"test": "node --test agile-context-engineering/src/ace-tools.test.js"
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"license": "MIT",
|
|
33
34
|
"repository": {
|
|
34
35
|
"type": "git",
|
|
35
|
-
"url": "https://github.com/
|
|
36
|
+
"url": "https://github.com/Quantarcane/ACE"
|
|
36
37
|
},
|
|
37
38
|
"engines": {
|
|
38
39
|
"node": ">=16.7.0"
|