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,207 +1,238 @@
1
- <workflow>
2
-
3
- <purpose>
4
- Check for ACE updates via npm, display version comparison, obtain user confirmation,
5
- and execute clean installation with cache clearing.
6
- </purpose>
7
-
8
- <mandatory-context>
9
- Read all files referenced by the invoking prompt's execution-context before starting.
10
- </mandatory-context>
11
-
12
- <process>
13
-
14
- <!-- ══════════════════════════════════════════════════════════════════ -->
15
- <!-- STEP 1: DETECT INSTALLATION -->
16
- <!-- ══════════════════════════════════════════════════════════════════ -->
17
-
18
- <step name="detect-installation" order="1">
19
- Detect whether ACE is installed locally or globally, and for which runtime.
20
-
21
- ```bash
22
- if [ -f "./.claude/agile-context-engineering/VERSION" ]; then
23
- echo "SCOPE=local"
24
- echo "RUNTIME=claude"
25
- echo "VERSION=$(cat ./.claude/agile-context-engineering/VERSION)"
26
- elif [ -f "$HOME/.claude/agile-context-engineering/VERSION" ]; then
27
- echo "SCOPE=global"
28
- echo "RUNTIME=claude"
29
- echo "VERSION=$(cat $HOME/.claude/agile-context-engineering/VERSION)"
30
- elif [ -f "./.opencode/agile-context-engineering/VERSION" ]; then
31
- echo "SCOPE=local"
32
- echo "RUNTIME=opencode"
33
- echo "VERSION=$(cat ./.opencode/agile-context-engineering/VERSION)"
34
- elif [ -f "$HOME/.opencode/agile-context-engineering/VERSION" ]; then
35
- echo "SCOPE=global"
36
- echo "RUNTIME=opencode"
37
- echo "VERSION=$(cat $HOME/.opencode/agile-context-engineering/VERSION)"
38
- else
39
- echo "SCOPE=unknown"
40
- echo "RUNTIME=claude"
41
- echo "VERSION=0.0.0"
42
- fi
43
- ```
44
-
45
- Parse SCOPE, RUNTIME, and VERSION from the output.
46
-
47
- **If SCOPE is "unknown":**
48
- ```
49
- ## ACE Update
50
-
51
- **Installed version:** Unknown
52
-
53
- Your installation doesn't include version tracking.
54
- Running fresh install...
55
- ```
56
-
57
- Proceed with VERSION=0.0.0.
58
- </step>
59
-
60
- <!-- ══════════════════════════════════════════════════════════════════ -->
61
- <!-- STEP 2: CHECK LATEST VERSION -->
62
- <!-- ══════════════════════════════════════════════════════════════════ -->
63
-
64
- <step name="check-latest-version" order="2">
65
- Check npm for the latest published version:
66
-
67
- ```bash
68
- npm view agile-context-engineering version 2>/dev/null
69
- ```
70
-
71
- **If npm check fails:**
72
- ```
73
- Couldn't check for updates (offline or npm unavailable).
74
-
75
- To update manually: `npx agile-context-engineering --claude --global`
76
- ```
77
- Exit.
78
- </step>
79
-
80
- <!-- ══════════════════════════════════════════════════════════════════ -->
81
- <!-- STEP 3: COMPARE VERSIONS -->
82
- <!-- ══════════════════════════════════════════════════════════════════ -->
83
-
84
- <step name="compare-versions" order="3">
85
- Compare installed vs latest.
86
-
87
- **If installed == latest:**
88
- ```
89
- ## ACE Update
90
-
91
- **Installed:** X.Y.Z
92
- **Latest:** X.Y.Z
93
-
94
- You're already on the latest version.
95
- ```
96
- Exit.
97
-
98
- **If installed > latest:**
99
- ```
100
- ## ACE Update
101
-
102
- **Installed:** X.Y.Z
103
- **Latest:** A.B.C
104
-
105
- You're ahead of the latest release (development version?).
106
- ```
107
- Exit.
108
- </step>
109
-
110
- <!-- ══════════════════════════════════════════════════════════════════ -->
111
- <!-- STEP 4: CONFIRM UPDATE -->
112
- <!-- ══════════════════════════════════════════════════════════════════ -->
113
-
114
- <step name="confirm-update" order="4">
115
- If update is available, show what will happen and ask for confirmation:
116
-
117
- ```
118
- ## ACE Update Available
119
-
120
- **Installed:** {installed_version}
121
- **Latest:** {latest_version}
122
-
123
- The installer performs a clean install of ACE folders:
124
- - `commands/ace/` will be wiped and replaced
125
- - `agile-context-engineering/` will be wiped and replaced
126
- - `agents/ace-*` files will be replaced
127
-
128
- Your custom files are preserved:
129
- - Custom commands not in `commands/ace/`
130
- - Custom agents not prefixed with `ace-`
131
- - Your CLAUDE.md files
132
- - Your .ace/ project artifacts
133
- ```
134
-
135
- Use AskUserQuestion:
136
- - Question: "Proceed with update?"
137
- - Options:
138
- - "Yes, update now"
139
- - "No, cancel"
140
-
141
- **If user cancels:** Exit.
142
- </step>
143
-
144
- <!-- ══════════════════════════════════════════════════════════════════ -->
145
- <!-- STEP 5: RUN UPDATE -->
146
- <!-- ══════════════════════════════════════════════════════════════════ -->
147
-
148
- <step name="run-update" order="5">
149
- Run the update using detected SCOPE and RUNTIME from step 1.
150
-
151
- Build the command: `npx agile-context-engineering --{RUNTIME} --{SCOPE}`
152
-
153
- Examples:
154
- - Global Claude: `npx agile-context-engineering --claude --global`
155
- - Local Claude: `npx agile-context-engineering --claude --local`
156
- - Global Crush: `npx agile-context-engineering --opencode --global`
157
- - Local Crush: `npx agile-context-engineering --opencode --local`
158
-
159
- If SCOPE was "unknown", default to `--claude --global`.
160
-
161
- Capture output. If install fails, show error and exit.
162
-
163
- Clear the update cache so statusline indicator disappears:
164
-
165
- **If SCOPE is "local":**
166
- ```bash
167
- rm -f ./.claude/cache/ace-update-check.json
168
- ```
169
-
170
- **If SCOPE is "global":**
171
- ```bash
172
- rm -f "$HOME/.claude/cache/ace-update-check.json"
173
- ```
174
-
175
- For Crush runtime, substitute `.opencode` for `.claude` in the cache path.
176
- </step>
177
-
178
- <!-- ══════════════════════════════════════════════════════════════════ -->
179
- <!-- STEP 6: DISPLAY RESULT -->
180
- <!-- ══════════════════════════════════════════════════════════════════ -->
181
-
182
- <step name="display-result" order="6">
183
- Format completion message:
184
-
185
- ```
186
- ============================================================
187
- ACE Updated: v{old} -> v{new}
188
- ============================================================
189
-
190
- Restart Claude Code to pick up the new commands.
191
- ```
192
- </step>
193
-
194
- </process>
195
-
196
- <success_criteria>
197
- <check>Installed version detected correctly (local/global, claude/crush)</check>
198
- <check>Latest version checked via npm</check>
199
- <check>Update skipped if already current</check>
200
- <check>Clean install warning shown</check>
201
- <check>User confirmation obtained before update</check>
202
- <check>Update executed with correct --runtime and --scope flags</check>
203
- <check>Update cache cleared</check>
204
- <check>Restart reminder shown</check>
205
- </success_criteria>
206
-
207
- </workflow>
1
+ <workflow>
2
+
3
+ <purpose>
4
+ Check for ACE updates via npm, display changelog for versions between installed and latest,
5
+ obtain user confirmation, and execute clean installation with cache clearing.
6
+ </purpose>
7
+
8
+ <mandatory-context>
9
+ Read all files referenced by the invoking prompt's execution-context before starting.
10
+ </mandatory-context>
11
+
12
+ <process>
13
+
14
+ <!-- ══════════════════════════════════════════════════════════════════ -->
15
+ <!-- STEP 1: DETECT INSTALLATION -->
16
+ <!-- ══════════════════════════════════════════════════════════════════ -->
17
+
18
+ <step name="detect-installation" order="1">
19
+ Detect whether ACE is installed locally or globally, and for which runtime.
20
+
21
+ ```bash
22
+ if [ -f "./.claude/agile-context-engineering/VERSION" ]; then
23
+ echo "SCOPE=local"
24
+ echo "RUNTIME=claude"
25
+ echo "VERSION=$(cat ./.claude/agile-context-engineering/VERSION)"
26
+ elif [ -f "$HOME/.claude/agile-context-engineering/VERSION" ]; then
27
+ echo "SCOPE=global"
28
+ echo "RUNTIME=claude"
29
+ echo "VERSION=$(cat $HOME/.claude/agile-context-engineering/VERSION)"
30
+ elif [ -f "./.opencode/agile-context-engineering/VERSION" ]; then
31
+ echo "SCOPE=local"
32
+ echo "RUNTIME=opencode"
33
+ echo "VERSION=$(cat ./.opencode/agile-context-engineering/VERSION)"
34
+ elif [ -f "$HOME/.opencode/agile-context-engineering/VERSION" ]; then
35
+ echo "SCOPE=global"
36
+ echo "RUNTIME=opencode"
37
+ echo "VERSION=$(cat $HOME/.opencode/agile-context-engineering/VERSION)"
38
+ else
39
+ echo "SCOPE=unknown"
40
+ echo "RUNTIME=claude"
41
+ echo "VERSION=0.0.0"
42
+ fi
43
+ ```
44
+
45
+ Parse SCOPE, RUNTIME, and VERSION from the output.
46
+
47
+ **If SCOPE is "unknown":**
48
+ ```
49
+ ## ACE Update
50
+
51
+ **Installed version:** Unknown
52
+
53
+ Your installation doesn't include version tracking.
54
+ Running fresh install...
55
+ ```
56
+
57
+ Proceed with VERSION=0.0.0.
58
+ </step>
59
+
60
+ <!-- ══════════════════════════════════════════════════════════════════ -->
61
+ <!-- STEP 2: CHECK LATEST VERSION -->
62
+ <!-- ══════════════════════════════════════════════════════════════════ -->
63
+
64
+ <step name="check-latest-version" order="2">
65
+ Check npm for the latest published version:
66
+
67
+ ```bash
68
+ npm view agile-context-engineering version 2>/dev/null
69
+ ```
70
+
71
+ **If npm check fails:**
72
+ ```
73
+ Couldn't check for updates (offline or npm unavailable).
74
+
75
+ To update manually: `npx agile-context-engineering --claude --global`
76
+ ```
77
+ Exit.
78
+ </step>
79
+
80
+ <!-- ══════════════════════════════════════════════════════════════════ -->
81
+ <!-- STEP 3: COMPARE VERSIONS -->
82
+ <!-- ══════════════════════════════════════════════════════════════════ -->
83
+
84
+ <step name="compare-versions" order="3">
85
+ Compare installed vs latest.
86
+
87
+ **If installed == latest:**
88
+ ```
89
+ ## ACE Update
90
+
91
+ **Installed:** X.Y.Z
92
+ **Latest:** X.Y.Z
93
+
94
+ You're already on the latest version.
95
+ ```
96
+ Exit.
97
+
98
+ **If installed > latest:**
99
+ ```
100
+ ## ACE Update
101
+
102
+ **Installed:** X.Y.Z
103
+ **Latest:** A.B.C
104
+
105
+ You're ahead of the latest release (development version?).
106
+ ```
107
+ Exit.
108
+ </step>
109
+
110
+ <!-- ══════════════════════════════════════════════════════════════════ -->
111
+ <!-- STEP 4: FETCH AND SHOW CHANGELOG -->
112
+ <!-- ══════════════════════════════════════════════════════════════════ -->
113
+
114
+ <step name="show-changelog-and-confirm" order="4">
115
+ If update is available, fetch the changelog and show what's new BEFORE updating.
116
+
117
+ 1. **Try local changelog first** — check if CHANGELOG.md exists in the installation:
118
+
119
+ For SCOPE=local: `./.claude/agile-context-engineering/CHANGELOG.md`
120
+ For SCOPE=global: `~/.claude/agile-context-engineering/CHANGELOG.md`
121
+ (substitute `.opencode` for Crush runtime)
122
+
123
+ If found, read it directly.
124
+
125
+ 2. **Fall back to GitHub** if local file not found, use WebFetch to fetch:
126
+ `https://raw.githubusercontent.com/Quantarcane/ACE/main/CHANGELOG.md`
127
+
128
+ If fetch fails, skip changelog display and proceed without it.
129
+
130
+ 3. **Extract relevant entries** from the fetched/read content, extract all
131
+ changelog sections between the installed version and the latest version.
132
+
133
+ Look for lines matching `## [X.Y.Z]` and extract everything from
134
+ `## [{latest_version}]` down to (but not including) `## [{installed_version}]`.
135
+
136
+ 4. **Display preview and ask for confirmation:**
137
+
138
+ ```
139
+ ## ACE Update Available
140
+
141
+ **Installed:** {installed_version}
142
+ **Latest:** {latest_version}
143
+
144
+ ### What's New
145
+ ────────────────────────────────────────────────────────────
146
+
147
+ {extracted changelog entries}
148
+
149
+ ────────────────────────────────────────────────────────────
150
+
151
+ The installer performs a clean install of ACE folders:
152
+ - `commands/ace/` will be wiped and replaced
153
+ - `agile-context-engineering/` will be wiped and replaced
154
+ - `agents/ace-*` files will be replaced
155
+
156
+ Your custom files are preserved:
157
+ - Custom commands not in `commands/ace/`
158
+ - Custom agents not prefixed with `ace-`
159
+ - Your CLAUDE.md files
160
+ - Your .ace/ project artifacts
161
+ ```
162
+
163
+ Use AskUserQuestion:
164
+ - Question: "Proceed with update?"
165
+ - Options:
166
+ - "Yes, update now"
167
+ - "No, cancel"
168
+
169
+ **If user cancels:** Exit.
170
+ </step>
171
+
172
+ <!-- ══════════════════════════════════════════════════════════════════ -->
173
+ <!-- STEP 5: RUN UPDATE -->
174
+ <!-- ══════════════════════════════════════════════════════════════════ -->
175
+
176
+ <step name="run-update" order="5">
177
+ Run the update using detected SCOPE and RUNTIME from step 1.
178
+
179
+ Build the command: `npx agile-context-engineering --{RUNTIME} --{SCOPE}`
180
+
181
+ Examples:
182
+ - Global Claude: `npx agile-context-engineering --claude --global`
183
+ - Local Claude: `npx agile-context-engineering --claude --local`
184
+ - Global Crush: `npx agile-context-engineering --opencode --global`
185
+ - Local Crush: `npx agile-context-engineering --opencode --local`
186
+
187
+ If SCOPE was "unknown", default to `--claude --global`.
188
+
189
+ Capture output. If install fails, show error and exit.
190
+
191
+ Clear the update cache so statusline indicator disappears:
192
+
193
+ **If SCOPE is "local":**
194
+ ```bash
195
+ rm -f ./.claude/cache/ace-update-check.json
196
+ ```
197
+
198
+ **If SCOPE is "global":**
199
+ ```bash
200
+ rm -f "$HOME/.claude/cache/ace-update-check.json"
201
+ ```
202
+
203
+ For Crush runtime, substitute `.opencode` for `.claude` in the cache path.
204
+ </step>
205
+
206
+ <!-- ══════════════════════════════════════════════════════════════════ -->
207
+ <!-- STEP 6: DISPLAY RESULT -->
208
+ <!-- ══════════════════════════════════════════════════════════════════ -->
209
+
210
+ <step name="display-result" order="6">
211
+ Format completion message (changelog was already shown in confirmation step):
212
+
213
+ ```
214
+ ============================================================
215
+ ACE Updated: v{old} -> v{new}
216
+ ============================================================
217
+
218
+ Restart Claude Code to pick up the new commands.
219
+
220
+ View full changelog: https://github.com/Quantarcane/ACE/blob/main/CHANGELOG.md
221
+ ```
222
+ </step>
223
+
224
+ </process>
225
+
226
+ <success_criteria>
227
+ <check>Installed version detected correctly (local/global, claude/crush)</check>
228
+ <check>Latest version checked via npm</check>
229
+ <check>Update skipped if already current</check>
230
+ <check>Changelog fetched and displayed BEFORE update</check>
231
+ <check>Clean install warning shown</check>
232
+ <check>User confirmation obtained before update</check>
233
+ <check>Update executed with correct --runtime and --scope flags</check>
234
+ <check>Update cache cleared</check>
235
+ <check>Restart reminder shown</check>
236
+ </success_criteria>
237
+
238
+ </workflow>
package/bin/install.js CHANGED
@@ -318,6 +318,14 @@ function installForRuntime(runtime, scope, packageDir) {
318
318
  const versionFile = path.join(acePath, 'VERSION');
319
319
  fs.writeFileSync(versionFile, VERSION, 'utf-8');
320
320
 
321
+ // Copy CHANGELOG.md
322
+ const changelogSrc = path.join(packageDir, 'CHANGELOG.md');
323
+ const changelogDest = path.join(acePath, 'CHANGELOG.md');
324
+ if (fs.existsSync(changelogSrc)) {
325
+ fs.copyFileSync(changelogSrc, changelogDest);
326
+ log(` ✓ CHANGELOG.md installed`, colors.green);
327
+ }
328
+
321
329
  return basePath;
322
330
  }
323
331
 
@@ -55,6 +55,7 @@ allowed-tools:
55
55
  <execution-context>
56
56
  <execute-story-workflow>@~/.claude/agile-context-engineering/workflows/execute-story.xml</execute-story-workflow>
57
57
  <story-template>@~/.claude/agile-context-engineering/templates/product/story.xml</story-template>
58
+ <walkthrough-template>@~/.claude/agile-context-engineering/templates/wiki/walkthrough.xml</walkthrough-template>
58
59
  <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
59
60
  <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
60
61
  </execution-context>