agile-context-engineering 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/LICENSE +51 -51
  3. package/README.md +324 -323
  4. package/agents/ace-research-synthesizer.md +228 -228
  5. package/agents/ace-technical-application-architect.md +28 -0
  6. package/agents/ace-wiki-mapper.md +445 -334
  7. package/agile-context-engineering/src/ace-tools.test.js +1089 -1089
  8. package/agile-context-engineering/templates/_command.md +53 -53
  9. package/agile-context-engineering/templates/_workflow.xml +16 -16
  10. package/agile-context-engineering/templates/product/product-backlog.xml +231 -231
  11. package/agile-context-engineering/templates/product/story-integration-solution.xml +1 -0
  12. package/agile-context-engineering/templates/product/story-wiki.xml +4 -0
  13. package/agile-context-engineering/templates/wiki/coding-standards.xml +38 -0
  14. package/agile-context-engineering/templates/wiki/decizions.xml +115 -115
  15. package/agile-context-engineering/templates/wiki/guide.xml +137 -137
  16. package/agile-context-engineering/templates/wiki/module-discovery.xml +174 -174
  17. package/agile-context-engineering/templates/wiki/pattern.xml +159 -159
  18. package/agile-context-engineering/templates/wiki/system-architecture.xml +254 -254
  19. package/agile-context-engineering/templates/wiki/system-cross-cutting.xml +197 -197
  20. package/agile-context-engineering/templates/wiki/system.xml +381 -381
  21. package/agile-context-engineering/templates/wiki/walkthrough.xml +255 -0
  22. package/agile-context-engineering/templates/wiki/wiki-readme.xml +297 -276
  23. package/agile-context-engineering/utils/questioning.xml +110 -110
  24. package/agile-context-engineering/workflows/execute-story.xml +1219 -1145
  25. package/agile-context-engineering/workflows/help.xml +540 -540
  26. package/agile-context-engineering/workflows/init-coding-standards.xml +386 -386
  27. package/agile-context-engineering/workflows/map-story.xml +1046 -797
  28. package/agile-context-engineering/workflows/map-subsystem.xml +2 -1
  29. package/agile-context-engineering/workflows/map-walkthrough.xml +457 -0
  30. package/agile-context-engineering/workflows/plan-feature.xml +1495 -1495
  31. package/agile-context-engineering/workflows/plan-story.xml +36 -1
  32. package/agile-context-engineering/workflows/research-integration-solution.xml +1 -0
  33. package/agile-context-engineering/workflows/research-story-wiki.xml +2 -1
  34. package/agile-context-engineering/workflows/research-technical-solution.xml +1 -0
  35. package/agile-context-engineering/workflows/review-story.xml +281 -281
  36. package/agile-context-engineering/workflows/update.xml +238 -207
  37. package/bin/install.js +8 -0
  38. package/commands/ace/execute-story.md +1 -0
  39. package/commands/ace/help.md +93 -93
  40. package/commands/ace/init-coding-standards.md +83 -83
  41. package/commands/ace/map-story.md +165 -156
  42. package/commands/ace/map-subsystem.md +140 -138
  43. package/commands/ace/map-system.md +92 -92
  44. package/commands/ace/map-walkthrough.md +127 -0
  45. package/commands/ace/plan-feature.md +89 -89
  46. package/commands/ace/plan-story.md +15 -1
  47. package/commands/ace/review-story.md +109 -109
  48. package/commands/ace/update.md +56 -54
  49. package/hooks/ace-check-update.js +62 -62
  50. package/hooks/ace-statusline.js +89 -89
  51. package/package.json +4 -3
