owflow 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +448 -283
  3. package/dist/agents/bottleneck-analyzer.md +332 -333
  4. package/dist/agents/code-quality-pragmatist.md +353 -354
  5. package/dist/agents/code-reviewer.md +238 -239
  6. package/dist/agents/codebase-analysis-reporter.md +245 -246
  7. package/dist/agents/docs-operator.md +22 -23
  8. package/dist/agents/e2e-test-verifier.md +447 -448
  9. package/dist/agents/gap-analyzer.md +501 -502
  10. package/dist/agents/implementation-completeness-checker.md +219 -220
  11. package/dist/agents/implementation-planner.md +308 -309
  12. package/dist/agents/information-gatherer.md +690 -691
  13. package/dist/agents/production-readiness-checker.md +278 -279
  14. package/dist/agents/project-analyzer.md +403 -403
  15. package/dist/agents/reality-assessor.md +365 -366
  16. package/dist/agents/research-planner.md +449 -450
  17. package/dist/agents/research-synthesizer.md +402 -403
  18. package/dist/agents/solution-brainstormer.md +256 -257
  19. package/dist/agents/solution-designer.md +371 -372
  20. package/dist/agents/spec-auditor.md +297 -298
  21. package/dist/agents/specification-creator.md +333 -334
  22. package/dist/agents/task-classifier.md +449 -450
  23. package/dist/agents/task-group-implementer.md +283 -284
  24. package/dist/agents/test-suite-runner.md +194 -195
  25. package/dist/agents/user-docs-generator.md +508 -509
  26. package/dist/commands/reviews-code.md +90 -90
  27. package/dist/commands/reviews-pragmatic.md +99 -99
  28. package/dist/commands/reviews-production-readiness.md +113 -113
  29. package/dist/commands/reviews-reality-check.md +110 -110
  30. package/dist/commands/reviews-spec-audit.md +114 -114
  31. package/dist/commands/work.md +280 -280
  32. package/dist/configuration/agents-config.d.ts +2 -0
  33. package/dist/configuration/agents-config.js +8 -44
  34. package/dist/configuration/commands-config.d.ts +23 -0
  35. package/dist/configuration/commands-config.js +17 -17
  36. package/dist/configuration/skills-config.d.ts +2 -0
  37. package/dist/configuration/skills-config.js +3 -3
  38. package/dist/hooks/hooks-diagnostics.d.ts +3 -0
  39. package/dist/hooks/hooks-diagnostics.js +21 -0
  40. package/dist/hooks/hooks-persistence.d.ts +17 -0
  41. package/dist/hooks/hooks-persistence.js +207 -0
  42. package/dist/hooks/hooks-registry.d.ts +6 -0
  43. package/dist/hooks/hooks-registry.js +104 -0
  44. package/dist/hooks/hooks-wrapper.d.ts +25 -0
  45. package/dist/hooks/hooks-wrapper.js +318 -0
  46. package/dist/hooks/internal/before-tool.d.ts +6 -0
  47. package/dist/hooks/internal/before-tool.js +13 -0
  48. package/dist/hooks/internal/session-compaction.d.ts +9 -0
  49. package/dist/hooks/{session-compaction.js → internal/session-compaction.js} +9 -7
  50. package/dist/hooks/runtime/circuit-breaker.d.ts +23 -0
  51. package/dist/hooks/runtime/circuit-breaker.js +39 -0
  52. package/dist/hooks/runtime/failure-policy.d.ts +15 -0
  53. package/dist/hooks/runtime/failure-policy.js +49 -0
  54. package/dist/hooks/runtime/process-executor.d.ts +33 -0
  55. package/dist/hooks/runtime/process-executor.js +147 -0
  56. package/dist/hooks/runtime/status-recorder.d.ts +27 -0
  57. package/dist/hooks/runtime/status-recorder.js +111 -0
  58. package/dist/index.d.ts +7 -0
  59. package/dist/index.js +111 -40
  60. package/dist/skills/agents-md-generator/SKILL.md +223 -223
  61. package/dist/skills/codebase-analyzer/SKILL.md +162 -162
  62. package/dist/skills/codebase-analyzer/references/code-analysis.md +63 -63
  63. package/dist/skills/codebase-analyzer/references/combined.md +31 -31
  64. package/dist/skills/codebase-analyzer/references/context-discovery.md +63 -63
  65. package/dist/skills/codebase-analyzer/references/file-discovery.md +51 -51
  66. package/dist/skills/codebase-analyzer/references/migration-target.md +23 -23
  67. package/dist/skills/codebase-analyzer/references/pattern-mining.md +22 -22
  68. package/dist/skills/dev-analyze/SKILL.md +115 -115
  69. package/dist/skills/dev-bugfix/SKILL.md +452 -452
  70. package/dist/skills/dev-finalize/SKILL.md +118 -118
  71. package/dist/skills/dev-implement/SKILL.md +167 -167
  72. package/dist/skills/dev-plan/SKILL.md +147 -147
  73. package/dist/skills/dev-spec/SKILL.md +182 -182
  74. package/dist/skills/dev-tdd-red/SKILL.md +94 -94
  75. package/dist/skills/dev-verify/SKILL.md +153 -153
  76. package/dist/skills/development/SKILL.md +260 -260
  77. package/dist/skills/diagrams-mermaid/SKILL.md +183 -159
  78. package/dist/skills/diagrams-mermaid/references/reference.md +220 -148
  79. package/dist/skills/docs-manager/SKILL.md +379 -379
  80. package/dist/skills/docs-manager/docs/INDEX.md +199 -199
  81. package/dist/skills/docs-manager/docs/standards/backend/api.md +25 -25
  82. package/dist/skills/docs-manager/docs/standards/backend/migrations.md +22 -22
  83. package/dist/skills/docs-manager/docs/standards/backend/models.md +25 -25
  84. package/dist/skills/docs-manager/docs/standards/backend/queries.md +22 -22
  85. package/dist/skills/docs-manager/docs/standards/frontend/accessibility.md +25 -25
  86. package/dist/skills/docs-manager/docs/standards/frontend/components.md +28 -28
  87. package/dist/skills/docs-manager/docs/standards/frontend/css.md +16 -16
  88. package/dist/skills/docs-manager/docs/standards/frontend/responsive.md +28 -28
  89. package/dist/skills/docs-manager/docs/standards/global/coding-style.md +25 -25
  90. package/dist/skills/docs-manager/docs/standards/global/commenting.md +10 -10
  91. package/dist/skills/docs-manager/docs/standards/global/conventions.md +31 -31
  92. package/dist/skills/docs-manager/docs/standards/global/error-handling.md +22 -22
  93. package/dist/skills/docs-manager/docs/standards/global/minimal-implementation.md +22 -22
  94. package/dist/skills/docs-manager/docs/standards/global/validation.md +28 -28
  95. package/dist/skills/docs-manager/docs/standards/testing/test-writing.md +25 -25
  96. package/dist/skills/docs-manager/references/agents-md-template.md +29 -29
  97. package/dist/skills/docs-manager/references/index-md-template.md +73 -73
  98. package/dist/skills/flow-init/SKILL.md +234 -234
  99. package/dist/skills/flow-init/references/architecture-template.md +45 -45
  100. package/dist/skills/flow-init/references/roadmap-templates.md +93 -93
  101. package/dist/skills/flow-init/references/tech-stack-template.md +70 -70
  102. package/dist/skills/flow-init/references/vision-templates.md +75 -75
  103. package/dist/skills/goal-development/SKILL.md +96 -96
  104. package/dist/skills/goal-migration/SKILL.md +114 -114
  105. package/dist/skills/goal-performance/SKILL.md +126 -126
  106. package/dist/skills/goal-research/SKILL.md +118 -118
  107. package/dist/skills/html-renderer/SKILL.md +173 -173
  108. package/dist/skills/html-renderer/references/index.html +318 -318
  109. package/dist/skills/html-renderer/references/styles.css +388 -388
  110. package/dist/skills/html-renderer/references/tokens.json +104 -104
  111. package/dist/skills/implementation-plan-executor/SKILL.md +378 -378
  112. package/dist/skills/implementation-verifier/SKILL.md +307 -307
  113. package/dist/skills/migration/SKILL.md +268 -268
  114. package/dist/skills/migration-analyze/SKILL.md +126 -126
  115. package/dist/skills/migration-finalize/SKILL.md +161 -161
  116. package/dist/skills/migration-fix/SKILL.md +155 -155
  117. package/dist/skills/migration-implement/SKILL.md +131 -131
  118. package/dist/skills/migration-plan/SKILL.md +131 -131
  119. package/dist/skills/migration-spec/SKILL.md +135 -135
  120. package/dist/skills/migration-spec/references/migration-strategies.md +430 -430
  121. package/dist/skills/migration-target/SKILL.md +134 -134
  122. package/dist/skills/migration-target/references/migration-types.md +489 -489
  123. package/dist/skills/migration-verify/SKILL.md +184 -184
  124. package/dist/skills/orchestrator-framework/SKILL.md +65 -65
  125. package/dist/skills/orchestrator-framework/references/command-namespacing.md +7 -7
  126. package/dist/skills/orchestrator-framework/references/confirm-or-revise-exception.md +20 -20
  127. package/dist/skills/orchestrator-framework/references/delegation-rules.md +54 -54
  128. package/dist/skills/orchestrator-framework/references/dispatcher-handoff.md +27 -27
  129. package/dist/skills/orchestrator-framework/references/fix-loop-contract.md +65 -65
  130. package/dist/skills/orchestrator-framework/references/gate-contract.md +122 -122
  131. package/dist/skills/orchestrator-framework/references/orchestrator-creation-checklist.md +51 -51
  132. package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +235 -235
  133. package/dist/skills/performance/SKILL.md +267 -267
  134. package/dist/skills/performance-analyze/SKILL.md +129 -129
  135. package/dist/skills/performance-analyze/references/performance-optimization-guide.md +271 -271
  136. package/dist/skills/performance-finalize/SKILL.md +117 -117
  137. package/dist/skills/performance-implement/SKILL.md +114 -114
  138. package/dist/skills/performance-plan/SKILL.md +112 -112
  139. package/dist/skills/performance-spec/SKILL.md +145 -145
  140. package/dist/skills/performance-verify/SKILL.md +164 -164
  141. package/dist/skills/research/SKILL.md +249 -249
  142. package/dist/skills/research-brainstorm/SKILL.md +120 -120
  143. package/dist/skills/research-brainstorm/references/brainstorming-techniques.md +84 -84
  144. package/dist/skills/research-converge/SKILL.md +130 -130
  145. package/dist/skills/research-design/SKILL.md +146 -146
  146. package/dist/skills/research-design/references/design-techniques.md +40 -40
  147. package/dist/skills/research-finalize/SKILL.md +125 -125
  148. package/dist/skills/research-fork/SKILL.md +190 -190
  149. package/dist/skills/research-gather/SKILL.md +133 -133
  150. package/dist/skills/research-plan/SKILL.md +141 -141
  151. package/dist/skills/research-plan/references/research-methodologies.md +710 -710
  152. package/dist/skills/research-quick/SKILL.md +139 -139
  153. package/dist/skills/research-synthesize/SKILL.md +127 -127
  154. package/dist/skills/rule-reviewer/SKILL.md +334 -334
  155. package/dist/skills/standards-discover/SKILL.md +260 -260
  156. package/dist/skills/standards-discover/references/aggregation-strategy.md +76 -76
  157. package/dist/skills/standards-discover/references/code-pattern-prompt.md +68 -68
  158. package/dist/skills/standards-discover/references/config-analyzer-prompt.md +67 -67
  159. package/dist/skills/standards-discover/references/docs-extractor-prompt.md +65 -65
  160. package/dist/skills/standards-discover/references/external-analyzer-prompt.md +75 -75
  161. package/dist/skills/standards-update/SKILL.md +207 -207
  162. package/dist/templates/orchestrator-state-base.yml +17 -17
  163. package/dist/templates/orchestrator-state-development.yml +95 -95
  164. package/dist/templates/orchestrator-state-migration.yml +95 -95
  165. package/dist/templates/orchestrator-state-performance.yml +64 -64
  166. package/dist/templates/orchestrator-state-research.yml +67 -67
  167. package/dist/tools/fork_task.d.ts +17 -0
  168. package/dist/tools/fork_task.js +21 -11
  169. package/dist/tools/verify_template.d.ts +11 -0
  170. package/dist/tools/verify_template.js +32 -17
  171. package/dist/tui/hooks-dialogs.d.ts +20 -0
  172. package/dist/tui/hooks-dialogs.js +181 -0
  173. package/dist/tui/hooks-presenter.d.ts +15 -0
  174. package/dist/tui/hooks-presenter.js +70 -0
  175. package/dist/tui/hooks-sidebar.d.ts +10 -0
  176. package/dist/tui/hooks-sidebar.js +104 -0
  177. package/dist/tui/primitives.d.ts +21 -0
  178. package/dist/tui/primitives.js +47 -0
  179. package/dist/tui.d.ts +12 -0
  180. package/dist/tui.js +129 -0
  181. package/dist/types/hook-types.d.ts +125 -0
  182. package/dist/types/hook-types.js +76 -0
  183. package/dist/types/opencode-types.d.ts +13 -0
  184. package/dist/utils/file-util.d.ts +2 -0
  185. package/dist/utils/file-util.js +6 -6
  186. package/dist/utils/fork-task.d.ts +27 -0
  187. package/dist/utils/fork-task.js +18 -23
  188. package/dist/utils/plugin-info.d.ts +3 -0
  189. package/dist/utils/plugin-info.js +8 -10
  190. package/dist/utils/workflow-paths.d.ts +17 -0
  191. package/dist/utils/workflow-paths.js +18 -0
  192. package/dist/utils/yaml-structure.d.ts +7 -0
  193. package/dist/utils/yaml-structure.js +7 -11
  194. package/package.json +68 -48
  195. package/dist/hooks/before-tool.js +0 -19
