agile-context-engineering 0.2.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +10 -0
- package/CHANGELOG.md +82 -0
- package/README.md +27 -18
- package/agents/ace-product-owner.md +1 -1
- package/agents/ace-technical-application-architect.md +28 -0
- package/agents/ace-wiki-mapper.md +144 -29
- package/bin/install.js +67 -63
- package/hooks/ace-check-update.js +17 -9
- package/package.json +7 -5
- package/shared/lib/ace-core.js +308 -0
- package/shared/lib/ace-core.test.js +308 -0
- package/shared/lib/ace-github.js +753 -0
- package/shared/lib/ace-story.js +400 -0
- package/shared/lib/ace-story.test.js +250 -0
- package/{agile-context-engineering → shared}/utils/ui-formatting.md +299 -299
- package/skills/execute-story/SKILL.md +110 -0
- package/skills/execute-story/script.js +305 -0
- package/skills/execute-story/script.test.js +261 -0
- package/skills/execute-story/walkthrough-template.xml +255 -0
- package/{agile-context-engineering/workflows/execute-story.xml → skills/execute-story/workflow.xml} +83 -9
- package/skills/help/SKILL.md +69 -0
- package/skills/help/script.js +318 -0
- package/skills/help/script.test.js +183 -0
- package/{agile-context-engineering/workflows/help.xml → skills/help/workflow.xml} +8 -8
- package/skills/init-coding-standards/SKILL.md +72 -0
- package/{agile-context-engineering/templates/wiki/coding-standards.xml → skills/init-coding-standards/coding-standards-template.xml} +38 -0
- package/skills/init-coding-standards/script.js +59 -0
- package/skills/init-coding-standards/script.test.js +70 -0
- package/{agile-context-engineering/workflows/init-coding-standards.xml → skills/init-coding-standards/workflow.xml} +4 -9
- package/skills/map-cross-cutting/SKILL.md +89 -0
- package/skills/map-cross-cutting/workflow.xml +330 -0
- package/skills/map-guide/SKILL.md +89 -0
- package/skills/map-guide/workflow.xml +320 -0
- package/skills/map-pattern/SKILL.md +89 -0
- package/skills/map-pattern/workflow.xml +331 -0
- package/skills/map-story/SKILL.md +127 -0
- package/skills/map-story/templates/guide.xml +137 -0
- package/skills/map-story/templates/pattern.xml +159 -0
- package/skills/map-story/templates/system-cross-cutting.xml +197 -0
- package/skills/map-story/templates/walkthrough.xml +255 -0
- package/{agile-context-engineering/workflows/map-story.xml → skills/map-story/workflow.xml} +258 -9
- package/skills/map-subsystem/SKILL.md +111 -0
- package/skills/map-subsystem/script.js +60 -0
- package/skills/map-subsystem/script.test.js +68 -0
- package/skills/map-subsystem/templates/decizions.xml +115 -0
- package/skills/map-subsystem/templates/guide.xml +137 -0
- package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/module-discovery.xml +3 -3
- package/skills/map-subsystem/templates/pattern.xml +159 -0
- package/skills/map-subsystem/templates/system-cross-cutting.xml +197 -0
- package/skills/map-subsystem/templates/system.xml +381 -0
- package/skills/map-subsystem/templates/walkthrough.xml +255 -0
- package/{agile-context-engineering/workflows/map-subsystem.xml → skills/map-subsystem/workflow.xml} +17 -21
- package/skills/map-sys-doc/SKILL.md +90 -0
- package/skills/map-sys-doc/system.xml +381 -0
- package/skills/map-sys-doc/workflow.xml +336 -0
- package/skills/map-system/SKILL.md +85 -0
- package/skills/map-system/script.js +84 -0
- package/skills/map-system/script.test.js +73 -0
- package/skills/map-system/templates/wiki-readme.xml +297 -0
- package/{agile-context-engineering/workflows/map-system.xml → skills/map-system/workflow.xml} +11 -16
- package/skills/map-walkthrough/SKILL.md +92 -0
- package/skills/map-walkthrough/walkthrough.xml +255 -0
- package/skills/map-walkthrough/workflow.xml +457 -0
- package/skills/plan-backlog/SKILL.md +75 -0
- package/skills/plan-backlog/script.js +136 -0
- package/skills/plan-backlog/script.test.js +83 -0
- package/{agile-context-engineering/workflows/plan-backlog.xml → skills/plan-backlog/workflow.xml} +13 -21
- package/skills/plan-feature/SKILL.md +76 -0
- package/skills/plan-feature/script.js +148 -0
- package/skills/plan-feature/script.test.js +80 -0
- package/{agile-context-engineering/workflows/plan-feature.xml → skills/plan-feature/workflow.xml} +21 -29
- package/skills/plan-product-vision/SKILL.md +75 -0
- package/skills/plan-product-vision/script.js +60 -0
- package/skills/plan-product-vision/script.test.js +69 -0
- package/{agile-context-engineering/workflows/plan-product-vision.xml → skills/plan-product-vision/workflow.xml} +4 -9
- package/skills/plan-story/SKILL.md +116 -0
- package/skills/plan-story/script.js +326 -0
- package/skills/plan-story/script.test.js +240 -0
- package/skills/plan-story/story-template.xml +451 -0
- package/{agile-context-engineering/workflows/plan-story.xml → skills/plan-story/workflow.xml} +1285 -909
- package/skills/research-external-solution/SKILL.md +107 -0
- package/skills/research-external-solution/script.js +238 -0
- package/skills/research-external-solution/script.test.js +134 -0
- package/{agile-context-engineering/workflows/research-external-solution.xml → skills/research-external-solution/workflow.xml} +4 -6
- package/skills/research-integration-solution/SKILL.md +98 -0
- package/{agile-context-engineering/templates/product/story-integration-solution.xml → skills/research-integration-solution/integration-solution-template.xml} +1 -0
- package/skills/research-integration-solution/script.js +231 -0
- package/skills/research-integration-solution/script.test.js +134 -0
- package/{agile-context-engineering/workflows/research-integration-solution.xml → skills/research-integration-solution/workflow.xml} +4 -5
- package/skills/research-story-wiki/SKILL.md +92 -0
- package/skills/research-story-wiki/script.js +231 -0
- package/skills/research-story-wiki/script.test.js +138 -0
- package/{agile-context-engineering/templates/product/story-wiki.xml → skills/research-story-wiki/story-wiki-template.xml} +4 -0
- package/{agile-context-engineering/workflows/research-story-wiki.xml → skills/research-story-wiki/workflow.xml} +5 -6
- package/skills/research-technical-solution/SKILL.md +103 -0
- package/skills/research-technical-solution/script.js +231 -0
- package/skills/research-technical-solution/script.test.js +134 -0
- package/{agile-context-engineering/workflows/research-technical-solution.xml → skills/research-technical-solution/workflow.xml} +4 -5
- package/skills/review-story/SKILL.md +100 -0
- package/skills/review-story/script.js +257 -0
- package/skills/review-story/script.test.js +169 -0
- package/skills/review-story/story-template.xml +451 -0
- package/{agile-context-engineering/workflows/review-story.xml → skills/review-story/workflow.xml} +1 -3
- package/skills/update/SKILL.md +53 -0
- package/{agile-context-engineering/workflows/update.xml → skills/update/workflow.xml} +237 -207
- package/agile-context-engineering/src/ace-tools.js +0 -2881
- package/agile-context-engineering/src/ace-tools.test.js +0 -1089
- package/agile-context-engineering/templates/_command.md +0 -54
- package/agile-context-engineering/templates/_workflow.xml +0 -17
- package/agile-context-engineering/templates/config.json +0 -0
- package/agile-context-engineering/templates/product/integration-solution.xml +0 -0
- package/agile-context-engineering/templates/wiki/wiki-readme.xml +0 -276
- package/commands/ace/execute-story.md +0 -137
- package/commands/ace/help.md +0 -93
- package/commands/ace/init-coding-standards.md +0 -83
- package/commands/ace/map-story.md +0 -156
- package/commands/ace/map-subsystem.md +0 -138
- package/commands/ace/map-system.md +0 -92
- package/commands/ace/plan-backlog.md +0 -83
- package/commands/ace/plan-feature.md +0 -89
- package/commands/ace/plan-product-vision.md +0 -81
- package/commands/ace/plan-story.md +0 -145
- package/commands/ace/research-external-solution.md +0 -138
- package/commands/ace/research-integration-solution.md +0 -135
- package/commands/ace/research-story-wiki.md +0 -116
- package/commands/ace/research-technical-solution.md +0 -147
- package/commands/ace/review-story.md +0 -109
- package/commands/ace/update.md +0 -54
- /package/{agile-context-engineering → shared}/utils/questioning.xml +0 -0
- /package/{agile-context-engineering/templates/product/story.xml → skills/execute-story/story-template.xml} +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-cross-cutting}/system-cross-cutting.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-guide}/guide.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-pattern}/pattern.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/decizions.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/system.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/tech-debt-index.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-architecture.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-structure.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-architecture.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-structure.xml +0 -0
- /package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/testing-framework.xml +0 -0
- /package/{agile-context-engineering/templates/product/product-backlog.xml → skills/plan-backlog/product-backlog-template.xml} +0 -0
- /package/{agile-context-engineering/templates/product/feature.xml → skills/plan-feature/feature-template.xml} +0 -0
- /package/{agile-context-engineering/templates/product/product-vision.xml → skills/plan-product-vision/product-vision-template.xml} +0 -0
- /package/{agile-context-engineering/templates/product/external-solution.xml → skills/research-external-solution/external-solution-template.xml} +0 -0
- /package/{agile-context-engineering/templates/product/story-technical-solution.xml → skills/research-technical-solution/technical-solution-template.xml} +0 -0
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
<workflow>
|
|
2
|
+
|
|
3
|
+
<purpose>
|
|
4
|
+
Create a deep tutorial-style walkthrough document in
|
|
5
|
+
`.docs/wiki/subsystems/[subsystem-name]/walkthroughs/`.
|
|
6
|
+
|
|
7
|
+
A walkthrough traces a single end-to-end flow from entry point to exit point, showing
|
|
8
|
+
ACTUAL code from the codebase at every step. Written for humans (especially new
|
|
9
|
+
developers) who need to UNDERSTAND a complex flow before working with it.
|
|
10
|
+
|
|
11
|
+
This workflow is executed directly — NO sub-agents are spawned.
|
|
12
|
+
The executing agent does everything: finding the entry point, LSP-driven flow tracing,
|
|
13
|
+
code reading, framework research, and document writing.
|
|
14
|
+
</purpose>
|
|
15
|
+
|
|
16
|
+
<mandatory-context>
|
|
17
|
+
Read all files referenced by the invoking command's execution-context before starting.
|
|
18
|
+
Also read any document or text passed as parameter ($ARGUMENTS) in the invoking command.
|
|
19
|
+
</mandatory-context>
|
|
20
|
+
|
|
21
|
+
<process>
|
|
22
|
+
|
|
23
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
24
|
+
<!-- STEP 1: SETUP AND VALIDATE -->
|
|
25
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
26
|
+
|
|
27
|
+
<step name="setup" order="1">
|
|
28
|
+
|
|
29
|
+
<substep order="1.1" name="display-banner">
|
|
30
|
+
Display stage banner:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
╔══════════════════════════════════════════════════╗
|
|
34
|
+
║ ACE > Map Walkthrough ║
|
|
35
|
+
╚══════════════════════════════════════════════════╝
|
|
36
|
+
```
|
|
37
|
+
</substep>
|
|
38
|
+
|
|
39
|
+
<substep order="1.2" name="parse-and-validate">
|
|
40
|
+
Parse $ARGUMENTS for: `flow`, `subsystem`, `emphasis-frameworks`.
|
|
41
|
+
|
|
42
|
+
**If `flow` is missing:** Ask the user:
|
|
43
|
+
- header: "Walkthrough"
|
|
44
|
+
- question: "Describe the flow to trace — where does it START and where does it END?\nE.g., 'tick data from bybit websocket to timescaledb'"
|
|
45
|
+
|
|
46
|
+
**If `subsystem` is missing:** Ask the user:
|
|
47
|
+
- header: "Walkthrough"
|
|
48
|
+
- question: "Which subsystem should this walkthrough live under?\n(The flow may span multiple subsystems — this just determines the wiki location.)"
|
|
49
|
+
</substep>
|
|
50
|
+
|
|
51
|
+
<substep order="1.3" name="resolve-subsystem">
|
|
52
|
+
Resolve the subsystem. Check if `.docs/wiki/subsystems/[subsystem-name]/` exists.
|
|
53
|
+
|
|
54
|
+
**If not found:**
|
|
55
|
+
```
|
|
56
|
+
! No wiki found for subsystem "[subsystem]".
|
|
57
|
+
Run /ace:map-subsystem first to create the subsystem wiki.
|
|
58
|
+
```
|
|
59
|
+
Exit.
|
|
60
|
+
|
|
61
|
+
Ensure walkthroughs directory exists:
|
|
62
|
+
```bash
|
|
63
|
+
mkdir -p .docs/wiki/subsystems/[subsystem_name]/walkthroughs
|
|
64
|
+
```
|
|
65
|
+
</substep>
|
|
66
|
+
|
|
67
|
+
Display:
|
|
68
|
+
```
|
|
69
|
+
i Flow: [flow description]
|
|
70
|
+
Subsystem: [subsystem-name]
|
|
71
|
+
Emphasis frameworks: [list, or "none"]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Continue to step 2.
|
|
75
|
+
</step>
|
|
76
|
+
|
|
77
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
78
|
+
<!-- STEP 2: CHECK FOR EXISTING WALKTHROUGH -->
|
|
79
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
80
|
+
|
|
81
|
+
<step name="check-existing" order="2">
|
|
82
|
+
|
|
83
|
+
Scan for existing walkthroughs:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Glob(pattern='*.md', path='.docs/wiki/subsystems/[subsystem_name]/walkthroughs')
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**If existing walkthroughs found:**
|
|
90
|
+
Read their titles (first line of each file). Check if any covers the same
|
|
91
|
+
or overlapping flow.
|
|
92
|
+
|
|
93
|
+
**If overlap detected:**
|
|
94
|
+
Use AskUserQuestion:
|
|
95
|
+
- header: "Walkthrough"
|
|
96
|
+
- question: "An existing walkthrough may cover a similar flow:\n\n- `[existing-file]`: [title]\n\nShould I update the existing walkthrough or create a new one?"
|
|
97
|
+
- options:
|
|
98
|
+
- "Update existing" — set MODE = update, set TARGET_FILE = existing path
|
|
99
|
+
- "Create new" — set MODE = create
|
|
100
|
+
|
|
101
|
+
**If no overlap or no existing walkthroughs:** Set MODE = create.
|
|
102
|
+
|
|
103
|
+
**If MODE = create:**
|
|
104
|
+
Derive file name from flow description in kebab-case.
|
|
105
|
+
Set TARGET_FILE = `.docs/wiki/subsystems/[subsystem_name]/walkthroughs/[flow-name].md`
|
|
106
|
+
|
|
107
|
+
Continue to step 3.
|
|
108
|
+
</step>
|
|
109
|
+
|
|
110
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
111
|
+
<!-- STEP 3: FIND ENTRY POINT AND TRACE THE ENTIRE FLOW -->
|
|
112
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
113
|
+
|
|
114
|
+
<step name="trace-flow" order="3">
|
|
115
|
+
|
|
116
|
+
The flow description tells you WHERE it starts and WHERE it ends.
|
|
117
|
+
Your job: find the entry point in the codebase, then follow EVERY SINGLE CALL
|
|
118
|
+
through the entire code until you reach the exit point.
|
|
119
|
+
|
|
120
|
+
**The flow may cross subsystem boundaries.** Do NOT stop tracing when
|
|
121
|
+
the code leaves the specified subsystem. Follow the call chain wherever
|
|
122
|
+
it goes — across projects, services, layers, subsystems. The `subsystem`
|
|
123
|
+
parameter only determines where the walkthrough FILE is placed.
|
|
124
|
+
|
|
125
|
+
<substep order="3.1" name="find-entry-point">
|
|
126
|
+
Read the subsystem's structure.md and architecture.md for context.
|
|
127
|
+
|
|
128
|
+
From the flow description, identify what the entry point is:
|
|
129
|
+
- A websocket handler? Grep for websocket/connection setup.
|
|
130
|
+
- An API endpoint? Grep for route/controller definitions.
|
|
131
|
+
- A SignalR hub method? Grep for Hub classes.
|
|
132
|
+
- A message consumer? Grep for queue/topic subscriptions.
|
|
133
|
+
- A scheduled job? Grep for cron/timer/scheduler setup.
|
|
134
|
+
|
|
135
|
+
Use Grep and Glob to find the specific file and class/method that
|
|
136
|
+
receives the initial input described in the flow.
|
|
137
|
+
|
|
138
|
+
Read the file. Confirm you have the right entry point.
|
|
139
|
+
|
|
140
|
+
**If you cannot confidently identify the entry point:** ASK the user.
|
|
141
|
+
Use AskUserQuestion:
|
|
142
|
+
- header: "Walkthrough"
|
|
143
|
+
- question: "I found these possible entry points for the flow:\n\n[candidates]\n\nWhich one starts the flow you described? Or point me to the right file/class."
|
|
144
|
+
|
|
145
|
+
**If the flow description is ambiguous or could mean multiple things:** ASK.
|
|
146
|
+
Do NOT guess. A wrong entry point means the entire walkthrough is wrong.
|
|
147
|
+
</substep>
|
|
148
|
+
|
|
149
|
+
<substep order="3.2" name="follow-every-call">
|
|
150
|
+
From the entry point, follow the COMPLETE call chain.
|
|
151
|
+
|
|
152
|
+
**THE RULE: follow EVERY significant method call until the flow terminates.**
|
|
153
|
+
|
|
154
|
+
WebSocket handler calls a service method? Follow it.
|
|
155
|
+
Service calls a repository? Follow it.
|
|
156
|
+
Repository calls the database? Follow it.
|
|
157
|
+
Service emits an event? Follow the handler.
|
|
158
|
+
Handler calls another service? Follow it.
|
|
159
|
+
|
|
160
|
+
For each method you encounter:
|
|
161
|
+
1. Use LSP Go to Definition to find where it lives
|
|
162
|
+
2. Read the target file and method
|
|
163
|
+
3. Identify what IT calls next in the flow
|
|
164
|
+
4. Follow that call too
|
|
165
|
+
5. Use LSP Find References when tracing callbacks, events, or interface implementations
|
|
166
|
+
6. Use Grep as fallback when LSP cannot resolve (dynamic dispatch, config-based wiring, DI)
|
|
167
|
+
|
|
168
|
+
**Stop when:** data reaches its final destination (database write, HTTP response
|
|
169
|
+
sent, message published to external system, UI updated) as described in the flow.
|
|
170
|
+
|
|
171
|
+
**If the call chain branches or you're unsure which path is the flow:** ASK.
|
|
172
|
+
Use AskUserQuestion:
|
|
173
|
+
- header: "Walkthrough"
|
|
174
|
+
- question: "The flow branches at [class.method]:\n\n[describe branches]\n\nWhich path should I follow?"
|
|
175
|
+
|
|
176
|
+
**If a call cannot be resolved** (dynamic dispatch, reflection, config-based):
|
|
177
|
+
Note it and ask the user only if it blocks the trace. Otherwise grep for
|
|
178
|
+
likely implementations and pick the one that matches the flow description.
|
|
179
|
+
</substep>
|
|
180
|
+
|
|
181
|
+
<substep order="3.3" name="build-flow-steps">
|
|
182
|
+
Build an ordered list of every step in the flow:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
FLOW_STEPS = [
|
|
186
|
+
{ file, class, method, code_snippet, calls_next, framework_interactions },
|
|
187
|
+
...
|
|
188
|
+
]
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
For each step:
|
|
192
|
+
- Read the full surrounding context (constructor, dependencies, class hierarchy)
|
|
193
|
+
- Extract a FOCUSED code snippet (the relevant portion, `// ...` for omitted parts)
|
|
194
|
+
- Note any emphasis framework interactions (classes, methods, APIs from those frameworks)
|
|
195
|
+
</substep>
|
|
196
|
+
|
|
197
|
+
Continue to step 4.
|
|
198
|
+
</step>
|
|
199
|
+
|
|
200
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
201
|
+
<!-- STEP 4: RESEARCH EMPHASIS FRAMEWORK USAGES -->
|
|
202
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
203
|
+
|
|
204
|
+
<step name="research-frameworks" order="4">
|
|
205
|
+
|
|
206
|
+
<variant condition="no emphasis-frameworks specified">
|
|
207
|
+
Skip to step 5.
|
|
208
|
+
</variant>
|
|
209
|
+
|
|
210
|
+
<variant condition="emphasis-frameworks specified">
|
|
211
|
+
|
|
212
|
+
<substep order="4.1" name="extract-usages">
|
|
213
|
+
From FLOW_STEPS, extract EVERY interaction with emphasis frameworks:
|
|
214
|
+
|
|
215
|
+
For each emphasis framework, compile:
|
|
216
|
+
```
|
|
217
|
+
FRAMEWORK_USAGES[framework_name] = [
|
|
218
|
+
{ step_index, class_name, method_name, api_call, context },
|
|
219
|
+
...
|
|
220
|
+
]
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
E.g., for SignalR:
|
|
224
|
+
- Step 2: `TickHub` inherits `Hub` — SignalR Hub base class
|
|
225
|
+
- Step 2: `Clients.All.SendAsync("ReceiveTick", data)` — SignalR broadcast
|
|
226
|
+
- Step 5: `HubConnection.On("ReceiveTick", handler)` — SignalR client subscription
|
|
227
|
+
|
|
228
|
+
These are the SPECIFIC concepts that need info boxes.
|
|
229
|
+
</substep>
|
|
230
|
+
|
|
231
|
+
<substep order="4.2" name="research-specific-concepts">
|
|
232
|
+
For each unique framework concept found in the actual code, research it.
|
|
233
|
+
|
|
234
|
+
Each emphasis-frameworks entry is either a NAME (research it) or a
|
|
235
|
+
file path / URL (read it directly and infer the framework name from content).
|
|
236
|
+
|
|
237
|
+
<variant condition="entry is a file path or URL">
|
|
238
|
+
Read the document (Read for local files, WebFetch for URLs).
|
|
239
|
+
Infer the framework name from the document content.
|
|
240
|
+
|
|
241
|
+
The provided URL is typically a landing/overview page. You MUST
|
|
242
|
+
navigate deeper — follow internal links to find the specific pages
|
|
243
|
+
that document each concept extracted in 4.1. E.g., if the code uses
|
|
244
|
+
`Hub.SendAsync()` and the user gave the SignalR overview URL, follow
|
|
245
|
+
links from that page to find the Hubs documentation, then the
|
|
246
|
+
server-side API reference for `SendAsync`.
|
|
247
|
+
|
|
248
|
+
For each concept from 4.1:
|
|
249
|
+
1. Scan the provided page for links to relevant sub-pages
|
|
250
|
+
2. WebFetch those sub-pages
|
|
251
|
+
3. Extract the specific documentation for the concept
|
|
252
|
+
4. Record the exact URL where the concept is documented
|
|
253
|
+
</variant>
|
|
254
|
+
|
|
255
|
+
<variant condition="entry is a framework name — research needed">
|
|
256
|
+
For each unique concept, research using context7 first, then WebSearch:
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
mcp__context7__resolve-library-id(libraryName="[framework name]")
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**If resolved:**
|
|
263
|
+
```
|
|
264
|
+
mcp__context7__query-docs(
|
|
265
|
+
libraryId=[resolved ID],
|
|
266
|
+
query="[specific concept from the code, e.g. 'Hub base class SendAsync', 'HubConnection.On callback']"
|
|
267
|
+
)
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**If context7 fails or insufficient:**
|
|
271
|
+
```
|
|
272
|
+
WebSearch(query="[framework] [specific concept] official documentation [language]")
|
|
273
|
+
```
|
|
274
|
+
Then fetch the official doc page:
|
|
275
|
+
```
|
|
276
|
+
WebFetch(url="[official docs URL]")
|
|
277
|
+
```
|
|
278
|
+
</variant>
|
|
279
|
+
|
|
280
|
+
For each concept, store:
|
|
281
|
+
```
|
|
282
|
+
CONCEPT_RESEARCH[concept] = {
|
|
283
|
+
framework: "[name]",
|
|
284
|
+
what_it_is: "[terse explanation]",
|
|
285
|
+
what_it_does_for_us: "[how it's used in THIS code]",
|
|
286
|
+
official_docs_url: "[URL]"
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
</substep>
|
|
290
|
+
</variant>
|
|
291
|
+
|
|
292
|
+
Continue to step 5.
|
|
293
|
+
</step>
|
|
294
|
+
|
|
295
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
296
|
+
<!-- STEP 5: WRITE THE WALKTHROUGH -->
|
|
297
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
298
|
+
|
|
299
|
+
<step name="write-walkthrough" order="5">
|
|
300
|
+
|
|
301
|
+
Read ALL existing wiki docs under `.docs/wiki/subsystems/[subsystem_name]/`
|
|
302
|
+
for cross-referencing in the Related Documentation section.
|
|
303
|
+
|
|
304
|
+
Follow the walkthrough template structure exactly.
|
|
305
|
+
|
|
306
|
+
<substep order="5.1" name="write-header-and-file-map">
|
|
307
|
+
- Title: derived from flow description
|
|
308
|
+
- One-line description of what the flow does and when it triggers
|
|
309
|
+
- Files Involved: list all discovered files in execution order
|
|
310
|
+
</substep>
|
|
311
|
+
|
|
312
|
+
<substep order="5.2" name="write-flow-diagram">
|
|
313
|
+
Build the mermaid sequenceDiagram from FLOW_STEPS.
|
|
314
|
+
Participants = real classes/components.
|
|
315
|
+
Arrows = real method calls, labeled with method names.
|
|
316
|
+
</substep>
|
|
317
|
+
|
|
318
|
+
<substep order="5.3" name="write-steps">
|
|
319
|
+
For EACH entry in FLOW_STEPS, write one Step section:
|
|
320
|
+
|
|
321
|
+
- **File:** reference in `file:Class.Method` format
|
|
322
|
+
- 1-2 sentences: what this step does and WHY (no filler)
|
|
323
|
+
- Code snippet: actual code from the file, focused on what the step explains
|
|
324
|
+
- Post-snippet explanation: ONLY what's non-obvious
|
|
325
|
+
- **If this step has framework_interactions AND emphasis-frameworks specified:**
|
|
326
|
+
Add a framework info box immediately after the code snippet:
|
|
327
|
+
|
|
328
|
+
```markdown
|
|
329
|
+
> **[Framework]: [Concept]**
|
|
330
|
+
>
|
|
331
|
+
> [From CONCEPT_RESEARCH: what_it_is + what_it_does_for_us. Dense. No filler.]
|
|
332
|
+
>
|
|
333
|
+
> *Source: [official_docs_url]*
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Each concept explained ONCE at its first appearance. Subsequent steps
|
|
337
|
+
reference the first: "See [Step N](#step-n-...) for [Concept] explanation."
|
|
338
|
+
</substep>
|
|
339
|
+
|
|
340
|
+
<substep order="5.4" name="write-framework-reference">
|
|
341
|
+
**If emphasis-frameworks specified:**
|
|
342
|
+
Write the Framework Concepts Reference table:
|
|
343
|
+
|
|
344
|
+
| Concept | Framework | What It Does | First Appearance |
|
|
345
|
+
|---------|-----------|-------------|------------------|
|
|
346
|
+
| [concept] | [framework] | [one-line from research] | [Step N](#step-n) |
|
|
347
|
+
</substep>
|
|
348
|
+
|
|
349
|
+
<substep order="5.5" name="write-related-docs">
|
|
350
|
+
Cross-reference related wiki docs:
|
|
351
|
+
- Relevant system docs under this subsystem
|
|
352
|
+
- Relevant pattern docs
|
|
353
|
+
- Relevant guides
|
|
354
|
+
- Official framework docs (from research URLs)
|
|
355
|
+
</substep>
|
|
356
|
+
|
|
357
|
+
<substep order="5.6" name="write-or-update">
|
|
358
|
+
**If MODE = create:** Write the complete document to TARGET_FILE.
|
|
359
|
+
**If MODE = update:** Read the existing walkthrough, merge changes
|
|
360
|
+
(update code snippets, add/remove steps, update diagram), write to TARGET_FILE.
|
|
361
|
+
</substep>
|
|
362
|
+
|
|
363
|
+
Continue to step 6.
|
|
364
|
+
</step>
|
|
365
|
+
|
|
366
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
367
|
+
<!-- STEP 6: VERIFY, COMMIT, AND REPORT -->
|
|
368
|
+
<!-- ══════════════════════════════════════════════════════════════════ -->
|
|
369
|
+
|
|
370
|
+
<step name="verify-and-report" order="6">
|
|
371
|
+
|
|
372
|
+
<substep order="6.1" name="quality-check">
|
|
373
|
+
Re-read TARGET_FILE and verify:
|
|
374
|
+
|
|
375
|
+
<verification-checklist>
|
|
376
|
+
<check>300+ lines (500+ for complex flows with 3+ frameworks)</check>
|
|
377
|
+
<check>Title + one-line description present</check>
|
|
378
|
+
<check>Files Involved lists all source files in execution order</check>
|
|
379
|
+
<check>Mermaid sequenceDiagram present and accurate</check>
|
|
380
|
+
<check>Every step has **File:** reference + code snippet</check>
|
|
381
|
+
<check>Code snippets are actual code (spot-check 2-3 against source files)</check>
|
|
382
|
+
<check>No pseudocode, no fabricated code, no filler phrases</check>
|
|
383
|
+
<check>[If emphasis-frameworks] Every framework interaction has an info box</check>
|
|
384
|
+
<check>[If emphasis-frameworks] Framework Concepts Reference table present</check>
|
|
385
|
+
<check>[If emphasis-frameworks] Info box links point to real official doc URLs</check>
|
|
386
|
+
<check>Related Documentation section present</check>
|
|
387
|
+
<check>Code references use `file:Symbol` format, not line numbers</check>
|
|
388
|
+
</verification-checklist>
|
|
389
|
+
|
|
390
|
+
Fix any failures by editing the document directly.
|
|
391
|
+
</substep>
|
|
392
|
+
|
|
393
|
+
<substep order="6.2" name="security-scan">
|
|
394
|
+
```
|
|
395
|
+
Grep(
|
|
396
|
+
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)",
|
|
397
|
+
path="[TARGET_FILE]",
|
|
398
|
+
output_mode="content"
|
|
399
|
+
)
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
<variant condition="matches found">SECRETS_FOUND — alert user, do NOT commit.</variant>
|
|
403
|
+
<variant condition="no matches">CLEAN.</variant>
|
|
404
|
+
</substep>
|
|
405
|
+
|
|
406
|
+
<substep order="6.3" name="commit">
|
|
407
|
+
```bash
|
|
408
|
+
git add [TARGET_FILE]
|
|
409
|
+
git commit -m "docs([subsystem_name]): add walkthrough — [flow-name]"
|
|
410
|
+
```
|
|
411
|
+
</substep>
|
|
412
|
+
|
|
413
|
+
<substep order="6.4" name="report">
|
|
414
|
+
Display:
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
╔══════════════════════════════════════════════════╗
|
|
418
|
+
║ ACE > Map Walkthrough > Complete ║
|
|
419
|
+
╚══════════════════════════════════════════════════╝
|
|
420
|
+
|
|
421
|
+
+ [TARGET_FILE] ([line count] lines)
|
|
422
|
+
|
|
423
|
+
Flow: [flow description]
|
|
424
|
+
Steps: [step count]
|
|
425
|
+
Emphasis frameworks: [list or "none"]
|
|
426
|
+
Framework info boxes: [count]
|
|
427
|
+
|
|
428
|
+
Next > /clear first for a fresh context window, then:
|
|
429
|
+
|
|
430
|
+
/ace:map-walkthrough — create another walkthrough
|
|
431
|
+
/ace:map-subsystem [subsystem] — map or refresh an entire subsystem
|
|
432
|
+
Review file at [TARGET_FILE]
|
|
433
|
+
```
|
|
434
|
+
</substep>
|
|
435
|
+
|
|
436
|
+
End workflow.
|
|
437
|
+
</step>
|
|
438
|
+
|
|
439
|
+
</process>
|
|
440
|
+
|
|
441
|
+
<success_criteria>
|
|
442
|
+
<criterion>Entry point found from flow description using subsystem docs + grep</criterion>
|
|
443
|
+
<criterion>EVERY call followed from entry to exit — no gaps in the trace</criterion>
|
|
444
|
+
<criterion>All source files in the flow discovered and read via LSP + code reading</criterion>
|
|
445
|
+
<criterion>Emphasis framework usages extracted from actual code (not generic research)</criterion>
|
|
446
|
+
<criterion>Each specific framework concept researched with official docs link</criterion>
|
|
447
|
+
<criterion>Walkthrough written to .docs/wiki/subsystems/[name]/walkthroughs/</criterion>
|
|
448
|
+
<criterion>Minimum 300 lines (500+ for complex flows)</criterion>
|
|
449
|
+
<criterion>Every step has actual code snippet verified against source file</criterion>
|
|
450
|
+
<criterion>Mermaid sequenceDiagram accurately reflects the traced flow</criterion>
|
|
451
|
+
<criterion>Framework info box at every emphasis framework interaction</criterion>
|
|
452
|
+
<criterion>Framework Concepts Reference table present (if emphasis-frameworks specified)</criterion>
|
|
453
|
+
<criterion>No pseudocode, no fabricated code, no filler</criterion>
|
|
454
|
+
<criterion>Security scan passed, document committed</criterion>
|
|
455
|
+
</success_criteria>
|
|
456
|
+
|
|
457
|
+
</workflow>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-backlog
|
|
3
|
+
description: Create or refine the product backlog through vision-aware questioning, wiki analysis, and guided epic/feature planning
|
|
4
|
+
argument-hint: "[optional: context='text, file, or URL with product description and suggested epics/features']"
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
allowed-tools: Read, Bash, Write, Task, AskUserQuestion
|
|
7
|
+
model: opus
|
|
8
|
+
effort: high
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Plan Backlog
|
|
12
|
+
|
|
13
|
+
Create or refine the product backlog through vision-aware questioning, wiki analysis, and guided epic/feature planning.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- After `/ace:plan-product-vision` — once the vision exists, plan what to build
|
|
18
|
+
- After `/ace:map-system` — once architecture is mapped, leverage wiki context for richer backlog
|
|
19
|
+
- Anytime — to create or refresh the product backlog
|
|
20
|
+
- Product vision exists and you want to break it into epics and features
|
|
21
|
+
- Starting implementation planning and need a structured backlog
|
|
22
|
+
- Brownfield project where features need to be inventoried from existing code
|
|
23
|
+
- Updating the backlog after scope changes or new discoveries
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
|
|
27
|
+
### Optional
|
|
28
|
+
|
|
29
|
+
- **`context`** — Product description, suggested epics/features, PRD excerpts, or any context to seed the backlog planning process. Will be absorbed and refined through questioning, not used as-is.
|
|
30
|
+
|
|
31
|
+
## Environment Context (preprocessed)
|
|
32
|
+
|
|
33
|
+
!`node "${CLAUDE_SKILL_DIR}/script.js" init "$ARGUMENTS" 2>/dev/null`
|
|
34
|
+
|
|
35
|
+
## Supporting Resources
|
|
36
|
+
|
|
37
|
+
Read ALL of these before starting the workflow:
|
|
38
|
+
|
|
39
|
+
- **Workflow**: Read [workflow.xml](workflow.xml) — complete orchestration process with all steps
|
|
40
|
+
- **Product backlog template**: Read [product-backlog-template.xml](product-backlog-template.xml) — output format for the product backlog
|
|
41
|
+
- **Questioning guide**: Read `${CLAUDE_SKILL_DIR}/../../shared/utils/questioning.xml` — deep questioning techniques
|
|
42
|
+
- **UI formatting**: Read `${CLAUDE_SKILL_DIR}/../../shared/utils/ui-formatting.md` — ACE output formatting rules
|
|
43
|
+
|
|
44
|
+
## Process
|
|
45
|
+
|
|
46
|
+
Use the `ace-product-owner` agent for requirements gathering, deep questioning, and backlog specification.
|
|
47
|
+
|
|
48
|
+
The Environment Context above contains the preprocessed INIT JSON — use it directly instead of running the init script manually. The workflow's step 1 setup can skip the init bash call since that data is already available.
|
|
49
|
+
|
|
50
|
+
Read all supporting resources listed above, then execute the workflow defined in [workflow.xml](workflow.xml) end-to-end. Preserve all workflow gates (validation, approvals, commits).
|
|
51
|
+
|
|
52
|
+
## Artifacts
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
.ace/artifacts/product/product-backlog.md
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Example Usage
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
# Create a new product backlog
|
|
62
|
+
/ace:plan-backlog
|
|
63
|
+
|
|
64
|
+
# Create backlog with seed context
|
|
65
|
+
/ace:plan-backlog context="E-commerce platform with user accounts, product catalog, and checkout"
|
|
66
|
+
|
|
67
|
+
# Refine existing backlog after scope changes
|
|
68
|
+
/ace:plan-backlog
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Next Steps
|
|
72
|
+
|
|
73
|
+
- `/ace:plan-feature E1` — Break a feature into detailed stories
|
|
74
|
+
- `/ace:help` — Check project initialization status
|
|
75
|
+
- `/ace:plan-product-vision` — Update the product vision if priorities shifted
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* plan-backlog skill script — Entry point for ace-tools operations
|
|
5
|
+
* needed by the plan-backlog skill.
|
|
6
|
+
*
|
|
7
|
+
* Subcommands:
|
|
8
|
+
* init [args] Environment detection for plan-backlog workflow
|
|
9
|
+
* resolve-fields [args] Resolve GitHub Project field IDs
|
|
10
|
+
* create-issue [args] Create a GitHub issue in a project
|
|
11
|
+
* fetch-issues [args] Fetch all epics/features from a GitHub project
|
|
12
|
+
*
|
|
13
|
+
* Usage: node script.js <subcommand> [args] [--raw]
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const path = require('path');
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
loadConfig, pathExists, resolveModel,
|
|
21
|
+
detectBrownfieldStatus, loadSettings, output, error,
|
|
22
|
+
} = require('../../shared/lib/ace-core');
|
|
23
|
+
|
|
24
|
+
const {
|
|
25
|
+
resolveFields, createIssue, fetchIssues,
|
|
26
|
+
} = require('../../shared/lib/ace-github');
|
|
27
|
+
|
|
28
|
+
// ─── CLI Dispatch ────────────────────────────────────────────────────────────
|
|
29
|
+
|
|
30
|
+
const cwd = process.cwd();
|
|
31
|
+
const args = process.argv.slice(2);
|
|
32
|
+
const raw = args.includes('--raw');
|
|
33
|
+
const cmd = args[0];
|
|
34
|
+
|
|
35
|
+
switch (cmd) {
|
|
36
|
+
case 'init':
|
|
37
|
+
cmdInit(cwd, raw, args.slice(1).filter(a => a !== '--raw'));
|
|
38
|
+
break;
|
|
39
|
+
case 'resolve-fields':
|
|
40
|
+
resolveFields(cwd, raw, args.slice(1).filter(a => a !== '--raw'));
|
|
41
|
+
break;
|
|
42
|
+
case 'create-issue':
|
|
43
|
+
createIssue(cwd, raw, args.slice(1).filter(a => a !== '--raw'));
|
|
44
|
+
break;
|
|
45
|
+
case 'fetch-issues':
|
|
46
|
+
fetchIssues(cwd, raw, args.slice(1).filter(a => a !== '--raw'));
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
error(`Unknown command: ${cmd}\nAvailable: init, resolve-fields, create-issue, fetch-issues`);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ─── Init: Plan Backlog ─────────────────────────────────────────────────────
|
|
53
|
+
|
|
54
|
+
function cmdInit(cwd, raw) {
|
|
55
|
+
const config = loadConfig(cwd);
|
|
56
|
+
const brownfield = detectBrownfieldStatus(cwd);
|
|
57
|
+
|
|
58
|
+
// Wiki detection — system-wide
|
|
59
|
+
const wikiSystemDir = '.docs/wiki/system-wide';
|
|
60
|
+
const has_wiki_system_wide = pathExists(cwd, wikiSystemDir);
|
|
61
|
+
const has_system_architecture = pathExists(cwd, path.join(wikiSystemDir, 'system-architecture.md'));
|
|
62
|
+
const has_system_structure = pathExists(cwd, path.join(wikiSystemDir, 'system-structure.md'));
|
|
63
|
+
const has_testing_framework = pathExists(cwd, path.join(wikiSystemDir, 'testing-framework.md'));
|
|
64
|
+
|
|
65
|
+
// Wiki detection — subsystems
|
|
66
|
+
const wikiSubsystemsDir = '.docs/wiki/subsystems';
|
|
67
|
+
const has_wiki_subsystems = pathExists(cwd, wikiSubsystemsDir);
|
|
68
|
+
|
|
69
|
+
let wiki_subsystem_names = [];
|
|
70
|
+
if (has_wiki_subsystems) {
|
|
71
|
+
try {
|
|
72
|
+
const entries = fs.readdirSync(path.join(cwd, wikiSubsystemsDir), { withFileTypes: true });
|
|
73
|
+
wiki_subsystem_names = entries
|
|
74
|
+
.filter(e => e.isDirectory())
|
|
75
|
+
.map(e => e.name);
|
|
76
|
+
} catch {}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const has_wiki = has_wiki_system_wide || has_wiki_subsystems;
|
|
80
|
+
|
|
81
|
+
const result = {
|
|
82
|
+
// Models
|
|
83
|
+
product_owner_model: resolveModel(cwd, 'ace-product-owner'),
|
|
84
|
+
researcher_model: resolveModel(cwd, 'ace-project-researcher'),
|
|
85
|
+
|
|
86
|
+
// Config
|
|
87
|
+
commit_docs: config.commit_docs,
|
|
88
|
+
|
|
89
|
+
// Product artifacts
|
|
90
|
+
has_product_vision: pathExists(cwd, '.docs/product/product-vision.md'),
|
|
91
|
+
has_product_backlog: pathExists(cwd, '.ace/artifacts/product/product-backlog.md'),
|
|
92
|
+
|
|
93
|
+
// Research artifacts (from previous runs)
|
|
94
|
+
has_features_research: pathExists(cwd, '.ace/research/FEATURES.md'),
|
|
95
|
+
has_architecture_research: pathExists(cwd, '.ace/research/ARCHITECTURE.md'),
|
|
96
|
+
|
|
97
|
+
// Wiki analysis cache (from previous runs)
|
|
98
|
+
has_wiki_analysis: pathExists(cwd, '.ace/artifacts/wiki/wiki-analysis.md'),
|
|
99
|
+
|
|
100
|
+
// Brownfield detection
|
|
101
|
+
...brownfield,
|
|
102
|
+
|
|
103
|
+
// Wiki state — system-wide
|
|
104
|
+
has_wiki,
|
|
105
|
+
has_wiki_system_wide,
|
|
106
|
+
has_system_architecture,
|
|
107
|
+
has_system_structure,
|
|
108
|
+
has_testing_framework,
|
|
109
|
+
|
|
110
|
+
// Wiki state — subsystems
|
|
111
|
+
has_wiki_subsystems,
|
|
112
|
+
wiki_subsystem_names,
|
|
113
|
+
|
|
114
|
+
// Git state
|
|
115
|
+
has_git: pathExists(cwd, '.git'),
|
|
116
|
+
|
|
117
|
+
// GitHub CLI
|
|
118
|
+
has_gh_cli: (() => {
|
|
119
|
+
try {
|
|
120
|
+
const { execSync } = require('child_process');
|
|
121
|
+
execSync('gh --version', { stdio: 'pipe' });
|
|
122
|
+
return true;
|
|
123
|
+
} catch {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
})(),
|
|
127
|
+
|
|
128
|
+
// GitHub Project settings (from settings.json)
|
|
129
|
+
github_project: (() => {
|
|
130
|
+
const settings = loadSettings(cwd);
|
|
131
|
+
return settings.github_project;
|
|
132
|
+
})(),
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
output(result, raw);
|
|
136
|
+
}
|