agile-context-engineering 0.3.0 → 0.5.1

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 (139) hide show
  1. package/.claude-plugin/marketplace.json +18 -0
  2. package/.claude-plugin/plugin.json +10 -0
  3. package/CHANGELOG.md +7 -1
  4. package/LICENSE +51 -51
  5. package/README.md +330 -318
  6. package/agents/ace-code-discovery-analyst.md +245 -245
  7. package/agents/ace-code-integration-analyst.md +248 -248
  8. package/agents/ace-code-reviewer.md +375 -375
  9. package/agents/ace-product-owner.md +365 -361
  10. package/agents/ace-project-researcher.md +606 -606
  11. package/agents/ace-research-synthesizer.md +228 -228
  12. package/agents/ace-technical-application-architect.md +315 -315
  13. package/agents/ace-wiki-mapper.md +449 -445
  14. package/bin/install.js +605 -195
  15. package/hooks/ace-check-update.js +71 -62
  16. package/hooks/ace-statusline.js +107 -89
  17. package/hooks/hooks.json +14 -0
  18. package/package.json +7 -5
  19. package/shared/lib/ace-core.js +361 -0
  20. package/shared/lib/ace-core.test.js +308 -0
  21. package/shared/lib/ace-github.js +753 -0
  22. package/shared/lib/ace-story.js +400 -0
  23. package/shared/lib/ace-story.test.js +250 -0
  24. package/{agile-context-engineering → shared}/utils/questioning.xml +110 -110
  25. package/{agile-context-engineering → shared}/utils/ui-formatting.md +299 -299
  26. package/{commands/ace/execute-story.md → skills/execute-story/SKILL.md} +116 -138
  27. package/skills/execute-story/script.js +291 -0
  28. package/skills/execute-story/script.test.js +261 -0
  29. package/{agile-context-engineering/templates/product/story.xml → skills/execute-story/story-template.xml} +451 -451
  30. package/skills/execute-story/walkthrough-template.xml +255 -0
  31. package/{agile-context-engineering/workflows/execute-story.xml → skills/execute-story/workflow.xml} +1221 -1219
  32. package/skills/help/SKILL.md +71 -0
  33. package/skills/help/script.js +315 -0
  34. package/skills/help/script.test.js +183 -0
  35. package/{agile-context-engineering/workflows/help.xml → skills/help/workflow.xml} +544 -533
  36. package/{commands/ace/init-coding-standards.md → skills/init-coding-standards/SKILL.md} +91 -83
  37. package/{agile-context-engineering/templates/wiki/coding-standards.xml → skills/init-coding-standards/coding-standards-template.xml} +531 -531
  38. package/skills/init-coding-standards/script.js +50 -0
  39. package/skills/init-coding-standards/script.test.js +70 -0
  40. package/{agile-context-engineering/workflows/init-coding-standards.xml → skills/init-coding-standards/workflow.xml} +381 -386
  41. package/skills/map-cross-cutting/SKILL.md +126 -0
  42. package/{agile-context-engineering/templates/wiki → skills/map-cross-cutting}/system-cross-cutting.xml +197 -197
  43. package/skills/map-cross-cutting/workflow.xml +330 -0
  44. package/skills/map-guide/SKILL.md +126 -0
  45. package/{agile-context-engineering/templates/wiki → skills/map-guide}/guide.xml +137 -137
  46. package/skills/map-guide/workflow.xml +320 -0
  47. package/skills/map-pattern/SKILL.md +125 -0
  48. package/{agile-context-engineering/templates/wiki → skills/map-pattern}/pattern.xml +159 -159
  49. package/skills/map-pattern/workflow.xml +331 -0
  50. package/{commands/ace/map-story.md → skills/map-story/SKILL.md} +180 -165
  51. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/decizions.xml +115 -115
  52. package/skills/map-story/templates/guide.xml +137 -0
  53. package/skills/map-story/templates/pattern.xml +159 -0
  54. package/skills/map-story/templates/system-cross-cutting.xml +197 -0
  55. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/system.xml +381 -381
  56. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/tech-debt-index.xml +125 -125
  57. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/walkthrough.xml +255 -255
  58. package/{agile-context-engineering/workflows/map-story.xml → skills/map-story/workflow.xml} +1046 -1046
  59. package/{commands/ace/map-subsystem.md → skills/map-subsystem/SKILL.md} +155 -140
  60. package/skills/map-subsystem/script.js +51 -0
  61. package/skills/map-subsystem/script.test.js +68 -0
  62. package/skills/map-subsystem/templates/decizions.xml +115 -0
  63. package/skills/map-subsystem/templates/guide.xml +137 -0
  64. package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/module-discovery.xml +174 -174
  65. package/skills/map-subsystem/templates/pattern.xml +159 -0
  66. package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-architecture.xml +343 -343
  67. package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-structure.xml +234 -234
  68. package/skills/map-subsystem/templates/system-cross-cutting.xml +197 -0
  69. package/skills/map-subsystem/templates/system.xml +381 -0
  70. package/skills/map-subsystem/templates/walkthrough.xml +255 -0
  71. package/{agile-context-engineering/workflows/map-subsystem.xml → skills/map-subsystem/workflow.xml} +1173 -1178
  72. package/skills/map-sys-doc/SKILL.md +125 -0
  73. package/skills/map-sys-doc/system.xml +381 -0
  74. package/skills/map-sys-doc/workflow.xml +336 -0
  75. package/{commands/ace/map-system.md → skills/map-system/SKILL.md} +103 -92
  76. package/skills/map-system/script.js +75 -0
  77. package/skills/map-system/script.test.js +73 -0
  78. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-architecture.xml +254 -254
  79. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-structure.xml +177 -177
  80. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/testing-framework.xml +283 -283
  81. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/wiki-readme.xml +296 -296
  82. package/{agile-context-engineering/workflows/map-system.xml → skills/map-system/workflow.xml} +667 -672
  83. package/{commands/ace/map-walkthrough.md → skills/map-walkthrough/SKILL.md} +140 -127
  84. package/skills/map-walkthrough/walkthrough.xml +255 -0
  85. package/{agile-context-engineering/workflows/map-walkthrough.xml → skills/map-walkthrough/workflow.xml} +457 -457
  86. package/{commands/ace/plan-backlog.md → skills/plan-backlog/SKILL.md} +93 -83
  87. package/{agile-context-engineering/templates/product/product-backlog.xml → skills/plan-backlog/product-backlog-template.xml} +231 -231
  88. package/skills/plan-backlog/script.js +121 -0
  89. package/skills/plan-backlog/script.test.js +83 -0
  90. package/{agile-context-engineering/workflows/plan-backlog.xml → skills/plan-backlog/workflow.xml} +1348 -1356
  91. package/{commands/ace/plan-feature.md → skills/plan-feature/SKILL.md} +99 -89
  92. package/{agile-context-engineering/templates/product/feature.xml → skills/plan-feature/feature-template.xml} +361 -361
  93. package/skills/plan-feature/script.js +131 -0
  94. package/skills/plan-feature/script.test.js +80 -0
  95. package/{agile-context-engineering/workflows/plan-feature.xml → skills/plan-feature/workflow.xml} +1487 -1495
  96. package/{commands/ace/plan-product-vision.md → skills/plan-product-vision/SKILL.md} +91 -81
  97. package/{agile-context-engineering/templates/product/product-vision.xml → skills/plan-product-vision/product-vision-template.xml} +227 -227
  98. package/skills/plan-product-vision/script.js +51 -0
  99. package/skills/plan-product-vision/script.test.js +69 -0
  100. package/{agile-context-engineering/workflows/plan-product-vision.xml → skills/plan-product-vision/workflow.xml} +337 -342
  101. package/{commands/ace/plan-story.md → skills/plan-story/SKILL.md} +139 -159
  102. package/skills/plan-story/script.js +295 -0
  103. package/skills/plan-story/script.test.js +240 -0
  104. package/skills/plan-story/story-template.xml +458 -0
  105. package/{agile-context-engineering/workflows/plan-story.xml → skills/plan-story/workflow.xml} +1301 -944
  106. package/{commands/ace/research-external-solution.md → skills/research-external-solution/SKILL.md} +120 -138
  107. package/{agile-context-engineering/templates/product/external-solution.xml → skills/research-external-solution/external-solution-template.xml} +832 -832
  108. package/skills/research-external-solution/script.js +229 -0
  109. package/skills/research-external-solution/script.test.js +134 -0
  110. package/{agile-context-engineering/workflows/research-external-solution.xml → skills/research-external-solution/workflow.xml} +657 -659
  111. package/{commands/ace/research-integration-solution.md → skills/research-integration-solution/SKILL.md} +121 -135
  112. package/{agile-context-engineering/templates/product/story-integration-solution.xml → skills/research-integration-solution/integration-solution-template.xml} +1015 -1015
  113. package/skills/research-integration-solution/script.js +223 -0
  114. package/skills/research-integration-solution/script.test.js +134 -0
  115. package/{agile-context-engineering/workflows/research-integration-solution.xml → skills/research-integration-solution/workflow.xml} +711 -713
  116. package/{commands/ace/research-story-wiki.md → skills/research-story-wiki/SKILL.md} +101 -116
  117. package/skills/research-story-wiki/script.js +223 -0
  118. package/skills/research-story-wiki/script.test.js +138 -0
  119. package/{agile-context-engineering/templates/product/story-wiki.xml → skills/research-story-wiki/story-wiki-template.xml} +194 -194
  120. package/{agile-context-engineering/workflows/research-story-wiki.xml → skills/research-story-wiki/workflow.xml} +473 -475
  121. package/{commands/ace/research-technical-solution.md → skills/research-technical-solution/SKILL.md} +131 -147
  122. package/skills/research-technical-solution/script.js +223 -0
  123. package/skills/research-technical-solution/script.test.js +134 -0
  124. package/{agile-context-engineering/templates/product/story-technical-solution.xml → skills/research-technical-solution/technical-solution-template.xml} +1025 -1025
  125. package/{agile-context-engineering/workflows/research-technical-solution.xml → skills/research-technical-solution/workflow.xml} +761 -763
  126. package/{commands/ace/review-story.md → skills/review-story/SKILL.md} +99 -109
  127. package/skills/review-story/script.js +249 -0
  128. package/skills/review-story/script.test.js +169 -0
  129. package/skills/review-story/story-template.xml +451 -0
  130. package/{agile-context-engineering/workflows/review-story.xml → skills/review-story/workflow.xml} +279 -281
  131. package/{commands/ace/update.md → skills/update/SKILL.md} +65 -56
  132. package/{agile-context-engineering/workflows/update.xml → skills/update/workflow.xml} +33 -18
  133. package/agile-context-engineering/src/ace-tools.js +0 -2881
  134. package/agile-context-engineering/src/ace-tools.test.js +0 -1089
  135. package/agile-context-engineering/templates/_command.md +0 -54
  136. package/agile-context-engineering/templates/_workflow.xml +0 -17
  137. package/agile-context-engineering/templates/config.json +0 -0
  138. package/agile-context-engineering/templates/product/integration-solution.xml +0 -0
  139. package/commands/ace/help.md +0 -93
