@nklisch/pi-agile-workflow 0.15.3

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 (203) hide show
  1. package/.claude-plugin/plugin.json +10 -0
  2. package/.codex-plugin/plugin.json +28 -0
  3. package/CHANGELOG.md +591 -0
  4. package/README.md +107 -0
  5. package/docs/ARCHITECTURE.md +716 -0
  6. package/docs/MIGRATION.md +419 -0
  7. package/docs/PRINCIPLES.md +464 -0
  8. package/docs/ROADMAP.md +95 -0
  9. package/docs/SPEC.md +855 -0
  10. package/docs/VISION.md +106 -0
  11. package/extensions/agile-workflow.test.ts +419 -0
  12. package/extensions/agile-workflow.ts +467 -0
  13. package/hooks/hooks.json +52 -0
  14. package/hooks/scripts/prompt-context.py +628 -0
  15. package/hooks/scripts/substrate-maintainer.py +359 -0
  16. package/hooks/scripts/test_prompt_context.py +757 -0
  17. package/package.json +30 -0
  18. package/scripts/install-work-view.sh +165 -0
  19. package/scripts/tests/agent-metadata.test.sh +75 -0
  20. package/scripts/tests/bump-version.test.sh +552 -0
  21. package/scripts/tests/channel-parity.test.sh +117 -0
  22. package/scripts/tests/convert-content-integrity.test.sh +246 -0
  23. package/scripts/tests/convert-install-routing.test.sh +159 -0
  24. package/scripts/tests/install-work-view.test.sh +411 -0
  25. package/scripts/tests/pi-package-metadata.test.sh +119 -0
  26. package/scripts/tests/work-board-shim.test.sh +239 -0
  27. package/scripts/tests/work-view-dist-version.test.sh +105 -0
  28. package/scripts/work-board.sh +64 -0
  29. package/scripts/work-view.sh +423 -0
  30. package/skills/autopilot/SKILL.md +330 -0
  31. package/skills/autopilot/agents/openai.yaml +6 -0
  32. package/skills/board/SKILL.md +62 -0
  33. package/skills/board/agents/openai.yaml +6 -0
  34. package/skills/bold-refactor/SKILL.md +244 -0
  35. package/skills/bold-refactor/agents/openai.yaml +6 -0
  36. package/skills/bug-scan/SKILL.md +378 -0
  37. package/skills/bug-scan/agents/openai.yaml +6 -0
  38. package/skills/bug-scan/references/async-promises.md +119 -0
  39. package/skills/bug-scan/references/concurrency-races.md +148 -0
  40. package/skills/bug-scan/references/data-layer.md +167 -0
  41. package/skills/bug-scan/references/error-handling.md +197 -0
  42. package/skills/bug-scan/references/gate-item-template.md +94 -0
  43. package/skills/bug-scan/references/language-footguns.md +219 -0
  44. package/skills/bug-scan/references/parked-item-template.md +103 -0
  45. package/skills/bug-scan/references/report-template.md +115 -0
  46. package/skills/bug-scan/references/resource-leaks.md +199 -0
  47. package/skills/bug-scan/references/state-closures.md +148 -0
  48. package/skills/bug-scan/references/time-numbers.md +158 -0
  49. package/skills/convert/SKILL.md +1463 -0
  50. package/skills/convert/agents/openai.yaml +6 -0
  51. package/skills/convert/references/legacy-overlap-migration.md +179 -0
  52. package/skills/deep-code-scan/SKILL.md +378 -0
  53. package/skills/deep-code-scan/agents/openai.yaml +6 -0
  54. package/skills/deep-code-scan/references/artifact-ledger.md +148 -0
  55. package/skills/deep-code-scan/references/consolidation.md +91 -0
  56. package/skills/deep-code-scan/references/decomposition.md +127 -0
  57. package/skills/deep-code-scan/references/item-templates.md +263 -0
  58. package/skills/deep-code-scan/references/lane-catalog.md +129 -0
  59. package/skills/deep-code-scan/references/review-gauntlet.md +108 -0
  60. package/skills/deep-code-scan/references/scanner-brief.md +152 -0
  61. package/skills/e2e-test-design/SKILL.md +517 -0
  62. package/skills/e2e-test-design/references/anti-tautology.md +261 -0
  63. package/skills/e2e-test-design/references/service-mocks.md +234 -0
  64. package/skills/e2e-test-design/references/test-taxonomy.md +211 -0
  65. package/skills/epic-design/SKILL.md +476 -0
  66. package/skills/epicize/SKILL.md +210 -0
  67. package/skills/epicize/agents/openai.yaml +6 -0
  68. package/skills/feature-design/SKILL.md +472 -0
  69. package/skills/fix/SKILL.md +173 -0
  70. package/skills/gate-cruft/SKILL.md +258 -0
  71. package/skills/gate-docs/SKILL.md +278 -0
  72. package/skills/gate-patterns/SKILL.md +389 -0
  73. package/skills/gate-refactor/SKILL.md +408 -0
  74. package/skills/gate-security/SKILL.md +275 -0
  75. package/skills/gate-tests/SKILL.md +367 -0
  76. package/skills/groom/SKILL.md +162 -0
  77. package/skills/groom/agents/openai.yaml +6 -0
  78. package/skills/ideate/SKILL.md +185 -0
  79. package/skills/ideate/agents/openai.yaml +6 -0
  80. package/skills/implement/SKILL.md +288 -0
  81. package/skills/implement-orchestrator/SKILL.md +604 -0
  82. package/skills/park/SKILL.md +111 -0
  83. package/skills/perf-design/SKILL.md +427 -0
  84. package/skills/perf-scout/SKILL.md +404 -0
  85. package/skills/perf-scout/agents/openai.yaml +6 -0
  86. package/skills/perf-scout/references/algorithmic-and-data-structures.md +126 -0
  87. package/skills/perf-scout/references/approximation-and-precomputation.md +136 -0
  88. package/skills/perf-scout/references/caching-and-memoization.md +123 -0
  89. package/skills/perf-scout/references/compiler-runtime-and-language.md +136 -0
  90. package/skills/perf-scout/references/database-and-storage-internals.md +144 -0
  91. package/skills/perf-scout/references/distributed-systems.md +150 -0
  92. package/skills/perf-scout/references/game-engine-and-realtime.md +136 -0
  93. package/skills/perf-scout/references/gpu-and-accelerators.md +130 -0
  94. package/skills/perf-scout/references/idea-ranking.md +75 -0
  95. package/skills/perf-scout/references/io-and-batching.md +135 -0
  96. package/skills/perf-scout/references/memory-and-data-locality.md +137 -0
  97. package/skills/perf-scout/references/parallelism-and-vectorization.md +126 -0
  98. package/skills/perf-scout/references/parked-item-template.md +117 -0
  99. package/skills/perf-scout/references/peer-review-pass.md +150 -0
  100. package/skills/perf-scout/references/report-template.md +148 -0
  101. package/skills/principles/SKILL.md +678 -0
  102. package/skills/principles/references/models.md +191 -0
  103. package/skills/principles/references/subagents.md +158 -0
  104. package/skills/prose-author/SKILL.md +185 -0
  105. package/skills/refactor-conventions-creator/SKILL.md +359 -0
  106. package/skills/refactor-conventions-creator/agents/openai.yaml +6 -0
  107. package/skills/refactor-conventions-creator/references/common-structures.md +91 -0
  108. package/skills/refactor-conventions-creator/references/common-styles.md +90 -0
  109. package/skills/refactor-design/SKILL.md +384 -0
  110. package/skills/release-deploy/SKILL.md +667 -0
  111. package/skills/release-deploy/agents/openai.yaml +6 -0
  112. package/skills/research/SKILL.md +166 -0
  113. package/skills/research/agents/openai.yaml +6 -0
  114. package/skills/review/SKILL.md +267 -0
  115. package/skills/review/references/deep-review.md +98 -0
  116. package/skills/review/references/review-lenses.md +68 -0
  117. package/skills/review/references/substrate-side-effects.md +161 -0
  118. package/skills/review/references/target-resolution.md +52 -0
  119. package/skills/scope/SKILL.md +486 -0
  120. package/work-view/Cargo.lock +486 -0
  121. package/work-view/Cargo.toml +9 -0
  122. package/work-view/crates/cli/.work-view-version +1 -0
  123. package/work-view/crates/cli/Cargo.toml +18 -0
  124. package/work-view/crates/cli/src/actionable.rs +500 -0
  125. package/work-view/crates/cli/src/args.rs +792 -0
  126. package/work-view/crates/cli/src/board/assets/board.css +855 -0
  127. package/work-view/crates/cli/src/board/assets/board.js +259 -0
  128. package/work-view/crates/cli/src/board/assets/card.js +139 -0
  129. package/work-view/crates/cli/src/board/assets/components.css +290 -0
  130. package/work-view/crates/cli/src/board/assets/dependency.js +1193 -0
  131. package/work-view/crates/cli/src/board/assets/detail.js +256 -0
  132. package/work-view/crates/cli/src/board/assets/filters.js +389 -0
  133. package/work-view/crates/cli/src/board/assets/index.html +77 -0
  134. package/work-view/crates/cli/src/board/assets/kanban.js +231 -0
  135. package/work-view/crates/cli/src/board/assets/markdown.js +260 -0
  136. package/work-view/crates/cli/src/board/assets/motion.css +131 -0
  137. package/work-view/crates/cli/src/board/assets/state.js +245 -0
  138. package/work-view/crates/cli/src/board/assets/table.js +304 -0
  139. package/work-view/crates/cli/src/board/assets/tokens.css +602 -0
  140. package/work-view/crates/cli/src/board/assets/views.js +41 -0
  141. package/work-view/crates/cli/src/board/assets.rs +162 -0
  142. package/work-view/crates/cli/src/board/feed.rs +204 -0
  143. package/work-view/crates/cli/src/board/mod.rs +246 -0
  144. package/work-view/crates/cli/src/board/open.rs +144 -0
  145. package/work-view/crates/cli/src/board/server.rs +407 -0
  146. package/work-view/crates/cli/src/main.rs +195 -0
  147. package/work-view/crates/cli/src/render.rs +354 -0
  148. package/work-view/crates/cli/src/scope.rs +157 -0
  149. package/work-view/crates/cli/src/stale.rs +581 -0
  150. package/work-view/crates/cli/tests/board-js/dependency-table.test.mjs +64 -0
  151. package/work-view/crates/cli/tests/board-js/expanded-browsing.test.mjs +79 -0
  152. package/work-view/crates/cli/tests/board-js/harness-smoke.test.mjs +11 -0
  153. package/work-view/crates/cli/tests/board-js/harness.mjs +437 -0
  154. package/work-view/crates/cli/tests/board-js/kanban-detail.test.mjs +75 -0
  155. package/work-view/crates/cli/tests/board-js/markdown-filter.test.mjs +60 -0
  156. package/work-view/crates/cli/tests/fixtures/golden/.work/CONVENTIONS.md +3 -0
  157. package/work-view/crates/cli/tests/fixtures/golden/.work/active/epics/epic-alpha.md +16 -0
  158. package/work-view/crates/cli/tests/fixtures/golden/.work/active/features/feat-a.md +16 -0
  159. package/work-view/crates/cli/tests/fixtures/golden/.work/active/features/feat-b.md +16 -0
  160. package/work-view/crates/cli/tests/fixtures/golden/.work/active/stories/story-alpha-1.md +16 -0
  161. package/work-view/crates/cli/tests/fixtures/golden/.work/active/stories/story-research-1.md +19 -0
  162. package/work-view/crates/cli/tests/fixtures/golden/.work/archive/feat-done.md +16 -0
  163. package/work-view/crates/cli/tests/fixtures/golden/.work/archive/feat-shipped.md +18 -0
  164. package/work-view/crates/cli/tests/fixtures/golden/.work/backlog/idea-backlog.md +7 -0
  165. package/work-view/crates/cli/tests/fixtures/golden/.work/releases/v1.0/v1.0.md +16 -0
  166. package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/CONVENTIONS.md +6 -0
  167. package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/features/feat-dep-done.md +17 -0
  168. package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/features/feat-design-ready.md +17 -0
  169. package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/features/feat-impl-ready.md +17 -0
  170. package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/stories/story-review-ready.md +17 -0
  171. package/work-view/crates/cli/tests/fixtures/with-malformed/.work/CONVENTIONS.md +4 -0
  172. package/work-view/crates/cli/tests/fixtures/with-malformed/.work/active/epics/malformed-no-closing-fence.md +8 -0
  173. package/work-view/crates/cli/tests/fixtures/with-malformed/.work/active/features/good-item.md +16 -0
  174. package/work-view/crates/cli/tests/integration.rs +2833 -0
  175. package/work-view/crates/core/Cargo.toml +13 -0
  176. package/work-view/crates/core/src/error.rs +61 -0
  177. package/work-view/crates/core/src/filter.rs +804 -0
  178. package/work-view/crates/core/src/graph.rs +324 -0
  179. package/work-view/crates/core/src/index.rs +590 -0
  180. package/work-view/crates/core/src/lib.rs +54 -0
  181. package/work-view/crates/core/src/model.rs +202 -0
  182. package/work-view/crates/core/src/parse.rs +494 -0
  183. package/work-view/crates/core/tests/fixtures/golden/.work/CONVENTIONS.md +15 -0
  184. package/work-view/crates/core/tests/fixtures/golden/.work/active/epics/epic-core.md +16 -0
  185. package/work-view/crates/core/tests/fixtures/golden/.work/active/features/feat-parser.md +16 -0
  186. package/work-view/crates/core/tests/fixtures/golden/.work/active/features/feat-query.md +16 -0
  187. package/work-view/crates/core/tests/fixtures/golden/.work/active/stories/malformed-no-id.md +15 -0
  188. package/work-view/crates/core/tests/fixtures/golden/.work/active/stories/story-parse-unit.md +16 -0
  189. package/work-view/crates/core/tests/fixtures/golden/.work/active/stories/story-security-gate.md +16 -0
  190. package/work-view/crates/core/tests/fixtures/golden/.work/archive/feat-old.md +16 -0
  191. package/work-view/crates/core/tests/fixtures/golden/.work/archive/feat-parser.md +17 -0
  192. package/work-view/crates/core/tests/fixtures/golden/.work/backlog/idea-future-board.md +7 -0
  193. package/work-view/crates/core/tests/fixtures/golden/.work/releases/v1.0/v1.0.md +16 -0
  194. package/work-view/crates/core/tests/fixtures/precedence/.work/CONVENTIONS.md +10 -0
  195. package/work-view/crates/core/tests/fixtures/precedence/.work/archive/dup-item.md +18 -0
  196. package/work-view/crates/core/tests/fixtures/precedence/.work/releases/v2.0/dup-item.md +18 -0
  197. package/work-view/crates/core/tests/integration.rs +541 -0
  198. package/work-view/dist/.gitattributes +1 -0
  199. package/work-view/dist/README.md +42 -0
  200. package/work-view/dist/aarch64-apple-darwin/work-view +0 -0
  201. package/work-view/dist/aarch64-unknown-linux-musl/work-view +0 -0
  202. package/work-view/dist/x86_64-apple-darwin/work-view +0 -0
  203. package/work-view/dist/x86_64-unknown-linux-musl/work-view +0 -0
