agile-context-engineering 0.3.0 → 0.5.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 (147) hide show
  1. package/.claude-plugin/plugin.json +10 -0
  2. package/LICENSE +51 -51
  3. package/README.md +332 -324
  4. package/agents/ace-product-owner.md +1 -1
  5. package/agents/ace-research-synthesizer.md +228 -228
  6. package/agents/ace-wiki-mapper.md +449 -445
  7. package/bin/install.js +60 -64
  8. package/hooks/ace-check-update.js +70 -62
  9. package/hooks/ace-statusline.js +89 -89
  10. package/package.json +5 -4
  11. package/shared/lib/ace-core.js +308 -0
  12. package/shared/lib/ace-core.test.js +308 -0
  13. package/shared/lib/ace-github.js +753 -0
  14. package/shared/lib/ace-story.js +400 -0
  15. package/shared/lib/ace-story.test.js +250 -0
  16. package/{agile-context-engineering → shared}/utils/questioning.xml +110 -110
  17. package/{agile-context-engineering → shared}/utils/ui-formatting.md +299 -299
  18. package/skills/execute-story/SKILL.md +110 -0
  19. package/skills/execute-story/script.js +305 -0
  20. package/skills/execute-story/script.test.js +261 -0
  21. package/skills/execute-story/walkthrough-template.xml +255 -0
  22. package/{agile-context-engineering/workflows/execute-story.xml → skills/execute-story/workflow.xml} +1219 -1219
  23. package/skills/help/SKILL.md +69 -0
  24. package/skills/help/script.js +318 -0
  25. package/skills/help/script.test.js +183 -0
  26. package/{agile-context-engineering/workflows/help.xml → skills/help/workflow.xml} +540 -540
  27. package/skills/init-coding-standards/SKILL.md +72 -0
  28. package/skills/init-coding-standards/script.js +59 -0
  29. package/skills/init-coding-standards/script.test.js +70 -0
  30. package/{agile-context-engineering/workflows/init-coding-standards.xml → skills/init-coding-standards/workflow.xml} +381 -386
  31. package/skills/map-cross-cutting/SKILL.md +89 -0
  32. package/{agile-context-engineering/templates/wiki → skills/map-cross-cutting}/system-cross-cutting.xml +197 -197
  33. package/skills/map-cross-cutting/workflow.xml +330 -0
  34. package/skills/map-guide/SKILL.md +89 -0
  35. package/{agile-context-engineering/templates/wiki → skills/map-guide}/guide.xml +137 -137
  36. package/skills/map-guide/workflow.xml +320 -0
  37. package/skills/map-pattern/SKILL.md +89 -0
  38. package/{agile-context-engineering/templates/wiki → skills/map-pattern}/pattern.xml +159 -159
  39. package/skills/map-pattern/workflow.xml +331 -0
  40. package/skills/map-story/SKILL.md +127 -0
  41. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/decizions.xml +115 -115
  42. package/skills/map-story/templates/guide.xml +137 -0
  43. package/skills/map-story/templates/pattern.xml +159 -0
  44. package/skills/map-story/templates/system-cross-cutting.xml +197 -0
  45. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/system.xml +381 -381
  46. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/walkthrough.xml +255 -255
  47. package/{agile-context-engineering/workflows/map-story.xml → skills/map-story/workflow.xml} +1046 -1046
  48. package/skills/map-subsystem/SKILL.md +111 -0
  49. package/skills/map-subsystem/script.js +60 -0
  50. package/skills/map-subsystem/script.test.js +68 -0
  51. package/skills/map-subsystem/templates/decizions.xml +115 -0
  52. package/skills/map-subsystem/templates/guide.xml +137 -0
  53. package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/module-discovery.xml +174 -174
  54. package/skills/map-subsystem/templates/pattern.xml +159 -0
  55. package/skills/map-subsystem/templates/system-cross-cutting.xml +197 -0
  56. package/skills/map-subsystem/templates/system.xml +381 -0
  57. package/skills/map-subsystem/templates/walkthrough.xml +255 -0
  58. package/{agile-context-engineering/workflows/map-subsystem.xml → skills/map-subsystem/workflow.xml} +15 -20
  59. package/skills/map-sys-doc/SKILL.md +90 -0
  60. package/skills/map-sys-doc/system.xml +381 -0
  61. package/skills/map-sys-doc/workflow.xml +336 -0
  62. package/skills/map-system/SKILL.md +85 -0
  63. package/skills/map-system/script.js +84 -0
  64. package/skills/map-system/script.test.js +73 -0
  65. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-architecture.xml +254 -254
  66. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/wiki-readme.xml +296 -296
  67. package/{agile-context-engineering/workflows/map-system.xml → skills/map-system/workflow.xml} +11 -16
  68. package/skills/map-walkthrough/SKILL.md +92 -0
  69. package/skills/map-walkthrough/walkthrough.xml +255 -0
  70. package/skills/plan-backlog/SKILL.md +75 -0
  71. package/{agile-context-engineering/templates/product/product-backlog.xml → skills/plan-backlog/product-backlog-template.xml} +231 -231
  72. package/skills/plan-backlog/script.js +136 -0
  73. package/skills/plan-backlog/script.test.js +83 -0
  74. package/{agile-context-engineering/workflows/plan-backlog.xml → skills/plan-backlog/workflow.xml} +13 -21
  75. package/skills/plan-feature/SKILL.md +76 -0
  76. package/skills/plan-feature/script.js +148 -0
  77. package/skills/plan-feature/script.test.js +80 -0
  78. package/{agile-context-engineering/workflows/plan-feature.xml → skills/plan-feature/workflow.xml} +1487 -1495
  79. package/skills/plan-product-vision/SKILL.md +75 -0
  80. package/skills/plan-product-vision/script.js +60 -0
  81. package/skills/plan-product-vision/script.test.js +69 -0
  82. package/{agile-context-engineering/workflows/plan-product-vision.xml → skills/plan-product-vision/workflow.xml} +4 -9
  83. package/skills/plan-story/SKILL.md +116 -0
  84. package/skills/plan-story/script.js +326 -0
  85. package/skills/plan-story/script.test.js +240 -0
  86. package/skills/plan-story/story-template.xml +451 -0
  87. package/{agile-context-engineering/workflows/plan-story.xml → skills/plan-story/workflow.xml} +1285 -944
  88. package/skills/research-external-solution/SKILL.md +107 -0
  89. package/skills/research-external-solution/script.js +238 -0
  90. package/skills/research-external-solution/script.test.js +134 -0
  91. package/{agile-context-engineering/workflows/research-external-solution.xml → skills/research-external-solution/workflow.xml} +4 -6
  92. package/skills/research-integration-solution/SKILL.md +98 -0
  93. package/skills/research-integration-solution/script.js +231 -0
  94. package/skills/research-integration-solution/script.test.js +134 -0
  95. package/{agile-context-engineering/workflows/research-integration-solution.xml → skills/research-integration-solution/workflow.xml} +3 -5
  96. package/skills/research-story-wiki/SKILL.md +92 -0
  97. package/skills/research-story-wiki/script.js +231 -0
  98. package/skills/research-story-wiki/script.test.js +138 -0
  99. package/{agile-context-engineering/workflows/research-story-wiki.xml → skills/research-story-wiki/workflow.xml} +3 -5
  100. package/skills/research-technical-solution/SKILL.md +103 -0
  101. package/skills/research-technical-solution/script.js +231 -0
  102. package/skills/research-technical-solution/script.test.js +134 -0
  103. package/{agile-context-engineering/workflows/research-technical-solution.xml → skills/research-technical-solution/workflow.xml} +3 -5
  104. package/skills/review-story/SKILL.md +100 -0
  105. package/skills/review-story/script.js +257 -0
  106. package/skills/review-story/script.test.js +169 -0
  107. package/skills/review-story/story-template.xml +451 -0
  108. package/{agile-context-engineering/workflows/review-story.xml → skills/review-story/workflow.xml} +279 -281
  109. package/skills/update/SKILL.md +53 -0
  110. package/{agile-context-engineering/workflows/update.xml → skills/update/workflow.xml} +12 -13
  111. package/agile-context-engineering/src/ace-tools.js +0 -2881
  112. package/agile-context-engineering/src/ace-tools.test.js +0 -1089
  113. package/agile-context-engineering/templates/_command.md +0 -54
  114. package/agile-context-engineering/templates/_workflow.xml +0 -17
  115. package/agile-context-engineering/templates/config.json +0 -0
  116. package/agile-context-engineering/templates/product/integration-solution.xml +0 -0
  117. package/commands/ace/execute-story.md +0 -138
  118. package/commands/ace/help.md +0 -93
  119. package/commands/ace/init-coding-standards.md +0 -83
  120. package/commands/ace/map-story.md +0 -165
  121. package/commands/ace/map-subsystem.md +0 -140
  122. package/commands/ace/map-system.md +0 -92
  123. package/commands/ace/map-walkthrough.md +0 -127
  124. package/commands/ace/plan-backlog.md +0 -83
  125. package/commands/ace/plan-feature.md +0 -89
  126. package/commands/ace/plan-product-vision.md +0 -81
  127. package/commands/ace/plan-story.md +0 -159
  128. package/commands/ace/research-external-solution.md +0 -138
  129. package/commands/ace/research-integration-solution.md +0 -135
  130. package/commands/ace/research-story-wiki.md +0 -116
  131. package/commands/ace/research-technical-solution.md +0 -147
  132. package/commands/ace/review-story.md +0 -109
  133. package/commands/ace/update.md +0 -56
  134. /package/{agile-context-engineering/templates/product/story.xml → skills/execute-story/story-template.xml} +0 -0
  135. /package/{agile-context-engineering/templates/wiki/coding-standards.xml → skills/init-coding-standards/coding-standards-template.xml} +0 -0
  136. /package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/tech-debt-index.xml +0 -0
  137. /package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-architecture.xml +0 -0
  138. /package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-structure.xml +0 -0
  139. /package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-structure.xml +0 -0
  140. /package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/testing-framework.xml +0 -0
  141. /package/{agile-context-engineering/workflows/map-walkthrough.xml → skills/map-walkthrough/workflow.xml} +0 -0
  142. /package/{agile-context-engineering/templates/product/feature.xml → skills/plan-feature/feature-template.xml} +0 -0
  143. /package/{agile-context-engineering/templates/product/product-vision.xml → skills/plan-product-vision/product-vision-template.xml} +0 -0
  144. /package/{agile-context-engineering/templates/product/external-solution.xml → skills/research-external-solution/external-solution-template.xml} +0 -0
  145. /package/{agile-context-engineering/templates/product/story-integration-solution.xml → skills/research-integration-solution/integration-solution-template.xml} +0 -0
  146. /package/{agile-context-engineering/templates/product/story-wiki.xml → skills/research-story-wiki/story-wiki-template.xml} +0 -0
  147. /package/{agile-context-engineering/templates/product/story-technical-solution.xml → skills/research-technical-solution/technical-solution-template.xml} +0 -0
