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
@@ -1,165 +1,180 @@
1
- ---
2
- name: ace:map-story
3
- description: Update living knowledge docs — either after a story implementation (git-based, with new subsystem detection) or for existing undocumented code (file-based, called by map-subsystem)
4
- argument-hint: "story-context='.ace/artifacts/...' commits=3 | files='a.ts,b.ts' module-name='User Management' subsystem-name='api'"
5
- allowed-tools:
6
- - Read
7
- - Bash
8
- - Glob
9
- - Grep
10
- - Write
11
- - Edit
12
- - Task
13
- - AskUserQuestion
14
- - Agent
15
- ---
16
-
17
- ```xml
18
- <command>
19
-
20
- <execution-time>
21
- <mode name="story" invoked-by="user">
22
- <trigger>After a story is implemented and tested</trigger>
23
- <trigger>Analyzes git changes (diff) to determine what was built</trigger>
24
- <trigger>Reads story artifacts for intent context</trigger>
25
- <trigger>Detects affected subsystem(s) from changed file paths</trigger>
26
- <trigger>Creates or updates living knowledge docs to reflect the CURRENT system state</trigger>
27
- <trigger>Detects NEW subsystems not yet in system-structure.md and offers full mapping via map-subsystem</trigger>
28
- </mode>
29
- <mode name="file" invoked-by="map-subsystem Step 8.7">
30
- <trigger>Called automatically during subsystem mapping</trigger>
31
- <trigger>Receives a curated file list + module metadata from module-discovery</trigger>
32
- <trigger>Documents existing undocumented code — no git diff needed</trigger>
33
- <trigger>Receives pre-curated existing documentation as additional context</trigger>
34
- </mode>
35
- <use-when mode="story">
36
- <condition>You just finished implementing and testing a story</condition>
37
- <condition>You want to update docs to reflect recent code changes</condition>
38
- <condition>You want to capture decisions and patterns from a recent implementation</condition>
39
- </use-when>
40
- <use-when mode="file">
41
- <condition>/ace:map-subsystem — for each module row in module-discovery.md</condition>
42
- </use-when>
43
- </execution-time>
44
-
45
- <input>
46
- <flags>
47
- </flags>
48
-
49
- <parameters>
50
- <mode-detection>
51
- <rule>If `files` is provided -> file mode</rule>
52
- <rule>If `story-context` is provided -> story mode</rule>
53
- <rule>If neither is provided -> story mode (staged + unstaged changes)</rule>
54
- </mode-detection>
55
-
56
- <story-mode>
57
- <required></required>
58
- <optional>
59
- <param name="story-context" type="path">
60
- Path to story artifacts folder (in `.ace/artifacts/` or legacy `documentation/features/`).
61
- Used to understand WHAT the story intended to build.
62
- If not provided, the agent relies solely on git changes.
63
- </param>
64
- <param name="commits" type="number | comma-separated commit SHAs">
65
- Specifies which commits to analyze.
66
- As a number: analyze the N most recent commits (e.g., commits=3).
67
- As commit SHAs: analyze specific commits (e.g., commits='abc123,def456').
68
- When not provided: analyze staged + unstaged changes (git diff + git diff --cached).
69
- </param>
70
- <param name="tech-debt" type="text | path">
71
- Tech debt items discovered during code review.
72
- Can be plain text, YAML, or a path to a file containing the items.
73
- When provided, the wiki mapper integrates these items into the
74
- relevant subsystem wiki docs (## Tech Debt sections) AND updates
75
- the system-wide tech-debt-index.md.
76
- </param>
77
- </optional>
78
- </story-mode>
79
-
80
- <file-mode>
81
- <required>
82
- <param name="files" type="comma-separated paths">
83
- Source code files to document. These are the files discovered by
84
- module-discovery (Step 8.5) that together form one coherent module.
85
- </param>
86
- <param name="module-name" type="text">
87
- Human-readable name of the module (e.g., "User Management", "Repository Pattern").
88
- </param>
89
- <param name="subsystem-name" type="text">
90
- Name of the subsystem this module belongs to.
91
- </param>
92
- </required>
93
- <optional>
94
- <param name="existing-docs" type="comma-separated paths or directories">
95
- Pre-existing documentation relevant to this module. Accepts file paths,
96
- directory paths, or a mix of both. When a directory is provided,
97
- recursively discover all files within it (including nested subdirectories).
98
- Typically curated by module-discovery's synthesis agent or passed through
99
- from map-subsystem. Read these FIRST for additional context about intent,
100
- decisions, and history. The actual source code remains the source of truth;
101
- existing docs provide the WHY.
102
- </param>
103
- </optional>
104
- </file-mode>
105
- </parameters>
106
- </input>
107
-
108
- <execution-context>
109
- <map-story-workflow>@~/.claude/agile-context-engineering/workflows/map-story.xml</map-story-workflow>
110
-
111
- <system>@~/.claude/agile-context-engineering/templates/wiki/system.xml</system>
112
- <system-cross-cutting>@~/.claude/agile-context-engineering/templates/wiki/system-cross-cutting.xml</system-cross-cutting>
113
- <pattern>@~/.claude/agile-context-engineering/templates/wiki/pattern.xml</pattern>
114
- <guide>@~/.claude/agile-context-engineering/templates/wiki/guide.xml</guide>
115
- <walkthrough>@~/.claude/agile-context-engineering/templates/wiki/walkthrough.xml</walkthrough>
116
- <decizions>@~/.claude/agile-context-engineering/templates/wiki/decizions.xml</decizions>
117
- <tech-debt-index>@~/.claude/agile-context-engineering/templates/wiki/tech-debt-index.xml</tech-debt-index>
118
-
119
- <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
120
- <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
121
- </execution-context>
122
-
123
- <output>
124
- <objective>
125
- Read the provided source code files (and any existing docs for context),
126
- then autonomously create or update living knowledge documents.
127
- One call may produce multiple docs across different categories
128
- (systems/, patterns/, cross-cutting/, guides/, walkthroughs/, decisions/).
129
-
130
- In story mode: analyze git changes to determine what was built, detect
131
- affected subsystem(s), identify NEW subsystems not yet in system-structure.md
132
- (offering full map-subsystem mapping with user approval), and update/create
133
- docs to reflect the CURRENT system state. Also suggests potential walkthroughs
134
- for complex flows discovered in the code the user can choose to create them.
135
-
136
- In file mode: document existing undocumented code from the provided file list.
137
- </objective>
138
-
139
- <artifacts>
140
- .docs/wiki/subsystems/[subsystem-name]/systems/[system-name].md
141
- .docs/wiki/subsystems/[subsystem-name]/patterns/[pattern-name].md
142
- .docs/wiki/subsystems/[subsystem-name]/cross-cutting/[concern-name].md
143
- .docs/wiki/subsystems/[subsystem-name]/guides/[guide-name].md
144
- .docs/wiki/subsystems/[subsystem-name]/walkthroughs/[flow-name].md (if user approves suggestions)
145
- .docs/wiki/subsystems/[subsystem-name]/decisions/[decision-name].md
146
- .docs/wiki/system-wide/system-structure.md (updated if new subsystem mapped)
147
- .docs/wiki/system-wide/system-architecture.md (updated if new subsystem mapped)
148
- </artifacts>
149
- </output>
150
-
151
- <process>
152
- Execute the map-story workflow from
153
- `@~/.claude/agile-context-engineering/workflows/map-story.xml` end-to-end.
154
- Preserve all workflow gates (validation, user questions, commits).
155
- </process>
156
-
157
- <next-steps>
158
- <step>/clear first for a fresh context window</step>
159
- <step>/ace:map-story document another story or module</step>
160
- <step>/ace:map-subsystem [subsystem] — map or refresh an entire subsystem</step>
161
- <step>Review and edit files in .docs/wiki/subsystems/[subsystem-name]/</step>
162
- </next-steps>
163
-
164
- </command>
165
- ```
1
+ ---
2
+ name: map-story
3
+ description: Update living knowledge docs — either after a story implementation (git-based, with new subsystem detection) or for existing undocumented code (file-based, called by map-subsystem)
4
+ argument-hint: "story-context='.ace/artifacts/...' commits=3 | files='a.ts,b.ts' module-name='User Management' subsystem-name='api'"
5
+ disable-model-invocation: true
6
+ allowed-tools:
7
+ - Read
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Write
12
+ - Edit
13
+ - Task
14
+ - AskUserQuestion
15
+ - Agent
16
+ model: opus
17
+ effort: max
18
+ ---
19
+
20
+ ## Supporting Resources (auto-loaded)
21
+
22
+ !`cat "${CLAUDE_SKILL_DIR}/workflow.xml"`
23
+
24
+ !`cat "${CLAUDE_SKILL_DIR}/templates/system.xml"`
25
+
26
+ !`cat "${CLAUDE_SKILL_DIR}/templates/system-cross-cutting.xml"`
27
+
28
+ !`cat "${CLAUDE_SKILL_DIR}/templates/pattern.xml"`
29
+
30
+ !`cat "${CLAUDE_SKILL_DIR}/templates/guide.xml"`
31
+
32
+ !`cat "${CLAUDE_SKILL_DIR}/templates/walkthrough.xml"`
33
+
34
+ !`cat "${CLAUDE_SKILL_DIR}/templates/decizions.xml"`
35
+
36
+ !`cat "${CLAUDE_SKILL_DIR}/templates/tech-debt-index.xml"`
37
+
38
+ !`cat "${CLAUDE_SKILL_DIR}/../../shared/utils/questioning.xml"`
39
+
40
+ !`cat "${CLAUDE_SKILL_DIR}/../../shared/utils/ui-formatting.md"`
41
+
42
+ ```xml
43
+ <command>
44
+
45
+ <execution-time>
46
+ <mode name="story" invoked-by="user">
47
+ <trigger>After a story is implemented and tested</trigger>
48
+ <trigger>Analyzes git changes (diff) to determine what was built</trigger>
49
+ <trigger>Reads story artifacts for intent context</trigger>
50
+ <trigger>Detects affected subsystem(s) from changed file paths</trigger>
51
+ <trigger>Creates or updates living knowledge docs to reflect the CURRENT system state</trigger>
52
+ <trigger>Detects NEW subsystems not yet in system-structure.md and offers full mapping via map-subsystem</trigger>
53
+ </mode>
54
+ <mode name="file" invoked-by="map-subsystem Step 8.7">
55
+ <trigger>Called automatically during subsystem mapping</trigger>
56
+ <trigger>Receives a curated file list + module metadata from module-discovery</trigger>
57
+ <trigger>Documents existing undocumented code — no git diff needed</trigger>
58
+ <trigger>Receives pre-curated existing documentation as additional context</trigger>
59
+ </mode>
60
+ <use-when mode="story">
61
+ <condition>You just finished implementing and testing a story</condition>
62
+ <condition>You want to update docs to reflect recent code changes</condition>
63
+ <condition>You want to capture decisions and patterns from a recent implementation</condition>
64
+ </use-when>
65
+ <use-when mode="file">
66
+ <condition>/ace:map-subsystem for each module row in module-discovery.md</condition>
67
+ </use-when>
68
+ </execution-time>
69
+
70
+ <input>
71
+ <flags>
72
+ </flags>
73
+
74
+ <parameters>
75
+ <mode-detection>
76
+ <rule>If `files` is provided -> file mode</rule>
77
+ <rule>If `story-context` is provided -> story mode</rule>
78
+ <rule>If neither is provided -> story mode (staged + unstaged changes)</rule>
79
+ </mode-detection>
80
+
81
+ <story-mode>
82
+ <required></required>
83
+ <optional>
84
+ <param name="story-context" type="path">
85
+ Path to story artifacts folder (in `.ace/artifacts/` or legacy `documentation/features/`).
86
+ Used to understand WHAT the story intended to build.
87
+ If not provided, the agent relies solely on git changes.
88
+ </param>
89
+ <param name="commits" type="number | comma-separated commit SHAs">
90
+ Specifies which commits to analyze.
91
+ As a number: analyze the N most recent commits (e.g., commits=3).
92
+ As commit SHAs: analyze specific commits (e.g., commits='abc123,def456').
93
+ When not provided: analyze staged + unstaged changes (git diff + git diff --cached).
94
+ </param>
95
+ <param name="tech-debt" type="text | path">
96
+ Tech debt items discovered during code review.
97
+ Can be plain text, YAML, or a path to a file containing the items.
98
+ When provided, the wiki mapper integrates these items into the
99
+ relevant subsystem wiki docs (## Tech Debt sections) AND updates
100
+ the system-wide tech-debt-index.md.
101
+ </param>
102
+ </optional>
103
+ </story-mode>
104
+
105
+ <file-mode>
106
+ <required>
107
+ <param name="files" type="comma-separated paths">
108
+ Source code files to document. These are the files discovered by
109
+ module-discovery (Step 8.5) that together form one coherent module.
110
+ </param>
111
+ <param name="module-name" type="text">
112
+ Human-readable name of the module (e.g., "User Management", "Repository Pattern").
113
+ </param>
114
+ <param name="subsystem-name" type="text">
115
+ Name of the subsystem this module belongs to.
116
+ </param>
117
+ </required>
118
+ <optional>
119
+ <param name="existing-docs" type="comma-separated paths or directories">
120
+ Pre-existing documentation relevant to this module. Accepts file paths,
121
+ directory paths, or a mix of both. When a directory is provided,
122
+ recursively discover all files within it (including nested subdirectories).
123
+ Typically curated by module-discovery's synthesis agent or passed through
124
+ from map-subsystem. Read these FIRST for additional context about intent,
125
+ decisions, and history. The actual source code remains the source of truth;
126
+ existing docs provide the WHY.
127
+ </param>
128
+ </optional>
129
+ </file-mode>
130
+ </parameters>
131
+ </input>
132
+
133
+ <execution-context>
134
+ <!-- All supporting files are auto-loaded in the Supporting Resources section above.
135
+ The model does NOT need to Read these files — they are already in context. -->
136
+ </execution-context>
137
+
138
+ <output>
139
+ <objective>
140
+ Read the provided source code files (and any existing docs for context),
141
+ then autonomously create or update living knowledge documents.
142
+ One call may produce multiple docs across different categories
143
+ (systems/, patterns/, cross-cutting/, guides/, walkthroughs/, decisions/).
144
+
145
+ In story mode: analyze git changes to determine what was built, detect
146
+ affected subsystem(s), identify NEW subsystems not yet in system-structure.md
147
+ (offering full map-subsystem mapping with user approval), and update/create
148
+ docs to reflect the CURRENT system state. Also suggests potential walkthroughs
149
+ for complex flows discovered in the code — the user can choose to create them.
150
+
151
+ In file mode: document existing undocumented code from the provided file list.
152
+ </objective>
153
+
154
+ <artifacts>
155
+ .docs/wiki/subsystems/[subsystem-name]/systems/[system-name].md
156
+ .docs/wiki/subsystems/[subsystem-name]/patterns/[pattern-name].md
157
+ .docs/wiki/subsystems/[subsystem-name]/cross-cutting/[concern-name].md
158
+ .docs/wiki/subsystems/[subsystem-name]/guides/[guide-name].md
159
+ .docs/wiki/subsystems/[subsystem-name]/walkthroughs/[flow-name].md (if user approves suggestions)
160
+ .docs/wiki/subsystems/[subsystem-name]/decisions/[decision-name].md
161
+ .docs/wiki/system-wide/system-structure.md (updated if new subsystem mapped)
162
+ .docs/wiki/system-wide/system-architecture.md (updated if new subsystem mapped)
163
+ </artifacts>
164
+ </output>
165
+
166
+ <process>
167
+ Execute the map-story workflow from
168
+ `workflow.xml` end-to-end.
169
+ Preserve all workflow gates (validation, user questions, commits).
170
+ </process>
171
+
172
+ <next-steps>
173
+ <step>/clear first for a fresh context window</step>
174
+ <step>/ace:map-story — document another story or module</step>
175
+ <step>/ace:map-subsystem [subsystem] — map or refresh an entire subsystem</step>
176
+ <step>Review and edit files in .docs/wiki/subsystems/[subsystem-name]/</step>
177
+ </next-steps>
178
+
179
+ </command>
180
+ ```
@@ -1,115 +1,115 @@
1
- <decisions>
2
- <purpose>
3
- Template for `.docs/wiki/subsystems/[subsystem-name]/decisions/<decision-name>.md` — an
4
- Architecture Decision Record (ADR) capturing WHY a significant choice was made.
5
- Answers "Why did we choose X over Y?"
6
-
7
- Each decision doc captures one significant technical decision with its context and
8
- trade-offs. It is the document an AI agent reads to understand WHY things are built
9
- a certain way, preventing it from making the wrong choice.
10
-
11
- Create an ADR ONLY when a significant "why" decision was made:
12
- - Choosing one approach over another with meaningful trade-offs
13
- - Deviating from an established pattern for a specific reason
14
- - Adopting a new technology, pattern, or architectural approach
15
- - Rejecting a seemingly obvious solution for non-obvious reasons
16
-
17
- Do NOT create ADRs for trivial or obvious decisions.
18
-
19
- Complements:
20
- - systems/ docs (WHAT exists — systems reference decisions that shaped them)
21
- - patterns/ docs (HOW things work — patterns reference decisions that defined them)
22
- - cross-cutting/ docs (shared infrastructure shaped by architectural decisions)
23
- </purpose>
24
-
25
- <template>
26
- <decision-record>
27
- # ADR-NNN: [Decision Title]
28
-
29
- **Status**: Accepted | Superseded by [ADR-MMM](./ADR-MMM-slug.md)
30
- **Date**: YYYY-MM-DD
31
- **Story**: [story reference, if applicable]
32
-
33
- ## Context
34
- What situation prompted this decision. 2-3 sentences max.
35
-
36
- ## Decision
37
- What was decided. 2-3 sentences max.
38
-
39
- ## Alternatives Considered
40
- - **[Alternative A]**: [Why rejected — 1 sentence]
41
- - **[Alternative B]**: [Why rejected — 1 sentence]
42
-
43
- ## Consequences
44
- - Pro: [positive outcome]
45
- - Pro: [positive outcome]
46
- - Con: [trade-off accepted]
47
- </decision-record>
48
- </template>
49
-
50
- <guidelines>
51
-
52
- **Documentation Style:**
53
- - EXTREMELY SUCCINCT — each ADR should be under 30 lines
54
- - NO FLUFF — every sentence must convey a decision, reason, or consequence
55
- - Bullet points for alternatives and consequences
56
- - Code references as `file-path:ClassName` only when the decision is about specific code
57
-
58
- **ADR Numbering:**
59
- - Sequential within the subsystem: ADR-001, ADR-002, etc.
60
- - Filename format: `ADR-NNN-kebab-case-slug.md`
61
- - To find the next number, read existing ADRs in the decisions/ directory.
62
-
63
- **Status:**
64
- - `Accepted` — the decision is in effect
65
- - `Superseded by ADR-MMM` — replaced by a later decision (link to it)
66
- - ADRs are IMMUTABLE — never edit an accepted ADR. Create a new one that supersedes it.
67
-
68
- **Context:**
69
- - 2-3 sentences. What problem or situation forced a choice.
70
- - Reference the system or pattern this decision affects.
71
-
72
- **Decision:**
73
- - 2-3 sentences. What was chosen and at what scope.
74
- - Be specific — "We use X for Y" not "We decided to improve things."
75
-
76
- **Alternatives Considered:**
77
- - List each rejected alternative with ONE sentence explaining why.
78
- - If there were no meaningful alternatives, omit this section.
79
-
80
- **Consequences:**
81
- - Bullet list of pros and cons.
82
- - Be honest about trade-offs — future agents need to know the downsides.
83
- - Include migration/compatibility consequences if applicable.
84
-
85
- **What does NOT belong here:**
86
- - Implementation details (that's in systems/ and patterns/ docs)
87
- - Step-by-step instructions (that's in guides/)
88
- - Full analysis or research documents (those are in .ace/artifacts/)
89
- - Revision history or meeting notes
90
-
91
- </guidelines>
92
-
93
- <evolution>
94
-
95
- ADRs are IMMUTABLE once accepted. They are historical records.
96
-
97
- **When to create a new ADR:**
98
- - A significant architectural or pattern choice is made during a story
99
- - An existing decision is reversed or significantly modified (supersede the old one)
100
- - A new technology, pattern, or approach is adopted
101
-
102
- **When NOT to create an ADR:**
103
- - Routine implementation following existing patterns
104
- - Bug fixes or refactoring that don't change architectural direction
105
- - Trivial decisions with no meaningful trade-offs
106
- - Decisions already captured in an existing ADR
107
-
108
- **Superseding:**
109
- - Create the new ADR with its own number
110
- - Update the old ADR's Status to: `Superseded by [ADR-MMM](./ADR-MMM-slug.md)`
111
- - This is the ONLY edit allowed on an accepted ADR
112
-
113
- </evolution>
114
-
115
- </decisions>
1
+ <decisions>
2
+ <purpose>
3
+ Template for `.docs/wiki/subsystems/[subsystem-name]/decisions/<decision-name>.md` — an
4
+ Architecture Decision Record (ADR) capturing WHY a significant choice was made.
5
+ Answers "Why did we choose X over Y?"
6
+
7
+ Each decision doc captures one significant technical decision with its context and
8
+ trade-offs. It is the document an AI agent reads to understand WHY things are built
9
+ a certain way, preventing it from making the wrong choice.
10
+
11
+ Create an ADR ONLY when a significant "why" decision was made:
12
+ - Choosing one approach over another with meaningful trade-offs
13
+ - Deviating from an established pattern for a specific reason
14
+ - Adopting a new technology, pattern, or architectural approach
15
+ - Rejecting a seemingly obvious solution for non-obvious reasons
16
+
17
+ Do NOT create ADRs for trivial or obvious decisions.
18
+
19
+ Complements:
20
+ - systems/ docs (WHAT exists — systems reference decisions that shaped them)
21
+ - patterns/ docs (HOW things work — patterns reference decisions that defined them)
22
+ - cross-cutting/ docs (shared infrastructure shaped by architectural decisions)
23
+ </purpose>
24
+
25
+ <template>
26
+ <decision-record>
27
+ # ADR-NNN: [Decision Title]
28
+
29
+ **Status**: Accepted | Superseded by [ADR-MMM](./ADR-MMM-slug.md)
30
+ **Date**: YYYY-MM-DD
31
+ **Story**: [story reference, if applicable]
32
+
33
+ ## Context
34
+ What situation prompted this decision. 2-3 sentences max.
35
+
36
+ ## Decision
37
+ What was decided. 2-3 sentences max.
38
+
39
+ ## Alternatives Considered
40
+ - **[Alternative A]**: [Why rejected — 1 sentence]
41
+ - **[Alternative B]**: [Why rejected — 1 sentence]
42
+
43
+ ## Consequences
44
+ - Pro: [positive outcome]
45
+ - Pro: [positive outcome]
46
+ - Con: [trade-off accepted]
47
+ </decision-record>
48
+ </template>
49
+
50
+ <guidelines>
51
+
52
+ **Documentation Style:**
53
+ - EXTREMELY SUCCINCT — each ADR should be under 30 lines
54
+ - NO FLUFF — every sentence must convey a decision, reason, or consequence
55
+ - Bullet points for alternatives and consequences
56
+ - Code references as `file-path:ClassName` only when the decision is about specific code
57
+
58
+ **ADR Numbering:**
59
+ - Sequential within the subsystem: ADR-001, ADR-002, etc.
60
+ - Filename format: `ADR-NNN-kebab-case-slug.md`
61
+ - To find the next number, read existing ADRs in the decisions/ directory.
62
+
63
+ **Status:**
64
+ - `Accepted` — the decision is in effect
65
+ - `Superseded by ADR-MMM` — replaced by a later decision (link to it)
66
+ - ADRs are IMMUTABLE — never edit an accepted ADR. Create a new one that supersedes it.
67
+
68
+ **Context:**
69
+ - 2-3 sentences. What problem or situation forced a choice.
70
+ - Reference the system or pattern this decision affects.
71
+
72
+ **Decision:**
73
+ - 2-3 sentences. What was chosen and at what scope.
74
+ - Be specific — "We use X for Y" not "We decided to improve things."
75
+
76
+ **Alternatives Considered:**
77
+ - List each rejected alternative with ONE sentence explaining why.
78
+ - If there were no meaningful alternatives, omit this section.
79
+
80
+ **Consequences:**
81
+ - Bullet list of pros and cons.
82
+ - Be honest about trade-offs — future agents need to know the downsides.
83
+ - Include migration/compatibility consequences if applicable.
84
+
85
+ **What does NOT belong here:**
86
+ - Implementation details (that's in systems/ and patterns/ docs)
87
+ - Step-by-step instructions (that's in guides/)
88
+ - Full analysis or research documents (those are in .ace/artifacts/)
89
+ - Revision history or meeting notes
90
+
91
+ </guidelines>
92
+
93
+ <evolution>
94
+
95
+ ADRs are IMMUTABLE once accepted. They are historical records.
96
+
97
+ **When to create a new ADR:**
98
+ - A significant architectural or pattern choice is made during a story
99
+ - An existing decision is reversed or significantly modified (supersede the old one)
100
+ - A new technology, pattern, or approach is adopted
101
+
102
+ **When NOT to create an ADR:**
103
+ - Routine implementation following existing patterns
104
+ - Bug fixes or refactoring that don't change architectural direction
105
+ - Trivial decisions with no meaningful trade-offs
106
+ - Decisions already captured in an existing ADR
107
+
108
+ **Superseding:**
109
+ - Create the new ADR with its own number
110
+ - Update the old ADR's Status to: `Superseded by [ADR-MMM](./ADR-MMM-slug.md)`
111
+ - This is the ONLY edit allowed on an accepted ADR
112
+
113
+ </evolution>
114
+
115
+ </decisions>