@@ -0,0 +1,210 @@
1
+ ---
2
+ name: epicize
3
+ description: >
4
+ Decompose foundation docs into multiple epics seeded in .work/active/epics/ with declared
5
+ dependencies. Reads VISION.md, SPEC.md, ARCHITECTURE.md, identifies capability arcs, proposes an
6
+ epic decomposition with depends_on chains, and writes the epic files at stage:drafting after user
7
+ confirmation. Use after /agile-workflow:convert on a greenfield project, or any time foundation docs
8
+ need epic decomposition. User-invocable only — interactive workshop.
9
+ ---
10
+
11
+ # Epicize
12
+
13
+ You read the project's foundation docs and produce **multiple epics** at
14
+ `.work/active/epics/`, each at `stage: drafting`, with declared `depends_on` chains
15
+ where one epic's output feeds another.
16
+
17
+ Epics are containment shapes — multi-feature architectural arcs. Each epic eventually
18
+ gets designed (via the design family on its child features) and implemented. Epicize
19
+ just establishes the top-level decomposition.
20
+
21
+ ## Prerequisites
22
+
23
+ - Substrate bootstrapped (`.work/CONVENTIONS.md` exists). If not, halt and tell the
24
+ user to run `/agile-workflow:convert` first.
25
+ - Foundation docs exist in `docs/`. At minimum `docs/VISION.md` AND
26
+ `docs/ARCHITECTURE.md` (or equivalents). If missing, halt and tell the user to run
27
+ `/agile-workflow:ideate` first.
28
+
29
+ ## Think like an agent
30
+
31
+ Before decomposing anything, think about what an agent (in autopilot or manual
32
+ mode) would need to execute each epic:
33
+
34
+ - **What can be built in one design + implement cycle?** A child feature under
35
+ the epic should fit comfortably in one `/agile-workflow:feature-design` →
36
+ `/agile-workflow:implement` pass — 5-15 implementation units. If a single
37
+ child feature would need more, the epic is too coarse; split.
38
+ - **What can be parallelized?** If two children of an epic don't share types or
39
+ files, declare them with no `depends_on` between them. The autopilot fans
40
+ them out as parallel agents.
41
+ - **What's needed before starting?** Dependencies aren't just code — research
42
+ needs (unfamiliar libraries, APIs you don't know cold), seed data,
43
+ configuration. If an epic uses a library no one has touched yet, plan for a
44
+ research pass on the first child.
45
+ - **How do you know an epic is done?** Not "it looks right" — every child
46
+ feature reaches `stage: done`. Stage transitions are the agent-readable
47
+ completion signal.
48
+ - **What design artifact feeds implementation?** Each child feature's body
49
+ accumulates the design when `/agile-workflow:feature-design` (or
50
+ refactor-design / perf-design) runs on it. The epic's body is a brief, not a
51
+ design — `/agile-workflow:epic-design` later writes the realized
52
+ decomposition into it.
53
+
54
+ ## Anti-patterns
55
+
56
+ - **Don't produce a phase plan.** Epics are containment shapes, not temporal
57
+ slots. No "Phase 1: Auth, Phase 2: Profiles, Phase 3: Admin." Use the
58
+ dependency graph; let the autopilot pick what's ready.
59
+ - **Don't split by layer.** Epic-DB / Epic-API / Epic-UI is anti-pattern unless
60
+ the layers are genuinely independent products. Split by capability instead:
61
+ "core search works" / "results link to the right app" / "users can see it in
62
+ a browser."
63
+ - **Don't pad with refactor or test epics.** Refactoring happens incrementally
64
+ via `/agile-workflow:refactor-design` on tagged features. Testing happens
65
+ through gate-tests at release time and per-feature acceptance criteria. Don't
66
+ manufacture epics for either.
67
+ - **Don't estimate.** No "this epic is bigger than that one" sizing labels. The
68
+ agent doesn't benefit from difficulty ratings; the work either fits in 5-15
69
+ child-feature units or it should be split further.
70
+ - **Don't pre-bind to releases.** Epics get `release_binding: null`. Binding
71
+ happens only when `/agile-workflow:release-deploy` runs.
72
+ - **Don't include deployment as an epic** unless deployment infrastructure is
73
+ the core value of the project.
74
+
75
+ ## Workflow
76
+
77
+ ### Phase 1: Read foundation
78
+
79
+ Read every foundation doc the project has:
80
+ - `docs/VISION.md`
81
+ - `docs/SPEC.md`
82
+ - `docs/ARCHITECTURE.md`
83
+ - `docs/PRINCIPLES.md` (if exists)
84
+ - Domain-specific docs (UX, CONTRACT, GAMEPLAY, DATA-SPEC, etc.)
85
+
86
+ Build a mental model of the system as foundation describes it.
87
+
88
+ ### Phase 2: Identify capability arcs
89
+
90
+ Look for natural decomposition seams. Signals:
91
+ - ARCHITECTURE.md describes distinct components or boundaries — each is a candidate
92
+ epic
93
+ - VISION.md identifies multiple capability areas — each is a candidate epic
94
+ - SPEC.md groups requirements by domain — each group is a candidate epic
95
+ - Sequencing implied by the docs (foundation systems before consumers, contracts
96
+ before clients, etc.) — these become `depends_on` chains
97
+
98
+ Aim for 3-8 epics for a typical project. Fewer than 3 means you should consider whether
99
+ this project even needs epic-level decomposition (maybe just go straight to features).
100
+ More than 8 means you're slicing too thin — collapse some.
101
+
102
+ ### Phase 3: Propose dependencies
103
+
104
+ For each epic candidate, identify what must be done first:
105
+ - "Auth epic must be at done before User-Profile epic can start" → User-Profile
106
+ `depends_on: [epic-auth]`
107
+ - Independent epics (no shared types, no cross-cutting concerns) have no dependencies
108
+ and can be worked in parallel
109
+
110
+ ### Phase 4: Confirm with user
111
+
112
+ Present the proposed decomposition via structured question tool or conversational summary:
113
+
114
+ ```
115
+ Proposed epic decomposition (4 epics):
116
+
117
+ 1. epic-substrate-foundation
118
+ depends_on: []
119
+ covers: foundation work that everything else builds on
120
+
121
+ 2. epic-auth
122
+ depends_on: [epic-substrate-foundation]
123
+ covers: authentication and session management
124
+
125
+ 3. epic-user-profile
126
+ depends_on: [epic-auth]
127
+ covers: profile CRUD, avatar handling, settings
128
+
129
+ 4. epic-admin-dashboard
130
+ depends_on: [epic-auth]
131
+ covers: admin-only views, user management
132
+ ```
133
+
134
+ Iterate with the user — they may collapse, split, rename, or reorder epics. Confirm
135
+ each rename and dependency edge before writing.
136
+
137
+ ### Phase 5: Write epic files
138
+
139
+ For each confirmed epic, write `.work/active/epics/<id>.md`:
140
+
141
+ ```yaml
142
+ ---
143
+ id: epic-<slug>
144
+ kind: epic
145
+ stage: drafting
146
+ tags: [<tag>, ...] # if a clear category from foundation docs
147
+ parent: null
148
+ depends_on: [<epic-id>, ...]
149
+ release_binding: null
150
+ gate_origin: null
151
+ created: YYYY-MM-DD
152
+ updated: YYYY-MM-DD
153
+ ---
154
+
155
+ # <Epic Name>
156
+
157
+ ## Brief
158
+ <two to four paragraphs: what this epic delivers, what capability area it covers,
159
+ why it exists, what it does NOT cover>
160
+
161
+ ## Foundation references
162
+ - `docs/VISION.md` — relevant section(s)
163
+ - `docs/ARCHITECTURE.md` — relevant component(s)
164
+ - (other foundation docs as relevant)
165
+
166
+ ## Anticipated child features
167
+ <NOT a commitment — a sketch of where features will likely live under this epic.
168
+ The actual feature decomposition happens at design time, not now. Keep this short
169
+ and provisional.>
170
+
171
+ <!-- The design pass on each child feature will fill in real specifics. -->
172
+ ```
173
+
174
+ ### Phase 6: Cycle check
175
+
176
+ Run `.work/bin/work-view --blocking <id> --paths` for each epic against its
177
+ `depends_on`. If any cycle exists, surface it and ask the user to break it before
178
+ committing.
179
+
180
+ ### Phase 7: Commit
181
+
182
+ ```bash
183
+ git add .work/active/epics/
184
+ git commit -m "epicize: <N> epics seeded from foundation docs"
185
+ ```
186
+
187
+ ## Output
188
+
189
+ In conversation:
190
+ - **Seeded**: list of `<id>` per epic with `depends_on` per epic
191
+ - **Suggested next step**: pick one epic to start with —
192
+ start an autopilot goal for `<epic-id>` for autonomous execution, or scope a
193
+ feature under one of the epics manually for guided exploration
194
+
195
+ ## Guardrails
196
+
197
+ - Epics produced here are at `stage: drafting`. Their bodies are briefs and
198
+ references — NOT designs. Design happens at the feature level under each epic, not
199
+ at the epic level.
200
+ - Anticipated child features are provisional, not commitments. Don't pre-create child
201
+ feature files at epicize time — that's `/agile-workflow:scope` (manual) or
202
+ `/agile-workflow:epic-design` (often autopilot-driven) when the epic is ready to be
203
+ decomposed into real feature files.
204
+ - Don't pre-bind epics to releases. `release_binding` stays `null` until
205
+ `/agile-workflow:release-deploy` runs.
206
+ - Don't infer `depends_on` purely from docs without confirming with the user.
207
+ Doc ordering doesn't always mean execution dependency.
208
+ - If the foundation docs don't have enough content to identify capability arcs,
209
+ halt and tell the user to run `/agile-workflow:ideate` to flesh out
210
+ ARCHITECTURE.md before epicizing.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "Epicize"
3
+ short_description: "Use Epicize for repo workflows"
4
+ default_prompt: "Use $epicize for this repository."
5
+ policy:
6
+ allow_implicit_invocation: false
@@ -0,0 +1,472 @@
1
+ ---
2
+ name: feature-design
3
+ description: >
4
+ ALWAYS invoke when the user asks to design or flesh out a feature at stage:drafting; do not write
5
+ design prose inline. Designs the feature inside its agile-workflow item body, grounded in foundation
6
+ docs and code, then spawns child stories with depends_on chains and advances drafting to
7
+ implementing. Use for greenfield features without [refactor], [perf], [prose], or [research] tags;
8
+ route [refactor] to refactor-design, [perf] to perf-design, [prose] to prose-author, [research] to
9
+ the agentic-research research-orchestrator, and epic decomposition to epic-design. UI/UX mockups are
10
+ fallback here, inherited from the parent epic when available.
11
+ ---
12
+
13
+ # Feature-Design
14
+
15
+ You design a feature in the agile-workflow substrate. The design lives in the
16
+ feature item's body — there is no separate `docs/designs/<name>.md`. As the design
17
+ takes shape, child stories are spawned with declared `depends_on` chains. When the
18
+ design is done, you advance the feature's stage `drafting → implementing`.
19
+
20
+ This skill is the feature-level entry point in the design family. The family
21
+ routes by item kind and tags:
22
+ - `epic-design` — `kind: epic` at `stage: drafting` (decomposes into features; an epic
23
+ carrying `[research]` is a research-program epic — routes here as normal decomposition,
24
+ whose children are `[research]` features each with their own `research_dials:` registration;
25
+ the tag at epic level signals program decomposition, never an epic-level registration)
26
+ - `feature-design` (this skill) — `kind: feature`, no specialized tag
27
+ - `refactor-design` — `kind: feature` with `tags: [refactor]`
28
+ - `perf-design` — `kind: feature` with `tags: [perf]`
29
+ - `prose-author` — `kind: feature` with `tags: [prose]` (no-code-surface work —
30
+ the authoring lane, not a design step: brief-as-design, no Explore / pre-mortem / question gate)
31
+ - `agentic-research:research-orchestrator` (**cross-plugin**) — `kind: feature` with
32
+ `tags: [research]`. A grounded research engagement is an *input* that grounds other work,
33
+ not a code design: the orchestrator reads the item's `research_dials:` block (the
34
+ commissioning subset of the registration) and runs the ARD walk; gates run inline; it
35
+ never binds to a release. Requires the
36
+ `agentic-research` plugin (without it, `[research]` is an inert project tag — fall through
37
+ to `feature-design`).
38
+
39
+ The cross-plugin target `agentic-research:research-orchestrator` is a fixed pairing contract;
40
+ a deployment substituting a different research entry skill edits these routing rows.
41
+
42
+ If the feature you're looking at has `[refactor]`, `[perf]`, `[prose]`, or `[research]`
43
+ in `tags`, you were misrouted. Don't try to design it — log a one-line note to the item
44
+ body ("Misrouted to feature-design; should have gone to refactor-design / perf-design /
45
+ prose-author / the agentic-research research-orchestrator based on tags") and return without advancing the
46
+ stage. The caller (autopilot or human) will route correctly on the next pass.
47
+
48
+ ## Trigger
49
+
50
+ Auto-triggers when the agent identifies a feature at `stage: drafting` ready for
51
+ design, with no specialized tag. Common phrases:
52
+ - "design feature X"
53
+ - "let's design this feature"
54
+ - "this feature is ready to design"
55
+
56
+ ## Invocation modes
57
+
58
+ The skill accepts an optional `--only-questions` flag and an optional target.
59
+
60
+ | Invocation | Behavior |
61
+ |---|---|
62
+ | `<feature-id>` (default) | Full design pass on one feature — workflow Phases 1-9. |
63
+ | `<feature-id> --only-questions` | Question-only pass on one feature — runs the read/ground phases, surfaces ambiguities, asks the user, captures answers in the body, does NOT design or advance stage. |
64
+ | `--only-questions <id1> <id2> ...` | Question-only pass over each listed feature, in order. |
65
+ | `--only-questions --all` | Question-only pass over every `kind: feature` at `stage: drafting` in `.work/active/features/` whose `tags` does not contain `refactor`, `perf`, `prose`, or `research`. Iterate in dependency order (features with fewer unresolved upstream deps first). |
66
+
67
+ `--only-questions` mode exists so a user can align with the agent on
68
+ high-level direction across many drafting features in one session, then
69
+ hand off to an autopilot goal for the full design + implement pass. Autopilot
70
+ inherits the captured answers from each feature body and no longer has to use
71
+ judgment on those points.
72
+
73
+ `--only-questions` requires interactive mode — if an active autopilot run or
74
+ harness goal is driving this session, refuse to run and report that the flag is
75
+ for interactive alignment only.
76
+ Do not run cross-model advisory review in `--only-questions` mode — the user is
77
+ the alignment signal.
78
+
79
+ ## Workflow — `--only-questions` mode
80
+
81
+ Use this path when invoked with `--only-questions`. Iterate over the
82
+ target set (one feature, an explicit list, or every drafting feature
83
+ under `--all` per the table above).
84
+
85
+ For each feature in the target set:
86
+
87
+ 1. **Read the feature item** at `.work/active/features/<id>.md`.
88
+ - Skip if `kind` is not `feature`, if `stage` is not `drafting`, or if
89
+ `tags` contains `refactor`, `perf`, `prose`, or `research`. Log the skip and move on.
90
+ 2. **Ground yourself** — read the parent epic body if `parent` is set, plus
91
+ the foundation docs (`docs/VISION.md`, `docs/SPEC.md`,
92
+ `docs/ARCHITECTURE.md`) and `AGENTS.md` / `CLAUDE.md`. Treat AGENTS as
93
+ canonical when both exist. Be efficient: skim, don't exhaustively re-read
94
+ across iterations within one session.
95
+ 3. **Map the codebase lightly** — start with direct Read/Glob/Grep over the
96
+ obvious area. Use one exploratory sub-agent only if local reading
97
+ leaves a real unknown; skip the full three-agent parallel sweep used in
98
+ the default mode because you're not designing units.
99
+ 4. **Run Phase 4.6 (UI surface fallback)** when `ux-ui-design` is installed
100
+ — same rules as default mode (inheritance check, mock only when
101
+ upstream coverage is missing). Most ask-questions runs find the parent
102
+ epic already mocked and skip here.
103
+ 5. **Surface ambiguities** — run Phase 4.5 as written above, but always in
104
+ the interactive branch (use `structured question tool`). Do not resolve with
105
+ judgment — the whole point of this mode is to capture user answers.
106
+ 6. **Capture answers** — append (or merge into existing) `## Design
107
+ decisions` in the feature body:
108
+ ```markdown
109
+ ## Design decisions
110
+ - **<question>**: <choice> — <one-line rationale>
111
+ ```
112
+ If the section already exists, merge — don't duplicate previously
113
+ answered questions, and don't overwrite prior answers without flagging
114
+ the conflict to the user.
115
+ 7. **Do NOT** spawn child stories, write the design body, or advance the
116
+ stage. The feature stays at `stage: drafting` so the design family can
117
+ pick it up later.
118
+ 8. **Commit per feature**:
119
+ ```bash
120
+ git add .work/active/features/<id>.md
121
+ git commit -m "feature-design --only-questions: <id>"
122
+ ```
123
+
124
+ ### Output (`--only-questions` mode)
125
+
126
+ In conversation, after the run:
127
+ - **Aligned**: list of feature ids and the count of design decisions
128
+ captured per feature
129
+ - **Skipped**: list of feature ids and reason (wrong stage, wrong tag, no
130
+ ambiguities found)
131
+ - **Next**: features stay at `stage: drafting` — start an autopilot goal for
132
+ `<epic-id>` or `--all`, or use direct `/agile-workflow:autopilot <scope>`.
133
+ The design pass on each feature will inherit the captured answers.
134
+
135
+ ## Workflow
136
+
137
+ ### Phase 1: Read the feature item
138
+
139
+ Read the feature file at `.work/active/features/<id>.md`. Confirm:
140
+ - `kind: feature`
141
+ - `stage: drafting`
142
+ - `tags` does NOT include `refactor`, `perf`, `prose`, or `research` (otherwise log a
143
+ misroute note and return without advancing — see the description block above)
144
+
145
+ The body should already have a brief from `scope`. Use it as the seed for design.
146
+
147
+ ### Phase 2: Ground yourself
148
+
149
+ The principles skill auto-loads — both code-design (Ports & Adapters, SSOT,
150
+ Generated Contracts, Fail Fast) and substrate-execution (Item-IS-the-Work,
151
+ Rolling-Foundation, Late-Binding) are active.
152
+
153
+ Read:
154
+ 1. `docs/VISION.md`, `docs/SPEC.md`, `docs/ARCHITECTURE.md` (foundation docs that
155
+ constrain this feature)
156
+ 2. `AGENTS.md` / `CLAUDE.md` (project conventions; AGENTS is canonical)
157
+ 2a. `.agents/rules/*.md` (if present) — the project's force-loaded agent rules
158
+ (tag semantics, test integrity, review policy)
159
+ 3. The parent epic if `parent` is set — read `.work/active/epics/<parent>.md`
160
+ 4. Existing source code in the area the feature touches
161
+ 5. Research docs in `docs/research/` if the feature uses libraries you haven't
162
+ verified
163
+
164
+ ### Phase 3: Map the codebase
165
+
166
+ Run a read-first scope-size probe before spawning exploratory sub-agents:
167
+
168
+ 1. Use Glob/`rg --files` to identify likely directories, entry points, and
169
+ existing tests.
170
+ 2. Use Grep/`rg` for feature terms, route names, exported types, and nearby
171
+ helpers.
172
+ 3. Read 2-5 representative source/test files yourself.
173
+
174
+ Then choose the dispatch size:
175
+
176
+ - **Small/bounded feature** — known module or a few obvious files: skip exploratory fanout
177
+ and use direct reading.
178
+ - **Medium/unclear feature** — one area but uncertain patterns: spawn one
179
+ read-only exploratory sub-agent with a combined brief.
180
+ - **Broad/cross-cutting feature** — distinct structure, interface, and test
181
+ questions across separate areas: spawn parallel read-only exploratory sub-agents.
182
+
183
+ For exploratory fanout:
184
+ - Use the host's generic/general-purpose subagent prompted with the explorer capsule from `../principles/references/subagents.md`, at medium reasoning by default.
185
+ - Use high or strongest reviewer reasoning for large or complex codebases.
186
+ - If no generic subagent adapter is available, keep the bounded mapping in the host session.
187
+
188
+ Possible prompts:
189
+ 1. **Codebase Structure** — directory layout, modules, entry points, exports
190
+ 2. **Interface & Type Inventory** — exported interfaces, types, signatures with file paths
191
+ 3. **Test Structure** — test patterns, helpers, fixtures, organization
192
+
193
+ After direct reading or Explore results, **read 2-3 key source files yourself**
194
+ to verify findings.
195
+
196
+ ### Phase 4: Re-align to project standards
197
+
198
+ Re-read `AGENTS.md` and `CLAUDE.md` if present at root, `.agents/`, or
199
+ `.claude/`, plus `.agents/rules/*.md` (if present) — the project's force-loaded
200
+ agent rules (tag semantics, test integrity, review policy). Treat AGENTS as
201
+ canonical if they disagree. Recency improves adherence. Confirm your approach
202
+ aligns with project conventions.
203
+
204
+ ### Phase 4.5: Surface ambiguities
205
+
206
+ Read the feature brief and the design space you've started to map, and
207
+ derive specific, concrete design questions about *this* feature's actual
208
+ work — requirements gaps, architecture trade-offs, scope boundaries,
209
+ integration assumptions, UX decisions. The questions must come from the
210
+ feature in front of you; examples of the *shape* only:
211
+
212
+ - "Should the cache invalidate on write or rely on TTL only?"
213
+ - "Does the upload accept multipart, or a presigned URL flow?"
214
+ - "When the parser hits a malformed row, do we skip and continue or fail
215
+ the whole batch?"
216
+ - "Is paging cursor-based or offset-based?"
217
+
218
+ Skip anything the brief, parent epic body, foundation docs, or codebase
219
+ already pin. Skip anything that's safely an implementation-time call.
220
+
221
+ Aim for the smallest set of questions that meaningfully resolve direction
222
+ — typically 2-5. Zero is fine if everything's already pinned.
223
+
224
+ **Cross-model advisory review under autopilot.** If this skill is running as a
225
+ delegation from active autopilot, the feature has large/risky architectural
226
+ decisions, and the body does not already contain useful `## Design decisions`
227
+ from a prior `--only-questions` pass, apply the cross-model advisory review
228
+ policy from `principles/SKILL.md` before resolving the questions yourself.
229
+
230
+ Use one focused `peer` pass only when a different model class is available.
231
+ Ask for missing questions, risks, ambiguous constraints, and alternatives for
232
+ this feature's design — not for a final verdict. Do not run the multi-pass
233
+ `peer-review` loop during routine autopilot design. If peeragent is
234
+ unavailable, the peer would use the same model class, or the invocation fails,
235
+ continue with host judgment and note that the advisory pass was skipped.
236
+ If the peeragent target is Claude Opus, allow 10 to 30 minutes for a large
237
+ review; no return after a few minutes is not evidence that it has hung.
238
+
239
+ Summarize the useful output under `## Other agent review` in the feature body
240
+ and fold accepted questions/risks into the decisions you log. Do not paste the
241
+ peer transcript into the item.
242
+
243
+ If this skill is running **as a delegation from an active autopilot run or
244
+ harness goal**, resolve each question with judgment (prioritize: consistent
245
+ with foundation docs > simpler option > defers irreversible decisions) and log
246
+ under `## Design decisions` in the body:
247
+
248
+ ```markdown
249
+ ## Design decisions
250
+ - **<question>**: <choice> — <one-line rationale>
251
+ ```
252
+
253
+ If the body already contains a `## Design decisions` section (from a prior
254
+ `--only-questions` pass or from `epic-design` Phase 4.7), treat those
255
+ locked-in answers as inputs — do NOT re-ask them.
256
+
257
+ In every other invocation — including direct user invocation under harness
258
+ auto mode (`permissions.defaultMode: "auto"`) — ask the user via
259
+ `structured question tool` before locking in. Harness-level "work without pausing"
260
+ reminders do **not** suppress these checkpoints. See `principles/SKILL.md`
261
+ Part III for the full caller-awareness rule.
262
+
263
+ The exception under autopilot: a 50/50 between two large irreversible choices
264
+ (e.g., SQL vs document store). Append a `## Blocker` section and return
265
+ without advancing — autopilot will skip and surface the blocker.
266
+
267
+ ### Phase 4.6: UI surface fallback (runs when ux-ui-design is installed)
268
+
269
+ This is the **fallback** mockup tier per `ux-ui-principles`. Epic-design
270
+ Phase 4.6 is primary; this phase exists to catch surfaces it didn't cover.
271
+
272
+ **Inheritance check first.** Read the parent epic body for a `## Mockups`
273
+ section and check `.mockups/screens/<this-feature-id>/` and
274
+ `.mockups/flows/` for existing mocks. If coverage exists, copy those paths
275
+ into this feature's `## Mockups` section and **skip the rest of this
276
+ phase**. Do not re-mock.
277
+
278
+ **Fallback only when upstream coverage is missing** — i.e. there's no
279
+ parent epic, the epic body shows a `## UI alignment deferred` note, OR a
280
+ genuinely-new surface emerged after epic-design ran. Then:
281
+
282
+ - **Net-new screen** → `/ux-ui-design:screens <feature-id>`.
283
+ - **Multi-screen flow tighter than the feature** → `/ux-ui-design:flows
284
+ <flow-name>` (rare).
285
+ - **Minor composition reusing existing patterns** → skip; note the
286
+ feature inherits from `<epic-id>`'s mocks.
287
+ - **No UI surface** → skip.
288
+
289
+ If prominent UI surface is missing both coverage AND a deferred note, the
290
+ epic-design tier should have caught it. Proceed with the fallback mock
291
+ and flag the discrepancy in the run output.
292
+
293
+ Skip this phase entirely if `ux-ui-design` is not installed.
294
+
295
+ ### Phase 5: Design the units
296
+
297
+ The substantive phase. Don't rush.
298
+
299
+ #### 5a. Architectural options
300
+
301
+ Name 2-3 plausible high-level approaches:
302
+ - One-paragraph description each
303
+ - Key tradeoff (what it optimizes for, what it sacrifices)
304
+ - Why it might or might not fit this project
305
+
306
+ Choose one explicitly. State why over the others.
307
+
308
+ #### 5b. Trickiest unit first
309
+
310
+ Among the units you'll design, name the one with highest unknowns or most novel
311
+ logic. Design it first and most carefully — the rest hangs on whether this is feasible.
312
+
313
+ #### 5c. Design each unit
314
+
315
+ For each unit, specify:
316
+ - **Exact file path** (e.g., `src/domain/user.ts`, not "the user file")
317
+ - **Code showing interfaces, types, and function signatures** in the project's language
318
+ - **Implementation notes** for non-obvious logic
319
+ - **Acceptance criteria** as testable assertions
320
+
321
+ Make strong decisions about abstractions, naming, and module boundaries.
322
+
323
+ ### Phase 5.5: Pre-mortem
324
+
325
+ Before finalizing, attack the design:
326
+ - What's the riskiest assumption?
327
+ - What would have to be true for this to fail in production?
328
+ - What's the fallback if the riskiest unit doesn't work?
329
+ - Where am I least sure?
330
+
331
+ If a serious risk surfaces, revise the design or add a spike unit that validates the
332
+ risky assumption first. Document discovered risks in a `## Risks` section in the
333
+ feature body.
334
+
335
+ ### Phase 6: Test approach
336
+
337
+ For each unit, design:
338
+ - **Unit tests** — behaviors to verify, edge cases, error paths
339
+ - **Integration points** — where does this unit meet other units; what tests prove the seams
340
+ - **Test data** — fixtures, factories, seed data needed
341
+
342
+ If a unit is hard to test, the design is probably wrong. Note it and revise.
343
+
344
+ ### Phase 7: Order and child stories
345
+
346
+ Specify implementation order — what must exist before what. Decide whether to
347
+ spawn child stories or treat the feature itself as the single implementation
348
+ unit.
349
+
350
+ #### When to spawn stories
351
+
352
+ Stories pay for themselves when **at least one** of these is true:
353
+
354
+ - **Parallelizable.** Three or more chunks can be implemented by independent
355
+ agents simultaneously — `/agile-workflow:implement-orchestrator` wants
356
+ stories so it has fan-out targets.
357
+ - **Non-trivial dependencies.** Story A blocks B blocks C; declaring
358
+ `depends_on:` at the story level makes the chain visible without reading
359
+ the full design body.
360
+ - **Multi-session work.** A feature that won't fit in one stride needs
361
+ resume points. A story file gives a fresh agent a smaller surface to
362
+ absorb than the entire feature design.
363
+ - **Heterogeneous acceptance.** Different chunks have different test
364
+ surfaces (UI works / IPC errors / DB schema). Gates score per-story
365
+ rather than per-feature, which is cleaner when the surfaces are genuinely
366
+ different.
367
+
368
+ #### When stories are pure overhead
369
+
370
+ Skip stories when **all** of these hold:
371
+
372
+ - Retroactive capture of already-done work (stories are forward-looking
373
+ containers; if the work is already done, just land it under the feature)
374
+ - Single-stride implementation (one session can finish the whole feature)
375
+ - Tight cohesion (every test exercises every code path; the chunks aren't
376
+ meaningfully independent)
377
+ - The natural decomposition is just "frontend / backend" — that's the
378
+ package boundary, not stories
379
+
380
+ #### Spawning a story
381
+
382
+ For each child story to spawn:
383
+ - Create `.work/active/stories/<feature-id>-<story-slug>.md`
384
+ - Frontmatter: `kind: story`, `stage: implementing`, `parent: <feature-id>`,
385
+ `depends_on: [...]` (declare which sibling stories must finish first)
386
+ - Body: scope of this story, the unit(s) it implements, acceptance criteria
387
+
388
+ Cycle check: run `.work/bin/work-view --blocking <story-id>` before adding any
389
+ `depends_on` entry.
390
+
391
+ ### Phase 8: Write design INTO the feature body
392
+
393
+ Update the feature file. Append (after the existing brief) sections like:
394
+
395
+ ```markdown
396
+ ## Architectural choice
397
+ <chosen approach + rationale>
398
+
399
+ ## Implementation Units
400
+
401
+ ### Unit N: <name>
402
+ **File**: `src/path/to/file.ext`
403
+ **Story**: `<story-id>` (if spawned as a separate story)
404
+
405
+ \`\`\`<lang>
406
+ // Exact interfaces, types, signatures
407
+ \`\`\`
408
+
409
+ **Implementation Notes**:
410
+ - <key detail>
411
+
412
+ **Acceptance Criteria**:
413
+ - [ ] <testable assertion>
414
+
415
+ ---
416
+
417
+ ## Implementation Order
418
+ 1. <unit / story>
419
+ 2. <unit / story>
420
+
421
+ ## Testing
422
+ ### Unit Tests: `tests/path/<name>.test.ext`
423
+ <test approach for each unit>
424
+
425
+ ## Risks
426
+ <from pre-mortem, if any>
427
+ ```
428
+
429
+ ### Phase 9: Advance stage and commit
430
+
431
+ 1. Edit the feature file's frontmatter: `stage: drafting → implementing`. The
432
+ PostToolUse hook auto-bumps `updated:`.
433
+ 2. Commit:
434
+ ```bash
435
+ git add .work/active/features/<id>.md .work/active/stories/<feature-id>-*.md
436
+ git commit -m "feature-design: <feature-id> (<N> child stories)"
437
+ ```
438
+
439
+ ## Output (default mode)
440
+
441
+ (For `--only-questions` mode output, see the section above.)
442
+
443
+ In conversation:
444
+ - **Designed**: `<feature-id>` advanced to `stage: implementing`
445
+ - **Child stories**: list with `depends_on` chains
446
+ - **Implementation order**: 1, 2, 3, ...
447
+ - **Risks flagged**: list (or "none")
448
+ - **Next**: `/agile-workflow:implement <story-id>` for sequential, or
449
+ `/agile-workflow:implement-orchestrator <feature-id>` for parallel agents over
450
+ the dependency graph
451
+
452
+ ## Guardrails
453
+
454
+ - The design lives in the feature's body. NEVER create `docs/designs/<name>.md` —
455
+ that's a workflow-plugin pattern; agile-workflow uses item-IS-the-work.
456
+ - **UI/UX mockups are FALLBACK here.** Check the parent epic body for
457
+ `## Mockups` first; reference and skip. Only mock at this tier for
458
+ genuinely-new surfaces the parent epic didn't cover, and flag the
459
+ upstream gap rather than silently back-filling.
460
+ - Specify types and signatures EXACTLY. Vague descriptions become guesses during
461
+ implementation, and guesses become bugs.
462
+ - Design error handling explicitly. Undesigned error paths are the #1 source of
463
+ production surprises.
464
+ - Build on existing patterns in the codebase — consistency reduces cognitive load.
465
+ - Cycle prevention is mandatory for `depends_on`. Use `work-view --blocking`.
466
+ - Don't pre-populate stage on child stories beyond `implementing`. Stage advances
467
+ through actual work, not at design time.
468
+ - `--only-questions` mode never advances stage, never spawns stories, and never
469
+ writes design content beyond the `## Design decisions` section. If you find
470
+ yourself doing any of those, you're in the wrong mode.
471
+ - `--only-questions` is interactive-only — refuse to run when an active
472
+ autopilot run or harness goal is driving the session.