@@ -0,0 +1,330 @@
1
+ <workflow>
2
+
3
+ <purpose>
4
+ Create or update a cross-cutting concern document in
5
+ `.docs/wiki/subsystems/[subsystem-name]/cross-cutting/`.
6
+
7
+ A cross-cutting doc describes shared infrastructure or mechanisms that multiple
8
+ domain systems depend on — DI registration, event systems, factory/registry,
9
+ serialization, error handling, auth middleware, caching.
10
+
11
+ The document an AI agent reads to understand how to register with or plug into
12
+ shared concerns.
13
+
14
+ This workflow is executed directly — NO sub-agents are spawned.
15
+ The executing agent does everything: finding registration points, tracing
16
+ usages, and writing the document.
17
+ </purpose>
18
+
19
+ <mandatory-context>
20
+ Read all files referenced by the invoking command's execution-context before starting.
21
+ Also read any document or text passed as parameter ($ARGUMENTS) in the invoking command.
22
+ </mandatory-context>
23
+
24
+ <process>
25
+
26
+ <!-- ══════════════════════════════════════════════════════════════════ -->
27
+ <!-- STEP 1: SETUP AND VALIDATE -->
28
+ <!-- ══════════════════════════════════════════════════════════════════ -->
29
+
30
+ <step name="setup" order="1">
31
+
32
+ <substep order="1.1" name="display-banner">
33
+ Display stage banner:
34
+
35
+ ```
36
+ ╔══════════════════════════════════════════════════╗
37
+ ║ ACE > Map Cross-Cutting ║
38
+ ╚══════════════════════════════════════════════════╝
39
+ ```
40
+ </substep>
41
+
42
+ <substep order="1.2" name="parse-and-validate">
43
+ Parse $ARGUMENTS for: `text`, `subsystem`, `story-context`, `commits`.
44
+
45
+ **If `text` is missing:** Ask the user:
46
+ - header: "Cross-Cutting"
47
+ - question: "Describe the cross-cutting concern to document — what shared infrastructure spans multiple systems?\nE.g., 'Event system used across all drawing components'"
48
+
49
+ **If `subsystem` is missing:** Ask the user:
50
+ - header: "Cross-Cutting"
51
+ - question: "Which subsystem does this concern belong to?"
52
+ </substep>
53
+
54
+ <substep order="1.3" name="resolve-subsystem">
55
+ Resolve the subsystem. Check if `.docs/wiki/subsystems/[subsystem-name]/` exists.
56
+
57
+ **If not found:**
58
+ ```
59
+ ! No wiki found for subsystem "[subsystem]".
60
+ Run /ace:map-subsystem first to create the subsystem wiki.
61
+ ```
62
+ Exit.
63
+
64
+ Ensure cross-cutting directory exists:
65
+ ```bash
66
+ mkdir -p .docs/wiki/subsystems/[subsystem_name]/cross-cutting
67
+ ```
68
+ </substep>
69
+
70
+ Display:
71
+ ```
72
+ i Concern: [text description]
73
+ Subsystem: [subsystem-name]
74
+ Story context: [path/issue, or "none"]
75
+ Commits: [value, or "search codebase directly"]
76
+ ```
77
+
78
+ Continue to step 2.
79
+ </step>
80
+
81
+ <!-- ══════════════════════════════════════════════════════════════════ -->
82
+ <!-- STEP 2: CHECK FOR EXISTING CROSS-CUTTING DOC -->
83
+ <!-- ══════════════════════════════════════════════════════════════════ -->
84
+
85
+ <step name="check-existing" order="2">
86
+
87
+ Scan for existing cross-cutting docs:
88
+
89
+ ```
90
+ Glob(pattern='*.md', path='.docs/wiki/subsystems/[subsystem_name]/cross-cutting')
91
+ ```
92
+
93
+ **If existing cross-cutting docs found:**
94
+ Read their titles and overview sections. Check if any covers the same
95
+ or overlapping concern.
96
+
97
+ **If overlap detected:**
98
+ Use AskUserQuestion:
99
+ - header: "Cross-Cutting"
100
+ - question: "An existing cross-cutting doc may cover a similar concern:\n\n- `[existing-file]`: [title]\n\nShould I update the existing doc or create a new one?"
101
+ - options:
102
+ - "Update existing" — set MODE = update, set TARGET_FILE = existing path
103
+ - "Create new" — set MODE = create
104
+
105
+ **If no overlap or no existing docs:** Set MODE = create.
106
+
107
+ **If MODE = create:**
108
+ Derive file name from concern name in kebab-case.
109
+ Set TARGET_FILE = `.docs/wiki/subsystems/[subsystem_name]/cross-cutting/[concern-name].md`
110
+
111
+ Continue to step 3.
112
+ </step>
113
+
114
+ <!-- ══════════════════════════════════════════════════════════════════ -->
115
+ <!-- STEP 3: GATHER CODE CONTEXT -->
116
+ <!-- ══════════════════════════════════════════════════════════════════ -->
117
+
118
+ <step name="gather-context" order="3">
119
+
120
+ <substep order="3.1" name="read-story-context">
121
+ <variant condition="story-context is a path">
122
+ Read all markdown files in the story artifacts folder.
123
+ Extract: what shared infrastructure was built/changed.
124
+ </variant>
125
+
126
+ <variant condition="story-context is a GitHub issue">
127
+ ```bash
128
+ gh issue view [issue-number] --json title,body,labels,comments
129
+ ```
130
+ Extract context about the cross-cutting concern.
131
+ </variant>
132
+
133
+ <variant condition="no story-context">
134
+ Skip — discover concern from codebase only.
135
+ </variant>
136
+ </substep>
137
+
138
+ <substep order="3.2" name="find-concern-code">
139
+ <variant condition="commits provided as number N">
140
+ ```bash
141
+ git diff --name-only HEAD~[N]..HEAD
142
+ ```
143
+ Filter to files within the subsystem. Read each file.
144
+ Then search for all other usages/registrations of this concern.
145
+ </variant>
146
+
147
+ <variant condition="commits provided as SHAs">
148
+ ```bash
149
+ git diff --name-only [first-sha]^..[last-sha]
150
+ ```
151
+ Filter to files within the subsystem. Read each file.
152
+ Then search for all other usages/registrations.
153
+ </variant>
154
+
155
+ <variant condition="no commits — search codebase directly">
156
+ Use the `text` description to find the cross-cutting concern:
157
+
158
+ 1. Read the subsystem's structure.md and architecture.md for orientation
159
+ 2. Grep for keywords from the text description (event, registry, factory,
160
+ container, middleware, etc.)
161
+ 3. Find the core infrastructure files (the concern itself)
162
+ 4. Find ALL registration points (where systems plug in)
163
+ 5. Find ALL usages (how consuming code interacts)
164
+ 6. Read each file to understand the mechanism
165
+ </variant>
166
+ </substep>
167
+
168
+ <substep order="3.3" name="analyze-concern">
169
+ From the code, understand:
170
+
171
+ 1. **How It Works**: The mechanism/pattern (event dispatch, DI resolution, etc.)
172
+ 2. **Registration / Setup**: WHERE and HOW components register
173
+ 3. **Usage**: How consuming code interacts with this concern
174
+ 4. **Current Registrations**: Complete list of everything registered
175
+ 5. **Integration Points**: Which systems depend on this concern
176
+ 6. **Gotchas**: Registration order, naming conventions, timing issues
177
+
178
+ Build a complete mental model of the concern.
179
+ </substep>
180
+
181
+ Continue to step 4.
182
+ </step>
183
+
184
+ <!-- ══════════════════════════════════════════════════════════════════ -->
185
+ <!-- STEP 4: WRITE THE CROSS-CUTTING DOC -->
186
+ <!-- ══════════════════════════════════════════════════════════════════ -->
187
+
188
+ <step name="write-doc" order="4">
189
+
190
+ Read ALL existing wiki docs under `.docs/wiki/subsystems/[subsystem_name]/`
191
+ for cross-referencing in Integration Points.
192
+
193
+ Follow the system-cross-cutting template structure exactly.
194
+
195
+ <substep order="4.1" name="write-overview">
196
+ - Title: "# [Cross-Cutting Concern]"
197
+ - Overview: ONE paragraph — what the concern addresses, why it exists
198
+ </substep>
199
+
200
+ <substep order="4.2" name="write-how-it-works">
201
+ Numbered steps explaining the mechanism.
202
+ Reference actual code locations — not theoretical descriptions.
203
+ If the mechanism has a flow (event dispatching, DI resolution),
204
+ show a mermaid sequence diagram.
205
+ </substep>
206
+
207
+ <substep order="4.3" name="write-registration">
208
+ The MOST CRITICAL section for AI agents.
209
+ List every registration point with exact file paths.
210
+ Show the registration pattern (inline code only if non-obvious).
211
+ </substep>
212
+
213
+ <substep order="4.4" name="write-usage">
214
+ How consuming code interacts with this concern.
215
+ Inline code snippet ONLY if usage pattern is non-obvious.
216
+ If straightforward (inject via constructor), a one-liner suffices.
217
+ </substep>
218
+
219
+ <substep order="4.5" name="write-current-registrations">
220
+ Complete list of everything currently registered/using this concern.
221
+ Agent uses this to verify consistency of new registrations.
222
+ </substep>
223
+
224
+ <substep order="4.6" name="write-integration-and-gotchas">
225
+ - Integration Points: cross-reference with markdown links to system docs
226
+ - Gotchas: registration order, naming conventions, initialization timing,
227
+ anything that silently fails if done wrong
228
+ </substep>
229
+
230
+ <substep order="4.7" name="write-or-update">
231
+ **If MODE = create:** Write the complete document to TARGET_FILE.
232
+ **If MODE = update:** Read the existing doc, add new registrations,
233
+ update mechanism if changed, add new gotchas. Write to TARGET_FILE.
234
+ </substep>
235
+
236
+ Continue to step 5.
237
+ </step>
238
+
239
+ <!-- ══════════════════════════════════════════════════════════════════ -->
240
+ <!-- STEP 5: VERIFY, COMMIT, AND REPORT -->
241
+ <!-- ══════════════════════════════════════════════════════════════════ -->
242
+
243
+ <step name="verify-and-report" order="5">
244
+
245
+ <substep order="5.1" name="quality-check">
246
+ Re-read TARGET_FILE and verify:
247
+
248
+ <verification-checklist>
249
+ <check>50+ lines of substantial content</check>
250
+ <check>Overview present (ONE paragraph)</check>
251
+ <check>"How It Works" has numbered steps with code references</check>
252
+ <check>"Registration / Setup" lists ALL registration points with exact file paths</check>
253
+ <check>"Current Registrations" lists ALL known registrations</check>
254
+ <check>"Integration Points" cross-references system docs with markdown links</check>
255
+ <check>"Gotchas" section present with practical warnings</check>
256
+ <check>Code references use `file:Symbol` format, not line numbers</check>
257
+ <check>If mechanism has a flow, mermaid diagram present</check>
258
+ <check>No filler phrases, no generic advice</check>
259
+ <check>No ASCII arrows for flows (all mermaid)</check>
260
+ </verification-checklist>
261
+
262
+ Fix any failures by editing the document directly.
263
+ </substep>
264
+
265
+ <substep order="5.2" name="security-scan">
266
+ ```
267
+ Grep(
268
+ pattern="(sk-[a-zA-Z0-9]{20,}|sk_live_|sk_test_|ghp_[a-zA-Z0-9]{36}|AKIA[A-Z0-9]{16}|-----BEGIN.*PRIVATE KEY)",
269
+ path="[TARGET_FILE]",
270
+ output_mode="content"
271
+ )
272
+ ```
273
+
274
+ <variant condition="matches found">SECRETS_FOUND — alert user, do NOT commit.</variant>
275
+ <variant condition="no matches">CLEAN.</variant>
276
+ </substep>
277
+
278
+ <substep order="5.3" name="commit">
279
+ ```bash
280
+ git add [TARGET_FILE]
281
+ git commit -m "docs([subsystem_name]): add cross-cutting — [concern-name]"
282
+ ```
283
+ </substep>
284
+
285
+ <substep order="5.4" name="report">
286
+ Display:
287
+
288
+ ```
289
+ ╔══════════════════════════════════════════════════╗
290
+ ║ ACE > Map Cross-Cutting > Complete ║
291
+ ╚══════════════════════════════════════════════════╝
292
+
293
+ + [TARGET_FILE] ([line count] lines)
294
+
295
+ Concern: [text description]
296
+ Registrations found: [count]
297
+ Integration points: [count]
298
+ Gotchas: [count]
299
+
300
+ Next > /clear first for a fresh context window, then:
301
+
302
+ /ace:map-cross-cutting — create another cross-cutting doc
303
+ /ace:map-sys-doc — document a system that uses this concern
304
+ /ace:map-guide — create a guide with registration steps
305
+ Review file at [TARGET_FILE]
306
+ ```
307
+ </substep>
308
+
309
+ End workflow.
310
+ </step>
311
+
312
+ </process>
313
+
314
+ <success_criteria>
315
+ <criterion>Concern description parsed and subsystem validated</criterion>
316
+ <criterion>Core infrastructure files discovered (from commits or codebase search)</criterion>
317
+ <criterion>All registration points found and documented</criterion>
318
+ <criterion>All current registrations listed</criterion>
319
+ <criterion>Existing cross-cutting docs checked to avoid duplication (create vs update)</criterion>
320
+ <criterion>Cross-cutting doc follows template structure from system-cross-cutting.xml</criterion>
321
+ <criterion>Registration / Setup section lists exact file paths</criterion>
322
+ <criterion>Integration Points cross-reference system docs with markdown links</criterion>
323
+ <criterion>Gotchas section present with practical warnings</criterion>
324
+ <criterion>Code references use file:Symbol format, no line numbers</criterion>
325
+ <criterion>If mechanism has a flow, mermaid diagram present</criterion>
326
+ <criterion>No filler, no generic advice, no pseudocode</criterion>
327
+ <criterion>Security scan passed, document committed</criterion>
328
+ </success_criteria>
329
+
330
+ </workflow>
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: map-guide
3
+ description: Create or update a step-by-step guide in .docs/wiki/subsystems/[name]/guides/ — recipes for common implementation tasks
4
+ argument-hint: "text='How to add a new drawing tool' subsystem='qarc-charts-v2' commits=3"
5
+ disable-model-invocation: true
6
+ allowed-tools:
7
+ - Read
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Write
12
+ - Edit
13
+ - AskUserQuestion
14
+ model: opus
15
+ effort: max
16
+ context: fork
17
+ agent: ace-wiki-mapper
18
+ ---
19
+
20
+ # Map Guide
21
+
22
+ Create or update a step-by-step guide — recipes for common implementation tasks.
23
+
24
+ ## When to Use
25
+
26
+ - When a recurring implementation task needs a step-by-step recipe
27
+ - After discovering a repeatable process that combines multiple patterns/systems
28
+ - When onboarding developers who need to perform common tasks
29
+ - A task is done repeatedly (add new endpoint, add new tool, add new entity)
30
+ - The task spans multiple files, registrations, and configuration steps
31
+ - An agent following the guide can complete the task end-to-end without guessing
32
+
33
+ ## Input
34
+
35
+ ### Required
36
+
37
+ - **`text`** (text) — Natural language description of the guide to create. Describes the recurring task and what the guide should teach. E.g.: "How to add a new drawing tool", "How to add a new CRUD endpoint with validation", "How to add a new indicator to the chart". If not provided, pause and ask the user.
38
+
39
+ - **`subsystem`** (path | text) — Subsystem where this guide belongs. Wiki location: `.docs/wiki/subsystems/[subsystem]/guides/`. If not provided, pause and ask the user.
40
+
41
+ ### Optional
42
+
43
+ - **`story-context`** (path | GitHub issue) — Path to story artifacts folder (in `.ace/artifacts/`) OR GitHub issue number/URL. Provides context about a specific implementation that exemplifies the task this guide describes. When not provided, the agent discovers the recipe from codebase patterns.
44
+
45
+ - **`commits`** (number | comma-separated commit SHAs) — Specifies which commits to analyze for understanding an example implementation. As a number: analyze the N most recent commits (e.g., commits=3). As commit SHAs: analyze specific commits (e.g., commits='abc123,def456'). When not provided: search the codebase directly to find existing implementations and derive the recipe from them.
46
+
47
+ ## Supporting Resources
48
+
49
+ Read ALL of these before starting the workflow:
50
+
51
+ - **Workflow**: Read [workflow.xml](workflow.xml) — complete orchestration process with all steps
52
+ - **Guide template**: Read [guide.xml](guide.xml) — output format for the guide
53
+ - **Questioning guide**: Read `${CLAUDE_SKILL_DIR}/../../shared/utils/questioning.xml` — deep questioning techniques
54
+ - **UI formatting**: Read `${CLAUDE_SKILL_DIR}/../../shared/utils/ui-formatting.md` — ACE output formatting rules
55
+
56
+ ## Process
57
+
58
+ Use the `ace-wiki-mapper` agent that's specialized in wiki exploration and documentation writing.
59
+
60
+ Read all supporting resources listed above, then execute the workflow defined in [workflow.xml](workflow.xml) end-to-end. Preserve all workflow gates (validation, user questions, commits).
61
+
62
+ **Objective:** Create or update a step-by-step guide that combines knowledge from multiple systems, patterns, and cross-cutting concerns into one actionable recipe. Includes prerequisites, numbered ordered steps with "copy from" references, verification checklist, and common mistakes. The document an AI agent follows when performing a recurring task end-to-end.
63
+
64
+ ## Artifacts
65
+
66
+ ```
67
+ .docs/wiki/subsystems/[subsystem-name]/guides/[guide-name].md
68
+ ```
69
+
70
+ ## Example Usage
71
+
72
+ ```
73
+ # Basic guide
74
+ /ace:map-guide text='How to add a new drawing tool' subsystem='qarc-charts-v2'
75
+
76
+ # With recent commits as example
77
+ /ace:map-guide text='How to add a new CRUD endpoint with validation' subsystem='api' commits=3
78
+
79
+ # With story context as example implementation
80
+ /ace:map-guide text='How to add a new indicator to the chart' subsystem='qarc-charts-v2' story-context='.ace/artifacts/product/e2-charts/f1-indicators/s1-rsi/s1-rsi.md'
81
+ ```
82
+
83
+ ## Next Steps
84
+
85
+ - `/clear` first for a fresh context window
86
+ - `/ace:map-guide` — create another guide
87
+ - `/ace:map-pattern` — document a pattern referenced by this guide
88
+ - `/ace:map-sys-doc` — document a system referenced by this guide
89
+ - Review file at `.docs/wiki/subsystems/[subsystem-name]/guides/`