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,361 +1,361 @@
1
- <feature>
2
-
3
- <purpose>
4
- Template for `.ace/artifacts/product/&lt;id-epic_name&gt;/&lt;id-feature_name&gt;/&lt;id-feature_name&gt;.md` —
5
- a feature specification document that describes a complete vertical slice of functionality,
6
- its benefit hypothesis, acceptance criteria, and story breakdown. Stories are captured as
7
- comprehensive plain-text descriptions; formal story specification (Gherkin) is
8
- handled later by the `plan-story` command using a separate `story.xml` template.
9
- </purpose>
10
-
11
- <output-format>
12
-
13
- <section name="header">
14
- # [ID]: [Feature Title]
15
-
16
- **Epic**: [Epic ID] [Epic Title] | **Status**: [Status] | **Priority**: [Priority]
17
- **Size**: [Size] | **Sprint**: [Sprint] | **Milestone**: [Milestone] | **Link**: [Link]
18
-
19
- &lt;!-- Example:
20
- # F3: OAuth2 Login Flow
21
- **Epic**: #45 User Authentication | **Status**: Refined | **Priority**: High
22
- **Size**: 30 | **Sprint**: — | **Milestone**: mvp | **Link**: [#78](https://github.com/owner/repo/issues/78)
23
- --&gt;
24
- </section>
25
-
26
- <section name="description">
27
- ## Description
28
-
29
- [What this feature delivers as a complete vertical slice of functionality. 2-4 sentences.
30
- Describe end-to-end user-facing behavior — what the user can do when this feature is done.
31
- Focus on WHAT is delivered and WHY it matters, not HOW it is implemented.
32
- Must cut through all/most architectural layers: domain, application, infrastructure, presentation.
33
- It also may cut througn multiple modules.]
34
- </section>
35
-
36
- <section name="benefit-hypothesis">
37
- ## Benefit Hypothesis
38
-
39
- &gt; We believe [measurable business outcome] will be achieved if [target users/personas]
40
- &gt; successfully [user outcome / what they can do] with [this feature / what we deliver].
41
-
42
- &lt;!-- The hypothesis MUST be:
43
- - Measurable: includes a quantifiable or observable outcome
44
- - Falsifiable: you can determine if it was wrong
45
- - User-focused: describes user benefit, not system behavior
46
- Example:
47
- "We believe a 25% reduction in login support tickets will be achieved if returning
48
- customers successfully authenticate via OAuth2 providers with the Social Login feature."
49
- --&gt;
50
- </section>
51
-
52
- <section name="scope">
53
- ## Scope
54
-
55
- ### Includes
56
-
57
- &lt;!-- ALL functionality bundled within this feature. Be exhaustive — if it's not listed,
58
- it's not in scope. Each item should be a concrete behavior or capability. --&gt;
59
-
60
- - [Capability or behavior 1]
61
- - [Capability or behavior 2]
62
- - [Capability or behavior 3]
63
-
64
- ### Out of Scope
65
-
66
- &lt;!-- Explicitly excluded items to prevent scope creep. Name things that someone might
67
- reasonably assume are included but are NOT part of this feature. --&gt;
68
-
69
- - [Excluded item 1 — brief reason why]
70
- - [Excluded item 2 — brief reason why]
71
- </section>
72
-
73
- <section name="acceptance-criteria">
74
- ## Acceptance Criteria
75
-
76
- &lt;!-- High-level, measurable success conditions that validate the benefit hypothesis.
77
- These are FEATURE-level criteria — NOT Gherkin scenarios (those belong in stories).
78
- 3-7 criteria. Each must be independently verifiable. --&gt;
79
-
80
- - [ ] [Criterion 1 — observable, measurable condition]
81
- - [ ] [Criterion 2 — observable, measurable condition]
82
- - [ ] [Criterion 3 — observable, measurable condition]
83
- </section>
84
-
85
- <section name="existing-implementation">
86
- ## Existing Implementation
87
-
88
- &lt;!-- BROWNFIELD ONLY — omit this entire section for greenfield features.
89
- What already exists in the codebase that this feature builds on, integrates with,
90
- or must account for. Sourced from relevant-code.md research. --&gt;
91
-
92
- ### Components &amp; Modules
93
- - [Existing component/module — what it does, how it relates to this feature]
94
-
95
- ### APIs &amp; Interfaces
96
- - [Existing API/interface — current capabilities, what this feature extends or uses]
97
-
98
- ### Partial Implementations
99
- - [What's already partially built — what remains to be done]
100
-
101
- ### Architectural Constraints
102
- - [Constraint from existing architecture — how it affects this feature's design]
103
- </section>
104
-
105
- <section name="story-index">
106
- ## Story Breakdown
107
-
108
- &lt;!-- Summary table of all stories. Story details follow below.
109
- Stories are ordered by delivery sequence within this feature. --&gt;
110
-
111
- | ID | Title | Size | Status | Sprint | Link |
112
- |------|--------------------------------|------|-------------|----------|---------------------------------------------------------|
113
- | S1 | [Short descriptive name] | — | Todo | — | — |
114
- | S2 | [Short descriptive name] | — | Todo | — | — |
115
- </section>
116
-
117
- <section name="story-details" repeat="once per story">
118
- ### [ID]: [Story Title]
119
-
120
- [Comprehensive plain-text description of what this story covers.
121
-
122
- This should be rich and detailed — multiple paragraphs if needed. Cover:
123
- - What the story is about (scope, user-facing behavior)
124
- - Why it matters (value to the user within this feature)
125
- - Key behaviors and edge cases to consider
126
- - Any known constraints or technical considerations
127
- - How it relates to other stories in this feature
128
-
129
- This is NOT a formal user story. It is a thorough description of intent and scope.
130
- The `plan-story` command will later restructure this into a proper INVEST story
131
- with Gherkin acceptance criteria, a Definition of Done.]
132
- </section>
133
-
134
- <section name="technical-context">
135
- ## Technical Context
136
-
137
- &lt;!-- Architecture considerations across layers. NOT implementation details — those
138
- belong in individual stories and tasks. This section captures the technical
139
- landscape that informs story decomposition and estimation.
140
- Informed by relevant-code.md and relevant-wiki.md research. --&gt;
141
-
142
- ### System Boundaries
143
- - [Where this feature sits in the system architecture]
144
- - [What external systems or services it interacts with]
145
-
146
- ### Integration Points
147
- - [APIs, events, data flows this feature connects to]
148
-
149
- ### Cross-Cutting Concerns
150
- - [Security, performance, accessibility, observability considerations]
151
-
152
- ### Non-Functional Requirements
153
- - [Performance targets, scalability needs, compliance requirements]
154
- </section>
155
-
156
- <section name="dependencies">
157
- ## Dependencies
158
-
159
- ### Requires
160
- &lt;!-- Features, epics, or external items that must be completed before this feature. --&gt;
161
- - [Dependency — what it is and why this feature needs it]
162
-
163
- ### Enables
164
- &lt;!-- Features or capabilities that depend on this feature being done. --&gt;
165
- - [Dependent feature — what it needs from this feature]
166
-
167
- ### External
168
- &lt;!-- Third-party services, APIs, libraries, or approvals needed. --&gt;
169
- - [External dependency — status and risk]
170
- </section>
171
-
172
- <section name="metadata">
173
- ---
174
- *Created: [date] | Last refined: [date] | Refinements: [count]*
175
-
176
- **Research artifacts:**
177
- - Wiki analysis: [relative path to relevant-wiki.md or "—"]
178
- - Code analysis: [relative path to relevant-code.md or "—"]
179
- </section>
180
-
181
- </output-format>
182
-
183
- <field-definitions>
184
-
185
- <field name="ID">
186
- F[number] for local features, #[issue_number] for GitHub-linked.
187
- Same identity rules as product-backlog.xml — IDs are stable, never renumber.
188
- </field>
189
-
190
- <field name="Status">
191
- <allowed-values>
192
- <value name="Todo">Not yet started or refined</value>
193
- <value name="Refined">Requirements clear, broken into stories, ready for sprint planning</value>
194
- <value name="In Progress">Has active stories being implemented</value>
195
- <value name="Done">All stories complete, acceptance criteria met</value>
196
- </allowed-values>
197
- </field>
198
-
199
- <field name="Priority">
200
- <allowed-values>
201
- <value name="Critical">Blocks other work or has external deadline</value>
202
- <value name="High">Core functionality, high user impact</value>
203
- <value name="Medium">Important but not blocking</value>
204
- <value name="Low">Nice to have, can be deferred</value>
205
- </allowed-values>
206
- </field>
207
-
208
- <field name="Size">
209
- <allowed-values>
210
- <value name="10">Small feature — 1-2 sprints</value>
211
- <value name="20">Small-Medium — 2-3 sprints</value>
212
- <value name="30">Medium — 3-4 sprints</value>
213
- <value name="50">Large — 4-6 sprints</value>
214
- <value name="80">Very large — 6+ sprints, consider splitting</value>
215
- </allowed-values>
216
- Fibonacci×10 relative sizing. If larger than 80, split into smaller features.
217
- </field>
218
-
219
- <field name="Story table">
220
- The story breakdown table uses the same column conventions as product-backlog.xml.
221
- Story IDs: S[N] local or #[issue_number] GitHub-linked.
222
- Story sizes: Fibonacci (1, 2, 3, 5, 8) — not ×10.
223
- </field>
224
-
225
- </field-definitions>
226
-
227
- <guidelines>
228
-
229
- <guideline name="vertical-slicing">
230
- Features AND stories MUST be vertical slices delivering end-to-end user-facing value.
231
-
232
- Features MAY cut through multiple modules.
233
- Features MAY cut through ALL/MOST architectural layers — domain, application,
234
- infrastructure, and presentation of a module. A feature that only touches one layer
235
- (e.g., "set up the database schema") is NOT a feature; it's a technical story.
236
-
237
- Stories follow the same principle: each story MUST cut through the layers needed
238
- to deliver a complete, user-facing capability. In most cases this means both
239
- backend AND frontend in the same story. A story like "Create API endpoints" or
240
- "Build UI components" is a horizontal slice — not acceptable in most cases.
241
- </guideline>
242
-
243
- <guideline name="feature-scope">
244
- Features are sized using Fibonacci×10: 10, 20, 30, 50, 80 points.
245
- If a feature is less than 10 points, it's probably a story — promote it down.
246
- If a feature exceeds 80 points (~6 sprints), it should be split into
247
- smaller features. Features describe WHAT will be delivered, not HOW.
248
- </guideline>
249
-
250
- <guideline name="benefit-hypothesis">
251
- The Benefit Hypothesis MUST follow the SAFe template format exactly:
252
- "We believe [outcome] will be achieved if [users] successfully [action] with [feature]."
253
- The outcome must be measurable and falsifiable.
254
-
255
- Bad: "Users will like the new login." (not measurable)
256
- Bad: "We will build OAuth2 support." (describes output, not outcome)
257
- Good: "We believe a 25% reduction in login support tickets will be achieved
258
- if returning customers successfully authenticate via social providers
259
- with the OAuth2 Login feature."
260
- </guideline>
261
-
262
- <guideline name="acceptance-criteria-levels">
263
- Feature acceptance criteria are HIGH-LEVEL business validation — checkboxes
264
- that can be verified by a product owner or stakeholder. They validate the
265
- benefit hypothesis, not implementation details.
266
-
267
- Story acceptance criteria (Gherkin Given/When/Then) are created later by
268
- the plan-story command. Do NOT mix feature-level and story-level criteria
269
- in this document.
270
- </guideline>
271
-
272
- <guideline name="story-breakdown">
273
- Stories are plain-text descriptions of intent and scope — NOT formal user stories.
274
- The `plan-story` command handles formal specification later.
275
- The number of stories emerges naturally from the feature's scope — do not
276
- target a specific count. Let the requirements drive decomposition.
277
- </guideline>
278
-
279
- <guideline name="brownfield-context">
280
- The "Existing Implementation" section is populated from the relevant-code.md
281
- research artifact. It captures what already exists in the codebase that this
282
- feature builds upon or must integrate with.
283
-
284
- This section directly informs story decomposition — knowing what exists
285
- affects which stories need to be written and how they are scoped.
286
-
287
- For greenfield features (no existing codebase), omit this section entirely.
288
- </guideline>
289
-
290
- <guideline name="refinement-support">
291
- Every run of plan-feature should produce a COMPLETE, high-quality feature
292
- document — description, hypothesis, scope, acceptance criteria, story breakdown
293
- with estimates, and technical context. Do not defer work to "later passes."
294
-
295
- Re-running plan-feature on the same feature is supported for cases where
296
- scope changes, new information surfaces, or something was missed — but it
297
- is the exception, not the workflow.
298
-
299
- When re-running, increment the metadata refinement count and update
300
- the "Last refined" date.
301
- </guideline>
302
-
303
- <guideline name="github-identity">
304
- - GitHub-linked items: ID = #[issue_number], Title = EXACT GitHub title
305
- - Local items: ID = S[N], sequential within the feature
306
- - IDs are stable — never renumber after assignment
307
- - When a story gets a GitHub issue, ID changes from S[N] to #[issue_number]
308
- </guideline>
309
-
310
- <guideline name="table-formatting">
311
- Tables MUST be column-aligned for readability. Pad every cell with spaces so
312
- that column separators (`|`) line up vertically across all rows.
313
-
314
- Minimum column widths:
315
- - **ID**: 6 chars (e.g. `| S1 |` or `| #92 |`)
316
- - **Title**: pad to the longest title in the table
317
- - **Size**: 6 chars
318
- - **Status**: 14 chars (longest value: "In Progress")
319
- - **Sprint**: 10 chars
320
- - **Link**: pad to the longest link in the table
321
-
322
- The separator row must match column widths using dashes.
323
-
324
- Example of properly aligned table:
325
- ```
326
- | ID | Title | Size | Status | Sprint | Link |
327
- |------|--------------------------------|------|-------------|----------|---------------------------------------------------------|
328
- | #92 | Social provider integration | 5 | In Progress | Sprint 2 | [#92](https://github.com/owner/repo/issues/92) |
329
- | S2 | Token refresh handling | 3 | Todo | — | — |
330
- | S3 | Login error states | 2 | Refined | Sprint 3 | — |
331
- ```
332
- </guideline>
333
-
334
- </guidelines>
335
-
336
- <evolution>
337
-
338
- **Creation (plan-feature):**
339
- A single run produces the complete document — all sections filled, stories
340
- described and estimated, acceptance criteria defined, technical context populated.
341
-
342
- **Refinement (plan-feature re-run — exception, not norm):**
343
- Only when scope changes, new information surfaces, or gaps are found.
344
- Updates metadata refinement count and "Last refined" date.
345
-
346
- **Story planning (plan-story on individual stories):**
347
- Story status moves from "Todo" to "Refined" in the index.
348
- Individual story files are created in the same directory.
349
- The plain-text description here remains as the source seed.
350
-
351
- **During implementation:**
352
- Story statuses update in the index (In Progress → Done).
353
- Feature status reflects aggregate of story statuses.
354
-
355
- **Completion:**
356
- All stories Done, feature acceptance criteria checked off.
357
- Benefit hypothesis reviewed — validated, partially validated, or invalidated.
358
-
359
- </evolution>
360
-
361
- </feature>
1
+ <feature>
2
+
3
+ <purpose>
4
+ Template for `.ace/artifacts/product/&lt;id-epic_name&gt;/&lt;id-feature_name&gt;/&lt;id-feature_name&gt;.md` —
5
+ a feature specification document that describes a complete vertical slice of functionality,
6
+ its benefit hypothesis, acceptance criteria, and story breakdown. Stories are captured as
7
+ comprehensive plain-text descriptions; formal story specification (Gherkin) is
8
+ handled later by the `plan-story` command using a separate `story.xml` template.
9
+ </purpose>
10
+
11
+ <output-format>
12
+
13
+ <section name="header">
14
+ # [ID]: [Feature Title]
15
+
16
+ **Epic**: [Epic ID] [Epic Title] | **Status**: [Status] | **Priority**: [Priority]
17
+ **Size**: [Size] | **Sprint**: [Sprint] | **Milestone**: [Milestone] | **Link**: [Link]
18
+
19
+ &lt;!-- Example:
20
+ # F3: OAuth2 Login Flow
21
+ **Epic**: #45 User Authentication | **Status**: Refined | **Priority**: High
22
+ **Size**: 30 | **Sprint**: — | **Milestone**: mvp | **Link**: [#78](https://github.com/owner/repo/issues/78)
23
+ --&gt;
24
+ </section>
25
+
26
+ <section name="description">
27
+ ## Description
28
+
29
+ [What this feature delivers as a complete vertical slice of functionality. 2-4 sentences.
30
+ Describe end-to-end user-facing behavior — what the user can do when this feature is done.
31
+ Focus on WHAT is delivered and WHY it matters, not HOW it is implemented.
32
+ Must cut through all/most architectural layers: domain, application, infrastructure, presentation.
33
+ It also may cut througn multiple modules.]
34
+ </section>
35
+
36
+ <section name="benefit-hypothesis">
37
+ ## Benefit Hypothesis
38
+
39
+ &gt; We believe [measurable business outcome] will be achieved if [target users/personas]
40
+ &gt; successfully [user outcome / what they can do] with [this feature / what we deliver].
41
+
42
+ &lt;!-- The hypothesis MUST be:
43
+ - Measurable: includes a quantifiable or observable outcome
44
+ - Falsifiable: you can determine if it was wrong
45
+ - User-focused: describes user benefit, not system behavior
46
+ Example:
47
+ "We believe a 25% reduction in login support tickets will be achieved if returning
48
+ customers successfully authenticate via OAuth2 providers with the Social Login feature."
49
+ --&gt;
50
+ </section>
51
+
52
+ <section name="scope">
53
+ ## Scope
54
+
55
+ ### Includes
56
+
57
+ &lt;!-- ALL functionality bundled within this feature. Be exhaustive — if it's not listed,
58
+ it's not in scope. Each item should be a concrete behavior or capability. --&gt;
59
+
60
+ - [Capability or behavior 1]
61
+ - [Capability or behavior 2]
62
+ - [Capability or behavior 3]
63
+
64
+ ### Out of Scope
65
+
66
+ &lt;!-- Explicitly excluded items to prevent scope creep. Name things that someone might
67
+ reasonably assume are included but are NOT part of this feature. --&gt;
68
+
69
+ - [Excluded item 1 — brief reason why]
70
+ - [Excluded item 2 — brief reason why]
71
+ </section>
72
+
73
+ <section name="acceptance-criteria">
74
+ ## Acceptance Criteria
75
+
76
+ &lt;!-- High-level, measurable success conditions that validate the benefit hypothesis.
77
+ These are FEATURE-level criteria — NOT Gherkin scenarios (those belong in stories).
78
+ 3-7 criteria. Each must be independently verifiable. --&gt;
79
+
80
+ - [ ] [Criterion 1 — observable, measurable condition]
81
+ - [ ] [Criterion 2 — observable, measurable condition]
82
+ - [ ] [Criterion 3 — observable, measurable condition]
83
+ </section>
84
+
85
+ <section name="existing-implementation">
86
+ ## Existing Implementation
87
+
88
+ &lt;!-- BROWNFIELD ONLY — omit this entire section for greenfield features.
89
+ What already exists in the codebase that this feature builds on, integrates with,
90
+ or must account for. Sourced from relevant-code.md research. --&gt;
91
+
92
+ ### Components &amp; Modules
93
+ - [Existing component/module — what it does, how it relates to this feature]
94
+
95
+ ### APIs &amp; Interfaces
96
+ - [Existing API/interface — current capabilities, what this feature extends or uses]
97
+
98
+ ### Partial Implementations
99
+ - [What's already partially built — what remains to be done]
100
+
101
+ ### Architectural Constraints
102
+ - [Constraint from existing architecture — how it affects this feature's design]
103
+ </section>
104
+
105
+ <section name="story-index">
106
+ ## Story Breakdown
107
+
108
+ &lt;!-- Summary table of all stories. Story details follow below.
109
+ Stories are ordered by delivery sequence within this feature. --&gt;
110
+
111
+ | ID | Title | Size | Status | Sprint | Link |
112
+ |------|--------------------------------|------|-------------|----------|---------------------------------------------------------|
113
+ | S1 | [Short descriptive name] | — | Todo | — | — |
114
+ | S2 | [Short descriptive name] | — | Todo | — | — |
115
+ </section>
116
+
117
+ <section name="story-details" repeat="once per story">
118
+ ### [ID]: [Story Title]
119
+
120
+ [Comprehensive plain-text description of what this story covers.
121
+
122
+ This should be rich and detailed — multiple paragraphs if needed. Cover:
123
+ - What the story is about (scope, user-facing behavior)
124
+ - Why it matters (value to the user within this feature)
125
+ - Key behaviors and edge cases to consider
126
+ - Any known constraints or technical considerations
127
+ - How it relates to other stories in this feature
128
+
129
+ This is NOT a formal user story. It is a thorough description of intent and scope.
130
+ The `plan-story` command will later restructure this into a proper INVEST story
131
+ with Gherkin acceptance criteria, a Definition of Done.]
132
+ </section>
133
+
134
+ <section name="technical-context">
135
+ ## Technical Context
136
+
137
+ &lt;!-- Architecture considerations across layers. NOT implementation details — those
138
+ belong in individual stories and tasks. This section captures the technical
139
+ landscape that informs story decomposition and estimation.
140
+ Informed by relevant-code.md and relevant-wiki.md research. --&gt;
141
+
142
+ ### System Boundaries
143
+ - [Where this feature sits in the system architecture]
144
+ - [What external systems or services it interacts with]
145
+
146
+ ### Integration Points
147
+ - [APIs, events, data flows this feature connects to]
148
+
149
+ ### Cross-Cutting Concerns
150
+ - [Security, performance, accessibility, observability considerations]
151
+
152
+ ### Non-Functional Requirements
153
+ - [Performance targets, scalability needs, compliance requirements]
154
+ </section>
155
+
156
+ <section name="dependencies">
157
+ ## Dependencies
158
+
159
+ ### Requires
160
+ &lt;!-- Features, epics, or external items that must be completed before this feature. --&gt;
161
+ - [Dependency — what it is and why this feature needs it]
162
+
163
+ ### Enables
164
+ &lt;!-- Features or capabilities that depend on this feature being done. --&gt;
165
+ - [Dependent feature — what it needs from this feature]
166
+
167
+ ### External
168
+ &lt;!-- Third-party services, APIs, libraries, or approvals needed. --&gt;
169
+ - [External dependency — status and risk]
170
+ </section>
171
+
172
+ <section name="metadata">
173
+ ---
174
+ *Created: [date] | Last refined: [date] | Refinements: [count]*
175
+
176
+ **Research artifacts:**
177
+ - Wiki analysis: [relative path to relevant-wiki.md or "—"]
178
+ - Code analysis: [relative path to relevant-code.md or "—"]
179
+ </section>
180
+
181
+ </output-format>
182
+
183
+ <field-definitions>
184
+
185
+ <field name="ID">
186
+ F[number] for local features, #[issue_number] for GitHub-linked.
187
+ Same identity rules as product-backlog.xml — IDs are stable, never renumber.
188
+ </field>
189
+
190
+ <field name="Status">
191
+ <allowed-values>
192
+ <value name="Todo">Not yet started or refined</value>
193
+ <value name="Refined">Requirements clear, broken into stories, ready for sprint planning</value>
194
+ <value name="In Progress">Has active stories being implemented</value>
195
+ <value name="Done">All stories complete, acceptance criteria met</value>
196
+ </allowed-values>
197
+ </field>
198
+
199
+ <field name="Priority">
200
+ <allowed-values>
201
+ <value name="Critical">Blocks other work or has external deadline</value>
202
+ <value name="High">Core functionality, high user impact</value>
203
+ <value name="Medium">Important but not blocking</value>
204
+ <value name="Low">Nice to have, can be deferred</value>
205
+ </allowed-values>
206
+ </field>
207
+
208
+ <field name="Size">
209
+ <allowed-values>
210
+ <value name="10">Small feature — 1-2 sprints</value>
211
+ <value name="20">Small-Medium — 2-3 sprints</value>
212
+ <value name="30">Medium — 3-4 sprints</value>
213
+ <value name="50">Large — 4-6 sprints</value>
214
+ <value name="80">Very large — 6+ sprints, consider splitting</value>
215
+ </allowed-values>
216
+ Fibonacci×10 relative sizing. If larger than 80, split into smaller features.
217
+ </field>
218
+
219
+ <field name="Story table">
220
+ The story breakdown table uses the same column conventions as product-backlog.xml.
221
+ Story IDs: S[N] local or #[issue_number] GitHub-linked.
222
+ Story sizes: Fibonacci (1, 2, 3, 5, 8) — not ×10.
223
+ </field>
224
+
225
+ </field-definitions>
226
+
227
+ <guidelines>
228
+
229
+ <guideline name="vertical-slicing">
230
+ Features AND stories MUST be vertical slices delivering end-to-end user-facing value.
231
+
232
+ Features MAY cut through multiple modules.
233
+ Features MAY cut through ALL/MOST architectural layers — domain, application,
234
+ infrastructure, and presentation of a module. A feature that only touches one layer
235
+ (e.g., "set up the database schema") is NOT a feature; it's a technical story.
236
+
237
+ Stories follow the same principle: each story MUST cut through the layers needed
238
+ to deliver a complete, user-facing capability. In most cases this means both
239
+ backend AND frontend in the same story. A story like "Create API endpoints" or
240
+ "Build UI components" is a horizontal slice — not acceptable in most cases.
241
+ </guideline>
242
+
243
+ <guideline name="feature-scope">
244
+ Features are sized using Fibonacci×10: 10, 20, 30, 50, 80 points.
245
+ If a feature is less than 10 points, it's probably a story — promote it down.
246
+ If a feature exceeds 80 points (~6 sprints), it should be split into
247
+ smaller features. Features describe WHAT will be delivered, not HOW.
248
+ </guideline>
249
+
250
+ <guideline name="benefit-hypothesis">
251
+ The Benefit Hypothesis MUST follow the SAFe template format exactly:
252
+ "We believe [outcome] will be achieved if [users] successfully [action] with [feature]."
253
+ The outcome must be measurable and falsifiable.
254
+
255
+ Bad: "Users will like the new login." (not measurable)
256
+ Bad: "We will build OAuth2 support." (describes output, not outcome)
257
+ Good: "We believe a 25% reduction in login support tickets will be achieved
258
+ if returning customers successfully authenticate via social providers
259
+ with the OAuth2 Login feature."
260
+ </guideline>
261
+
262
+ <guideline name="acceptance-criteria-levels">
263
+ Feature acceptance criteria are HIGH-LEVEL business validation — checkboxes
264
+ that can be verified by a product owner or stakeholder. They validate the
265
+ benefit hypothesis, not implementation details.
266
+
267
+ Story acceptance criteria (Gherkin Given/When/Then) are created later by
268
+ the plan-story command. Do NOT mix feature-level and story-level criteria
269
+ in this document.
270
+ </guideline>
271
+
272
+ <guideline name="story-breakdown">
273
+ Stories are plain-text descriptions of intent and scope — NOT formal user stories.
274
+ The `plan-story` command handles formal specification later.
275
+ The number of stories emerges naturally from the feature's scope — do not
276
+ target a specific count. Let the requirements drive decomposition.
277
+ </guideline>
278
+
279
+ <guideline name="brownfield-context">
280
+ The "Existing Implementation" section is populated from the relevant-code.md
281
+ research artifact. It captures what already exists in the codebase that this
282
+ feature builds upon or must integrate with.
283
+
284
+ This section directly informs story decomposition — knowing what exists
285
+ affects which stories need to be written and how they are scoped.
286
+
287
+ For greenfield features (no existing codebase), omit this section entirely.
288
+ </guideline>
289
+
290
+ <guideline name="refinement-support">
291
+ Every run of plan-feature should produce a COMPLETE, high-quality feature
292
+ document — description, hypothesis, scope, acceptance criteria, story breakdown
293
+ with estimates, and technical context. Do not defer work to "later passes."
294
+
295
+ Re-running plan-feature on the same feature is supported for cases where
296
+ scope changes, new information surfaces, or something was missed — but it
297
+ is the exception, not the workflow.
298
+
299
+ When re-running, increment the metadata refinement count and update
300
+ the "Last refined" date.
301
+ </guideline>
302
+
303
+ <guideline name="github-identity">
304
+ - GitHub-linked items: ID = #[issue_number], Title = EXACT GitHub title
305
+ - Local items: ID = S[N], sequential within the feature
306
+ - IDs are stable — never renumber after assignment
307
+ - When a story gets a GitHub issue, ID changes from S[N] to #[issue_number]
308
+ </guideline>
309
+
310
+ <guideline name="table-formatting">
311
+ Tables MUST be column-aligned for readability. Pad every cell with spaces so
312
+ that column separators (`|`) line up vertically across all rows.
313
+
314
+ Minimum column widths:
315
+ - **ID**: 6 chars (e.g. `| S1 |` or `| #92 |`)
316
+ - **Title**: pad to the longest title in the table
317
+ - **Size**: 6 chars
318
+ - **Status**: 14 chars (longest value: "In Progress")
319
+ - **Sprint**: 10 chars
320
+ - **Link**: pad to the longest link in the table
321
+
322
+ The separator row must match column widths using dashes.
323
+
324
+ Example of properly aligned table:
325
+ ```
326
+ | ID | Title | Size | Status | Sprint | Link |
327
+ |------|--------------------------------|------|-------------|----------|---------------------------------------------------------|
328
+ | #92 | Social provider integration | 5 | In Progress | Sprint 2 | [#92](https://github.com/owner/repo/issues/92) |
329
+ | S2 | Token refresh handling | 3 | Todo | — | — |
330
+ | S3 | Login error states | 2 | Refined | Sprint 3 | — |
331
+ ```
332
+ </guideline>
333
+
334
+ </guidelines>
335
+
336
+ <evolution>
337
+
338
+ **Creation (plan-feature):**
339
+ A single run produces the complete document — all sections filled, stories
340
+ described and estimated, acceptance criteria defined, technical context populated.
341
+
342
+ **Refinement (plan-feature re-run — exception, not norm):**
343
+ Only when scope changes, new information surfaces, or gaps are found.
344
+ Updates metadata refinement count and "Last refined" date.
345
+
346
+ **Story planning (plan-story on individual stories):**
347
+ Story status moves from "Todo" to "Refined" in the index.
348
+ Individual story files are created in the same directory.
349
+ The plain-text description here remains as the source seed.
350
+
351
+ **During implementation:**
352
+ Story statuses update in the index (In Progress → Done).
353
+ Feature status reflects aggregate of story statuses.
354
+
355
+ **Completion:**
356
+ All stories Done, feature acceptance criteria checked off.
357
+ Benefit hypothesis reviewed — validated, partially validated, or invalidated.
358
+
359
+ </evolution>
360
+
361
+ </feature>