@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,185 @@
1
+ ---
2
+ name: ideate
3
+ description: >
4
+ Interactive project definition workshop for agile-workflow. Explores an idea through discovery,
5
+ refinement, and definitions phases, then produces tailored foundation documents (VISION.md, SPEC.md,
6
+ ARCHITECTURE.md, and domain-specific docs) that encode the rolling-foundation principle from day
7
+ one. Use when defining what to build, formalizing a rough idea, or establishing a project's
8
+ foundation documents before bootstrapping the substrate via /agile-workflow:convert.
9
+ ---
10
+
11
+ # Ideate
12
+
13
+ You are a **project definition partner**. The user has an idea — anything from a vague
14
+ sentence to a detailed concept — and you help them explore it, refine it, and produce
15
+ foundation documents that define the project. This skill produces docs only; it does
16
+ not bootstrap the substrate (that's `/agile-workflow:convert`'s job).
17
+
18
+ The foundation docs you produce will be subject to the **rolling-foundation principle**:
19
+ they describe current truth or intended future state, never past state, and they
20
+ roll forward in place as the project evolves. Encode that intent — write docs
21
+ as declarative truth, with no historical prose or migration notes.
22
+
23
+ ## Workflow
24
+
25
+ Four phases, mostly conversational. Use **structured question tool** only at defined checkpoints —
26
+ everything else is open exploration.
27
+
28
+ ### Phase 1: Discovery
29
+
30
+ **Goal:** Deeply understand what the user wants to build and why.
31
+
32
+ Freeform exploration. No structured questions. Cover:
33
+ - The idea — what is it, what does it do, who is it for
34
+ - The problem — what pain point or opportunity does this address
35
+ - Prior art — what exists, what's missing
36
+ - Audience — who uses this, what do they care about
37
+ - Constraints — budget, timeline, platform, team, existing systems
38
+ - Inspiration — what projects influenced this
39
+ - Ambition — weekend hack or long-term investment
40
+ - Anti-vision — what does failure look like, in concrete terms
41
+ - Competitive landscape — who else is solving this, why isn't their solution good enough
42
+
43
+ When you can explain the idea to someone else, summarize your understanding and ask:
44
+ "Did I get this right? What did I miss or get wrong?" Iterate until the user confirms.
45
+
46
+ ### Phase 1.5: Maximalist vs Minimalist Contrast
47
+
48
+ Before refining, generate two concrete versions of the project:
49
+
50
+ - **Maximalist:** "If you had unlimited time, budget, and team — what would this be at
51
+ its most ambitious?" Describe the full vision: every feature, every audience.
52
+ - **Minimalist:** "What's the smallest version that still proves the core idea is worth
53
+ pursuing?"
54
+
55
+ Present both with a clear contrast. Then ask: "Where between these two should we land,
56
+ and why?" Push back respectfully if the user lands too close to maximalist — the cuts
57
+ reveal what they actually value.
58
+
59
+ When the user stakes out a position, summarize: "So you're building something closer
60
+ to the minimalist version, but you want X and Y from the maximalist. Right?"
61
+
62
+ ### Phase 2: Refinement
63
+
64
+ Sharpen the idea into something concrete:
65
+ - **What this IS** — one-paragraph project definition
66
+ - **What this is NOT** — explicit exclusions to prevent scope creep
67
+ - **Success criteria** — measurable. "Fast" becomes "API responses under 200ms at p95."
68
+ - **Key decisions** — what trade-offs have been made
69
+ - **Open questions** — what's still unresolved (flag honestly)
70
+
71
+ **Checkpoint (structured question tool):** Present the project summary. Iterate until approved.
72
+
73
+ ### Phase 3: Definitions
74
+
75
+ Nail down technical and structural specifics:
76
+ - Tech stack (languages, frameworks, databases, platforms)
77
+ - Architecture direction (monolith vs services, client-server, etc.)
78
+ - Structure (monorepo vs multirepo, module boundaries, key abstractions)
79
+ - Domain-specific decisions (if applicable)
80
+
81
+ Use `WebSearch` to verify unfamiliar tech choices.
82
+
83
+ **Then propose a doc plan.** Recommend which foundation documents this project
84
+ needs. Skip docs the project doesn't need — more docs is not better; the right
85
+ docs is better.
86
+
87
+ ### Doc menu
88
+
89
+ Common foundation docs:
90
+
91
+ - **VISION.md** — the project's reason for existing. What problem this solves,
92
+ for whom, what success looks like. Concise enough to read in 2 minutes.
93
+ *Almost every project benefits from this.*
94
+ - **SPEC.md** — technical boundaries and decisions. What's the stack, what are
95
+ the hard constraints, what are the external interfaces?
96
+ *Include for any project with meaningful technical decisions.*
97
+ - **ARCHITECTURE.md** — how the system is organized. Components, data flow,
98
+ key design decisions. Diagrams encouraged.
99
+ *Include when the system has multiple components or non-obvious structure.*
100
+ - **PRINCIPLES.md** — standing principles the project applies in design and
101
+ implementation.
102
+ *Include when principles are durable enough to outlive any one feature.*
103
+
104
+ Domain-specific docs (examples, not exhaustive):
105
+
106
+ - **UX.md** — user experience: flows, interaction patterns, design system.
107
+ *For projects with a user interface.*
108
+ When the `ux-ui-design` plugin is installed, UX.md should reference the
109
+ mockup-first convention (mocks live in `.mockups/`, generated via
110
+ `/ux-ui-design:screens` / `:flows` / `:palette`). For UI-bearing projects,
111
+ recommend running `/ux-ui-design:palette` after the foundation docs are
112
+ written so design-system tokens are locked in before feature work begins.
113
+ - **USERSTORIES.md** — what users can do, with acceptance criteria.
114
+ *For projects with distinct user-facing features that benefit from formal
115
+ definition.*
116
+ - **CONTRACT.md** — API contracts, protocols, interfaces.
117
+ *For projects exposing or consuming APIs that need formal definition.*
118
+ - **GAMEPLAY.md** — core mechanics, progression systems, player experience loops.
119
+ *For game projects.*
120
+ - **NARRATIVE.md** — story, world-building, characters, lore.
121
+ *For games, interactive fiction, narrative-driven projects.*
122
+ - **WORLD.md** — world rules, physics, geography, factions.
123
+ *For projects with a fictional or simulated world.*
124
+ - **DATA-SPEC.md** — data models, schemas, pipeline architecture, storage.
125
+ *For data-heavy projects, ML pipelines, analytics platforms.*
126
+ - **CONTENT-STRATEGY.md** — content types, editorial guidelines, publishing
127
+ workflows, voice and tone.
128
+ *For content platforms, publications, marketing projects.*
129
+ - **RESEARCH.md** — methodology, hypotheses, literature review, experiment
130
+ design.
131
+ *For research projects requiring systematic investigation.*
132
+ - **HARDWARE-SPEC.md** — physical components, protocols, power requirements,
133
+ form factor.
134
+ *For hardware, IoT, embedded systems.*
135
+ - **CURRICULUM.md** — learning objectives, lesson structure, assessment.
136
+ *For educational products or training programs.*
137
+ - **PROTOCOL.md** — communication protocols, message formats, state machines.
138
+ *For networking, distributed systems, inter-service communication.*
139
+ - **MIGRATION.md** — rules for handling existing data/state when the project
140
+ ships.
141
+ *For projects replacing or evolving existing systems.*
142
+
143
+ **Custom docs** — propose any document type not on this list when the project
144
+ demands it. Name it clearly and explain what it covers.
145
+
146
+ **Checkpoint (structured question tool):** Present the doc plan. List each doc with a one-sentence
147
+ description of what it will contain for *this specific project*. Iterate until approved.
148
+
149
+ ### Phase 4: Doc Writing
150
+
151
+ Write docs one at a time. For each:
152
+ 1. **Draft** based on everything discussed
153
+ 2. **Present** the draft conversationally; flag decisions and assumptions
154
+ 3. **Iterate** to approval
155
+ 4. **Save** to disk under `docs/`
156
+
157
+ **Output location:** Default to `docs/` for foundation documents — `docs/VISION.md`,
158
+ `docs/SPEC.md`, `docs/ARCHITECTURE.md`. Create `docs/` if absent.
159
+
160
+ After all docs are written, present a final summary listing every file produced with a
161
+ one-line description of each, and tell the user to run `/agile-workflow:convert` next
162
+ to bootstrap the substrate around these docs.
163
+
164
+ ## Encoding rolling-foundation
165
+
166
+ While drafting, write every assertion in **present tense, current truth**. No:
167
+ - "Future plans"
168
+ - "Will eventually"
169
+ - Roadmap-shaped sections (no upfront commitments to features-by-version)
170
+ - "Note: in v1.x we..." anything
171
+
172
+ The docs are foundations the project rolls forward indefinitely. Anything time-bound
173
+ lives in items in `.work/`, not in foundation docs.
174
+
175
+ ## Anti-Patterns
176
+
177
+ - **Don't rush discovery.** Doc quality depends on conversation quality.
178
+ - **Don't default to all docs.** A focused project might only need VISION + SPEC.
179
+ - **Don't impose structure from other projects.** Each project's docs should be shaped
180
+ for *that project*.
181
+ - **Don't produce a roadmap.** That's anti-pattern under agile-workflow's late-binding
182
+ principle. Phase decomposition into epics happens later via `/agile-workflow:epicize`.
183
+ - **Don't write code or scaffold projects.** This skill produces docs only.
184
+ - **Don't skip checkpoints.** The user must approve the project summary (Refinement)
185
+ and doc plan (Definitions) before you write to disk.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "Ideate"
3
+ short_description: "Use Ideate for repo workflows"
4
+ default_prompt: "Use $ideate for this repository."
5
+ policy:
6
+ allow_implicit_invocation: false
@@ -0,0 +1,288 @@
1
+ ---
2
+ name: implement
3
+ description: >
4
+ ALWAYS invoke this skill when the user explicitly asks to implement a substrate item inline OR the
5
+ delivery is tiny (about 50 LoC or less, two files or fewer, no coordination) OR the deliverable is no-code prose (a
6
+ [prose] item — any size, as long as it needs no coordination) — for any larger or default *code*
7
+ work prefer /agile-workflow:implement-orchestrator. Inline single-stride implementation of a
8
+ substrate item at stage:implementing. Reads the design embedded in the item body, writes code per
9
+ the spec, runs build+tests, advances stage implementing to review, and updates the item body with
10
+ implementation notes. Triggers on "implement this inline", "implement this item inline", "just do it
11
+ inline", or a very small explicit delivery.
12
+ ---
13
+
14
+ # Implement
15
+
16
+ You implement a substrate item — feature or story at `stage: implementing` — by
17
+ reading the design embedded in its body and writing code that conforms. The item
18
+ file is your spec. The item body is also your scratchpad: you add implementation
19
+ notes there as you work.
20
+
21
+ ## Trigger
22
+
23
+ `/agile-workflow:implement-orchestrator` is the default routing for implementing
24
+ work, including lone stories. This skill is the **inline alternative** — same
25
+ work, no sub-agent fan-out — and it's the right call when:
26
+
27
+ - The delivery is small and focused (a tiny tweak, a single-file change, a
28
+ flag flip, landing code already in the working tree)
29
+ - The deliverable is **no-code prose** (a `[prose]` feature — docs, a
30
+ convention / rule, research write-up, copy). The ≤50 LoC / ≤2 files cap is a
31
+ *code-coordination* proxy; it does not apply to prose, which qualifies on
32
+ **no-coordination** alone regardless of length. A 600-line convention rewrite
33
+ is one authoring stride, not an orchestrated fan-out.
34
+ - The user explicitly asks to implement inline / "do it yourself"
35
+ - You're already mid-flow on this item and a hand-off would lose context
36
+
37
+ When the work is multi-unit *code*, spans several files, or has sibling stories
38
+ that could run in parallel, prefer the orchestrator. When in doubt on code work
39
+ and nothing strongly points either way, the orchestrator is the safer default.
40
+ Prose work is never a reason to reach for the orchestrator.
41
+
42
+ Common phrases:
43
+ - "implement story X", "implement this feature"
44
+ - "let's code feature Y"
45
+ - "the design is ready, start building"
46
+ - "just do it inline"
47
+
48
+ ## Workflow
49
+
50
+ ### Phase 1: Ground yourself
51
+
52
+ The principles skill auto-loads (both code-design and substrate-execution paradigms
53
+ active during implementation).
54
+
55
+ Read:
56
+ 1. **The item file** at `.work/active/{features,stories}/<id>.md` — this is your
57
+ spec. The design is in there. Note whether `tags:` contains `prose`; that switches the
58
+ workflow into prose mode below.
59
+ 2. **The parent feature** if implementing a story: `.work/active/features/<parent>.md`
60
+ — context and acceptance criteria for the parent
61
+ 3. **Foundation docs** referenced by the design: `docs/SPEC.md`, `docs/ARCHITECTURE.md`
62
+ 4. `AGENTS.md` and `CLAUDE.md` (root, `.agents/`, or `.claude/`) for project
63
+ conventions. Treat AGENTS as canonical if they disagree.
64
+ 4a. `.agents/rules/*.md` (if present) — the project's force-loaded agent rules
65
+ (tag semantics, test integrity, review policy)
66
+ 5. **Research docs** referenced by the design: `docs/research/<topic>.md` if any
67
+ 6. **Existing source code** the design references — verify interfaces, signatures,
68
+ module paths
69
+
70
+ ### Phase 2: Verify dependency readiness
71
+
72
+ If the item has `depends_on`, run:
73
+
74
+ ```bash
75
+ .work/bin/work-view --stage done --paths
76
+ ```
77
+
78
+ Confirm every entry in `depends_on` is at `stage: done` (or in releases/archive,
79
+ which count as terminal-done).
80
+
81
+ If any dep is unmet, append a one-line note to the item body and return
82
+ without advancing the stage:
83
+
84
+ > Skipped: depends_on `<dep-id>` not yet done (stage:`<x>`).
85
+
86
+ Autopilot pre-filters via `work-view --ready` so this should rarely fire under
87
+ autopilot. Interactive callers will see the note and can choose to fix the
88
+ dep or remove it.
89
+
90
+ ### Phase 2.5: Choose delivery mode
91
+
92
+ If the item carries `tags: [prose]`, use **prose mode** for the rest of this skill:
93
+
94
+ - Treat the item body as a writing brief, not a code design.
95
+ - Treat the target docs, rules, conventions, copy, or research write-up as the integration surface.
96
+ - Skip source-code mapping and build/test assumptions unless the prose claim depends on a code fact
97
+ or the repo has explicit docs checks.
98
+ - Do not spawn an exploratory sub-agent just to map code. Use a read-only sub-agent only when the
99
+ document's factual basis is broad enough that local reading leaves named unknowns.
100
+
101
+ For non-prose items, continue in code mode.
102
+
103
+ ### Phase 3: Map integration points
104
+
105
+ For `[prose]` items, map prose integration points instead:
106
+
107
+ - list the target docs/rules/copy files named by the brief
108
+ - read nearby sections for terminology, tone, and current conventions
109
+ - verify any concrete API, command, path, or behavior claim against the repo before writing it
110
+ - check for duplicate or conflicting guidance in `AGENTS.md`, `.agents/rules/*.md`, docs, and skill
111
+ references
112
+
113
+ Then skip to Phase 6 in prose mode.
114
+
115
+ Start with a local scope-size probe using Read/Glob/Grep:
116
+
117
+ - list the files named by the design
118
+ - search for public exports, shared utilities, type definitions, and module
119
+ boundaries in the target area
120
+ - search for matching test helpers and fixtures
121
+ - read the 1-3 files most likely to define the integration contract
122
+
123
+ If this answers the integration question, skip exploratory fanout and continue. Inline
124
+ implementation is often chosen because the scope is small enough for direct
125
+ reading.
126
+
127
+ Spawn one read-only exploratory sub-agent only when the integration surface is still
128
+ unclear or broader than a few obvious files:
129
+ - Use the host's generic/general-purpose subagent prompted with the explorer capsule from `../principles/references/subagents.md`, at medium reasoning by default.
130
+ - Use high or strongest reviewer reasoning for large or complex codebases.
131
+ - If no generic subagent adapter is available, keep the bounded mapping in the host session.
132
+ - For the dynamic explorer prompt posture, load
133
+ `../principles/references/subagents.md`; do not assume named agile-workflow
134
+ roles are installed.
135
+
136
+ Brief:
137
+ - "Find all public exports, shared utilities, type definitions, and module
138
+ boundaries that <new code area> must integrate with. Include file paths and
139
+ signatures. Also check for existing test helpers and fixtures."
140
+
141
+ After direct reading or Explore results, **spot-check 1-2 key integration
142
+ points** by reading those files yourself.
143
+
144
+ ### Phase 4: Plan and reconcile design vs reality
145
+
146
+ For each file the design says to modify or depend on:
147
+ - Confirm the file exists at the path the design specifies
148
+ - Confirm interfaces, types, signatures match the design's expectations
149
+ - Note any discrepancies — the design captured intent at design time; the repo is
150
+ current ground truth
151
+
152
+ Reconcile silently if changes are minor and obvious. Surface significant discrepancies
153
+ in the implementation notes you'll write in Phase 7.
154
+
155
+ #### Phase 4a: Detect "code already exists" (land mode)
156
+
157
+ Check if the implementation already exists in the working tree (typical for
158
+ items captured retroactively by `convert` Phase 8.5 or manual scope).
159
+ Signals: a "Files in this cluster" list in the body, a retroactive-capture
160
+ note, sparse design with concrete file paths matching `git status`. Two or
161
+ more signals → land mode.
162
+
163
+ In land mode:
164
+ 1. Read the existing code; update the body's design section to reflect
165
+ as-built reality (paths, interfaces, signatures).
166
+ 2. Validate — typecheck, lint, tests scoped to touched packages
167
+ (`pnpm --filter`, `cargo -p`, `pytest <path>`).
168
+ 3. Fill test gaps for any meaningful behavior that lacks coverage.
169
+ 4. Skip Phase 6 (no new code) and go straight to Phase 7 (notes — log
170
+ "Land mode" explicitly), Phase 8 (verify), Phase 9 (commit + advance).
171
+
172
+ ### Phase 5: Re-align to project standards
173
+
174
+ Re-read `AGENTS.md` and `CLAUDE.md` if present at root, `.agents/`, or
175
+ `.claude/`, plus `.agents/rules/*.md` (if present) — the project's force-loaded
176
+ agent rules (tag semantics, test integrity, review policy). Treat AGENTS as
177
+ canonical when they disagree. Recency improves adherence.
178
+
179
+ ### Phase 6: Implement
180
+
181
+ For `[prose]` items:
182
+ 1. Write the requested prose deliverable in the target file(s), preserving surrounding structure,
183
+ markers, and ownership boundaries.
184
+ 2. Keep statements current-state oriented. Do not add history narratives unless the target file is
185
+ explicitly historical.
186
+ 3. Remove or reconcile obsolete duplicate wording when the brief requires a single source of truth.
187
+ 4. Verify links, commands, file paths, skill names, and frontmatter examples against the repo.
188
+ 5. Do not run unrelated code builds solely because the repository has one.
189
+
190
+ For code items:
191
+
192
+ For each unit/file in the item's design:
193
+ 1. Write the code following the design's specifications — exact types, signatures,
194
+ contracts
195
+ 2. Apply established patterns from the codebase
196
+ 3. Handle every error path the design specifies
197
+ 4. Write tests that verify behavior, not implementation
198
+ 5. Update module exports (index files) so new code integrates cleanly
199
+
200
+ Take pride in the details: clean variable names, idiomatic control flow, meaningful
201
+ error messages. Code that a future developer would read with appreciation.
202
+
203
+ ### Phase 7: Update item body with implementation notes
204
+
205
+ Append (or update) an "Implementation notes" section in the item's body:
206
+
207
+ ```markdown
208
+ ## Implementation notes
209
+ - Files changed: <list>
210
+ - Tests added: <list>
211
+ - Discrepancies from design: <list with one-line explanation each, or "none">
212
+ - Adjacent issues parked: <list of backlog ids if any, or "none">
213
+ ```
214
+
215
+ This is part of the rolling record of the item — a future agent reading this file
216
+ should see the design AND what actually happened.
217
+
218
+ ### Phase 8: Self-verify
219
+
220
+ For `[prose]` items:
221
+ 1. Proofread the changed text in context.
222
+ 2. Run markdown/docs checks if the repo defines them.
223
+ 3. Verify every concrete path, command, skill name, and version claim touched by the prose.
224
+ 4. Walk through each acceptance criterion in the item body and confirm it is met.
225
+
226
+ For code items:
227
+
228
+ 1. Run the build command from `AGENTS.md` / `CLAUDE.md`
229
+ 2. Run the test command — all tests including new ones must pass
230
+ 3. Walk through each acceptance criterion in the item body — confirm each is met
231
+ 4. If any gap, fix or report
232
+
233
+ Don't claim done if tests don't pass. A known gap reported is better than a hidden one.
234
+
235
+ #### Test integrity
236
+
237
+ When tests fail during verification, classify each failure before reacting:
238
+
239
+ - **Bad test** (stale fixture, drifted assertion, broken mock, outdated
240
+ snapshot) → fix in-session. Repairing the suite is part of the stride.
241
+ - **Real production bug** surfaced by the test → park it via
242
+ `/agile-workflow:park` with a short repro. Do NOT silently fix mid-pass.
243
+ Once the suite is green, if the parked bug is small enough for a single
244
+ stride, pick it up immediately with `/agile-workflow:scope` → design →
245
+ implement. Larger bugs stay in backlog for prioritization.
246
+ - **Pre-existing flake or unrelated regression** → park it. Don't bundle.
247
+
248
+ NEVER game a test to make it pass. A failing test that documents *why* it
249
+ fails (inline comment, `skip` linked to a backlog id, `xfail` with reason)
250
+ is more honest than a green test that lies. No `expect(true).toBe(true)`,
251
+ no asserting on whatever the code happens to return, no deleting a test
252
+ as "flaky" without root-causing first.
253
+
254
+ ### Phase 9: Advance stage and commit
255
+
256
+ 1. Edit the item's frontmatter: `stage: implementing → review`. PostToolUse hook
257
+ bumps `updated:`.
258
+ 2. Commit:
259
+ ```bash
260
+ git add <changed-files> <test-files> .work/active/<kind>s/<id>.md
261
+ git commit -m "implement: <id>"
262
+ ```
263
+
264
+ ## Output
265
+
266
+ In conversation:
267
+ - **Implemented**: `<id>` advanced to `stage: review`
268
+ - **Files changed**: list
269
+ - **Tests added**: list
270
+ - **Discrepancies from design**: list (or "none")
271
+ - **Adjacent issues parked**: backlog ids (or "none")
272
+ - **Next**: `/agile-workflow:review <id>` to evaluate the change
273
+
274
+ ## Guardrails
275
+
276
+ - The item file is your spec. If it conflicts with the repo, trust the repo's
277
+ reality and note the discrepancy in implementation notes.
278
+ - The design's INTENT is your north star. The repo's INTERFACES are your reality.
279
+ When they disagree, adapt the implementation, document the why.
280
+ - Implement fully or report a blocker. NEVER leave TODO comments or `unimplemented!`.
281
+ - Don't add unrequested features. Adapt to repo reality freely; expand scope never.
282
+ - Don't advance past `review` — that's `/agile-workflow:review`'s job.
283
+ - If you discover a genuine design flaw, don't muscle through. Append a
284
+ `## Implementation discovery` section, set stage back to `drafting`, and
285
+ return. The design family will pick it up on the next pass.
286
+ - Adjacent issues you notice get parked via `/agile-workflow:park`, not bundled.
287
+ - Test integrity is non-negotiable. Fix bad tests in-session; park real
288
+ production bugs; never make a test pass just to make it pass.