agile-context-engineering 0.1.0 → 0.2.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 (83) hide show
  1. package/LICENSE +30 -0
  2. package/README.md +272 -78
  3. package/agents/ace-code-discovery-analyst.md +245 -0
  4. package/agents/ace-code-integration-analyst.md +248 -0
  5. package/agents/ace-code-reviewer.md +375 -0
  6. package/agents/ace-product-owner.md +361 -0
  7. package/agents/ace-project-researcher.md +606 -0
  8. package/agents/ace-research-synthesizer.md +228 -0
  9. package/agents/ace-technical-application-architect.md +287 -0
  10. package/agents/ace-wiki-mapper.md +334 -0
  11. package/agile-context-engineering/src/ace-tools.js +2881 -0
  12. package/agile-context-engineering/src/ace-tools.test.js +1089 -0
  13. package/agile-context-engineering/templates/_command.md +54 -0
  14. package/agile-context-engineering/templates/_workflow.xml +17 -0
  15. package/agile-context-engineering/templates/config.json +0 -0
  16. package/agile-context-engineering/templates/product/external-solution.xml +832 -0
  17. package/agile-context-engineering/templates/product/feature.xml +361 -0
  18. package/agile-context-engineering/templates/product/integration-solution.xml +0 -0
  19. package/agile-context-engineering/templates/product/product-backlog.xml +231 -0
  20. package/agile-context-engineering/templates/product/product-vision.xml +227 -0
  21. package/agile-context-engineering/templates/product/story-integration-solution.xml +1014 -0
  22. package/agile-context-engineering/templates/product/story-technical-solution.xml +1025 -0
  23. package/agile-context-engineering/templates/product/story-wiki.xml +190 -0
  24. package/agile-context-engineering/templates/product/story.xml +451 -0
  25. package/agile-context-engineering/templates/wiki/coding-standards.xml +493 -0
  26. package/agile-context-engineering/templates/wiki/decizions.xml +115 -0
  27. package/agile-context-engineering/templates/wiki/guide.xml +137 -0
  28. package/agile-context-engineering/templates/wiki/module-discovery.xml +174 -0
  29. package/agile-context-engineering/templates/wiki/pattern.xml +159 -0
  30. package/agile-context-engineering/templates/wiki/subsystem-architecture.xml +343 -0
  31. package/agile-context-engineering/templates/wiki/subsystem-structure.xml +235 -0
  32. package/agile-context-engineering/templates/wiki/system-architecture.xml +254 -0
  33. package/agile-context-engineering/templates/wiki/system-cross-cutting.xml +197 -0
  34. package/agile-context-engineering/templates/wiki/system-structure.xml +178 -0
  35. package/agile-context-engineering/templates/wiki/system.xml +381 -0
  36. package/agile-context-engineering/templates/wiki/tech-debt-index.xml +125 -0
  37. package/agile-context-engineering/templates/wiki/testing-framework.xml +283 -0
  38. package/agile-context-engineering/utils/questioning.xml +111 -0
  39. package/agile-context-engineering/utils/ui-formatting.md +300 -0
  40. package/agile-context-engineering/workflows/execute-story.xml +1145 -0
  41. package/agile-context-engineering/workflows/help.xml +540 -0
  42. package/agile-context-engineering/workflows/init-coding-standards.xml +386 -0
  43. package/agile-context-engineering/workflows/map-story.xml +797 -0
  44. package/agile-context-engineering/workflows/map-subsystem.xml +1177 -0
  45. package/agile-context-engineering/workflows/map-system.xml +647 -0
  46. package/agile-context-engineering/workflows/plan-backlog.xml +1356 -0
  47. package/agile-context-engineering/workflows/plan-feature.xml +1495 -0
  48. package/agile-context-engineering/workflows/plan-product-vision.xml +342 -0
  49. package/agile-context-engineering/workflows/plan-story.xml +909 -0
  50. package/agile-context-engineering/workflows/research-external-solution.xml +659 -0
  51. package/agile-context-engineering/workflows/research-integration-solution.xml +712 -0
  52. package/agile-context-engineering/workflows/research-story-wiki.xml +474 -0
  53. package/agile-context-engineering/workflows/research-technical-solution.xml +762 -0
  54. package/agile-context-engineering/workflows/review-story.xml +281 -0
  55. package/bin/install.js +102 -166
  56. package/commands/ace/execute-story.md +137 -0
  57. package/commands/ace/help.md +93 -0
  58. package/commands/ace/init-coding-standards.md +83 -0
  59. package/commands/ace/map-story.md +156 -0
  60. package/commands/ace/map-subsystem.md +138 -0
  61. package/commands/ace/map-system.md +90 -0
  62. package/commands/ace/plan-backlog.md +83 -0
  63. package/commands/ace/plan-feature.md +89 -0
  64. package/commands/ace/plan-product-vision.md +81 -0
  65. package/commands/ace/plan-story.md +145 -0
  66. package/commands/ace/research-external-solution.md +138 -0
  67. package/commands/ace/research-integration-solution.md +135 -0
  68. package/commands/ace/research-story-wiki.md +116 -0
  69. package/commands/ace/research-technical-solution.md +147 -0
  70. package/commands/ace/review-story.md +109 -0
  71. package/package.json +5 -8
  72. package/agents/executor.md +0 -88
  73. package/agents/planner.md +0 -78
  74. package/agents/researcher.md +0 -77
  75. package/agents/verifier.md +0 -116
  76. package/commands/ace-execute-story.md +0 -114
  77. package/commands/ace-init.md +0 -254
  78. package/commands/ace-plan-epic.md +0 -79
  79. package/commands/ace-plan-feature.md +0 -78
  80. package/commands/ace-plan-project.md +0 -205
  81. package/commands/ace-plan-story.md +0 -97
  82. package/commands/ace-refine-story.md +0 -90
  83. package/commands/ace-verify-story.md +0 -127
@@ -0,0 +1,342 @@
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
+ - [ ] Vision — why 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 1 — Create 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>