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,342 +1,337 @@
1
- <workflow>
2
-
3
- <purpose>
4
- Orchestrate product vision creation or update through environment detection, architecture-aware
5
- questioning, and document writing. Produces `.docs/product/product-vision.md` — the north star
6
- document that aligns the team on what the product is, who it's for, and why it matters.
7
-
8
- Brownfield projects with system architecture: use the Subsystem Responsibility Matrix to
9
- pre-populate suggested capabilities. Without architecture: suggest /ace:map-system first.
10
- Greenfield projects: gather everything from user interview directly.
11
- </purpose>
12
-
13
- <mandatory-context>
14
- Read all files referenced by the invoking command's execution-context before starting.
15
- Also read any document or text passed as parameter ($ARGUMENTS) in the invoking command.
16
- </mandatory-context>
17
-
18
- <process>
19
-
20
- <!-- ══════════════════════════════════════════════════════════════════ -->
21
- <!-- STEP 1: SETUP -->
22
- <!-- ══════════════════════════════════════════════════════════════════ -->
23
-
24
- <step name="setup" order="1">
25
- **MANDATORY FIRST STEP — Execute environment detection before any user interaction:**
26
-
27
- ```bash
28
- INIT=$(node ~/.claude/agile-context-engineering/src/ace-tools.js init product-vision)
29
- ```
30
-
31
- Parse JSON for: `product_owner_model`, `commit_docs`, `has_product_vision`,
32
- `is_brownfield`, `is_greenfield`, `has_existing_code`, `has_package_file`,
33
- `has_system_architecture`, `has_git`.
34
-
35
- Also resolve the product owner model for spawning the writing agent:
36
- ```bash
37
- PO_MODEL=$(node ~/.claude/agile-context-engineering/src/ace-tools.js resolve-model ace-product-owner --raw)
38
- ```
39
-
40
- Display stage banner:
41
-
42
- ```
43
- ╔══════════════════════════════════════════════════╗
44
- ║ ACE > Product Vision ║
45
- ╚══════════════════════════════════════════════════╝
46
- ```
47
-
48
- **If `has_product_vision` is true:**
49
-
50
- Use AskUserQuestion:
51
- - header: "Vision exists"
52
- - question: "A product vision already exists at `.docs/product/product-vision.md`. What would you like to do?"
53
- - options:
54
- - "Update it" Review and refine the existing vision
55
- - "Start fresh" Discard and create a new vision from scratch
56
- - "Skip" — Keep the current vision as-is
57
-
58
- If "Update": Read existing file, hold as seed context, continue to step 2
59
- If "Start fresh": Ignore existing file, continue to step 2
60
- If "Skip": Exit workflow
61
-
62
- **If `has_git` is false:** Initialize git:
63
- ```bash
64
- git init
65
- ```
66
- </step>
67
-
68
- <!-- ══════════════════════════════════════════════════════════════════ -->
69
- <!-- STEP 2: PREREQUISITE CHECK + ARCHITECTURE CONTEXT -->
70
- <!-- ══════════════════════════════════════════════════════════════════ -->
71
-
72
- <step name="prerequisite-check" order="2">
73
-
74
- **If `is_brownfield` AND `has_system_architecture` is false:**
75
-
76
- Inform the user:
77
- "Your project has code but no system architecture document yet. The architecture
78
- analysis helps me understand your subsystems and infer capabilities for the product vision."
79
-
80
- Use AskUserQuestion:
81
- - header: "Architecture"
82
- - question: "Would you like to map your system architecture first? This helps me infer capabilities from your codebase."
83
- - options:
84
- - "Run /ace:map-system first" — Exit and map architecture before creating the vision
85
- - "Skip — I'll describe capabilities myself" — Continue without architecture context
86
-
87
- If "Run /ace:map-system first":
88
- - Display:
89
- ```
90
- ┌──────────────────────────────────────────────────┐
91
- │ Next > /ace:map-system │
92
- │ Then re-run /ace:plan-product-vision │
93
- └──────────────────────────────────────────────────┘
94
- ```
95
- - Exit workflow.
96
-
97
- If "Skip — I'll describe capabilities myself":
98
- - Hold architecture context as: `ARCHITECTURE = null`
99
- - Continue to step 3.
100
-
101
- **If `is_brownfield` AND `has_system_architecture` is true:**
102
-
103
- Read `.docs/wiki/system-wide/system-architecture.md`.
104
-
105
- Extract and hold as architecture context:
106
- - **System Overview** what the system is and does
107
- - **Subsystem Responsibility Matrix** — subsystem names and their responsibilities
108
- (the "Responsibility" column maps directly to capability areas for the product vision)
109
- - **Tech Stack** — languages, frameworks, infrastructure
110
-
111
- Hold as `ARCHITECTURE` for use in step 3 questioning.
112
-
113
- **If `is_greenfield`:**
114
-
115
- No architecture context available.
116
- Hold architecture context as: `ARCHITECTURE = null`
117
- Continue to step 3.
118
- </step>
119
-
120
- <!-- ══════════════════════════════════════════════════════════════════ -->
121
- <!-- STEP 3: DEEP QUESTIONING -->
122
- <!-- ══════════════════════════════════════════════════════════════════ -->
123
-
124
- <step name="deep-questioning" order="3">
125
- Follow the questioning guide from `questioning.xml`. You are a thinking partner,
126
- not an interviewer.
127
-
128
- **Opening — adapt based on available context:**
129
-
130
- If greenfield (no architecture, no existing code):
131
- - Open with: "What do you want to build?"
132
- - Wait for their response. This gives you context for intelligent follow-ups.
133
-
134
- If brownfield WITH architecture context:
135
- - Acknowledge what you see: "I see your system [overview from ARCHITECTURE].
136
- Your subsystems handle: [list responsibilities from Subsystem Responsibility Matrix].
137
- Let's define the product vision around these capabilities."
138
- - Use the Subsystem Responsibility Matrix to pre-populate suggested high-level
139
- capabilities the "Responsibility" column maps directly to capability areas.
140
- - Probe: what's the product's purpose beyond the technical capabilities?
141
- Who uses it? What problems does it solve?
142
-
143
- If brownfield WITHOUT architecture context:
144
- - Acknowledge existing code: "You have an existing codebase. Tell me about the product —
145
- what does it do and who is it for?"
146
- - Proceed with standard questioning.
147
-
148
- If user provided a document/text ($ARGUMENTS):
149
- - Absorb it first (do NOT summarize it back)
150
- - Use it as seed context, probe gaps and ambiguities
151
-
152
- **Follow the thread:**
153
-
154
- Based on what they said (and what you absorbed), ask follow-up questions that dig
155
- into their response. Use AskUserQuestion with options that probe what they mentioned —
156
- interpretations, clarifications, concrete examples.
157
-
158
- Keep following threads. Each answer opens new threads to explore:
159
- - What excited them
160
- - What problem sparked this
161
- - What they mean by vague terms
162
- - What it would actually look like
163
- - What's already decided vs open
164
- - Who specifically will use this
165
-
166
- **Map answers to product-vision template sections (background, not out loud):**
167
-
168
- As you question, mentally track coverage against the template:
169
- - [ ] Visionwhy does this product exist? (1-2 sentence elevator pitch)
170
- - [ ] Target Audience who specifically is this for?
171
- - [ ] Problem Statement — what pain or unmet need?
172
- - [ ] Value Proposition — why this over alternatives?
173
- - [ ] Key Objectives measurable outcomes (3-5)
174
- - [ ] High-Level Capabilities broad capability areas
175
- - [ ] Constraints — tech, timeline, budget, platform
176
- - [ ] Competitive Landscape — what alternatives exist?
177
-
178
- If architecture context exists, the High-Level Capabilities checklist item gets
179
- pre-populated from the Subsystem Responsibility Matrix. Confirm with the user
180
- rather than asking from scratch.
181
-
182
- Don't walk through this as a checklist. Weave questions naturally based on the
183
- conversation. If gaps remain after the conversation feels complete, probe those
184
- specific areas.
185
-
186
- **Decision gate:**
187
-
188
- When you could write a clear product-vision.md, use AskUserQuestion:
189
- - header: "Ready?"
190
- - question: "I think I understand what you're after. Ready to create the product vision?"
191
- - options:
192
- - "Create product vision" — Let's move forward
193
- - "Keep exploring" — I want to share more / ask me more
194
-
195
- If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
196
-
197
- Loop until "Create product vision" selected.
198
- </step>
199
-
200
- <!-- ══════════════════════════════════════════════════════════════════ -->
201
- <!-- STEP 4: WRITE PRODUCT VISION -->
202
- <!-- ══════════════════════════════════════════════════════════════════ -->
203
-
204
- <step name="write" order="4">
205
- **Step 1Create directory structure:**
206
- ```bash
207
- mkdir -p .docs/product
208
- ```
209
-
210
- **Step 2 — Prepare a context brief (200-400 words max) that distills:**
211
- - What the product is, who it's for, what problem it solves
212
- - Key capabilities, constraints, competitive landscape discussed
213
- - If architecture context exists: subsystem-derived capabilities, tech stack constraints
214
- - Brownfield summary (if any existing product context was gathered)
215
-
216
- **Step 3 — Spawn the vision-writing agent:**
217
-
218
- ```
219
- Task(
220
- prompt="You are an Agile Product Owner writing a product vision document.
221
-
222
- **Context brief from questioning session:**
223
- {paste the context brief here}
224
-
225
- **Instructions:**
226
- 1. Read the product vision template: ~/.claude/agile-context-engineering/templates/product/product-vision.xml
227
- 2. Write `.docs/product/product-vision.md` following the template structure and guidelines
228
- 3. Do not compress capture everything from the context brief
229
- 4. Write the file using the Write tool
230
-
231
- **Template guidelines:**
232
- - **Vision Statement:** Concise, inspiring, 1-2 sentences. Answers 'why does this product exist?'
233
- - **Target Audience:** Specific personas defined by behavior and need
234
- - **Problem Statement:** Framed from user's perspective. Specific pain, not vague descriptions.
235
- - **Value Proposition:** What differentiates this from alternatives. Use Geoffrey Moore's format if it fits.
236
- - **Key Objectives:** 3-5 measurable outcomes. 'Users can do X' not 'Build feature Y'.
237
- - **High-Level Capabilities:** Broad capability areas that define the product's shape. These inform epic planning downstream.
238
- - **Success Metrics:** Quantifiable indicators with targets and measurement method.
239
- - **Competitive Landscape:** Honest assessment of alternatives and gaps this product fills.
240
- - **Constraints and Assumptions:** Hard limits with rationale. Tech stack, timeline, budget, platform, dependencies.
241
- - **Risks:** Key uncertainties with likelihood, impact, and mitigation.
242
- - **Last updated:** 'after initialization'
243
-
244
- Do not compress. Capture everything gathered. If the user said it, it should be reflected somewhere in the document.
245
-
246
- **Return format ONLY this, nothing else:**
247
- DONE
248
- - [Vision statement in one line]
249
- - [Target audience in one line]
250
- - [Core problem in one line]
251
- - [Number of capabilities listed]
252
- - [Number of objectives listed]",
253
- subagent_type="ace-product-owner",
254
- model="{PO_MODEL}",
255
- description="Write product vision document"
256
- )
257
- ```
258
- </step>
259
-
260
- <!-- ══════════════════════════════════════════════════════════════════ -->
261
- <!-- STEP 5: REVIEW AND APPROVE -->
262
- <!-- ══════════════════════════════════════════════════════════════════ -->
263
-
264
- <step name="review" order="5">
265
- Show the agent's returned summary to the user. Then:
266
-
267
- - header: "Vision"
268
- - question: "Product vision written to `.docs/product/product-vision.md`. Does this summary look right? Review the full file in your editor for details."
269
- - options:
270
- - "Approve" Looks good, commit it
271
- - "Adjust" I want to change some things
272
- - "Redo questioning" — Let's go back and explore more
273
-
274
- **If "Adjust":**
275
- - Ask what they want to change
276
- - Spawn a Task agent to edit:
277
- ```
278
- Task(
279
- prompt="Read `.docs/product/product-vision.md` and make these changes:
280
- {user's requested changes}.
281
- Use the Edit tool to modify in place. Return only a confirmation of what changed.",
282
- subagent_type="general-purpose",
283
- model="haiku",
284
- description="Adjust product vision"
285
- )
286
- ```
287
- - Present for review again. Loop until approved.
288
-
289
- **If "Redo questioning":**
290
- - Return to step 3 (deep-questioning), preserve architecture context
291
- - Hold previous answers as context
292
-
293
- **If "Approve":**
294
- Continue to commit step.
295
- </step>
296
-
297
- <!-- ══════════════════════════════════════════════════════════════════ -->
298
- <!-- STEP 6: COMMIT -->
299
- <!-- ══════════════════════════════════════════════════════════════════ -->
300
-
301
- <step name="commit" order="6">
302
- Commit the product vision:
303
-
304
- ```bash
305
- git add .docs/product/product-vision.md
306
- git commit -m "docs: initialize product vision"
307
- ```
308
-
309
- Display completion:
310
-
311
- ```
312
- ╔══════════════════════════════════════════════════╗
313
- ACE > Product Vision Created ║
314
- ╚══════════════════════════════════════════════════╝
315
-
316
- + .docs/product/product-vision.md committed.
317
-
318
- i This vision will be used as context by ACE commands
319
- when planning epics, features, and stories.
320
-
321
- Next > /ace:init-coding-standards
322
- Establish coding standards for the project.
323
- > /ace:map-system
324
- Map your codebase structure and architecture.
325
- ```
326
- </step>
327
-
328
- </process>
329
-
330
- <success_criteria>
331
- - Init function executed (brownfield/greenfield detected, architecture checked)
332
- - Brownfield with architecture: subsystem responsibilities used to suggest capabilities
333
- - Brownfield without architecture: user offered /ace:map-system or continued manually
334
- - Greenfield: all context gathered from user interview
335
- - User interviewed about product vision, goals, audience, capabilities
336
- - product-vision.md written following template structure
337
- - Document captures everything discussed, not compressed
338
- - User reviewed and approved the document
339
- - Document committed to .docs/product/
340
- </success_criteria>
341
-
342
- </workflow>
1
+ <workflow>
2
+
3
+ <purpose>
4
+ Orchestrate product vision creation or update through environment detection, architecture-aware
5
+ questioning, and document writing. Produces `.docs/product/product-vision.md` — the north star
6
+ document that aligns the team on what the product is, who it's for, and why it matters.
7
+
8
+ Brownfield projects with system architecture: use the Subsystem Responsibility Matrix to
9
+ pre-populate suggested capabilities. Without architecture: suggest /ace:map-system first.
10
+ Greenfield projects: gather everything from user interview directly.
11
+ </purpose>
12
+
13
+ <mandatory-context>
14
+ All supporting resource files are auto-loaded in the skill prompt above. Do NOT re-read them.
15
+ Also read any document or text passed as parameter ($ARGUMENTS) in the invoking command.
16
+ </mandatory-context>
17
+
18
+ <process>
19
+
20
+ <!-- ══════════════════════════════════════════════════════════════════ -->
21
+ <!-- STEP 1: SETUP -->
22
+ <!-- ══════════════════════════════════════════════════════════════════ -->
23
+
24
+ <step name="setup" order="1">
25
+ **MANDATORY FIRST STEP — Execute environment detection before any user interaction:**
26
+
27
+ INIT is available from the preprocessed Environment Context above — do NOT re-run init.
28
+
29
+ Parse INIT JSON for: `product_owner_model`, `commit_docs`, `has_product_vision`,
30
+ `is_brownfield`, `is_greenfield`, `has_existing_code`, `has_package_file`,
31
+ `has_system_architecture`, `has_git`.
32
+
33
+ PO_MODEL is available from INIT.product_owner_model — do NOT re-run resolve-model.
34
+
35
+ Display stage banner:
36
+
37
+ ```
38
+ ╔══════════════════════════════════════════════════╗
39
+ ║ ACE > Product Vision ║
40
+ ╚══════════════════════════════════════════════════╝
41
+ ```
42
+
43
+ **If `has_product_vision` is true:**
44
+
45
+ Use AskUserQuestion:
46
+ - header: "Vision exists"
47
+ - question: "A product vision already exists at `.docs/product/product-vision.md`. What would you like to do?"
48
+ - options:
49
+ - "Update it" — Review and refine the existing vision
50
+ - "Start fresh" — Discard and create a new vision from scratch
51
+ - "Skip" — Keep the current vision as-is
52
+
53
+ If "Update": Read existing file, hold as seed context, continue to step 2
54
+ If "Start fresh": Ignore existing file, continue to step 2
55
+ If "Skip": Exit workflow
56
+
57
+ **If `has_git` is false:** Initialize git:
58
+ ```bash
59
+ git init
60
+ ```
61
+ </step>
62
+
63
+ <!-- ══════════════════════════════════════════════════════════════════ -->
64
+ <!-- STEP 2: PREREQUISITE CHECK + ARCHITECTURE CONTEXT -->
65
+ <!-- ══════════════════════════════════════════════════════════════════ -->
66
+
67
+ <step name="prerequisite-check" order="2">
68
+
69
+ **If `is_brownfield` AND `has_system_architecture` is false:**
70
+
71
+ Inform the user:
72
+ "Your project has code but no system architecture document yet. The architecture
73
+ analysis helps me understand your subsystems and infer capabilities for the product vision."
74
+
75
+ Use AskUserQuestion:
76
+ - header: "Architecture"
77
+ - question: "Would you like to map your system architecture first? This helps me infer capabilities from your codebase."
78
+ - options:
79
+ - "Run /ace:map-system first" — Exit and map architecture before creating the vision
80
+ - "Skip — I'll describe capabilities myself" — Continue without architecture context
81
+
82
+ If "Run /ace:map-system first":
83
+ - Display:
84
+ ```
85
+ ┌──────────────────────────────────────────────────┐
86
+ │ Next > /ace:map-system │
87
+ │ Then re-run /ace:plan-product-vision │
88
+ └──────────────────────────────────────────────────┘
89
+ ```
90
+ - Exit workflow.
91
+
92
+ If "Skip — I'll describe capabilities myself":
93
+ - Hold architecture context as: `ARCHITECTURE = null`
94
+ - Continue to step 3.
95
+
96
+ **If `is_brownfield` AND `has_system_architecture` is true:**
97
+
98
+ Read `.docs/wiki/system-wide/system-architecture.md`.
99
+
100
+ Extract and hold as architecture context:
101
+ - **System Overview** what the system is and does
102
+ - **Subsystem Responsibility Matrix** — subsystem names and their responsibilities
103
+ (the "Responsibility" column maps directly to capability areas for the product vision)
104
+ - **Tech Stack** — languages, frameworks, infrastructure
105
+
106
+ Hold as `ARCHITECTURE` for use in step 3 questioning.
107
+
108
+ **If `is_greenfield`:**
109
+
110
+ No architecture context available.
111
+ Hold architecture context as: `ARCHITECTURE = null`
112
+ Continue to step 3.
113
+ </step>
114
+
115
+ <!-- ══════════════════════════════════════════════════════════════════ -->
116
+ <!-- STEP 3: DEEP QUESTIONING -->
117
+ <!-- ══════════════════════════════════════════════════════════════════ -->
118
+
119
+ <step name="deep-questioning" order="3">
120
+ Follow the questioning guide from `questioning.xml`. You are a thinking partner,
121
+ not an interviewer.
122
+
123
+ **Opening — adapt based on available context:**
124
+
125
+ If greenfield (no architecture, no existing code):
126
+ - Open with: "What do you want to build?"
127
+ - Wait for their response. This gives you context for intelligent follow-ups.
128
+
129
+ If brownfield WITH architecture context:
130
+ - Acknowledge what you see: "I see your system [overview from ARCHITECTURE].
131
+ Your subsystems handle: [list responsibilities from Subsystem Responsibility Matrix].
132
+ Let's define the product vision around these capabilities."
133
+ - Use the Subsystem Responsibility Matrix to pre-populate suggested high-level
134
+ capabilities the "Responsibility" column maps directly to capability areas.
135
+ - Probe: what's the product's purpose beyond the technical capabilities?
136
+ Who uses it? What problems does it solve?
137
+
138
+ If brownfield WITHOUT architecture context:
139
+ - Acknowledge existing code: "You have an existing codebase. Tell me about the product —
140
+ what does it do and who is it for?"
141
+ - Proceed with standard questioning.
142
+
143
+ If user provided a document/text ($ARGUMENTS):
144
+ - Absorb it first (do NOT summarize it back)
145
+ - Use it as seed context, probe gaps and ambiguities
146
+
147
+ **Follow the thread:**
148
+
149
+ Based on what they said (and what you absorbed), ask follow-up questions that dig
150
+ into their response. Use AskUserQuestion with options that probe what they mentioned —
151
+ interpretations, clarifications, concrete examples.
152
+
153
+ Keep following threads. Each answer opens new threads to explore:
154
+ - What excited them
155
+ - What problem sparked this
156
+ - What they mean by vague terms
157
+ - What it would actually look like
158
+ - What's already decided vs open
159
+ - Who specifically will use this
160
+
161
+ **Map answers to product-vision template sections (background, not out loud):**
162
+
163
+ As you question, mentally track coverage against the template:
164
+ - [ ] Vision why does this product exist? (1-2 sentence elevator pitch)
165
+ - [ ] Target Audience — who specifically is this for?
166
+ - [ ] Problem Statement what pain or unmet need?
167
+ - [ ] Value Proposition — why this over alternatives?
168
+ - [ ] Key Objectives measurable outcomes (3-5)
169
+ - [ ] High-Level Capabilities broad capability areas
170
+ - [ ] Constraintstech, timeline, budget, platform
171
+ - [ ] Competitive Landscape — what alternatives exist?
172
+
173
+ If architecture context exists, the High-Level Capabilities checklist item gets
174
+ pre-populated from the Subsystem Responsibility Matrix. Confirm with the user
175
+ rather than asking from scratch.
176
+
177
+ Don't walk through this as a checklist. Weave questions naturally based on the
178
+ conversation. If gaps remain after the conversation feels complete, probe those
179
+ specific areas.
180
+
181
+ **Decision gate:**
182
+
183
+ When you could write a clear product-vision.md, use AskUserQuestion:
184
+ - header: "Ready?"
185
+ - question: "I think I understand what you're after. Ready to create the product vision?"
186
+ - options:
187
+ - "Create product vision" — Let's move forward
188
+ - "Keep exploring" I want to share more / ask me more
189
+
190
+ If "Keep exploring" ask what they want to add, or identify gaps and probe naturally.
191
+
192
+ Loop until "Create product vision" selected.
193
+ </step>
194
+
195
+ <!-- ══════════════════════════════════════════════════════════════════ -->
196
+ <!-- STEP 4: WRITE PRODUCT VISION -->
197
+ <!-- ══════════════════════════════════════════════════════════════════ -->
198
+
199
+ <step name="write" order="4">
200
+ **Step 1 — Create directory structure:**
201
+ ```bash
202
+ mkdir -p .docs/product
203
+ ```
204
+
205
+ **Step 2Prepare a context brief (200-400 words max) that distills:**
206
+ - What the product is, who it's for, what problem it solves
207
+ - Key capabilities, constraints, competitive landscape discussed
208
+ - If architecture context exists: subsystem-derived capabilities, tech stack constraints
209
+ - Brownfield summary (if any existing product context was gathered)
210
+
211
+ **Step 3 Spawn the vision-writing agent:**
212
+
213
+ ```
214
+ Task(
215
+ prompt="You are an Agile Product Owner writing a product vision document.
216
+
217
+ **Context brief from questioning session:**
218
+ {paste the context brief here}
219
+
220
+ **Instructions:**
221
+ 1. Read the product vision template: ${CLAUDE_SKILL_DIR}/product-vision-template.xml
222
+ 2. Write `.docs/product/product-vision.md` following the template structure and guidelines
223
+ 3. Do not compress — capture everything from the context brief
224
+ 4. Write the file using the Write tool
225
+
226
+ **Template guidelines:**
227
+ - **Vision Statement:** Concise, inspiring, 1-2 sentences. Answers 'why does this product exist?'
228
+ - **Target Audience:** Specific personas defined by behavior and need
229
+ - **Problem Statement:** Framed from user's perspective. Specific pain, not vague descriptions.
230
+ - **Value Proposition:** What differentiates this from alternatives. Use Geoffrey Moore's format if it fits.
231
+ - **Key Objectives:** 3-5 measurable outcomes. 'Users can do X' not 'Build feature Y'.
232
+ - **High-Level Capabilities:** Broad capability areas that define the product's shape. These inform epic planning downstream.
233
+ - **Success Metrics:** Quantifiable indicators with targets and measurement method.
234
+ - **Competitive Landscape:** Honest assessment of alternatives and gaps this product fills.
235
+ - **Constraints and Assumptions:** Hard limits with rationale. Tech stack, timeline, budget, platform, dependencies.
236
+ - **Risks:** Key uncertainties with likelihood, impact, and mitigation.
237
+ - **Last updated:** 'after initialization'
238
+
239
+ Do not compress. Capture everything gathered. If the user said it, it should be reflected somewhere in the document.
240
+
241
+ **Return format ONLY this, nothing else:**
242
+ DONE
243
+ - [Vision statement in one line]
244
+ - [Target audience in one line]
245
+ - [Core problem in one line]
246
+ - [Number of capabilities listed]
247
+ - [Number of objectives listed]",
248
+ subagent_type="ace-product-owner",
249
+ model="{PO_MODEL}",
250
+ description="Write product vision document"
251
+ )
252
+ ```
253
+ </step>
254
+
255
+ <!-- ══════════════════════════════════════════════════════════════════ -->
256
+ <!-- STEP 5: REVIEW AND APPROVE -->
257
+ <!-- ══════════════════════════════════════════════════════════════════ -->
258
+
259
+ <step name="review" order="5">
260
+ Show the agent's returned summary to the user. Then:
261
+
262
+ - header: "Vision"
263
+ - question: "Product vision written to `.docs/product/product-vision.md`. Does this summary look right? Review the full file in your editor for details."
264
+ - options:
265
+ - "Approve" Looks good, commit it
266
+ - "Adjust" — I want to change some things
267
+ - "Redo questioning" — Let's go back and explore more
268
+
269
+ **If "Adjust":**
270
+ - Ask what they want to change
271
+ - Spawn a Task agent to edit:
272
+ ```
273
+ Task(
274
+ prompt="Read `.docs/product/product-vision.md` and make these changes:
275
+ {user's requested changes}.
276
+ Use the Edit tool to modify in place. Return only a confirmation of what changed.",
277
+ subagent_type="general-purpose",
278
+ model="haiku",
279
+ description="Adjust product vision"
280
+ )
281
+ ```
282
+ - Present for review again. Loop until approved.
283
+
284
+ **If "Redo questioning":**
285
+ - Return to step 3 (deep-questioning), preserve architecture context
286
+ - Hold previous answers as context
287
+
288
+ **If "Approve":**
289
+ Continue to commit step.
290
+ </step>
291
+
292
+ <!-- ══════════════════════════════════════════════════════════════════ -->
293
+ <!-- STEP 6: COMMIT -->
294
+ <!-- ══════════════════════════════════════════════════════════════════ -->
295
+
296
+ <step name="commit" order="6">
297
+ Commit the product vision:
298
+
299
+ ```bash
300
+ git add .docs/product/product-vision.md
301
+ git commit -m "docs: initialize product vision"
302
+ ```
303
+
304
+ Display completion:
305
+
306
+ ```
307
+ ╔══════════════════════════════════════════════════╗
308
+ ║ ACE > Product Vision Created ║
309
+ ╚══════════════════════════════════════════════════╝
310
+
311
+ + .docs/product/product-vision.md committed.
312
+
313
+ i This vision will be used as context by ACE commands
314
+ when planning epics, features, and stories.
315
+
316
+ Next > /ace:init-coding-standards
317
+ Establish coding standards for the project.
318
+ > /ace:map-system
319
+ Map your codebase structure and architecture.
320
+ ```
321
+ </step>
322
+
323
+ </process>
324
+
325
+ <success_criteria>
326
+ - Init function executed (brownfield/greenfield detected, architecture checked)
327
+ - Brownfield with architecture: subsystem responsibilities used to suggest capabilities
328
+ - Brownfield without architecture: user offered /ace:map-system or continued manually
329
+ - Greenfield: all context gathered from user interview
330
+ - User interviewed about product vision, goals, audience, capabilities
331
+ - product-vision.md written following template structure
332
+ - Document captures everything discussed, not compressed
333
+ - User reviewed and approved the document
334
+ - Document committed to .docs/product/
335
+ </success_criteria>
336
+
337
+ </workflow>