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.
Files changed (51) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/LICENSE +51 -51
  3. package/README.md +324 -323
  4. package/agents/ace-research-synthesizer.md +228 -228
  5. package/agents/ace-technical-application-architect.md +28 -0
  6. package/agents/ace-wiki-mapper.md +445 -334
  7. package/agile-context-engineering/src/ace-tools.test.js +1089 -1089
  8. package/agile-context-engineering/templates/_command.md +53 -53
  9. package/agile-context-engineering/templates/_workflow.xml +16 -16
  10. package/agile-context-engineering/templates/product/product-backlog.xml +231 -231
  11. package/agile-context-engineering/templates/product/story-integration-solution.xml +1 -0
  12. package/agile-context-engineering/templates/product/story-wiki.xml +4 -0
  13. package/agile-context-engineering/templates/wiki/coding-standards.xml +38 -0
  14. package/agile-context-engineering/templates/wiki/decizions.xml +115 -115
  15. package/agile-context-engineering/templates/wiki/guide.xml +137 -137
  16. package/agile-context-engineering/templates/wiki/module-discovery.xml +174 -174
  17. package/agile-context-engineering/templates/wiki/pattern.xml +159 -159
  18. package/agile-context-engineering/templates/wiki/system-architecture.xml +254 -254
  19. package/agile-context-engineering/templates/wiki/system-cross-cutting.xml +197 -197
  20. package/agile-context-engineering/templates/wiki/system.xml +381 -381
  21. package/agile-context-engineering/templates/wiki/walkthrough.xml +255 -0
  22. package/agile-context-engineering/templates/wiki/wiki-readme.xml +297 -276
  23. package/agile-context-engineering/utils/questioning.xml +110 -110
  24. package/agile-context-engineering/workflows/execute-story.xml +1219 -1145
  25. package/agile-context-engineering/workflows/help.xml +540 -540
  26. package/agile-context-engineering/workflows/init-coding-standards.xml +386 -386
  27. package/agile-context-engineering/workflows/map-story.xml +1046 -797
  28. package/agile-context-engineering/workflows/map-subsystem.xml +2 -1
  29. package/agile-context-engineering/workflows/map-walkthrough.xml +457 -0
  30. package/agile-context-engineering/workflows/plan-feature.xml +1495 -1495
  31. package/agile-context-engineering/workflows/plan-story.xml +36 -1
  32. package/agile-context-engineering/workflows/research-integration-solution.xml +1 -0
  33. package/agile-context-engineering/workflows/research-story-wiki.xml +2 -1
  34. package/agile-context-engineering/workflows/research-technical-solution.xml +1 -0
  35. package/agile-context-engineering/workflows/review-story.xml +281 -281
  36. package/agile-context-engineering/workflows/update.xml +238 -207
  37. package/bin/install.js +8 -0
  38. package/commands/ace/execute-story.md +1 -0
  39. package/commands/ace/help.md +93 -93
  40. package/commands/ace/init-coding-standards.md +83 -83
  41. package/commands/ace/map-story.md +165 -156
  42. package/commands/ace/map-subsystem.md +140 -138
  43. package/commands/ace/map-system.md +92 -92
  44. package/commands/ace/map-walkthrough.md +127 -0
  45. package/commands/ace/plan-feature.md +89 -89
  46. package/commands/ace/plan-story.md +15 -1
  47. package/commands/ace/review-story.md +109 -109
  48. package/commands/ace/update.md +56 -54
  49. package/hooks/ace-check-update.js +62 -62
  50. package/hooks/ace-statusline.js +89 -89
  51. 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();
@@ -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.2.2",
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/agile-context-engineering/ace"
36
+ "url": "https://github.com/Quantarcane/ACE"
36
37
  },
37
38
  "engines": {
38
39
  "node": ">=16.7.0"