@@ -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
+ All supporting resource files are auto-loaded in the skill prompt above. Do NOT re-read them.
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,126 @@
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
+ ## Supporting Resources (auto-loaded)
21
+
22
+ !`cat "${CLAUDE_SKILL_DIR}/workflow.xml"`
23
+
24
+ !`cat "${CLAUDE_SKILL_DIR}/guide.xml"`
25
+
26
+ !`cat "${CLAUDE_SKILL_DIR}/../../shared/utils/questioning.xml"`
27
+
28
+ !`cat "${CLAUDE_SKILL_DIR}/../../shared/utils/ui-formatting.md"`
29
+
30
+ ```xml
31
+ <command>
32
+
33
+ <execution-time>
34
+ <runs-after>
35
+ <trigger>When a recurring implementation task needs a step-by-step recipe</trigger>
36
+ <trigger>After discovering a repeatable process that combines multiple patterns/systems</trigger>
37
+ <trigger>When onboarding developers who need to perform common tasks</trigger>
38
+ </runs-after>
39
+ <use-when>
40
+ <condition>A task is done repeatedly (add new endpoint, add new tool, add new entity)</condition>
41
+ <condition>The task spans multiple files, registrations, and configuration steps</condition>
42
+ <condition>An agent following the guide can complete the task end-to-end without guessing</condition>
43
+ </use-when>
44
+ </execution-time>
45
+
46
+ <input>
47
+ <flags>
48
+ </flags>
49
+
50
+ <parameters>
51
+ <required>
52
+ <param name="text" type="text">
53
+ Natural language description of the guide to create. Describes the
54
+ recurring task and what the guide should teach.
55
+
56
+ E.g.:
57
+ - "How to add a new drawing tool"
58
+ - "How to add a new CRUD endpoint with validation"
59
+ - "How to add a new indicator to the chart"
60
+
61
+ If not provided, pause and ask the user.
62
+ </param>
63
+ <param name="subsystem" type="path | text">
64
+ Subsystem where this guide belongs.
65
+ Wiki location: `.docs/wiki/subsystems/[subsystem]/guides/`.
66
+ If not provided, pause and ask the user.
67
+ </param>
68
+ </required>
69
+
70
+ <optional>
71
+ <param name="story-context" type="path | GitHub issue">
72
+ Path to story artifacts folder (in `.ace/artifacts/`) OR GitHub issue
73
+ number/URL. Provides context about a specific implementation that
74
+ exemplifies the task this guide describes.
75
+ When not provided, the agent discovers the recipe from codebase patterns.
76
+ </param>
77
+ <param name="commits" type="number | comma-separated commit SHAs">
78
+ Specifies which commits to analyze for understanding an example implementation.
79
+ As a number: analyze the N most recent commits (e.g., commits=3).
80
+ As commit SHAs: analyze specific commits (e.g., commits='abc123,def456').
81
+ When not provided: search the codebase directly to find existing implementations
82
+ and derive the recipe from them.
83
+ </param>
84
+ </optional>
85
+ </parameters>
86
+ </input>
87
+
88
+ <execution-context>
89
+ <!-- All supporting files are auto-loaded in the Supporting Resources section above.
90
+ The model does NOT need to Read these files — they are already in context. -->
91
+ </execution-context>
92
+
93
+ <output>
94
+ <objective>
95
+ Create or update a step-by-step guide that combines knowledge from multiple
96
+ systems, patterns, and cross-cutting concerns into one actionable recipe.
97
+ Includes prerequisites, numbered ordered steps with "copy from" references,
98
+ verification checklist, and common mistakes.
99
+
100
+ The document an AI agent follows when performing a recurring task end-to-end.
101
+ </objective>
102
+
103
+ <artifacts>
104
+ .docs/wiki/subsystems/[subsystem-name]/guides/[guide-name].md
105
+ </artifacts>
106
+ </output>
107
+
108
+ <process>
109
+ For this command use the `ace-wiki-mapper` agent
110
+ that's specialized in wiki exploration and documentation writing.
111
+
112
+ Execute the map-guide workflow from
113
+ `workflow.xml` end-to-end.
114
+ Preserve all workflow gates (validation, user questions, commits).
115
+ </process>
116
+
117
+ <next-steps>
118
+ <step>/clear first for a fresh context window</step>
119
+ <step>/ace:map-guide — create another guide</step>
120
+ <step>/ace:map-pattern — document a pattern referenced by this guide</step>
121
+ <step>/ace:map-sys-doc — document a system referenced by this guide</step>
122
+ <step>Review file at .docs/wiki/subsystems/[subsystem-name]/guides/</step>
123
+ </next-steps>
124
+
125
+ </command>
126
+ ```