@@ -1,138 +1,140 @@
1
- ---
2
- name: ace:map-subsystem
3
- description: Map a subsystem's structure, architecture, and knowledge docs into .docs/wiki/subsystems/[name]/
4
- argument-hint: "subsystem='src/api' (or subsystem name) existing-docs=comma separated paths | directory"
5
- allowed-tools:
6
- - Read
7
- - Bash
8
- - Glob
9
- - Grep
10
- - Write
11
- - Task
12
- - AskUserQuestion
13
- ---
14
-
15
- ```xml
16
- <command>
17
-
18
- <execution-time>
19
- <runs-after>
20
- <trigger>After /ace:map-system — drill into individual subsystems</trigger>
21
- <trigger>Anytime to refresh an existing subsystem's wiki documents</trigger>
22
- <trigger>When a new subsystem is added and needs to be documented</trigger>
23
- </runs-after>
24
- <use-when>
25
- <condition>A subsystem has not yet been documented in `.docs/wiki/subsystems/`</condition>
26
- <condition>An existing subsystem's docs are stale after a significant refactor</condition>
27
- <condition>You want a deep-dive view of a specific subsystem's internals (components, flows, data)</condition>
28
- </use-when>
29
- </execution-time>
30
-
31
- <input>
32
- <flags>
33
- </flags>
34
-
35
- <parameters>
36
- <required>
37
- <param name="subsystem" type="path | text">
38
- Path to the subsystem (e.g., `src/api`) or its name.
39
- If not provided, pause execution and ask the user for it.
40
- If provided but ambiguous, or not found in the codebase, ask clarifying questions.
41
- </param>
42
- </required>
43
-
44
- <optional>
45
- <param name="existing-docs" type="comma-separated paths or directories">
46
- Pre-existing documentation relevant to this subsystem. Accepts file paths,
47
- directory paths, or a mix of both. When a directory is provided, recursively
48
- discover all files within it (including nested subdirectories).
49
- All resolved file paths are passed through to every map-story invocation
50
- (file mode) alongside any per-module docs discovered during module-discovery.
51
- Use this when the caller already knows about documentation that should
52
- inform knowledge-doc generation.
53
- </param>
54
- </optional>
55
- </parameters>
56
- </input>
57
-
58
- <execution-context>
59
- <map-subsystem-workflow>@~/.claude/agile-context-engineering/workflows/map-subsystem.xml</map-subsystem-workflow>
60
- <subsystem-structure-template>@~/.claude/agile-context-engineering/templates/wiki/subsystem-structure.xml</subsystem-structure-template>
61
- <subsystem-architecture-template>@~/.claude/agile-context-engineering/templates/wiki/subsystem-architecture.xml</subsystem-architecture-template>
62
- <module-discovery-template>@~/.claude/agile-context-engineering/templates/wiki/module-discovery.xml</module-discovery-template>
63
- <map-story-workflow>@~/.claude/agile-context-engineering/workflows/map-story.xml</map-story-workflow>
64
- <system-template>@~/.claude/agile-context-engineering/templates/wiki/system.xml</system-template>
65
- <pattern-template>@~/.claude/agile-context-engineering/templates/wiki/pattern.xml</pattern-template>
66
- <cross-cutting-template>@~/.claude/agile-context-engineering/templates/wiki/system-cross-cutting.xml</cross-cutting-template>
67
- <guide-template>@~/.claude/agile-context-engineering/templates/wiki/guide.xml</guide-template>
68
- <decisions-template>@~/.claude/agile-context-engineering/templates/wiki/decizions.xml</decisions-template>
69
- <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
70
- <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
71
- </execution-context>
72
-
73
- <output>
74
- <objective>
75
- Resolve the target subsystem, load system-wide wiki context, and determine whether
76
- to create, update, or recreate per-subsystem wiki documents. Then:
77
-
78
- 1. Spawn ace-wiki-mapper agents to produce structure and architecture documents.
79
- 2. Update system-structure.md if this subsystem was not previously listed there.
80
- 3. Update the subsystem responsibility matrix in system-architecture.md if missing.
81
- 4. Run module discovery trace E2E flows, identify patterns, find cross-cutting
82
- concerns by reading actual source code. Produce module-discovery.md artifact.
83
- 5. For EACH discovered module, run map-story in file mode to create or update
84
- knowledge documentation (systems/, patterns/, cross-cutting/, guides/, decisions/).
85
- </objective>
86
-
87
- <artifacts>
88
- - .docs/wiki/subsystems/[subsystem-name]/structure.md
89
- - .docs/wiki/subsystems/[subsystem-name]/architecture.md
90
- - .docs/wiki/subsystems/[subsystem-name]/systems/*.md (created/updated by map-story)
91
- - .docs/wiki/subsystems/[subsystem-name]/patterns/*.md (created/updated by map-story)
92
- - .docs/wiki/subsystems/[subsystem-name]/cross-cutting/*.md (created/updated by map-story)
93
- - .docs/wiki/subsystems/[subsystem-name]/guides/*.md (created/updated by map-story)
94
- - .docs/wiki/subsystems/[subsystem-name]/decisions/*.md (created/updated by map-story)
95
- - .ace/artifacts/subsystems/[subsystem-name]/module-discovery/module-discovery.md
96
- - .ace/artifacts/subsystems/[subsystem-name]/module-discovery/existing-docs-inventory.md (if existing-docs directory provided)
97
- - .docs/wiki/system-wide/system-structure.md (subsystem entry added if new)
98
- - .docs/wiki/system-wide/system-architecture.md (subsystem responsibility matrix updated if missing)
99
- </artifacts>
100
- </output>
101
-
102
- <process>
103
- Execute the map-subsystem workflow from
104
- `@~/.claude/agile-context-engineering/workflows/map-subsystem.xml` end-to-end.
105
- Preserve all workflow gates (validation, user questions, commits).
106
-
107
- The workflow has 13 steps:
108
- 1-5: Setup, context loading, subsystem resolution, document triage, directory creation
109
- 6-8: Structure + architecture agents (parallel) + collect results
110
- 9: Update system-wide docs (system-structure.md, system-architecture.md)
111
- 10: Module discovery (3 parallel discovery agents + 1 synthesis agent)
112
- 11: Knowledge documentation run map-story for EACH discovered module (sequential)
113
- 12: Verify and commit all documents
114
- 13: Completion report
115
-
116
- Steps 10-11 are CRITICAL — they produce the knowledge docs (systems/, patterns/,
117
- cross-cutting/, guides/, decisions/) that AI agents need for future implementations.
118
- Do NOT skip them.
119
- </process>
120
-
121
- <next-steps>
122
- **After this command, `/clear` first for a fresh context window, then:**
123
-
124
- For each subsystem found and defined in the Subsystem Responsibility Matrix,
125
- suggest a `/ace:map-subsystem` command. Example:
126
- - `/ace:map-subsystem subsystem="src/api"` Map the API subsystem
127
- - `/ace:map-subsystem subsystem="src/auth"` Map the Auth subsystem
128
- - `/ace:map-subsystem subsystem="src/db"` — Map the DB subsystem
129
- (list one per subsystem discovered during this command's execution)
130
-
131
- Also suggest:
132
- - `/ace:init-coding-standards` — Define prescriptive coding standards
133
- - `/ace:help` — Check project initialization status and next steps
134
- - Review and edit files in `.docs/wiki/system-wide/` anytime
135
- </next-steps>
136
-
137
- </command>
138
- ```
1
+ ---
2
+ name: ace:map-subsystem
3
+ description: Map a subsystem's structure, architecture, and knowledge docs into .docs/wiki/subsystems/[name]/
4
+ argument-hint: "subsystem='src/api' (or subsystem name) existing-docs=comma separated paths | directory"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Task
12
+ - AskUserQuestion
13
+ ---
14
+
15
+ ```xml
16
+ <command>
17
+
18
+ <execution-time>
19
+ <runs-after>
20
+ <trigger>After /ace:map-system — drill into individual subsystems</trigger>
21
+ <trigger>Anytime to refresh an existing subsystem's wiki documents</trigger>
22
+ <trigger>When a new subsystem is added and needs to be documented</trigger>
23
+ </runs-after>
24
+ <use-when>
25
+ <condition>A subsystem has not yet been documented in `.docs/wiki/subsystems/`</condition>
26
+ <condition>An existing subsystem's docs are stale after a significant refactor</condition>
27
+ <condition>You want a deep-dive view of a specific subsystem's internals (components, flows, data)</condition>
28
+ </use-when>
29
+ </execution-time>
30
+
31
+ <input>
32
+ <flags>
33
+ </flags>
34
+
35
+ <parameters>
36
+ <required>
37
+ <param name="subsystem" type="path | text">
38
+ Path to the subsystem (e.g., `src/api`) or its name.
39
+ If not provided, pause execution and ask the user for it.
40
+ If provided but ambiguous, or not found in the codebase, ask clarifying questions.
41
+ </param>
42
+ </required>
43
+
44
+ <optional>
45
+ <param name="existing-docs" type="comma-separated paths or directories">
46
+ Pre-existing documentation relevant to this subsystem. Accepts file paths,
47
+ directory paths, or a mix of both. When a directory is provided, recursively
48
+ discover all files within it (including nested subdirectories).
49
+ All resolved file paths are passed through to every map-story invocation
50
+ (file mode) alongside any per-module docs discovered during module-discovery.
51
+ Use this when the caller already knows about documentation that should
52
+ inform knowledge-doc generation.
53
+ </param>
54
+ </optional>
55
+ </parameters>
56
+ </input>
57
+
58
+ <execution-context>
59
+ <map-subsystem-workflow>@~/.claude/agile-context-engineering/workflows/map-subsystem.xml</map-subsystem-workflow>
60
+ <subsystem-structure-template>@~/.claude/agile-context-engineering/templates/wiki/subsystem-structure.xml</subsystem-structure-template>
61
+ <subsystem-architecture-template>@~/.claude/agile-context-engineering/templates/wiki/subsystem-architecture.xml</subsystem-architecture-template>
62
+ <module-discovery-template>@~/.claude/agile-context-engineering/templates/wiki/module-discovery.xml</module-discovery-template>
63
+ <map-story-workflow>@~/.claude/agile-context-engineering/workflows/map-story.xml</map-story-workflow>
64
+ <system-template>@~/.claude/agile-context-engineering/templates/wiki/system.xml</system-template>
65
+ <pattern-template>@~/.claude/agile-context-engineering/templates/wiki/pattern.xml</pattern-template>
66
+ <cross-cutting-template>@~/.claude/agile-context-engineering/templates/wiki/system-cross-cutting.xml</cross-cutting-template>
67
+ <guide-template>@~/.claude/agile-context-engineering/templates/wiki/guide.xml</guide-template>
68
+ <walkthrough-template>@~/.claude/agile-context-engineering/templates/wiki/walkthrough.xml</walkthrough-template>
69
+ <decisions-template>@~/.claude/agile-context-engineering/templates/wiki/decizions.xml</decisions-template>
70
+ <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
71
+ <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
72
+ </execution-context>
73
+
74
+ <output>
75
+ <objective>
76
+ Resolve the target subsystem, load system-wide wiki context, and determine whether
77
+ to create, update, or recreate per-subsystem wiki documents. Then:
78
+
79
+ 1. Spawn ace-wiki-mapper agents to produce structure and architecture documents.
80
+ 2. Update system-structure.md if this subsystem was not previously listed there.
81
+ 3. Update the subsystem responsibility matrix in system-architecture.md if missing.
82
+ 4. Run module discovery trace E2E flows, identify patterns, find cross-cutting
83
+ concerns by reading actual source code. Produce module-discovery.md artifact.
84
+ 5. For EACH discovered module, run map-story in file mode to create or update
85
+ knowledge documentation (systems/, patterns/, cross-cutting/, guides/, walkthroughs/, decisions/).
86
+ </objective>
87
+
88
+ <artifacts>
89
+ - .docs/wiki/subsystems/[subsystem-name]/structure.md
90
+ - .docs/wiki/subsystems/[subsystem-name]/architecture.md
91
+ - .docs/wiki/subsystems/[subsystem-name]/systems/*.md (created/updated by map-story)
92
+ - .docs/wiki/subsystems/[subsystem-name]/patterns/*.md (created/updated by map-story)
93
+ - .docs/wiki/subsystems/[subsystem-name]/cross-cutting/*.md (created/updated by map-story)
94
+ - .docs/wiki/subsystems/[subsystem-name]/guides/*.md (created/updated by map-story)
95
+ - .docs/wiki/subsystems/[subsystem-name]/walkthroughs/*.md (created/updated by map-story)
96
+ - .docs/wiki/subsystems/[subsystem-name]/decisions/*.md (created/updated by map-story)
97
+ - .ace/artifacts/subsystems/[subsystem-name]/module-discovery/module-discovery.md
98
+ - .ace/artifacts/subsystems/[subsystem-name]/module-discovery/existing-docs-inventory.md (if existing-docs directory provided)
99
+ - .docs/wiki/system-wide/system-structure.md (subsystem entry added if new)
100
+ - .docs/wiki/system-wide/system-architecture.md (subsystem responsibility matrix updated if missing)
101
+ </artifacts>
102
+ </output>
103
+
104
+ <process>
105
+ Execute the map-subsystem workflow from
106
+ `@~/.claude/agile-context-engineering/workflows/map-subsystem.xml` end-to-end.
107
+ Preserve all workflow gates (validation, user questions, commits).
108
+
109
+ The workflow has 13 steps:
110
+ 1-5: Setup, context loading, subsystem resolution, document triage, directory creation
111
+ 6-8: Structure + architecture agents (parallel) + collect results
112
+ 9: Update system-wide docs (system-structure.md, system-architecture.md)
113
+ 10: Module discovery (3 parallel discovery agents + 1 synthesis agent)
114
+ 11: Knowledge documentation — run map-story for EACH discovered module (sequential)
115
+ 12: Verify and commit all documents
116
+ 13: Completion report
117
+
118
+ Steps 10-11 are CRITICAL — they produce the knowledge docs (systems/, patterns/,
119
+ cross-cutting/, guides/, walkthroughs/, decisions/) that AI agents need for future implementations.
120
+ Do NOT skip them.
121
+ </process>
122
+
123
+ <next-steps>
124
+ **After this command, `/clear` first for a fresh context window, then:**
125
+
126
+ For each subsystem found and defined in the Subsystem Responsibility Matrix,
127
+ suggest a `/ace:map-subsystem` command. Example:
128
+ - `/ace:map-subsystem subsystem="src/api"` — Map the API subsystem
129
+ - `/ace:map-subsystem subsystem="src/auth"` Map the Auth subsystem
130
+ - `/ace:map-subsystem subsystem="src/db"` — Map the DB subsystem
131
+ (list one per subsystem discovered during this command's execution)
132
+
133
+ Also suggest:
134
+ - `/ace:init-coding-standards` Define prescriptive coding standards
135
+ - `/ace:help` — Check project initialization status and next steps
136
+ - Review and edit files in `.docs/wiki/system-wide/` anytime
137
+ </next-steps>
138
+
139
+ </command>
140
+ ```
@@ -1,92 +1,92 @@
1
- ---
2
- name: ace:map-system
3
- description: Map system-wide codebase structure, architecture, and testing framework into .docs/wiki/system-wide/
4
- argument-hint: "[optional: references='existing artifacts and documents to be considered alongside the codebase']"
5
- allowed-tools:
6
- - Read
7
- - Bash
8
- - Glob
9
- - Grep
10
- - Write
11
- - Task
12
- - AskUserQuestion
13
- ---
14
-
15
- ```xml
16
- <command>
17
-
18
- <execution-time>
19
- <runs-after>
20
- <trigger>Before /ace:help (brownfield codebases) — understand existing code first</trigger>
21
- <trigger>After /ace:help (greenfield codebases) — document architecture decisions</trigger>
22
- <trigger>Anytime to refresh system-wide wiki documents</trigger>
23
- </runs-after>
24
- <use-when>
25
- <condition>Onboarding to an existing codebase (brownfield — analyzes code automatically)</condition>
26
- <condition>Starting a new project and need to document architecture decisions (greenfield — interviews you)</condition>
27
- <condition>System-wide documents are stale or missing</condition>
28
- <condition>After major refactoring that changed subsystem boundaries or tech stack</condition>
29
- </use-when>
30
- </execution-time>
31
-
32
- <input>
33
- <flags>
34
- </flags>
35
-
36
- <parameters>
37
- <required>
38
- </required>
39
-
40
- <optional>
41
- <param name="references" type="file | text">
42
- Existing architecture docs, ADRs, or design notes
43
- to consider alongside the codebase analysis. Absorbed before analysis begins.
44
- </param>
45
- </optional>
46
- </parameters>
47
- </input>
48
-
49
- <execution-context>
50
- <map-system-workflow>@~/.claude/agile-context-engineering/workflows/map-system.xml</map-system-workflow>
51
- <system-structure-template>@~/.claude/agile-context-engineering/templates/wiki/system-structure.xml</system-structure-template>
52
- <system-architecture-template>@~/.claude/agile-context-engineering/templates/wiki/system-architecture.xml</system-architecture-template>
53
- <testing-framework-template>@~/.claude/agile-context-engineering/templates/wiki/testing-framework.xml</testing-framework-template>
54
- <wiki-readme-template>@~/.claude/agile-context-engineering/templates/wiki/wiki-readme.xml</wiki-readme-template>
55
- <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
56
- <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
57
- </execution-context>
58
-
59
- <output>
60
- <objective>
61
- Detect brownfield/greenfield status and existing wiki state. For each system-wide
62
- document (structure, architecture, testing), determine whether to create, update,
63
- recreate, scaffold, or skip. Spawn ace-wiki-mapper agents to produce documents.
64
- For greenfield architecture, conduct deep questioning before generating.
65
- Add CLAUDE.md instructions to keep wiki current with future code changes.
66
- </objective>
67
-
68
- <artifacts>
69
- - .docs/wiki/wiki-readme.md (created if not already present)
70
- - .docs/wiki/system-wide/system-structure.md
71
- - .docs/wiki/system-wide/system-architecture.md
72
- - .docs/wiki/system-wide/testing-framework.md
73
- - CLAUDE.md (wiki maintenance instructions appended)
74
- </artifacts>
75
- </output>
76
-
77
- <process>
78
- Execute the map-system workflow from
79
- `@~/.claude/agile-context-engineering/workflows/map-system.xml` end-to-end.
80
- Preserve all workflow gates (validation, user questions, commits).
81
- </process>
82
-
83
- <next-steps>
84
- **After this command, `/clear` first for a fresh context window, then:**
85
- - `/ace:map-subsystems` — Map individual subsystem internals (structure, dependencies)
86
- - `/ace:init-coding-standards` — Define prescriptive coding standards
87
- - `/ace:help` — Check project initialization status and next steps
88
- - Review and edit files in `.docs/wiki/system-wide/` anytime
89
- </next-steps>
90
-
91
- </command>
92
- ```
1
+ ---
2
+ name: ace:map-system
3
+ description: Map system-wide codebase structure, architecture, and testing framework into .docs/wiki/system-wide/
4
+ argument-hint: "[optional: references='existing artifacts and documents to be considered alongside the codebase']"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Task
12
+ - AskUserQuestion
13
+ ---
14
+
15
+ ```xml
16
+ <command>
17
+
18
+ <execution-time>
19
+ <runs-after>
20
+ <trigger>Before /ace:help (brownfield codebases) — understand existing code first</trigger>
21
+ <trigger>After /ace:help (greenfield codebases) — document architecture decisions</trigger>
22
+ <trigger>Anytime to refresh system-wide wiki documents</trigger>
23
+ </runs-after>
24
+ <use-when>
25
+ <condition>Onboarding to an existing codebase (brownfield — analyzes code automatically)</condition>
26
+ <condition>Starting a new project and need to document architecture decisions (greenfield — interviews you)</condition>
27
+ <condition>System-wide documents are stale or missing</condition>
28
+ <condition>After major refactoring that changed subsystem boundaries or tech stack</condition>
29
+ </use-when>
30
+ </execution-time>
31
+
32
+ <input>
33
+ <flags>
34
+ </flags>
35
+
36
+ <parameters>
37
+ <required>
38
+ </required>
39
+
40
+ <optional>
41
+ <param name="references" type="file | text">
42
+ Existing architecture docs, ADRs, or design notes
43
+ to consider alongside the codebase analysis. Absorbed before analysis begins.
44
+ </param>
45
+ </optional>
46
+ </parameters>
47
+ </input>
48
+
49
+ <execution-context>
50
+ <map-system-workflow>@~/.claude/agile-context-engineering/workflows/map-system.xml</map-system-workflow>
51
+ <system-structure-template>@~/.claude/agile-context-engineering/templates/wiki/system-structure.xml</system-structure-template>
52
+ <system-architecture-template>@~/.claude/agile-context-engineering/templates/wiki/system-architecture.xml</system-architecture-template>
53
+ <testing-framework-template>@~/.claude/agile-context-engineering/templates/wiki/testing-framework.xml</testing-framework-template>
54
+ <wiki-readme-template>@~/.claude/agile-context-engineering/templates/wiki/wiki-readme.xml</wiki-readme-template>
55
+ <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
56
+ <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
57
+ </execution-context>
58
+
59
+ <output>
60
+ <objective>
61
+ Detect brownfield/greenfield status and existing wiki state. For each system-wide
62
+ document (structure, architecture, testing), determine whether to create, update,
63
+ recreate, scaffold, or skip. Spawn ace-wiki-mapper agents to produce documents.
64
+ For greenfield architecture, conduct deep questioning before generating.
65
+ Add CLAUDE.md instructions to keep wiki current with future code changes.
66
+ </objective>
67
+
68
+ <artifacts>
69
+ - .docs/wiki/wiki-readme.md (created if not already present)
70
+ - .docs/wiki/system-wide/system-structure.md
71
+ - .docs/wiki/system-wide/system-architecture.md
72
+ - .docs/wiki/system-wide/testing-framework.md
73
+ - CLAUDE.md (wiki maintenance instructions appended)
74
+ </artifacts>
75
+ </output>
76
+
77
+ <process>
78
+ Execute the map-system workflow from
79
+ `@~/.claude/agile-context-engineering/workflows/map-system.xml` end-to-end.
80
+ Preserve all workflow gates (validation, user questions, commits).
81
+ </process>
82
+
83
+ <next-steps>
84
+ **After this command, `/clear` first for a fresh context window, then:**
85
+ - `/ace:map-subsystems` — Map individual subsystem internals (structure, dependencies)
86
+ - `/ace:init-coding-standards` — Define prescriptive coding standards
87
+ - `/ace:help` — Check project initialization status and next steps
88
+ - Review and edit files in `.docs/wiki/system-wide/` anytime
89
+ </next-steps>
90
+
91
+ </command>
92
+ ```
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: ace:map-walkthrough
3
+ description: Create deep tutorial-style flow walkthroughs in .docs/wiki/subsystems/[name]/walkthroughs/
4
+ argument-hint: "flow='tick data from bybit websocket to timescaledb' subsystem='data-ingestion' emphasis-frameworks='SignalR,Redis Streams'"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Edit
12
+ - LSP
13
+ - AskUserQuestion
14
+ - WebSearch
15
+ - WebFetch
16
+ - mcp__context7__resolve-library-id
17
+ - mcp__context7__query-docs
18
+ ---
19
+
20
+ ```xml
21
+ <command>
22
+
23
+ <execution-time>
24
+ <runs-after>
25
+ <trigger>After /ace:map-subsystem — to create deep walkthroughs for complex flows</trigger>
26
+ <trigger>Anytime a complex multi-class flow needs human-readable documentation</trigger>
27
+ <trigger>When onboarding new developers who need to understand specific flows</trigger>
28
+ </runs-after>
29
+ <use-when>
30
+ <condition>A flow spans 3+ classes across multiple architectural layers</condition>
31
+ <condition>External frameworks/libraries are involved that need explanation</condition>
32
+ <condition>An intern reading the code alone would not understand what's happening</condition>
33
+ <condition>A system doc would need paragraphs of explanation with code snippets</condition>
34
+ </use-when>
35
+ </execution-time>
36
+
37
+ <input>
38
+ <flags>
39
+ </flags>
40
+
41
+ <parameters>
42
+ <required>
43
+ <param name="flow" type="text">
44
+ Natural language description of the end-to-end flow — WHERE it starts
45
+ and WHERE it ends. The agent finds the entry point, follows every call
46
+ through the entire code, and traces it to the exit point.
47
+
48
+ E.g.:
49
+ - "tick data from bybit websocket to timescaledb"
50
+ - "user message from SignalR hub until LLM response is sent back"
51
+ - "order placement from API endpoint to payment confirmation"
52
+
53
+ If not provided, pause and ask the user.
54
+ </param>
55
+ <param name="subsystem" type="path | text">
56
+ Subsystem where the walkthrough wiki file is placed.
57
+ The flow itself may span MULTIPLE subsystems — the agent follows
58
+ the code wherever it goes. This parameter only determines the
59
+ wiki location: `.docs/wiki/subsystems/[subsystem]/walkthroughs/`.
60
+ If not provided, pause and ask the user.
61
+ </param>
62
+ </required>
63
+
64
+ <optional>
65
+ <param name="emphasis-frameworks" type="csv">
66
+ Comma-separated frameworks/libraries/APIs/SDKs that should receive deep
67
+ explanation throughout the walkthrough. When specified:
68
+ - EVERY step touching the framework gets a framework info box
69
+ - ALL code interacting with the framework is shown and explained
70
+ - The Framework Concepts Reference table becomes MANDATORY
71
+
72
+ Each entry is EITHER:
73
+ - A name (agent researches via WebSearch/context7):
74
+ "SignalR" or "SignalR,EF Core"
75
+ - A file path or URL to documentation (agent reads the page, follows
76
+ internal links to find pages covering the specific concepts used in
77
+ the code, and infers the framework name from content):
78
+ "https://learn.microsoft.com/aspnet/signalr/overview" or "docs/signalr-guide.md"
79
+ - A mix of both:
80
+ "SignalR,docs/custom-redis-wrapper.md,EF Core"
81
+ </param>
82
+ </optional>
83
+ </parameters>
84
+ </input>
85
+
86
+ <execution-context>
87
+ <map-walkthrough-workflow>@~/.claude/agile-context-engineering/workflows/map-walkthrough.xml</map-walkthrough-workflow>
88
+ <walkthrough-template>@~/.claude/agile-context-engineering/templates/wiki/walkthrough.xml</walkthrough-template>
89
+ <questioning>@~/.claude/agile-context-engineering/utils/questioning.xml</questioning>
90
+ <ui-formatting>@~/.claude/agile-context-engineering/utils/ui-formatting.md</ui-formatting>
91
+ </execution-context>
92
+
93
+ <output>
94
+ <objective>
95
+ Create or update a deep tutorial-style walkthrough that traces a flow end-to-end.
96
+
97
+ The agent reads the flow description, finds the entry point in the codebase,
98
+ then follows EVERY SINGLE CALL through the entire code — handler to service
99
+ to repository to database (or whatever the flow touches) — using LSP and code
100
+ reading. It discovers all files automatically, extracts emphasis framework
101
+ usages from the actual code, researches those specific concepts, and writes
102
+ the walkthrough with real code snippets and framework info boxes.
103
+ </objective>
104
+
105
+ <artifacts>
106
+ .docs/wiki/subsystems/[subsystem-name]/walkthroughs/[flow-name].md
107
+ </artifacts>
108
+ </output>
109
+
110
+ <process>
111
+ For this command use the `ace-wiki-mapper` agent
112
+ that's specialized in wiki exploration and documentation writing.
113
+
114
+ Execute the map-walkthrough workflow from
115
+ `@~/.claude/agile-context-engineering/workflows/map-walkthrough.xml` end-to-end.
116
+ Preserve all workflow gates (validation, user questions, commits).
117
+ </process>
118
+
119
+ <next-steps>
120
+ <step>/clear first for a fresh context window</step>
121
+ <step>/ace:map-walkthrough — create another walkthrough</step>
122
+ <step>/ace:map-subsystem [subsystem] — map or refresh an entire subsystem</step>
123
+ <step>Review and edit files in .docs/wiki/subsystems/[subsystem-name]/walkthroughs/</step>
124
+ </next-steps>
125
+
126
+ </command>
127
+ ```