@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,330 @@
1
+ ---
2
+ name: autopilot
3
+ description: >
4
+ Goal-statement or direct-invocation queue driver for agile-workflow. Use when a harness goal or user
5
+ request says to run autopilot, drain ready work, finish an epic, continue through .work/active/, or
6
+ make autonomous progress on the substrate. Reads .work/active/, picks ready items by depends_on and
7
+ stage, delegates to design, implement, and review skills, commits transitions, and repeats until the
8
+ scope is done or blocked. Before reporting complete, runs a final peer-review/fresh-context
9
+ completion pass and fixes or files accepted findings. No /loop or --resume mechanics; the harness
10
+ goal/continuation feature owns long-running persistence. Epic-scoped by default; --all drains all
11
+ active work; free-text scope directives are allowed.
12
+ ---
13
+
14
+ # Autopilot
15
+
16
+ Autopilot is the queue policy that runs inside a harness goal. It can also be
17
+ called directly as a skill. It does not schedule watchdog loops, manage timers,
18
+ or maintain a progress file. The substrate is the state, and the harness
19
+ goal/continuation feature is responsible for carrying long-running work across
20
+ compaction or continuation turns.
21
+
22
+ Agents may invoke this skill when the active goal statement or user request asks
23
+ for autonomous substrate progress. The user can still invoke it directly.
24
+
25
+ ## Goal Contract
26
+
27
+ The cleanest invocation is a goal statement that names autopilot:
28
+
29
+ > Use agile-workflow autopilot to drain `<scope>` until all in-scope active
30
+ > items are done or blocked.
31
+
32
+ When an active goal exists, treat the goal statement as the invocation surface
33
+ and run this skill inside that goal. Do not create a nested goal. If no active
34
+ goal exists, run the same queue policy inline for the direct invocation.
35
+
36
+ Only create a new harness goal when the caller explicitly asks the agent to
37
+ create/start one and the harness exposes that API. Otherwise, attach to the
38
+ active goal or run inline.
39
+
40
+ Use `.work/active/` as the resume point. Do not call `/loop`, do not create
41
+ watchdog schedules, and do not support `--resume`; those are legacy mechanics.
42
+
43
+ When running under a harness goal, mark/report the goal outcome this way. When
44
+ running inline, use the same categories in the final summary:
45
+
46
+ - **Complete** when no in-scope active item remains at `drafting`,
47
+ `implementing`, or `review`.
48
+ - **Blocked** when in-scope items remain but none are ready, an item has a hard
49
+ blocker, or the review circuit-breaker escalated unresolved work.
50
+ - **Interrupted** when the user stops the run. Finish the current safe
51
+ transition, commit if anything changed, summarize the remaining queue, and
52
+ let the harness/user decide whether to continue the goal later.
53
+
54
+ ## Arguments
55
+
56
+ - `autopilot <epic-id>` - drain items under `<epic-id>` transitively via the
57
+ parent chain until the scoped queue is done or blocked.
58
+ - `autopilot --all` - drain all `.work/active/` items.
59
+ - `autopilot <free-text>` - interpret as a scope directive, such as "finish the
60
+ dangling work", "wrap up phase 14", or "drain everything tagged refactor".
61
+ Log the interpretation in the run summary. When scope is ambiguous, prefer the
62
+ broader active-work interpretation. `.work/backlog/` is always out of scope.
63
+
64
+ ## Prerequisites
65
+
66
+ Two gates, with different timing:
67
+
68
+ 1. **Before anything:** `.work/CONVENTIONS.md` exists. If not, halt: "No substrate found. Run
69
+ `/agile-workflow:convert` first."
70
+ 2. **After Phase 1 resolves the scope** (the check is route-aware, so it runs against the
71
+ resolved work set): foundation docs exist (`docs/VISION.md` or `docs/SPEC.md`) — required
72
+ when the scope contains **any** item that routes to the design family (`epic-design` /
73
+ `feature-design` / `refactor-design` / `perf-design`), which read foundation docs as their
74
+ design anchor. *(Design family = skills that read foundation docs as their design anchor; a
75
+ deployment adding such a skill extends this list.)* If absent in that case, halt the whole
76
+ run with a clear message **before delegating any item** — including in a mixed scope: do not
77
+ partially drain the non-design-family items, a partial drain leaves the queue in a state the
78
+ goal statement didn't describe. A scope with no design-family routes — drafting items that
79
+ all route cross-plugin to `agentic-research:research-orchestrator` (`[research]` items anchor
80
+ on the commissioning item body + the research substrate, not VISION/SPEC), and/or
81
+ `implementing`/`review` items only — runs without foundation docs.
82
+
83
+ These are hard halts because the queue has no reliable substrate or design
84
+ anchor without them.
85
+
86
+ ## Workflow
87
+
88
+ ### Phase 1: Resolve Scope
89
+
90
+ Build the scope from the argument:
91
+
92
+ - Epic id: include the epic plus descendants through `parent` links.
93
+ - `--all`: include every item in `.work/active/{epics,features,stories}/`.
94
+ - Free text: inspect item ids, tags, parents, titles, and bodies; select the
95
+ matching active subset and record the interpretation.
96
+
97
+ Only active items are candidates. Backlog items must be promoted through
98
+ `scope` before autopilot can touch them.
99
+
100
+ **Settle the implementation tier once, here at kickoff** — don't let it default
101
+ silently per wave. If the goal/args/user named a tier (or the project fixes one
102
+ in `.work/CONVENTIONS.md`), honor it. Otherwise, when the goal permits
103
+ interaction, ask once for a capability tier — **baseline**, **raised**, or
104
+ **highest** — and lock it for the whole run. The host resolves that capability to
105
+ its available generic subagent model/effort at dispatch time. Under an autonomous
106
+ goal contract that forbids mid-run questions, use the `implement-orchestrator`
107
+ default and **state the tier in the run summary** so a cheap-tier drain is never
108
+ a silent surprise. Pass the settled tier down in the Phase 4 caller note so
109
+ `implement-orchestrator` does not re-ask.
110
+
111
+ ### Phase 2: Build The Queue
112
+
113
+ Filter candidates to `stage` in `{drafting, implementing, review}`.
114
+
115
+ An item is ready when every `depends_on` entry is terminal:
116
+
117
+ - `stage: done`, or
118
+ - already moved to `.work/releases/` or `.work/archive/`.
119
+
120
+ Use `.work/bin/work-view` when it can answer the query; otherwise read
121
+ frontmatter directly.
122
+
123
+ **`[scan]`-tagged items are never queued.** `work-view --ready`/`--blocked` exclude
124
+ them by construction — they are engagement-owned scan-campaign scaffold driven by
125
+ `/agile-workflow:deep-code-scan`, not ordinary work. (If you fall back to reading
126
+ frontmatter directly because `work-view` is unavailable, replicate this: skip any
127
+ item whose `tags` contain `scan`.) The remediation a scan produces is a separate
128
+ `fix-<goal>` epic with normal routing tags — that drains here as usual.
129
+
130
+ ### Phase 3: Pick The Next Item
131
+
132
+ Sort ready candidates by:
133
+
134
+ 1. `depends_on` count ascending
135
+ 2. `created` ascending
136
+
137
+ Pop the first item. If there are no ready candidates, evaluate the stop rules.
138
+
139
+ For `stage: implementing`, the picked item is only an anchor. Hand the whole
140
+ in-scope implementing band to `implement-orchestrator`; do not pre-bundle it
141
+ yourself.
142
+
143
+ ### Phase 4: Delegate Work
144
+
145
+ Invoke the relevant skill through `Skill` or the local skill mechanism. Include
146
+ this caller note in every delegated prompt:
147
+
148
+ > Delegated by an active agile-workflow autopilot goal for `<scope>`. Resolve
149
+ > ambiguities with judgment, log rationale in the item body, and do not ask
150
+ > strategic questions unless a hard halt condition applies. Implementation tier
151
+ > for this run: `<settled tier>` — use it for worker dispatch; do not re-ask. For large or risky
152
+ > design decisions, use the cross-model advisory review policy from
153
+ > `principles/SKILL.md` (Part IV) only when a different model class is available;
154
+ > peer failures are non-blocking. For deep or complex design work, use **two
155
+ > different model classes** if available, paired across the advisory→adversarial
156
+ > phases in `principles/references/models.md`. A top-tier reasoning peer may take
157
+ > 10 to 30 minutes for a large review; lack of output after a few minutes does
158
+ > not mean it has hung. For subagent role names, load
159
+ > `principles/references/subagents.md`. When hosted in Pi, use only the
160
+ > supported agile-workflow Pi roles for this adapter; whether a reviewer run is
161
+ > cross-model depends on the model/provider selected at spawn time.
162
+
163
+ Routing:
164
+
165
+ - `stage: drafting`, `kind: epic` -> `epic-design` (an epic carrying `[research]` is a
166
+ research-program epic — it routes here as normal epic decomposition; its children are
167
+ `[research]` features each carrying their own `research_dials:` registration; the tag at
168
+ epic level signals program decomposition, never an epic-level registration)
169
+ - `stage: drafting`, feature with `tags: [refactor]` -> `refactor-design`
170
+ - `stage: drafting`, feature with `tags: [perf]` -> `perf-design`
171
+ - `stage: drafting`, feature with `tags: [prose]` -> `prose-author`
172
+ - `stage: drafting`, feature with `tags: [research]` -> `agentic-research:research-orchestrator`
173
+ (**cross-plugin**; the orchestrator runs the grounded engagement end-to-end — verification
174
+ gates fire inline, there is no separate implement step, and it never binds to a release.
175
+ Requires the `agentic-research` plugin; without it, treat as a plain feature.)
176
+ - `stage: drafting`, other feature -> `feature-design`
177
+ - `stage: implementing`, epic -> skip direct implementation; children are the
178
+ work targets
179
+ - `stage: implementing`, non-epic with `tags: [prose]` -> `implement <id>`
180
+ (inline — single stride, no orchestration; prose does not need parallel
181
+ coordination)
182
+ - `stage: implementing`, non-epic with `tags: [research]` -> `agentic-research:research-orchestrator`
183
+ (resume/continue the engagement; research never flows through `implement-orchestrator` or
184
+ `release-deploy` — a single-pass research engagement may be a story that skips `drafting`.
185
+ Requires the `agentic-research` plugin; without it, treat as a plain implementing item ->
186
+ `implement-orchestrator`, mirroring the drafting row's degrade.)
187
+ - `stage: implementing`, non-epic (and NOT `tags: [prose]` or `[research]`) -> `implement-orchestrator <scope>`
188
+ - `stage: review` -> `review <id>` (review self-selects its lane: a **story**
189
+ fast-advances on `implement`'s verification with no peer pass; a **feature** or
190
+ **epic** gets a fresh-context deep review — cross-model via peeragent when a
191
+ different class is reachable (two classes paired across the advisory→adversarial
192
+ phases for deep/complex scope; see `principles/references/models.md`), else a
193
+ generic sub-agent prompted as a reviewer from `principles/references/subagents.md`
194
+ with the strongest appropriate model available (cross-model only if that model
195
+ is a different class), else a fresh top-class sub-agent)
196
+
197
+ The delegated skill owns its internal workflow and stage transition. After it
198
+ returns, rebuild the queue from disk rather than relying on cached state.
199
+
200
+ If a delegated skill reports a hard blocker without a stage transition, append
201
+ a `## Blocker` section to the item body, commit that note, and continue with
202
+ other ready items. The final goal outcome is blocked if unresolved blockers
203
+ remain in scope.
204
+
205
+ ### Phase 5: Review Circuit-Breaker
206
+
207
+ Track per-item review bounces during the run:
208
+
209
+ ```text
210
+ bounces[<item-id>] = times this item has gone implementing -> review -> implementing
211
+ ```
212
+
213
+ If an item bounces back to `implementing` twice:
214
+
215
+ 1. Append `## Stuck at review` with the latest blockers and the two-pass note.
216
+ 2. Leave the item at `review`.
217
+ 3. Log it as escalated.
218
+ 4. Continue draining other ready work.
219
+
220
+ Escalated items make the final goal outcome blocked unless the user resolves
221
+ them before the run ends.
222
+
223
+ ### Phase 6: Refactor Cadence (`--all` Only)
224
+
225
+ Every 5 items advanced to `done` in `--all` mode, delegate a conservative
226
+ discovery pass to `refactor-design` over files touched by those items:
227
+
228
+ 1. Collect touched paths from the commits associated with those item ids.
229
+ 2. Invoke `refactor-design <path...>` in discovery mode.
230
+ 3. Let `refactor-design` classify and emit any follow-up items.
231
+ 4. Rebuild the queue; newly emitted items are picked up naturally.
232
+
233
+ Never invoke `bold-refactor` from autopilot. It is too aggressive for autonomous
234
+ queue driving.
235
+
236
+ ### Phase 7: Stop Rules
237
+
238
+ After each queue rebuild:
239
+
240
+ - If no in-scope active items remain at `drafting`, `implementing`, or `review`,
241
+ run Phase 8 (Final Peer Review Loop) before reporting completion.
242
+ - If in-scope active items remain but none are ready, the goal is blocked on
243
+ dependencies or unresolved blockers. Report the blocking ids.
244
+ - If the user interrupts, stop at the next safe boundary and report remaining
245
+ state without claiming completion.
246
+ - Otherwise pick the next item and continue.
247
+
248
+ Do not stop because of elapsed time, context size, or "long run" concerns. The
249
+ harness owns continuation. Your job is to keep applying the queue policy until a
250
+ real stop rule fires.
251
+
252
+ ### Phase 8: Final Peer Review Loop
253
+
254
+ This is the last step before reporting `complete`. It runs in addition to any
255
+ design-time cross-model advisory passes from delegated skills.
256
+
257
+ When the scoped queue appears drained:
258
+
259
+ 1. Build a concise completion bundle:
260
+ - scope interpretation
261
+ - items advanced during this run
262
+ - final state of in-scope epics/features/stories
263
+ - commits associated with advanced items
264
+ - notable design decisions, implementation deviations, blockers resolved,
265
+ and verification results reported by delegated skills
266
+ 2. Run the completion review as the two-phase design-review order from
267
+ `principles/SKILL.md` Part IV (advisory/completeness, then adversarial). If
268
+ `peer-review` is available with a different model class, use it; for a deep or
269
+ complex completion bundle, **use two different model classes** if available,
270
+ one per phase. Ask for bugs, missed acceptance criteria, unreviewed risks,
271
+ foundation-doc drift, and substrate-state inconsistencies that would make
272
+ "complete" premature. A top-tier reasoning peer may take 10 to 30 minutes for a
273
+ large completion review; do not classify a quiet, still-running process as
274
+ hung after only a few minutes.
275
+ 3. If peeragent would use the same model class, do not use `peer-review`; spawn
276
+ a generic sub-agent prompted as a reviewer from
277
+ `principles/references/subagents.md` when available, with the strongest
278
+ appropriate model. Record it as cross-model only if that spawned model is a
279
+ different class; otherwise record same-harness fresh-context.
280
+ 4. If peer-review is unavailable, use that same generic reviewer-subagent path
281
+ when available, otherwise the local inline review fallback.
282
+ If the selected final-review path fails, do not report completion; mark the
283
+ run blocked on final review and include the failure reason. Do not invent a
284
+ pass.
285
+ 5. For every substantive accepted finding:
286
+ - Small and clearly safe fix: fix it immediately, run verification, commit,
287
+ and rebuild the queue.
288
+ - Needs tracked work: create or update a substrate item at the right stage
289
+ (`drafting` for design gaps, `implementing` for concrete fixes), commit,
290
+ and rebuild the queue.
291
+ - Invalid or lower-value finding: reject it with a one-line rationale in the
292
+ final review summary.
293
+ 6. If rebuilding the queue finds new or regressed `drafting`, `implementing`, or
294
+ `review` items in scope, return to Phase 2 and drain them. Completion is not
295
+ allowed while accepted final-review findings remain active.
296
+ 7. Once the final review path succeeds, produces no accepted
297
+ blocking/substantive findings, and the queue is still empty, report the goal
298
+ as complete.
299
+
300
+ Record the final review in the autopilot final summary. Do not paste the full
301
+ peer transcript into item bodies; summarize accepted/rejected points where they
302
+ affect specific items.
303
+
304
+ ## Output
305
+
306
+ Narrate briefly as items advance. Final summary:
307
+
308
+ - Goal scope and interpretation
309
+ - Items advanced to done
310
+ - Items reviewed and approved
311
+ - Items reviewed and bounced
312
+ - Escalated or blocked item ids
313
+ - Refactor cadences run (`--all` only)
314
+ - Implement-orchestrator bundle summary, if reported
315
+ - Final peer-review status: cross-model, local fallback, skipped, or failed;
316
+ include accepted findings fixed/filed and rejected findings summary
317
+ - Goal outcome: complete, blocked, or interrupted
318
+
319
+ ## Guardrails
320
+
321
+ - Never use structured question tool while an autopilot goal is actively driving the
322
+ delegated work. Resolve with judgment and log rationale.
323
+ - Do not report `complete` until Phase 8 has run successfully and all accepted
324
+ final-review findings have been fixed or filed back into the queue.
325
+ - Commit after every item state change or blocker note.
326
+ - Do not push, force-push, or release; the user controls publication.
327
+ - Do not touch `.work/backlog/` except to report that backlog items are out of
328
+ scope.
329
+ - The substrate is the resume point. No `PROGRESS.md`, no watchdog loops, no
330
+ `--resume`.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "Autopilot"
3
+ short_description: "Use Autopilot for repo workflows"
4
+ default_prompt: "Use $autopilot for this repository."
5
+ policy:
6
+ allow_implicit_invocation: true
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: board
3
+ description: >
4
+ Launch and open the agile-workflow interactive substrate board for a project. Use when the user asks
5
+ to open, view, serve, inspect, or launch the .work board, substrate board, kanban board, dependency
6
+ board, or `work-view board`. Requires an existing agile-workflow `.work/` substrate, a compiled
7
+ board-capable `.work/bin/work-view` binary, and a full terminal session that can keep the
8
+ long-running local server alive.
9
+ ---
10
+
11
+ # Board
12
+
13
+ Launch and open the live local board for the current project's `.work/`
14
+ substrate. The board is served by the compiled `work-view` binary and reads the
15
+ substrate directly; it does not generate a static HTML file.
16
+
17
+ This skill is for **opening the UI for the user**, not merely printing a command.
18
+ Run it in a full terminal / PTY session that stays attached while the local
19
+ server runs. Do not launch it from a short-lived noninteractive shell that exits
20
+ after the first line of output, because that kills the board server.
21
+
22
+ ## Workflow
23
+
24
+ 1. From the project root or a descendant directory, start the board in a full
25
+ terminal session:
26
+
27
+ ```bash
28
+ .work/bin/work-view board
29
+ ```
30
+
31
+ Leave that terminal session running. By default, `work-view board` opens the
32
+ browser after it binds. Do not add `--no-open` or `--print` unless the user
33
+ asks for URL-only/headless behavior or the environment has no desktop browser.
34
+
35
+ 2. Pass user-supplied arguments through to `work-view board` when present. If
36
+ the user asks for a specific port but still wants the UI opened, keep browser
37
+ opening enabled:
38
+
39
+ ```bash
40
+ .work/bin/work-view board --port 8181
41
+ ```
42
+
43
+ Use `--no-open` / `--print` only for explicit URL-only runs:
44
+
45
+ ```bash
46
+ .work/bin/work-view board --port 8181 --no-open
47
+ ```
48
+
49
+ 3. Report the printed localhost URL to the user after the server starts. The
50
+ command binds to `127.0.0.1`, scans upward when the requested port is busy,
51
+ then opens a browser when a desktop session is available. In headless
52
+ sessions it prints the URL and keeps serving.
53
+
54
+ ## Failure Handling
55
+
56
+ - If no `.work/CONVENTIONS.md` exists in the current directory or an ancestor,
57
+ stop and tell the user to run `$agile-workflow:convert` first.
58
+ - If `.work/bin/work-view` is missing or does not support `board`, tell the
59
+ user that the interactive board requires a compiled board-capable `work-view`
60
+ binary for this project.
61
+ - For compatibility with older invocations, `plugins/agile-workflow/scripts/work-board.sh`
62
+ is only a shim. Prefer `.work/bin/work-view board` for all new usage.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "Board"
3
+ short_description: "Launch the agile-workflow board"
4
+ default_prompt: "Use $board to open the live agile-workflow board for this project."
5
+ policy:
6
+ allow_implicit_invocation: false
@@ -0,0 +1,244 @@
1
+ ---
2
+ name: bold-refactor
3
+ description: >
4
+ Find beautiful code abstractions and cross-cutting simplifications. Applies conceptual lenses
5
+ (elimination, unification, inversion, algebraic, declarative, domain crystallization) to surface
6
+ bold architectural reconceptions, then produces a refactor EPIC with child features tagged
7
+ [refactor] and declared depends_on chains. The epic and its children land in .work/active/ — the
8
+ actual refactor work then flows through /agile-workflow:refactor-design and
9
+ /agile-workflow:implement. User-invocable only — too aggressive for auto-trigger.
10
+ ---
11
+
12
+ # Bold-Refactor
13
+
14
+ You are not an LLM doing safe refactoring. You are a master architect who has
15
+ spent a week studying this codebase and is now ready to tell the team what
16
+ they've been doing wrong — and what a beautiful version of this code actually
17
+ looks like.
18
+
19
+ LLMs default to timid, incremental refactoring: extract a helper here, add an
20
+ interface there, rename for clarity. That's housekeeping, not architecture. You
21
+ do something fundamentally different. You look at a subsystem and ask: **what
22
+ single elegant idea, if it existed, would make half of this code unnecessary?**
23
+
24
+ You think in reconceptions, not cleanups. You find the abstractions that are
25
+ *screaming* to exist but haven't been named yet. You spot five things that look
26
+ different but are secretly the same thing. You see the 500-line module that could
27
+ be 50 lines if you inverted one assumption.
28
+
29
+ This is the code equivalent of "stop using Inter and a purple gradient." Stop
30
+ extracting helpers. Start reimagining.
31
+
32
+ ## What this is NOT
33
+
34
+ - **Cosmetic changes** (variable naming, early returns) — handled inline by
35
+ refactor-conventions or `/agile-workflow:refactor-design`
36
+ - **File reorganization** (folder layout, module boundaries) — handled by
37
+ `/agile-workflow:refactor-design`
38
+ - **Safe incremental dedup** (extracting shared functions) — handled by
39
+ `/agile-workflow:refactor-design`
40
+ - **Performance work** — `/agile-workflow:perf-design`
41
+ - **Implementation** — you produce an epic + child features, you don't write code
42
+
43
+ ## Beneath you: generic LLM refactoring
44
+
45
+ If you catch yourself suggesting any of these, you're not thinking boldly enough:
46
+
47
+ - **Trivial extraction** — extracting a 3-line helper used twice. Adds indirection
48
+ for zero benefit.
49
+ - **Premature abstraction** — `BaseHandler<T>` with two implementations sharing
50
+ 4 lines.
51
+ - **Ceremony interfaces** — wrapping a concrete class "for testability" with one
52
+ implementation forever.
53
+ - **Pattern-for-pattern's-sake** — applying Strategy/Observer/Factory because you
54
+ read about them, not because the code's actual shape calls for them.
55
+ - **AbstractFactoryProviderManager disease** — extensibility you'll never use is
56
+ not a feature; it's debt.
57
+ - **Speculative generalization** — "what if someday we need X?" Today's code
58
+ doesn't need it.
59
+ - **Wrapper worship** — wrapping a third-party lib "so we can swap it later." You
60
+ won't.
61
+
62
+ If your suggestion could be generated by asking an LLM "refactor this code,"
63
+ it's not bold enough. Every suggestion must pass the test: **would this surprise
64
+ a senior engineer — and then convince them?**
65
+
66
+ ## Invocation modes
67
+
68
+ | Invocation | Behavior |
69
+ |---|---|
70
+ | `bold-refactor` (no arg) / `--all` | Sweep the whole codebase for areas with the highest complexity-to-value ratio. |
71
+ | `bold-refactor <path>` | Focus the sweep on that path/area. |
72
+ | `bold-refactor <NL scope>` (e.g. "bold-refactor the auth layer") | NL-interpreted scope, same shape as scope/autopilot. |
73
+
74
+ One scan may produce 1-N epics — every suggestion that survives the Phase 2 / 3
75
+ checkpoints becomes its own epic with its own lens. Don't force-merge unrelated
76
+ reconceptions into a single epic.
77
+
78
+ ## Conceptual lenses
79
+
80
+ Commit each suggestion to one lens. Don't hedge. Don't blend. Pick one and follow
81
+ it to its logical conclusion.
82
+
83
+ | Lens | Core question |
84
+ |---|---|
85
+ | **Elimination** | What if you deleted this? What *actually* breaks? |
86
+ | **Unification** | What seemingly-different things are secretly the same? |
87
+ | **Inversion** | What if you flipped who controls what? |
88
+ | **Algebraic** | What types and compositions are hiding in this imperative code? |
89
+ | **Declarative** | What DSL is trying to emerge from this procedural logic? |
90
+ | **Domain Crystallization** | What domain concept is screaming to be named? |
91
+
92
+ ## Workflow
93
+
94
+ ### Phase 1: Explore
95
+
96
+ If the user provided a target path, focus there. Otherwise, sweep the codebase
97
+ for areas with the highest complexity-to-value ratio.
98
+
99
+ Run a local scope-size probe first: list likely roots, search for obvious
100
+ entry points and large/hot files, and read a few representative files. If the
101
+ target path is small and the leverage is visible from direct reading, skip
102
+ parallel exploratory fanout and proceed with that evidence.
103
+
104
+ For repo-wide or genuinely broad targets, spawn parallel exploratory sub-agents:
105
+ 1. **Architecture map** — module structure, dependency graph, entry points, data flow
106
+ 2. **Complexity hotspots** — large files, deep nesting, high cyclomatic complexity, god objects
107
+ 3. **Hidden assumptions** — implicit conventions, invisible coupling
108
+
109
+ Read key files yourself. Build a mental model of *how the system thinks*, not
110
+ just what files exist.
111
+
112
+ ### Phase 2: Provoke
113
+
114
+ Generate suggestions until you've exhausted the lenses or run out of leverage.
115
+ Quality over quantity. One sharp suggestion beats five mediocre ones.
116
+
117
+ Each suggestion:
118
+ 1. **Provocative name** — not "Extract auth utilities" but "Auth is just middleware
119
+ composition"
120
+ 2. **One lens** — state which lens drives this
121
+ 3. **Thesis** — one sentence: what's the insight, why does it matter
122
+ 4. **Impact** — what code changes, what disappears, what gets simpler
123
+ 5. **Cost** — what's the risk, what breaks during transition, what's hard
124
+
125
+ Vary the lenses across suggestions. If all 5 use Elimination, you're not
126
+ thinking broadly enough.
127
+
128
+ **Checkpoint (structured question tool):** Present all suggestions. Ask which resonate,
129
+ which to drop, what's missing. Expect pushback — that's the point.
130
+
131
+ ### Phase 3: Discuss
132
+
133
+ Dialogue, not presentation. For each suggestion the user engages:
134
+ - **Push back on dismissals** — "why doesn't this resonate?" Sometimes the best
135
+ ideas feel uncomfortable at first.
136
+ - **Deepen accepted ideas** — explore implications, find affected code, identify
137
+ the hardest part
138
+ - **Combine and evolve** — suggestions may merge or spawn new ones
139
+ - **Narrow scope** — find the version that captures 80% of the value with 20% of
140
+ the change
141
+ - **Recommend "do nothing"** when appropriate. A confident "don't refactor this"
142
+ is more valuable than a forced suggestion.
143
+
144
+ **Checkpoint:** Present the refined scope. Ask if the user is ready to scope as
145
+ a refactor epic.
146
+
147
+ ### Phase 4: Scope as epic(s)
148
+
149
+ For each accepted suggestion that survived discussion, produce its own epic.
150
+ **One scan can produce multiple epics** — each surviving suggestion gets its
151
+ own top-level epic with its own lens and child features.
152
+
153
+ 1. **Top-level: refactor epic** at `.work/active/epics/<id>.md`:
154
+
155
+ ```yaml
156
+ ---
157
+ id: epic-bold-<slug>
158
+ kind: epic
159
+ stage: drafting
160
+ tags: [refactor, bold]
161
+ parent: null
162
+ depends_on: []
163
+ release_binding: null
164
+ gate_origin: null
165
+ created: YYYY-MM-DD
166
+ updated: YYYY-MM-DD
167
+ ---
168
+
169
+ # <provocative name>
170
+
171
+ ## Thesis
172
+ <one sentence: the insight>
173
+
174
+ ## Lens
175
+ <Elimination | Unification | Inversion | Algebraic | Declarative | Domain Crystallization>
176
+
177
+ ## Impact
178
+ <what code changes, what disappears, what gets simpler>
179
+
180
+ ## Cost
181
+ <risk, what breaks during transition, hardest part>
182
+
183
+ ## Child features
184
+ - <one per major area of change>
185
+ ```
186
+
187
+ 2. **Child features** at `.work/active/features/<id>.md`, each with `tags: [refactor]`,
188
+ `parent: <epic-id>`, `depends_on:` chains where steps must occur in order.
189
+ Each child's body has a brief — design happens later via
190
+ `/agile-workflow:refactor-design` per child.
191
+
192
+ **The riskiest child feature gets refactor-designed FIRST.** The rest of the
193
+ epic hangs on whether the riskiest unit is feasible — confirming feasibility
194
+ early is more valuable than work order convenience. In the epic body's
195
+ "Child features" list, mark the riskiest one explicitly:
196
+
197
+ ```markdown
198
+ ## Child features (riskiest first)
199
+ - **feature-<slug>** *(riskiest — design this first)* — <brief>
200
+ - feature-<slug> — <brief>
201
+ - ...
202
+ ```
203
+
204
+ Set `depends_on` on the rest so they wait for the riskiest if appropriate;
205
+ otherwise just signal in the body which to design first.
206
+
207
+ ### Phase 5: Cycle check and commit
208
+
209
+ ```bash
210
+ # For each child with depends_on, verify no cycle:
211
+ .work/bin/work-view --blocking <child-id>
212
+ ```
213
+
214
+ ```bash
215
+ git add .work/active/epics/epic-bold-<slug>.md .work/active/features/
216
+ git commit -m "bold-refactor: scope <epic-id> (<N> child features)"
217
+ ```
218
+
219
+ ## Output
220
+
221
+ In conversation, per epic produced (1-N):
222
+ - **Epic scoped**: `<epic-id>` at `stage: drafting`, `tags: [refactor, bold]`
223
+ - **Lens**: chosen lens for the epic
224
+ - **Children**: list of child features with `depends_on` chains
225
+ - **Riskiest first**: which feature gets designed first
226
+
227
+ Then a single **Next**: start an autopilot goal for `--all` (or for each new
228
+ `<epic-id>`) to execute through the dependency graph; or run
229
+ `/agile-workflow:refactor-design` on the riskiest child of each epic to begin
230
+ the cascade manually.
231
+
232
+ ## Guardrails
233
+
234
+ - Every suggestion commits to one conceptual lens. No hedging, no blending.
235
+ - Reject trivial extraction, premature abstraction, generic cleanup. If it could
236
+ come from "ask an LLM to refactor this," it's not bold enough.
237
+ - Bold refactors land as **epics** with child features, NOT as features directly.
238
+ The arc is multi-feature — that's the whole point.
239
+ - Children get `tags: [refactor]` so they route to `/agile-workflow:refactor-design`
240
+ when designed.
241
+ - This skill is user-invocable only. The agent doesn't auto-trigger bold-refactor
242
+ during normal conversation — it's too aggressive a verb for autonomous reach.
243
+ - "Do nothing" is a valid output. If the exploration genuinely concludes the code
244
+ is fine, say so confidently and don't manufacture an epic.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "Bold Refactor"
3
+ short_description: "Use Bold Refactor for repo workflows"
4
+ default_prompt: "Use $bold-refactor for this repository."
5
+ policy:
6
+ allow_implicit_invocation: false