@@ -1,118 +1,118 @@
1
- ---
2
- name: owflow:dev-finalize
3
- description: Development — conditional E2E testing, user documentation, and workflow finalization with commit guidance.
4
- argument-hint: "[task-path-or-identifier]"
5
- user-invocable: true
6
- ---
7
-
8
- # Dev Finalize — E2E, User Docs & Finalization (e2e-run, docs-generated, task-completed)
9
-
10
- Closing phase of the development workflow. Runs optional E2E browser verification and user documentation when enabled, then finalizes the workflow.
11
-
12
- ## Entry Gate
13
-
14
- Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
15
-
16
- - **Path** (absolute or project-relative) to the task directory — use as-is.
17
- - **Identifier** — exact directory name inside `.owflow/tasks/development/` (e.g., `2026-01-12-my-task`); resolve to its path.
18
- - If the argument is **missing**, the path does **not exist**, or matches **no identifier** → print the blocked block, then STOP (never guess or auto-pick a task):
19
- 1. Steps that must be completed first (in order), each with its command:
20
- - Codebase & gap analysis (`codebase-analysed`, `gap-analysed`) → `/owflow:dev-analyze <task-path>`
21
- - TDD red gate (`tdd-red-proven`) — only when a reproducible defect was detected → `/owflow:dev-tdd-red <task-path>`
22
- - Requirements, specification & audit (`spec-written`, `spec-audited`) → `/owflow:dev-spec <task-path>`
23
- - Implementation planning (`plan-created`) → `/owflow:dev-plan <task-path>`
24
- - Implementation & TDD green gate (`implementation-done`, `tdd-green-proven`) → `/owflow:dev-implement <task-path>`
25
- - Verification & issue resolution (`options-chosen`, `verification-done`) → `/owflow:dev-verify <task-path>`
26
- 2. List available dev-task identifiers (directories under `.owflow/tasks/development/`) to resume from, if any.
27
- 3. Hint: `Run /owflow:development <description> to start a task from scratch, or pass a task path/identifier to resume.`
28
-
29
- ### Prerequisites
30
-
31
- | Required for this skill | Where verified | Produced by |
32
- | ----------------------- | ----------------------------------------- | ---------------------------------- |
33
- | State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:development <desc>` |
34
- | Verification done | `verification-done` in `completed_phases` | `/owflow:dev-verify <task-path>` |
35
-
36
- 1. **Read `orchestrator-state.yml`** from the task path. If missing → mid-pipeline bootstrap ([Missing-state Bootstrap](../orchestrator-framework/references/gate-contract.md), starting slug `e2e-run`): `question` — create a fresh standard development task starting at this step, or decline → print `No development task found at <path>. Run /owflow:development <description> to start a task from scratch.` and STOP.
37
- 2. **Prerequisite check**: `verification-done` in `completed_phases`. If missing → print the blocked block, then STOP:
38
- - Steps that must be completed first: analysis (`codebase-analysed`, `gap-analysed`) → TDD red gate (`tdd-red-proven`, only when a reproducible defect was detected) → specification (`spec-written`) → implementation planning (`plan-created`) → implementation (`implementation-done`) → verification (`verification-done`).
39
- - `Run /owflow:dev-verify <task-path> first` (or the command for the earliest missing earlier step).
40
- - If no task exists yet: `Run /owflow:development <description> to start a task from scratch.`
41
- 3. **Skip/resume**: if `task.status` is `completed`, report the existing finalization and STOP.
42
- 4. **Conditional activation**: if `options.e2e_enabled: false` and `options.user_docs_enabled: false`, skip straight to Finalization.
43
-
44
- ## Execute
45
-
46
- **Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md).
47
-
48
- ### E2E Testing (`e2e-run`, conditional)
49
-
50
- **Skip if** `options.e2e_enabled: false`.
51
-
52
- Task tool - `e2e-test-verifier`. Prompt MUST include: task_path (absolute), spec_path (`implementation/spec.md`), base_url. Report saves to `{task_path}/verification/e2e-verification-report.md` with screenshots. This is runtime browser verification via Playwright MCP tools — not test file generation.
53
-
54
- ### User Documentation (`docs-generated`, conditional)
55
-
56
- **Skip if** `options.user_docs_enabled: false`.
57
-
58
- Task tool - `user-docs-generator`. Prompt MUST include: task_path (absolute), spec_path, base_url. Guide saves to `{task_path}/documentation/user-guide.md` with screenshots.
59
-
60
- ### Finalization (`task-completed`, inline)
61
-
62
- 1. Create workflow summary: what was built, phases executed, verification outcome, artifacts produced.
63
- 2. Update `task.status: completed` in state.
64
- 3. Provide commit message template (conventional style, referencing task name).
65
- 4. Guide next steps: code review, PR, deployment.
66
-
67
- ## State Update Convention (per step)
68
-
69
- Apply after EVERY phase above:
70
-
71
- 1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed plus that step's fields. Never batch multiple steps into one end-of-skill write:
72
- - After E2E testing (only when it ran): append `e2e-run` to `completed_phases`; record the E2E verdict; bump `orchestrator.updated`.
73
- - After user documentation (only when it ran): append `docs-generated` to `completed_phases`; record the guide location; bump `orchestrator.updated`.
74
- - After finalization: append `task-completed` to `completed_phases`; set `task.status: completed`; bump `orchestrator.updated`.
75
- 2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
76
- 3. **Failures** — if the E2E run or documentation generation fails and cannot be recovered, do NOT append the corresponding slug to `completed_phases`; append it to `orchestrator.failed_phases` and increment `auto_fix_attempts["<slug>"]`. Ask the user whether to retry or continue to finalization without that step.
77
- 4. **Validate** — after every write, re-read the file to confirm values, then run the `verify_template` tool with `filePath: <task-path>/orchestrator-state.yml`, `templateName: orchestrator-state-development.yml`. Fix any reported issue immediately before proceeding.
78
- 5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run to confirm the full state matches everything performed in this session.
79
-
80
- ## Exit Gate
81
-
82
- Present results, get user confirmation, then close the workflow (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
83
-
84
- ### Results box
85
-
86
- ```markdown
87
- ## ✅ DEVELOPMENT WORKFLOW COMPLETE — <task name>
88
-
89
- **Built** — [1-2 line summary of what was built]
90
- **Steps** — [executed steps, e.g. codebase-analysed → task-completed]
91
- **Verification** — [final verification outcome]
92
- **E2E verdict** — [if run] / skipped
93
- **User guide** — [path] / not generated
94
-
95
- **Artifacts**
96
- - `verification/e2e-verification-report.md` [conditional]
97
- - `documentation/user-guide.md` [conditional]
98
- ```
99
-
100
- ### Results-acceptance question
101
-
102
- Use `question` — "Are these results correct?" with options:
103
-
104
- - **Accept** — workflow is complete; show closing guidance.
105
- - **Adjust** — re-run the affected optional phase (E2E or user docs) with the user's corrections, then re-present the results box.
106
- - **Discuss** — walk through the finalization (summary, E2E verdict, guide contents, commit guidance) in more depth; then re-ask.
107
- - **Stop here** — print the resume command (`/owflow:dev-finalize <task-path>`) and end.
108
-
109
- ### Next steps (after Accept)
110
-
111
- Workflow is finished; no further owflow phase command is required. All follow-ups are `optional` (post-completion quality work, none advance phases):
112
-
113
- - `/owflow:reviews-pragmatic <task-path>` — `optional` — post-completion over-engineering / pragmatism check; does not advance phases
114
- - `/owflow:standards-update "<lesson learned>"` — `optional` — captures any new patterns as project standards; does not advance phases
115
-
116
- **Other options**: commit the changes using the provided message template; open a PR. (Manual steps outside owflow.)
117
-
118
- Then STOP.
1
+ ---
2
+ name: owflow:dev-finalize
3
+ description: Development — conditional E2E testing, user documentation, and workflow finalization with commit guidance.
4
+ argument-hint: "[task-path-or-identifier]"
5
+ user-invocable: true
6
+ ---
7
+
8
+ # Dev Finalize — E2E, User Docs & Finalization (e2e-run, docs-generated, task-completed)
9
+
10
+ Closing phase of the development workflow. Runs optional E2E browser verification and user documentation when enabled, then finalizes the workflow.
11
+
12
+ ## Entry Gate
13
+
14
+ Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
15
+
16
+ - **Path** (absolute or project-relative) to the task directory — use as-is.
17
+ - **Identifier** — exact directory name inside `.owflow/tasks/development/` (e.g., `2026-01-12-my-task`); resolve to its path.
18
+ - If the argument is **missing**, the path does **not exist**, or matches **no identifier** → print the blocked block, then STOP (never guess or auto-pick a task):
19
+ 1. Steps that must be completed first (in order), each with its command:
20
+ - Codebase & gap analysis (`codebase-analysed`, `gap-analysed`) → `/owflow:dev-analyze <task-path>`
21
+ - TDD red gate (`tdd-red-proven`) — only when a reproducible defect was detected → `/owflow:dev-tdd-red <task-path>`
22
+ - Requirements, specification & audit (`spec-written`, `spec-audited`) → `/owflow:dev-spec <task-path>`
23
+ - Implementation planning (`plan-created`) → `/owflow:dev-plan <task-path>`
24
+ - Implementation & TDD green gate (`implementation-done`, `tdd-green-proven`) → `/owflow:dev-implement <task-path>`
25
+ - Verification & issue resolution (`options-chosen`, `verification-done`) → `/owflow:dev-verify <task-path>`
26
+ 2. List available dev-task identifiers (directories under `.owflow/tasks/development/`) to resume from, if any.
27
+ 3. Hint: `Run /owflow:development <description> to start a task from scratch, or pass a task path/identifier to resume.`
28
+
29
+ ### Prerequisites
30
+
31
+ | Required for this skill | Where verified | Produced by |
32
+ | ----------------------- | ----------------------------------------- | ---------------------------------- |
33
+ | State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:development <desc>` |
34
+ | Verification done | `verification-done` in `completed_phases` | `/owflow:dev-verify <task-path>` |
35
+
36
+ 1. **Read `orchestrator-state.yml`** from the task path. If missing → mid-pipeline bootstrap ([Missing-state Bootstrap](../orchestrator-framework/references/gate-contract.md), starting slug `e2e-run`): `question` — create a fresh standard development task starting at this step, or decline → print `No development task found at <path>. Run /owflow:development <description> to start a task from scratch.` and STOP.
37
+ 2. **Prerequisite check**: `verification-done` in `completed_phases`. If missing → print the blocked block, then STOP:
38
+ - Steps that must be completed first: analysis (`codebase-analysed`, `gap-analysed`) → TDD red gate (`tdd-red-proven`, only when a reproducible defect was detected) → specification (`spec-written`) → implementation planning (`plan-created`) → implementation (`implementation-done`) → verification (`verification-done`).
39
+ - `Run /owflow:dev-verify <task-path> first` (or the command for the earliest missing earlier step).
40
+ - If no task exists yet: `Run /owflow:development <description> to start a task from scratch.`
41
+ 3. **Skip/resume**: if `task.status` is `completed`, report the existing finalization and STOP.
42
+ 4. **Conditional activation**: if `options.e2e_enabled: false` and `options.user_docs_enabled: false`, skip straight to Finalization.
43
+
44
+ ## Execute
45
+
46
+ **Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md).
47
+
48
+ ### E2E Testing (`e2e-run`, conditional)
49
+
50
+ **Skip if** `options.e2e_enabled: false`.
51
+
52
+ Task tool - `e2e-test-verifier`. Prompt MUST include: task_path (absolute), spec_path (`implementation/spec.md`), base_url. Report saves to `{task_path}/verification/e2e-verification-report.md` with screenshots. This is runtime browser verification via Playwright MCP tools — not test file generation.
53
+
54
+ ### User Documentation (`docs-generated`, conditional)
55
+
56
+ **Skip if** `options.user_docs_enabled: false`.
57
+
58
+ Task tool - `user-docs-generator`. Prompt MUST include: task_path (absolute), spec_path, base_url. Guide saves to `{task_path}/documentation/user-guide.md` with screenshots.
59
+
60
+ ### Finalization (`task-completed`, inline)
61
+
62
+ 1. Create workflow summary: what was built, phases executed, verification outcome, artifacts produced.
63
+ 2. Update `task.status: completed` in state.
64
+ 3. Provide commit message template (conventional style, referencing task name).
65
+ 4. Guide next steps: code review, PR, deployment.
66
+
67
+ ## State Update Convention (per step)
68
+
69
+ Apply after EVERY phase above:
70
+
71
+ 1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed plus that step's fields. Never batch multiple steps into one end-of-skill write:
72
+ - After E2E testing (only when it ran): append `e2e-run` to `completed_phases`; record the E2E verdict; bump `orchestrator.updated`.
73
+ - After user documentation (only when it ran): append `docs-generated` to `completed_phases`; record the guide location; bump `orchestrator.updated`.
74
+ - After finalization: append `task-completed` to `completed_phases`; set `task.status: completed`; bump `orchestrator.updated`.
75
+ 2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
76
+ 3. **Failures** — if the E2E run or documentation generation fails and cannot be recovered, do NOT append the corresponding slug to `completed_phases`; append it to `orchestrator.failed_phases` and increment `auto_fix_attempts["<slug>"]`. Ask the user whether to retry or continue to finalization without that step.
77
+ 4. **Validate** — after every write, re-read the file to confirm values, then run the `verify_template` tool with `filePath: <task-path>/orchestrator-state.yml`, `templateName: orchestrator-state-development.yml`. Fix any reported issue immediately before proceeding.
78
+ 5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run to confirm the full state matches everything performed in this session.
79
+
80
+ ## Exit Gate
81
+
82
+ Present results, get user confirmation, then close the workflow (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
83
+
84
+ ### Results box
85
+
86
+ ```markdown
87
+ ## ✅ DEVELOPMENT WORKFLOW COMPLETE — <task name>
88
+
89
+ **Built** — [1-2 line summary of what was built]
90
+ **Steps** — [executed steps, e.g. codebase-analysed → task-completed]
91
+ **Verification** — [final verification outcome]
92
+ **E2E verdict** — [if run] / skipped
93
+ **User guide** — [path] / not generated
94
+
95
+ **Artifacts**
96
+ - `verification/e2e-verification-report.md` [conditional]
97
+ - `documentation/user-guide.md` [conditional]
98
+ ```
99
+
100
+ ### Results-acceptance question
101
+
102
+ Use `question` — "Are these results correct?" with options:
103
+
104
+ - **Accept** — workflow is complete; show closing guidance.
105
+ - **Adjust** — re-run the affected optional phase (E2E or user docs) with the user's corrections, then re-present the results box.
106
+ - **Discuss** — walk through the finalization (summary, E2E verdict, guide contents, commit guidance) in more depth; then re-ask.
107
+ - **Stop here** — print the resume command (`/owflow:dev-finalize <task-path>`) and end.
108
+
109
+ ### Next steps (after Accept)
110
+
111
+ Workflow is finished; no further owflow phase command is required. All follow-ups are `optional` (post-completion quality work, none advance phases):
112
+
113
+ - `/owflow:reviews-pragmatic <task-path>` — `optional` — post-completion over-engineering / pragmatism check; does not advance phases
114
+ - `/owflow:standards-update "<lesson learned>"` — `optional` — captures any new patterns as project standards; does not advance phases
115
+
116
+ **Other options**: commit the changes using the provided message template; open a PR. (Manual steps outside owflow.)
117
+
118
+ Then STOP.
@@ -1,167 +1,167 @@
1
- ---
2
- name: owflow:dev-implement
3
- description: Development — execute the implementation plan via delegation, then the TDD Green Gate when a red gate exists. --quick selects the condensed direct path (bootstrap a task here when no state file exists; direct implementation when it does).
4
- argument-hint: "[task-path-or-identifier | \"description\"] [--quick]"
5
- user-invocable: true
6
- ---
7
-
8
- # Dev Implement — Implementation & TDD Green Gate (implementation-done, tdd-green-proven)
9
-
10
- Work phase of the development workflow. Executes the implementation plan via delegation, then verifies the TDD red-gate test now passes when one exists.
11
-
12
- Supports a **quick mode** (`--quick`): a condensed path that implements **directly in the main agent** with the discovered standards — never routed through `implementation-plan-executor`. On a description argument with no existing task it first bootstraps a standard development task (state file, condensed spec + plan); on an existing task it applies `--quick` to the implementation itself (e.g., a quick plan). After the Exit Gate, the pipeline can either stop there or continue with `/owflow:dev-verify` — the task is a regular development task, resumable by any dev-* subskill.
13
-
14
- ## Entry Gate
15
-
16
- Resolve the argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). The argument may be:
17
-
18
- - **Path** (absolute or project-relative) to the task directory — use as-is.
19
- - **Identifier** — exact directory name inside `.owflow/tasks/development/` (e.g., `2026-01-12-my-task`); resolve to its path.
20
- - **Description** — anything else (quoted free text, e.g. `"Add a logout button to the navbar"`) is treated as a new task description for quick bootstrap.
21
-
22
- Route by argument kind and flags:
23
-
24
- | Situation | Route |
25
- | ---------------------------------------------------------------- | -------------------------------------------- |
26
- | Task path/identifier, no `--quick`, state + spec + plan exist (or only implementation pending) | Normal implementation below |
27
- | Task path/identifier, `--quick`, spec + plan exist | Direct implementation (quick mode) — the flag selects the direct path over delegation |
28
- | Task path/identifier, `--quick`, spec or plan missing | Quick prelude for the missing pieces, then direct implementation |
29
- | Task path/identifier of a dev-bugfix task (`entry_point: "dev-bugfix"`, implementation slugs complete, no spec/plan) | Normal implementation below — implement nothing; if `implementation-done` holds, run the green gate when a red gate exists, then Exit Gate (or suggest `/owflow:dev-verify <task-path>` for the verification pipeline) |
30
- | Description argument, `--quick` (or no argument after prompt) | Quick bootstrap (create task + condensed prelude), then normal implementation |
31
- | Description argument, no `--quick` | Ask via `question`: quick condensed task / full pipeline (blocked block below) / cancel |
32
- | Missing argument | Prompt for input (path, identifier, or description), then re-route |
33
-
34
- If the path does **not exist** or matches **no identifier** → print the blocked block, then STOP (never guess or auto-pick a task):
35
-
36
- 1. Steps that must be completed first (in order), each with its command:
37
- - Codebase & gap analysis (`codebase-analysed`, `gap-analysed`) → `/owflow:dev-analyze <task-path>`
38
- - TDD red gate (`tdd-red-proven`) — only when a reproducible defect was detected → `/owflow:dev-tdd-red <task-path>`
39
- - Requirements, specification & audit (`spec-written`, `spec-audited`) → `/owflow:dev-spec <task-path>`
40
- - Implementation planning (`plan-created`) → `/owflow:dev-plan <task-path>`
41
- 2. List available dev-task identifiers (directories under `.owflow/tasks/development/`) to resume from, if any.
42
- 3. Hint: `Run /owflow:development <description> to start a task from scratch, /owflow:dev-implement --quick "<description>" for a condensed quick task, or pass a task path/identifier to resume.`
43
-
44
- ### Prerequisites
45
-
46
- | Required for this skill | Where verified | Produced by |
47
- | ----------------------- | ------------------------------------------- | -------------------------------- |
48
- | State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:development <desc>` or quick bootstrap |
49
- | Spec approved | `implementation/spec.md` exists | `/owflow:dev-spec <task-path>` or quick prelude |
50
- | Plan approved | `implementation/implementation-plan.md` exists | `/owflow:dev-plan <task-path>` or quick prelude |
51
-
52
- 1. **Read `orchestrator-state.yml`** from the task path. If missing → quick bootstrap (see Quick Mode), otherwise mid-pipeline bootstrap ([Missing-state Bootstrap](../orchestrator-framework/references/gate-contract.md), starting slug `implementation-done`): `question` — bootstrap a fresh standard task starting at this step, or decline → print: `No development task found at <path>. Run /owflow:development <description> to start a task from scratch.` and STOP.
53
- 2. **Skip/resume**: if `implementation-done` is in `completed_phases`, skip to the TDD green gate.
54
- 3. **Prerequisite check**: `implementation/spec.md` AND `implementation/implementation-plan.md` exist — **unless `implementation-done` is in `completed_phases`** (dev-bugfix task or re-run: spec/plan are not required; go straight to the skip/resume TDD green gate). If missing → run the Quick prelude for the missing pieces (`--quick` or user chooses quick), otherwise print the blocked block, then STOP:
55
- - Steps that must be completed first: analysis (`codebase-analysed`, `gap-analysed`) → TDD red gate (`tdd-red-proven`, only when a reproducible defect was detected) → specification (`spec-written`) → implementation planning (`plan-created`).
56
- - `Run /owflow:dev-spec and /owflow:dev-plan <task-path> first` (or `/owflow:dev-analyze <task-path>` / `/owflow:dev-spec <task-path>` for the missing earlier steps).
57
- - If no task exists yet: `Run /owflow:development <description> to start a task from scratch, or /owflow:dev-implement --quick "<description>" for a condensed quick task.`
58
-
59
- ## Quick Mode (condensed prelude → normal implementation)
60
-
61
- Quick mode produces the same artifacts as the early pipeline phases — just condensed into one pass inside this skill. It does NOT introduce a second state format: the task gets a standard `orchestrator-state.yml` and standard artifacts, so every other dev-* subskill can pick it up afterwards.
62
-
63
- ### Quick bootstrap (no state file, description argument)
64
-
65
- 1. **Create Task Directory**: `.owflow/tasks/development/YYYY-MM-DD-task-name/` (3–5 kebab-case words from the description).
66
- 2. **Initialize State**: create `orchestrator-state.yml` from the development template with `task.title` / `task.description` from the description, `task.status: in_progress`, `orchestrator.entry_point: "dev-implement --quick"`, and `task_context.task_characteristics.has_reproducible_defect` set to `true` ONLY when the description is clearly bug-shaped (symptom + expected vs actual); otherwise `false`. Bug-shaped descriptions with a reproducible defect → suggest `/owflow:dev-bugfix` instead (TDD red gate discipline, same standard state) — `/owflow:dev-bugfix "<description>"` produces this same task shape under `.owflow/tasks/development/` — unless the user insists on proceeding here.
67
- - **CRITICAL**: use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-development.yml`.
68
- 3. **Discover project documentation**: read `.owflow/docs/INDEX.md` (if exists) and extract the Project Documentation file paths into `project_context.project_doc_paths` (matching the development dispatcher's initialization).
69
- 4. If `.owflow/docs/` does not exist, proceed without standards and note the graceful-fallback hint in the completion message: `"No AI SDLC standards found. Consider running /owflow:flow-init to initialize project documentation and coding standards."`
70
-
71
- ### Quick prelude (one condensed pass)
72
-
73
- **MANDATORY order — standards before analysis, analysis before spec/plan:**
74
-
75
- 1. **Standards discovery**: identify applicable standards from INDEX.md by task keywords (e.g., "API" → api/error-handling, "form" → validation/accessibility) and **READ each applicable standard file** with the Read tool — reading INDEX.md alone is NOT sufficient. Record the paths in `project_context.standards_applied` (extra state field) and reference them in the spec.
76
- 2. **Brief codebase analysis**: explore the affected areas (Glob, Grep, Read) — enough to identify affected files/modules, existing patterns, and test strategy. Write `analysis/quick-analysis.md` (affected files, approach sketch, standards referenced). Extract a 1–2 sentence summary into `phase_summaries.quick_analysis`.
77
- 3. **Condensed spec**: write `implementation/spec.md` — goal, scope (in/out), requirements, applicable standards with key guidelines, verification criteria. Mark `spec-written` complete (`phase_summaries.specification` summary).
78
- 4. **Condensed plan**: write `implementation/implementation-plan.md` — 1–3 task groups, each with concrete checkable steps and tests. Use the same on-the-fly plan shape as the dev-plan quick prelude: key discoveries with `file:line` references, a "What We're NOT Doing" out-of-scope list, intent + contract per step (no code snippets unless non-obvious), automated vs manual acceptance criteria, and no open questions (resolve before finalizing). Mark `plan-created` complete.
79
- 5. **Approval gate** — use `question`: present the mini plan (goal, approach, affected files, task groups) and ask "Proceed with implementation?" Options: **Approve and implement** / **Adjust** (rework spec/plan, re-ask) / **Run full pipeline instead** (print `/owflow:development <task-path>` and STOP — do not implement) / **Cancel**.
80
- 6. On approval: append `codebase-analysed` and `gap-analysed` to `completed_phases` (quick analysis covers both; note the condensation in `phase_summaries.codebase_analysis` / `phase_summaries.gap_analysis`), bump `orchestrator.updated`, re-run `verify_template` on the state file.
81
-
82
- The TDD red gate is SKIPPED in quick mode (no `tdd-red-proven`), and the green gate below is therefore skipped too. `spec-audited` is skipped — the approval gate in step 5 substitutes for the audit.
83
-
84
- Then continue with **Direct Implementation (quick mode)** below.
85
-
86
- ### Direct implementation (quick mode, `implementation-done`)
87
-
88
- **Trigger**: quick mode selected for this run — the `--quick` flag on this invocation, or the task bootstrapped/prelude-run in quick mode this session (`orchestrator.entry_point: "dev-implement --quick"`). Quick mode NEVER routes to `implementation-plan-executor` — the main agent implements directly, applying the standards already read in prelude step 1 (for a pre-existing plan, apply the standards listed in its "Standards Compliance" section). (Normal full-pipeline runs always delegate — see Execute below.)
89
-
90
- 1. **Work through the condensed plan's task groups in order**, following each step's intent and contract.
91
- 2. **Apply standards**: for every code change, verify it follows the applicable standards from `project_context.standards_applied`. If implementation reveals new areas (auth, database, file handling, ...) whose standards were not read in the prelude, check `.owflow/docs/INDEX.md` and READ the applicable standard files before proceeding; append their paths to `project_context.standards_applied`.
92
- 3. **Tests**: run the plan's tests as steps specify (test-driven order per group: tests → implementation → verify). Fix failures before moving on.
93
- 4. **Mark checkboxes** in `implementation/implementation-plan.md` immediately after each step completes (main agent responsibility — same convention as implementation-plan-executor).
94
- 5. **Work-log**: append per-group entries and a completion entry to `implementation/work-log.md` (files changed, standards applied — prelude-read and discovered, test results).
95
-
96
- ## Execute (normal runs — full pipeline)
97
-
98
- **Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md).
99
-
100
- **Scope**: normal runs only — task created via the full pipeline, or a quick task resumed **without** `--quick` (e.g., a `/owflow:dev-plan --quick` task continued with `/owflow:dev-implement <task-path>`; the executor picks up uncompleted groups). Quick mode uses Direct implementation above instead of this section.
101
-
102
- ### Implementation (`implementation-done`) — Skill tool
103
-
104
- **ANTI-PATTERN (normal runs) — never implement directly. "Simple enough to code inline" is NOT a reason to skip delegation.**
105
-
106
- Skill tool - `implementation-plan-executor`. Pass: task_path, task_description, task_characteristics, `phase_summaries`, research context if present in state. The skill manages its own subagents, incremental tests, and `implementation/work-log.md`.
107
-
108
- ### TDD Green Gate (`tdd-green-proven`, conditional)
109
-
110
- **Skip if** `tdd-red-proven` is NOT in `completed_phases` (no red gate exists).
111
-
112
- 1. Run the test written in the red gate (path recorded in `implementation/tdd-red-gate.md`).
113
- 2. **It MUST pass** — proves the defect is fixed. On failure: fix implementation and retry (up to 5 attempts: syntax, imports, test alignment). Still failing → `question`: continue fixing, return to `/owflow:dev-implement` implementation work, or stop.
114
- 3. Write results to `implementation/tdd-green-gate.md`; set `task_context.tdd_green_passed: true`.
115
-
116
- ## State Update Convention (per step)
117
-
118
- Apply after EVERY phase/step above:
119
-
120
- 1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed plus that step's fields. Never batch multiple steps into one end-of-skill write:
121
- - After implementation (direct quick implementation or plan execution complete): append `implementation-done` to `completed_phases`; extract 1-2 sentence summary to `phase_summaries.implementation` (task groups completed, files changed, test results, known issues); bump `orchestrator.updated`.
122
- - After the green gate (only when it ran — no red gate ⇒ no `tdd-green-proven`): append `tdd-green-proven` to `completed_phases`; set `task_context.tdd_green_passed: true`; bump `orchestrator.updated`.
123
- 2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
124
- 3. **Failures** — if the direct implementation or green gate ultimately fails (retries exhausted, user stops): do NOT append the corresponding slug to `completed_phases`; append it to `orchestrator.failed_phases` and increment `auto_fix_attempts["<slug>"]`. Partial progress stays documented in `phase_summaries.implementation` and `implementation/work-log.md`.
125
- 4. **Validate** — after every write, re-read the file to confirm values, then run the `verify_template` tool with `filePath: <task-path>/orchestrator-state.yml`, `templateName: orchestrator-state-development.yml`. Fix any reported issue immediately before proceeding.
126
- 5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run to confirm the full state matches everything performed in this session.
127
-
128
- ## Exit Gate
129
-
130
- Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
131
-
132
- ### Results box
133
-
134
- ```markdown
135
- ## ✅ DEV IMPLEMENT COMPLETE — <task name>
136
-
137
- **Task groups** — [completed groups / total]
138
- **Files changed** — [count + key files, 1-3 lines]
139
- **Tests** — [incremental test results]
140
- **Green gate** — [✅ PASSED / not required (no red gate)]
141
- **Known issues** — [deferred items / "none"]
142
- **Entry point** — [quick bootstrap (direct implementation) / full pipeline (delegated)]
143
-
144
- **Artifacts**
145
- - implemented code
146
- - `implementation/work-log.md`
147
- - `implementation/tdd-green-gate.md` [conditional]
148
- ```
149
-
150
- ### Results-acceptance question
151
-
152
- Use `question` — "Are these results correct?" with options:
153
-
154
- - **Accept** — implementation matches the plan; continue.
155
- - **Adjust** — re-work the affected task groups (fix code, re-run their tests), update state and work-log, re-present the results box.
156
- - **Discuss** — walk through implementation details (decisions made, files changed, deferred items) in more depth; then re-ask.
157
- - **Stop here** — print the resume command (`/owflow:dev-implement <task-path>`) and end. The task is a regular development task; `/owflow:dev-verify <task-path>` (or `/owflow:development <task-path>`) continues the pipeline later.
158
-
159
- ### Next steps (after Accept)
160
-
161
- - `→ /owflow:dev-verify <task-path>` — `required` before commit: runs the verification pipeline (completeness, code review with a bounded fix loop) and must pass before finalization. Remaining after: finalize.
162
-
163
- **Other options**:
164
-
165
- - `/owflow:goal-development <task-path>` — `optional` shortcut: runs all remaining phases in one loop (verify → finalize)
166
-
167
- Then STOP.
1
+ ---
2
+ name: owflow:dev-implement
3
+ description: Development — execute the implementation plan via delegation, then the TDD Green Gate when a red gate exists. --quick selects the condensed direct path (bootstrap a task here when no state file exists; direct implementation when it does).
4
+ argument-hint: "[task-path-or-identifier | \"description\"] [--quick]"
5
+ user-invocable: true
6
+ ---
7
+
8
+ # Dev Implement — Implementation & TDD Green Gate (implementation-done, tdd-green-proven)
9
+
10
+ Work phase of the development workflow. Executes the implementation plan via delegation, then verifies the TDD red-gate test now passes when one exists.
11
+
12
+ Supports a **quick mode** (`--quick`): a condensed path that implements **directly in the main agent** with the discovered standards — never routed through `implementation-plan-executor`. On a description argument with no existing task it first bootstraps a standard development task (state file, condensed spec + plan); on an existing task it applies `--quick` to the implementation itself (e.g., a quick plan). After the Exit Gate, the pipeline can either stop there or continue with `/owflow:dev-verify` — the task is a regular development task, resumable by any dev-* subskill.
13
+
14
+ ## Entry Gate
15
+
16
+ Resolve the argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). The argument may be:
17
+
18
+ - **Path** (absolute or project-relative) to the task directory — use as-is.
19
+ - **Identifier** — exact directory name inside `.owflow/tasks/development/` (e.g., `2026-01-12-my-task`); resolve to its path.
20
+ - **Description** — anything else (quoted free text, e.g. `"Add a logout button to the navbar"`) is treated as a new task description for quick bootstrap.
21
+
22
+ Route by argument kind and flags:
23
+
24
+ | Situation | Route |
25
+ | ---------------------------------------------------------------- | -------------------------------------------- |
26
+ | Task path/identifier, no `--quick`, state + spec + plan exist (or only implementation pending) | Normal implementation below |
27
+ | Task path/identifier, `--quick`, spec + plan exist | Direct implementation (quick mode) — the flag selects the direct path over delegation |
28
+ | Task path/identifier, `--quick`, spec or plan missing | Quick prelude for the missing pieces, then direct implementation |
29
+ | Task path/identifier of a dev-bugfix task (`entry_point: "dev-bugfix"`, implementation slugs complete, no spec/plan) | Normal implementation below — implement nothing; if `implementation-done` holds, run the green gate when a red gate exists, then Exit Gate (or suggest `/owflow:dev-verify <task-path>` for the verification pipeline) |
30
+ | Description argument, `--quick` (or no argument after prompt) | Quick bootstrap (create task + condensed prelude), then normal implementation |
31
+ | Description argument, no `--quick` | Ask via `question`: quick condensed task / full pipeline (blocked block below) / cancel |
32
+ | Missing argument | Prompt for input (path, identifier, or description), then re-route |
33
+
34
+ If the path does **not exist** or matches **no identifier** → print the blocked block, then STOP (never guess or auto-pick a task):
35
+
36
+ 1. Steps that must be completed first (in order), each with its command:
37
+ - Codebase & gap analysis (`codebase-analysed`, `gap-analysed`) → `/owflow:dev-analyze <task-path>`
38
+ - TDD red gate (`tdd-red-proven`) — only when a reproducible defect was detected → `/owflow:dev-tdd-red <task-path>`
39
+ - Requirements, specification & audit (`spec-written`, `spec-audited`) → `/owflow:dev-spec <task-path>`
40
+ - Implementation planning (`plan-created`) → `/owflow:dev-plan <task-path>`
41
+ 2. List available dev-task identifiers (directories under `.owflow/tasks/development/`) to resume from, if any.
42
+ 3. Hint: `Run /owflow:development <description> to start a task from scratch, /owflow:dev-implement --quick "<description>" for a condensed quick task, or pass a task path/identifier to resume.`
43
+
44
+ ### Prerequisites
45
+
46
+ | Required for this skill | Where verified | Produced by |
47
+ | ----------------------- | ------------------------------------------- | -------------------------------- |
48
+ | State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:development <desc>` or quick bootstrap |
49
+ | Spec approved | `implementation/spec.md` exists | `/owflow:dev-spec <task-path>` or quick prelude |
50
+ | Plan approved | `implementation/implementation-plan.md` exists | `/owflow:dev-plan <task-path>` or quick prelude |
51
+
52
+ 1. **Read `orchestrator-state.yml`** from the task path. If missing → quick bootstrap (see Quick Mode), otherwise mid-pipeline bootstrap ([Missing-state Bootstrap](../orchestrator-framework/references/gate-contract.md), starting slug `implementation-done`): `question` — bootstrap a fresh standard task starting at this step, or decline → print: `No development task found at <path>. Run /owflow:development <description> to start a task from scratch.` and STOP.
53
+ 2. **Skip/resume**: if `implementation-done` is in `completed_phases`, skip to the TDD green gate.
54
+ 3. **Prerequisite check**: `implementation/spec.md` AND `implementation/implementation-plan.md` exist — **unless `implementation-done` is in `completed_phases`** (dev-bugfix task or re-run: spec/plan are not required; go straight to the skip/resume TDD green gate). If missing → run the Quick prelude for the missing pieces (`--quick` or user chooses quick), otherwise print the blocked block, then STOP:
55
+ - Steps that must be completed first: analysis (`codebase-analysed`, `gap-analysed`) → TDD red gate (`tdd-red-proven`, only when a reproducible defect was detected) → specification (`spec-written`) → implementation planning (`plan-created`).
56
+ - `Run /owflow:dev-spec and /owflow:dev-plan <task-path> first` (or `/owflow:dev-analyze <task-path>` / `/owflow:dev-spec <task-path>` for the missing earlier steps).
57
+ - If no task exists yet: `Run /owflow:development <description> to start a task from scratch, or /owflow:dev-implement --quick "<description>" for a condensed quick task.`
58
+
59
+ ## Quick Mode (condensed prelude → normal implementation)
60
+
61
+ Quick mode produces the same artifacts as the early pipeline phases — just condensed into one pass inside this skill. It does NOT introduce a second state format: the task gets a standard `orchestrator-state.yml` and standard artifacts, so every other dev-* subskill can pick it up afterwards.
62
+
63
+ ### Quick bootstrap (no state file, description argument)
64
+
65
+ 1. **Create Task Directory**: `.owflow/tasks/development/YYYY-MM-DD-task-name/` (3–5 kebab-case words from the description).
66
+ 2. **Initialize State**: create `orchestrator-state.yml` from the development template with `task.title` / `task.description` from the description, `task.status: in_progress`, `orchestrator.entry_point: "dev-implement --quick"`, and `task_context.task_characteristics.has_reproducible_defect` set to `true` ONLY when the description is clearly bug-shaped (symptom + expected vs actual); otherwise `false`. Bug-shaped descriptions with a reproducible defect → suggest `/owflow:dev-bugfix` instead (TDD red gate discipline, same standard state) — `/owflow:dev-bugfix "<description>"` produces this same task shape under `.owflow/tasks/development/` — unless the user insists on proceeding here.
67
+ - **CRITICAL**: use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-development.yml`.
68
+ 3. **Discover project documentation**: read `.owflow/docs/INDEX.md` (if exists) and extract the Project Documentation file paths into `project_context.project_doc_paths` (matching the development dispatcher's initialization).
69
+ 4. If `.owflow/docs/` does not exist, proceed without standards and note the graceful-fallback hint in the completion message: `"No AI SDLC standards found. Consider running /owflow:flow-init to initialize project documentation and coding standards."`
70
+
71
+ ### Quick prelude (one condensed pass)
72
+
73
+ **MANDATORY order — standards before analysis, analysis before spec/plan:**
74
+
75
+ 1. **Standards discovery**: identify applicable standards from INDEX.md by task keywords (e.g., "API" → api/error-handling, "form" → validation/accessibility) and **READ each applicable standard file** with the Read tool — reading INDEX.md alone is NOT sufficient. Record the paths in `project_context.standards_applied` (extra state field) and reference them in the spec.
76
+ 2. **Brief codebase analysis**: explore the affected areas (Glob, Grep, Read) — enough to identify affected files/modules, existing patterns, and test strategy. Write `analysis/quick-analysis.md` (affected files, approach sketch, standards referenced). Extract a 1–2 sentence summary into `phase_summaries.quick_analysis`.
77
+ 3. **Condensed spec**: write `implementation/spec.md` — goal, scope (in/out), requirements, applicable standards with key guidelines, verification criteria. Mark `spec-written` complete (`phase_summaries.specification` summary).
78
+ 4. **Condensed plan**: write `implementation/implementation-plan.md` — 1–3 task groups, each with concrete checkable steps and tests. Use the same on-the-fly plan shape as the dev-plan quick prelude: key discoveries with `file:line` references, a "What We're NOT Doing" out-of-scope list, intent + contract per step (no code snippets unless non-obvious), automated vs manual acceptance criteria, and no open questions (resolve before finalizing). Mark `plan-created` complete.
79
+ 5. **Approval gate** — use `question`: present the mini plan (goal, approach, affected files, task groups) and ask "Proceed with implementation?" Options: **Approve and implement** / **Adjust** (rework spec/plan, re-ask) / **Run full pipeline instead** (print `/owflow:development <task-path>` and STOP — do not implement) / **Cancel**.
80
+ 6. On approval: append `codebase-analysed` and `gap-analysed` to `completed_phases` (quick analysis covers both; note the condensation in `phase_summaries.codebase_analysis` / `phase_summaries.gap_analysis`), bump `orchestrator.updated`, re-run `verify_template` on the state file.
81
+
82
+ The TDD red gate is SKIPPED in quick mode (no `tdd-red-proven`), and the green gate below is therefore skipped too. `spec-audited` is skipped — the approval gate in step 5 substitutes for the audit.
83
+
84
+ Then continue with **Direct Implementation (quick mode)** below.
85
+
86
+ ### Direct implementation (quick mode, `implementation-done`)
87
+
88
+ **Trigger**: quick mode selected for this run — the `--quick` flag on this invocation, or the task bootstrapped/prelude-run in quick mode this session (`orchestrator.entry_point: "dev-implement --quick"`). Quick mode NEVER routes to `implementation-plan-executor` — the main agent implements directly, applying the standards already read in prelude step 1 (for a pre-existing plan, apply the standards listed in its "Standards Compliance" section). (Normal full-pipeline runs always delegate — see Execute below.)
89
+
90
+ 1. **Work through the condensed plan's task groups in order**, following each step's intent and contract.
91
+ 2. **Apply standards**: for every code change, verify it follows the applicable standards from `project_context.standards_applied`. If implementation reveals new areas (auth, database, file handling, ...) whose standards were not read in the prelude, check `.owflow/docs/INDEX.md` and READ the applicable standard files before proceeding; append their paths to `project_context.standards_applied`.
92
+ 3. **Tests**: run the plan's tests as steps specify (test-driven order per group: tests → implementation → verify). Fix failures before moving on.
93
+ 4. **Mark checkboxes** in `implementation/implementation-plan.md` immediately after each step completes (main agent responsibility — same convention as implementation-plan-executor).
94
+ 5. **Work-log**: append per-group entries and a completion entry to `implementation/work-log.md` (files changed, standards applied — prelude-read and discovered, test results).
95
+
96
+ ## Execute (normal runs — full pipeline)
97
+
98
+ **Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md).
99
+
100
+ **Scope**: normal runs only — task created via the full pipeline, or a quick task resumed **without** `--quick` (e.g., a `/owflow:dev-plan --quick` task continued with `/owflow:dev-implement <task-path>`; the executor picks up uncompleted groups). Quick mode uses Direct implementation above instead of this section.
101
+
102
+ ### Implementation (`implementation-done`) — Skill tool
103
+
104
+ **ANTI-PATTERN (normal runs) — never implement directly. "Simple enough to code inline" is NOT a reason to skip delegation.**
105
+
106
+ Skill tool - `implementation-plan-executor`. Pass: task_path, task_description, task_characteristics, `phase_summaries`, research context if present in state. The skill manages its own subagents, incremental tests, and `implementation/work-log.md`.
107
+
108
+ ### TDD Green Gate (`tdd-green-proven`, conditional)
109
+
110
+ **Skip if** `tdd-red-proven` is NOT in `completed_phases` (no red gate exists).
111
+
112
+ 1. Run the test written in the red gate (path recorded in `implementation/tdd-red-gate.md`).
113
+ 2. **It MUST pass** — proves the defect is fixed. On failure: fix implementation and retry (up to 5 attempts: syntax, imports, test alignment). Still failing → `question`: continue fixing, return to `/owflow:dev-implement` implementation work, or stop.
114
+ 3. Write results to `implementation/tdd-green-gate.md`; set `task_context.tdd_green_passed: true`.
115
+
116
+ ## State Update Convention (per step)
117
+
118
+ Apply after EVERY phase/step above:
119
+
120
+ 1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed plus that step's fields. Never batch multiple steps into one end-of-skill write:
121
+ - After implementation (direct quick implementation or plan execution complete): append `implementation-done` to `completed_phases`; extract 1-2 sentence summary to `phase_summaries.implementation` (task groups completed, files changed, test results, known issues); bump `orchestrator.updated`.
122
+ - After the green gate (only when it ran — no red gate ⇒ no `tdd-green-proven`): append `tdd-green-proven` to `completed_phases`; set `task_context.tdd_green_passed: true`; bump `orchestrator.updated`.
123
+ 2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
124
+ 3. **Failures** — if the direct implementation or green gate ultimately fails (retries exhausted, user stops): do NOT append the corresponding slug to `completed_phases`; append it to `orchestrator.failed_phases` and increment `auto_fix_attempts["<slug>"]`. Partial progress stays documented in `phase_summaries.implementation` and `implementation/work-log.md`.
125
+ 4. **Validate** — after every write, re-read the file to confirm values, then run the `verify_template` tool with `filePath: <task-path>/orchestrator-state.yml`, `templateName: orchestrator-state-development.yml`. Fix any reported issue immediately before proceeding.
126
+ 5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run to confirm the full state matches everything performed in this session.
127
+
128
+ ## Exit Gate
129
+
130
+ Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
131
+
132
+ ### Results box
133
+
134
+ ```markdown
135
+ ## ✅ DEV IMPLEMENT COMPLETE — <task name>
136
+
137
+ **Task groups** — [completed groups / total]
138
+ **Files changed** — [count + key files, 1-3 lines]
139
+ **Tests** — [incremental test results]
140
+ **Green gate** — [✅ PASSED / not required (no red gate)]
141
+ **Known issues** — [deferred items / "none"]
142
+ **Entry point** — [quick bootstrap (direct implementation) / full pipeline (delegated)]
143
+
144
+ **Artifacts**
145
+ - implemented code
146
+ - `implementation/work-log.md`
147
+ - `implementation/tdd-green-gate.md` [conditional]
148
+ ```
149
+
150
+ ### Results-acceptance question
151
+
152
+ Use `question` — "Are these results correct?" with options:
153
+
154
+ - **Accept** — implementation matches the plan; continue.
155
+ - **Adjust** — re-work the affected task groups (fix code, re-run their tests), update state and work-log, re-present the results box.
156
+ - **Discuss** — walk through implementation details (decisions made, files changed, deferred items) in more depth; then re-ask.
157
+ - **Stop here** — print the resume command (`/owflow:dev-implement <task-path>`) and end. The task is a regular development task; `/owflow:dev-verify <task-path>` (or `/owflow:development <task-path>`) continues the pipeline later.
158
+
159
+ ### Next steps (after Accept)
160
+
161
+ - `→ /owflow:dev-verify <task-path>` — `required` before commit: runs the verification pipeline (completeness, code review with a bounded fix loop) and must pass before finalization. Remaining after: finalize.
162
+
163
+ **Other options**:
164
+
165
+ - `/owflow:goal-development <task-path>` — `optional` shortcut: runs all remaining phases in one loop (verify → finalize)
166
+
167
+ Then STOP.