owflow 0.2.0 → 0.3.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.
- package/README.md +61 -28
- package/dist/agents/code-reviewer.md +1 -1
- package/dist/agents/production-readiness-checker.md +1 -1
- package/dist/agents/project-analyzer.md +0 -1
- package/dist/agents/task-classifier.md +3 -3
- package/dist/commands/agents-md-generator.md +36 -0
- package/dist/commands/dev-analyze.md +33 -0
- package/dist/commands/dev-bugfix.md +37 -0
- package/dist/commands/dev-finalize.md +33 -0
- package/dist/commands/dev-implement.md +34 -0
- package/dist/commands/dev-plan.md +37 -0
- package/dist/commands/dev-spec.md +37 -0
- package/dist/commands/dev-tdd-red.md +33 -0
- package/dist/commands/dev-verify.md +33 -0
- package/dist/commands/development.md +11 -12
- package/dist/commands/diagrams-mermaid.md +3 -4
- package/dist/commands/flow-init.md +3 -4
- package/dist/commands/goal-development.md +32 -0
- package/dist/commands/html-renderer.md +3 -4
- package/dist/commands/migration.md +3 -4
- package/dist/commands/performance.md +3 -4
- package/dist/commands/research.md +3 -4
- package/dist/commands/reviews-code.md +4 -4
- package/dist/commands/reviews-pragmatic.md +4 -4
- package/dist/commands/reviews-production-readiness.md +4 -4
- package/dist/commands/reviews-reality-check.md +4 -4
- package/dist/commands/reviews-spec-audit.md +4 -4
- package/dist/commands/rule-reviewer.md +38 -0
- package/dist/commands/standards-discover.md +3 -4
- package/dist/commands/standards-update.md +3 -4
- package/dist/commands/work.md +19 -19
- package/dist/skills/agents-md-generator/SKILL.md +223 -0
- package/dist/skills/codebase-analyzer/SKILL.md +1 -1
- package/dist/skills/dev-analyze/SKILL.md +115 -0
- package/dist/skills/dev-bugfix/SKILL.md +452 -0
- package/dist/skills/dev-finalize/SKILL.md +118 -0
- package/dist/skills/dev-implement/SKILL.md +167 -0
- package/dist/skills/dev-plan/SKILL.md +147 -0
- package/dist/skills/dev-spec/SKILL.md +182 -0
- package/dist/skills/dev-tdd-red/SKILL.md +94 -0
- package/dist/skills/dev-verify/SKILL.md +160 -0
- package/dist/skills/development/SKILL.md +130 -522
- package/dist/skills/diagrams-mermaid/SKILL.md +3 -1
- package/dist/skills/docs-manager/SKILL.md +4 -4
- package/dist/skills/docs-manager/references/agents-md-template.md +1 -1
- package/dist/skills/flow-init/SKILL.md +34 -13
- package/dist/skills/goal-development/SKILL.md +96 -0
- package/dist/skills/html-renderer/SKILL.md +14 -1
- package/dist/skills/implementation-plan-executor/SKILL.md +1 -1
- package/dist/skills/implementation-verifier/SKILL.md +1 -1
- package/dist/skills/migration/SKILL.md +63 -18
- package/dist/skills/orchestrator-framework/SKILL.md +1 -1
- package/dist/skills/orchestrator-framework/references/command-namespacing.md +7 -0
- package/dist/skills/orchestrator-framework/references/confirm-or-revise-exception.md +20 -0
- package/dist/skills/orchestrator-framework/references/delegation-rules.md +54 -0
- package/dist/skills/orchestrator-framework/references/dispatcher-handoff.md +20 -0
- package/dist/skills/orchestrator-framework/references/gate-contract.md +104 -0
- package/dist/skills/orchestrator-framework/references/orchestrator-creation-checklist.md +3 -0
- package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +8 -50
- package/dist/skills/performance/SKILL.md +52 -18
- package/dist/skills/research/SKILL.md +57 -24
- package/dist/skills/rule-reviewer/SKILL.md +334 -0
- package/dist/skills/standards-discover/SKILL.md +37 -14
- package/dist/skills/standards-update/SKILL.md +58 -10
- package/dist/templates/orchestrator-state-development.yml +14 -13
- package/dist/utils/file-util.js +13 -7
- package/package.json +1 -1
- package/dist/commands/quick-bugfix.md +0 -37
- package/dist/commands/quick-dev.md +0 -182
- package/dist/commands/quick-plan.md +0 -167
- package/dist/skills/quick-bugfix/SKILL.md +0 -311
- package/dist/templates/quick-bugfix-task.yml +0 -10
- package/dist/templates/quick-dev-task.yml +0 -10
- package/dist/templates/quick-plan-task.yml +0 -11
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: owflow:dev-bugfix
|
|
3
|
+
description: Quick bug fix with TDD red/green gates and complexity escalation. Alternative entry point into the dev-* workflow — creates/resumes a standard development task.
|
|
4
|
+
argument-hint: "[bug description | task-path-or-identifier]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Dev Bug Fix
|
|
9
|
+
|
|
10
|
+
Lightweight TDD-driven bug fix workflow with planning mode. Analyze the bug, present a fix plan for approval, then reproduce with a failing test, fix, and verify. Direct execution — no subagents — but with a **standard** development state file, so the task is a first-class development task: continuable by any dev-* subskill (`/owflow:dev-verify`, `/owflow:development <task-path>`, …) after the fix.
|
|
11
|
+
|
|
12
|
+
Dev-bugfix is an **alternative entry point** into the development workflow, parallel to `/owflow:dev-implement --quick`: it runs an accelerated, bug-shaped slice of the pipeline (condensed analysis + plan → TDD red → fix → TDD green) and records the same state slugs so downstream skills can pick the task up. It does NOT introduce a second state format.
|
|
13
|
+
|
|
14
|
+
For complex bugs that grow beyond a quick fix, suggests escalating to the full development workflow (`/owflow:development`).
|
|
15
|
+
|
|
16
|
+
Gates follow the shared contract in [Gate Contract](../orchestrator-framework/references/gate-contract.md).
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
/owflow:dev-bugfix "Login form submits twice on slow connections"
|
|
22
|
+
/owflow:dev-bugfix "API returns 500 when email contains special characters"
|
|
23
|
+
/owflow:dev-bugfix .owflow/tasks/development/2026-05-28-login-double-submit
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Two invocation modes:
|
|
27
|
+
|
|
28
|
+
| Mode | Argument | Result |
|
|
29
|
+
| ------------------------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| **Standalone** (new task) | Bug description (or nothing — prompt) | Bootstrap a NEW standard development task, run the quick fix slice, task remains continuable by any dev-* |
|
|
31
|
+
| **Consecutive run** (existing) | Task path / identifier under `.owflow/tasks/development/` | Fix a newly emerging problem on an existing development task; reuse the task dir and state |
|
|
32
|
+
|
|
33
|
+
## Entry Gate
|
|
34
|
+
|
|
35
|
+
Resolve the argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
|
|
36
|
+
|
|
37
|
+
- **Path / identifier** of an existing task directory under `.owflow/tasks/development/` → **Consecutive-run mode** below. Never guess or auto-pick a task.
|
|
38
|
+
- **Description** (quoted free text) → **Standalone mode** below.
|
|
39
|
+
- **Missing argument** → scan the recent conversation for bug context (error messages, reproduction steps, discussed symptoms); if found, use that as the bug description. Only if no argument AND no bug context in session, use `question`:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
"Describe the bug — what's the expected behavior vs actual behavior?"
|
|
43
|
+
(or type a task path to fix a bug on an existing development task)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then re-route by the answer's kind. Stop only when no bug context or task reference can be obtained after asking.
|
|
47
|
+
|
|
48
|
+
### Standalone mode (new task from scratch)
|
|
49
|
+
|
|
50
|
+
1. **Create Task Directory**: `.owflow/tasks/development/YYYY-MM-DD-task-name/` — 3–5 key words from the bug description, lowercase kebab-case, today's date prefix (e.g. "Login form submits twice" → `2026-05-28-login-double-submit`). Create `analysis/` and `implementation/` subdirectories.
|
|
51
|
+
2. **Initialize State**: create `orchestrator-state.yml` from the development template with:
|
|
52
|
+
- `task.title` / `task.description` from the bug description, `task.status: in_progress`
|
|
53
|
+
- `orchestrator.entry_point: "dev-bugfix"`
|
|
54
|
+
- `task_context.task_characteristics.has_reproducible_defect: true`
|
|
55
|
+
- **CRITICAL**: use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-development.yml`.
|
|
56
|
+
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). If `.owflow/docs/` does not exist, proceed without standards and note the graceful-fallback hint (bottom of this file) in the completion message.
|
|
57
|
+
|
|
58
|
+
### Consecutive-run mode (existing development task)
|
|
59
|
+
|
|
60
|
+
Used when a bug emerges on a task that already progressed in the dev pipeline (after implementation, verification, or finalization).
|
|
61
|
+
|
|
62
|
+
1. **Read `orchestrator-state.yml`** from the task path. If missing or the path matches no identifier → ask via `question` to bootstrap a fresh standard bugfix task ([Missing-state Bootstrap](../orchestrator-framework/references/gate-contract.md), starting slug `codebase-analysed`), or decline → print `No development task found at <path>. Run /owflow:dev-bugfix "<description>" to fix a bug on a fresh task.` and STOP.
|
|
63
|
+
2. **Read the existing state**: `completed_phases`, `phase_summaries`, affected files from prior phases. The bug fix is APPENDED to the task — existing artifacts (analysis, spec, plan, work-log) stay intact.
|
|
64
|
+
3. Continue with the normal workflow below. On success, the fix slugs re-map the task back toward verification (see Downstream Reset in the State Update Convention).
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## When to Use
|
|
69
|
+
|
|
70
|
+
**Use `/owflow:dev-bugfix` when:**
|
|
71
|
+
|
|
72
|
+
- Bug is reasonably scoped and reproducible
|
|
73
|
+
- You have a clear description of expected vs actual behavior
|
|
74
|
+
- Fix likely touches a small number of files
|
|
75
|
+
|
|
76
|
+
**Use `/owflow:development` instead when:**
|
|
77
|
+
|
|
78
|
+
- Bug requires architectural changes
|
|
79
|
+
- Multiple subsystems are involved
|
|
80
|
+
- You need formal specification and planning
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Workflow
|
|
85
|
+
|
|
86
|
+
### Step 1: Parse Input
|
|
87
|
+
|
|
88
|
+
Handled by the Entry Gate above — description → standalone bootstrap, task path/identifier → consecutive-run mode.
|
|
89
|
+
|
|
90
|
+
### Step 2: Standards Discovery
|
|
91
|
+
|
|
92
|
+
**CRITICAL: This step MUST complete before entering plan mode.**
|
|
93
|
+
|
|
94
|
+
**Check if `.owflow/docs/INDEX.md` exists:**
|
|
95
|
+
|
|
96
|
+
**If exists:**
|
|
97
|
+
|
|
98
|
+
1. Read INDEX.md to discover available documentation and standards
|
|
99
|
+
2. Identify which standards are relevant based on:
|
|
100
|
+
- The categories and files listed in INDEX.md
|
|
101
|
+
- The area of the bug (e.g., API, frontend, database)
|
|
102
|
+
- Keywords in the bug description
|
|
103
|
+
3. **READ the applicable standard files** (see Standards Reading Enforcement below)
|
|
104
|
+
4. **Update `orchestrator-state.yml`**: add the paths of standards read to `project_context.standards_applied` (extra state field keyed into `project_context`; create it if absent)
|
|
105
|
+
|
|
106
|
+
**If not exists:**
|
|
107
|
+
|
|
108
|
+
- Note that no standards are available
|
|
109
|
+
- Suggest running `/owflow:flow-init` in the completion message
|
|
110
|
+
|
|
111
|
+
### Standards Reading Enforcement (MANDATORY)
|
|
112
|
+
|
|
113
|
+
**BLOCKING**: Reading INDEX.md alone is NOT sufficient. You MUST read actual standard files.
|
|
114
|
+
|
|
115
|
+
**Enforcement Process**:
|
|
116
|
+
|
|
117
|
+
1. Read INDEX.md to discover available standards
|
|
118
|
+
2. Identify which standards apply based on the bug area
|
|
119
|
+
3. **READ each applicable standard file** using the Read tool (not just note it exists)
|
|
120
|
+
4. Apply standards during fix implementation
|
|
121
|
+
5. List applied standards in the completion summary
|
|
122
|
+
|
|
123
|
+
**Examples of standard discovery**:
|
|
124
|
+
|
|
125
|
+
- Bug in API handler → Read API and error-handling standards
|
|
126
|
+
- Bug in form validation → Read validation and frontend standards
|
|
127
|
+
- Bug in database query → Read database and backend standards
|
|
128
|
+
|
|
129
|
+
### Step 3: Analyze & Assess Complexity
|
|
130
|
+
|
|
131
|
+
**Explore the codebase to understand the bug:**
|
|
132
|
+
|
|
133
|
+
1. Search for relevant files (Glob, Grep, Read)
|
|
134
|
+
2. Trace the code path where the bug occurs
|
|
135
|
+
3. Identify: likely root cause, affected files, existing tests
|
|
136
|
+
4. Form a root cause hypothesis
|
|
137
|
+
|
|
138
|
+
In **consecutive-run mode**, also read the existing phase summaries and affected files from `orchestrator-state.yml` — the newly emerging bug may interact with prior changes.
|
|
139
|
+
|
|
140
|
+
**Complexity Escalation Check:**
|
|
141
|
+
|
|
142
|
+
Assess whether this bug exceeds quick-fix scope. If **2 or more** of these signals are detected, suggest escalation:
|
|
143
|
+
|
|
144
|
+
| Signal | Example |
|
|
145
|
+
| ----------------------------------------------------------- | ---------------------------------------------------------------- |
|
|
146
|
+
| Changes span 5+ files across multiple modules | Bug in shared utility affects API, frontend, and background jobs |
|
|
147
|
+
| Requires database schema or data model changes | Missing column, wrong relationship, migration needed |
|
|
148
|
+
| Multiple valid fix approaches with architectural trade-offs | Could fix at API layer, middleware layer, or client layer |
|
|
149
|
+
| Security-sensitive code | Auth, crypto, permissions, input sanitization |
|
|
150
|
+
| Root cause unclear after initial analysis | Symptoms don't point to a single location |
|
|
151
|
+
|
|
152
|
+
**If escalation triggered:**
|
|
153
|
+
|
|
154
|
+
**Write `analysis/findings.md`** in the task directory with the analysis captured so far:
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
# Bug Analysis
|
|
158
|
+
|
|
159
|
+
## Root Cause
|
|
160
|
+
|
|
161
|
+
[Root cause hypothesis with evidence — file paths, code references]
|
|
162
|
+
|
|
163
|
+
## Affected Files
|
|
164
|
+
|
|
165
|
+
- `path/to/file` — reason
|
|
166
|
+
|
|
167
|
+
## Complexity Assessment
|
|
168
|
+
|
|
169
|
+
- [ ] Changes span 5+ files across multiple modules
|
|
170
|
+
- [ ] Requires database schema changes
|
|
171
|
+
- [ ] Multiple valid fix approaches with architectural trade-offs
|
|
172
|
+
- [ ] Security-sensitive code
|
|
173
|
+
- [ ] Root cause unclear after initial analysis
|
|
174
|
+
|
|
175
|
+
Signals detected: X of 5
|
|
176
|
+
|
|
177
|
+
## Test Strategy
|
|
178
|
+
|
|
179
|
+
[How the bug will be reproduced with a failing test]
|
|
180
|
+
|
|
181
|
+
## Standards Referenced
|
|
182
|
+
|
|
183
|
+
- [standard file]: [key guideline applied]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Use question:
|
|
187
|
+
|
|
188
|
+
- Question: "This bug appears more complex than a quick fix — [describe why]. How would you like to proceed?"
|
|
189
|
+
- Options:
|
|
190
|
+
1. "Continue with quick fix" — proceed, accepting the complexity
|
|
191
|
+
2. "Switch to full development workflow" — escalate (see below)
|
|
192
|
+
|
|
193
|
+
**If user chooses to escalate:**
|
|
194
|
+
|
|
195
|
+
1. Ensure `analysis/findings.md` is written (above)
|
|
196
|
+
2. Update `orchestrator-state.yml`: set `task.status: escalated`, append `escalation_reason` to `task_context.gaps` as `"[signals detected]"`, bump `orchestrator.updated`
|
|
197
|
+
3. Tell the user: "Run `/owflow:development .owflow/tasks/development/YYYY-MM-DD-task-name` to continue with the full workflow." The dispatcher resumes the slugs that exist and routes to the first missing one (analysis specification / planning — whatever the quick slice condensed).
|
|
198
|
+
4. Do NOT set `escalated_to` — the development orchestrator will set it
|
|
199
|
+
5. `summary.md` is NOT written on escalation
|
|
200
|
+
6. Then STOP
|
|
201
|
+
|
|
202
|
+
**If no escalation needed or user chooses to continue:**
|
|
203
|
+
|
|
204
|
+
Write `analysis/findings.md` (same template above — captures analysis for auditability), extract a 1–2 sentence root-cause summary into `phase_summaries.quick_analysis` (`summary`, `affected_files`, `root_cause`), then proceed to Step 4.
|
|
205
|
+
|
|
206
|
+
### Step 4: Enter Planning Mode
|
|
207
|
+
|
|
208
|
+
**Present the fix plan for user approval.**
|
|
209
|
+
|
|
210
|
+
Standards context from Step 2 and analysis from Step 3 MUST inform the plan.
|
|
211
|
+
|
|
212
|
+
**Plan file** — write `implementation/fix-plan.md`:
|
|
213
|
+
|
|
214
|
+
```markdown
|
|
215
|
+
## Bug Analysis
|
|
216
|
+
|
|
217
|
+
**Root Cause**: [hypothesis with evidence — file paths, code references]
|
|
218
|
+
**Affected Files**: [list of files that need changes]
|
|
219
|
+
|
|
220
|
+
## Proposed Fix
|
|
221
|
+
|
|
222
|
+
[Description of the fix approach — what changes, why this approach]
|
|
223
|
+
|
|
224
|
+
## Test Strategy
|
|
225
|
+
|
|
226
|
+
[What the failing test will assert — setup conditions, expected behavior]
|
|
227
|
+
|
|
228
|
+
## Applicable Standards
|
|
229
|
+
|
|
230
|
+
[List each standard file read, with key guidelines extracted from each.
|
|
231
|
+
If no standards exist: "No AI SDLC standards found. Consider running `/owflow:flow-init`."]
|
|
232
|
+
|
|
233
|
+
## Standards Compliance Checklist
|
|
234
|
+
|
|
235
|
+
- [ ] [Guideline from standard file] (from `standards/[path]`)
|
|
236
|
+
- [ ] [Guideline from standard file] (from `standards/[path]`)
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### User approval gate: Mandatory Sections
|
|
240
|
+
|
|
241
|
+
**BLOCKING: Do NOT ask for user approval until the plan file contains:**
|
|
242
|
+
|
|
243
|
+
1. **"## Bug Analysis"** — root cause hypothesis with evidence
|
|
244
|
+
2. **"## Proposed Fix"** — what changes and why
|
|
245
|
+
3. **"## Test Strategy"** — what the TDD red test will assert
|
|
246
|
+
4. **"## Applicable Standards"** — standards read and key guidelines
|
|
247
|
+
5. **"## Standards Compliance Checklist"** — checkboxes for applicable guidelines
|
|
248
|
+
|
|
249
|
+
If any section is missing, add it before asking for user approval.
|
|
250
|
+
|
|
251
|
+
### Approval question
|
|
252
|
+
|
|
253
|
+
Use `question` — present the mini plan (root cause, approach, affected files, test strategy) and ask "Proceed with the fix?" Options:
|
|
254
|
+
|
|
255
|
+
- **Approve and implement** — continue with the TDD red gate
|
|
256
|
+
- **Adjust** — rework the plan (different approach, different files), re-ask
|
|
257
|
+
- **Run full pipeline instead** — escalate per the escalation procedure in Step 3 (escalation handling), then STOP
|
|
258
|
+
- **Cancel** — end; state and artifacts persist
|
|
259
|
+
|
|
260
|
+
On approval: append the condensed-phase slugs `codebase-analysed` and `gap-analysed` to `completed_phases` (the condensed analysis in Steps 2–3 covers both; note the condensation in `phase_summaries.codebase_analysis` / `phase_summaries.gap_analysis`), bump `orchestrator.updated`, and re-run `verify_template` on the state file. In **consecutive-run mode** these slugs already exist — do not append duplicates; instead note the re-fix in the existing analysis artifacts.
|
|
261
|
+
|
|
262
|
+
### Step 5: TDD Red Gate (`tdd-red-proven`)
|
|
263
|
+
|
|
264
|
+
**Write a failing test that reproduces the bug.**
|
|
265
|
+
|
|
266
|
+
Direct execution (targeted, single-test task — no delegation).
|
|
267
|
+
|
|
268
|
+
1. Identify the appropriate test file (existing test suite or create new test file following project conventions)
|
|
269
|
+
2. Write a test that:
|
|
270
|
+
- Sets up the conditions that trigger the bug
|
|
271
|
+
- Asserts the **correct** (expected) behavior
|
|
272
|
+
- Should FAIL with current code (proving the bug exists)
|
|
273
|
+
3. Run the test
|
|
274
|
+
|
|
275
|
+
**The test MUST fail.** This proves the bug is real and reproducible.
|
|
276
|
+
|
|
277
|
+
**If the test passes:**
|
|
278
|
+
|
|
279
|
+
- The bug may not be what we think, or it's already fixed
|
|
280
|
+
- Investigate further — re-read the bug description, check if conditions are correct
|
|
281
|
+
- Use question: "The reproduction test passes — the expected behavior already works under these conditions. Is the bug description accurate, or are there additional conditions?"
|
|
282
|
+
|
|
283
|
+
**On success**: record the test path and key failure output in `implementation/tdd-red-gate.md` (mimicking the dev-tdd-red artifact), append `tdd-red-proven` to `completed_phases`, set `task_context.tdd_red_passed: true` (create `task_context` fields if absent), bump `orchestrator.updated`, re-run `verify_template`.
|
|
284
|
+
|
|
285
|
+
**On failure to reproduce** (test framework issues, 2 rewrite attempts exhausted): do NOT append `tdd-red-proven`; document the blocker in `task_context.gaps` and use `question`: "The bug could not be reproduced with a failing test. Continue without a red gate (documented skip), or stop?" A user-chosen skip is recorded in `task_context.gaps` with `task_context.tdd_red_passed: false` — no slugs appended. If the user chooses stop → STOP (state persists; resumable via `/owflow:dev-bugfix <task-path>`).
|
|
286
|
+
|
|
287
|
+
### Step 6: Fix & Verify — TDD Green Gate (`implementation-done`, `tdd-green-proven`)
|
|
288
|
+
|
|
289
|
+
**Implement the fix:**
|
|
290
|
+
|
|
291
|
+
1. Apply the fix based on the approved plan from Step 4
|
|
292
|
+
2. **Apply discovered standards** from Step 2
|
|
293
|
+
3. Run the failing test — it MUST now pass
|
|
294
|
+
4. Run the full test file and related test files to check for regressions
|
|
295
|
+
5. Append progress to `implementation/work-log.md` (what was fixed, files touched, test results — creating the file if absent); in **consecutive-run mode** append to the existing work-log rather than overwriting.
|
|
296
|
+
|
|
297
|
+
**If tests fail after fix:**
|
|
298
|
+
|
|
299
|
+
- Analyze the failure
|
|
300
|
+
- Adjust the fix
|
|
301
|
+
- Re-run tests
|
|
302
|
+
- Maximum 3 fix-and-verify iterations
|
|
303
|
+
|
|
304
|
+
**If still failing after 3 attempts:**
|
|
305
|
+
|
|
306
|
+
- Stop and present findings to the user
|
|
307
|
+
- Suggest escalating to `/owflow:development <task-path>` for a more thorough approach (the task is a standard dev task — the dispatcher continues it)
|
|
308
|
+
|
|
309
|
+
**On success**: append `implementation-done` and `tdd-green-proven` to `completed_phases`, set `task_context.tdd_green_passed: true`, record test results in `implementation/tdd-green-gate.md`, extract 1–2 sentences into `phase_summaries.implementation` (root cause in 1 line, fix, files changed, test results), bump `orchestrator.updated`, re-run `verify_template`.
|
|
310
|
+
|
|
311
|
+
### Downstream reset (consecutive-run mode only)
|
|
312
|
+
|
|
313
|
+
If `completed_phases` contained any of `options-chosen`, `verification-done`, `e2e-run`, `docs-generated`, `task-completed` **before** this run, REMOVE those downstream slugs now — new code invalidates prior verification, so the pipeline must route back to `/owflow:dev-verify`. Also set `verification_context.last_status: null` (re-verification required). Do NOT remove the fix slugs appended this run.
|
|
314
|
+
|
|
315
|
+
### Step 7: Summary
|
|
316
|
+
|
|
317
|
+
**Write `summary.md`** in the task directory (in consecutive-run mode, write `summary.md` describing THIS fix run; earlier runs' summaries are reflected in the work-log):
|
|
318
|
+
|
|
319
|
+
```markdown
|
|
320
|
+
# Task Summary
|
|
321
|
+
|
|
322
|
+
**Command**: dev-bugfix
|
|
323
|
+
**Date**: YYYY-MM-DD
|
|
324
|
+
**Status**: completed
|
|
325
|
+
|
|
326
|
+
## What Was Done
|
|
327
|
+
|
|
328
|
+
[Root cause and fix description]
|
|
329
|
+
|
|
330
|
+
## Files Modified
|
|
331
|
+
|
|
332
|
+
- `path/to/file`
|
|
333
|
+
|
|
334
|
+
## Standards Applied
|
|
335
|
+
|
|
336
|
+
- [standard]: [guideline]
|
|
337
|
+
|
|
338
|
+
## Tests
|
|
339
|
+
|
|
340
|
+
- [test file] — [result]
|
|
341
|
+
|
|
342
|
+
## Commit Suggestion
|
|
343
|
+
|
|
344
|
+
[conventional commit message]
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
**Update `orchestrator-state.yml`**: set `task.status: completed` (both modes — in consecutive-run mode, the task stays open for verification, so use `task.status: in_progress` instead when the downstream reset applied), `updated: [now]`, plus final state update convention below.
|
|
348
|
+
|
|
349
|
+
**Post-implementation: verify standards compliance using the checklist from the plan file.**
|
|
350
|
+
|
|
351
|
+
### State Update Convention (per step)
|
|
352
|
+
|
|
353
|
+
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the slugs actually performed plus that step's fields. Never batch multiple steps into one end-of-skill write. (Slugs are appended at the step boundaries flagged above: approval → analysis slugs, Step 5 → `tdd-red-proven`, Step 6 → `implementation-done` + `tdd-green-proven`.)
|
|
354
|
+
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
355
|
+
3. **Failures** — if a step ultimately fails (retries exhausted, user stops): do NOT append its slugs; document the blocker in `task_context.gaps`; in consecutive-run mode the task's existing slugs are untouched.
|
|
356
|
+
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.
|
|
357
|
+
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.
|
|
358
|
+
|
|
359
|
+
### Step 8: Exit Gate
|
|
360
|
+
|
|
361
|
+
Present results, get user confirmation, then close (Exit Gate contract, [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
362
|
+
|
|
363
|
+
**Results box**:
|
|
364
|
+
|
|
365
|
+
```markdown
|
|
366
|
+
## ✅ QUICK BUGFIX COMPLETE — <task name>
|
|
367
|
+
|
|
368
|
+
**Root cause** — [1-line root cause]
|
|
369
|
+
**Fix** — [1-line fix description]
|
|
370
|
+
**Files** — [count + key files]
|
|
371
|
+
**Tests** — [red gate failed → green gate passed]
|
|
372
|
+
**Standards** — [applied standards count]
|
|
373
|
+
**Entry point** — [standalone bootstrap / consecutive fix on existing task]
|
|
374
|
+
**Task state** — [slugs appended this run / pipeline position]
|
|
375
|
+
|
|
376
|
+
**Artifacts**
|
|
377
|
+
- implemented code
|
|
378
|
+
- `summary.md`
|
|
379
|
+
- `analysis/findings.md`
|
|
380
|
+
- `implementation/fix-plan.md`
|
|
381
|
+
- `implementation/tdd-red-gate.md` + `implementation/tdd-green-gate.md`
|
|
382
|
+
- `implementation/work-log.md`
|
|
383
|
+
- `orchestrator-state.yml` (status: <completed | in_progress>)
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**Results-acceptance question** — use `question` — "Is the bug fixed correctly?" with options:
|
|
387
|
+
|
|
388
|
+
- **Accept** — fix verified; print next steps below.
|
|
389
|
+
- **Adjust** — re-work the fix (different approach, additional files), re-run the TDD loop, then re-present the results box.
|
|
390
|
+
- **Discuss** — walk through root cause analysis and fix reasoning in more depth; then re-ask.
|
|
391
|
+
- **Stop here** — end; `summary.md` and the task directory persist. Resume or escalate later via the hints below.
|
|
392
|
+
|
|
393
|
+
**Next steps (after Accept)**:
|
|
394
|
+
|
|
395
|
+
Standalone (fresh task):
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
✓ Bug fixed — <task-path>
|
|
399
|
+
|
|
400
|
+
Next steps:
|
|
401
|
+
→ /owflow:dev-verify <task-path> — recommended: run the verification pipeline
|
|
402
|
+
(completeness, code review) before commit
|
|
403
|
+
|
|
404
|
+
Other options:
|
|
405
|
+
→ Commit using the suggested message from summary.md
|
|
406
|
+
/owflow:goal-development <task-path> — run verify → finalize in one loop
|
|
407
|
+
/owflow:dev-spec <task-path> — write a formal specification later if needed
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Consecutive run (existing task, downstream slugs were reset):
|
|
411
|
+
|
|
412
|
+
```
|
|
413
|
+
✓ Bug fixed on <task-path>
|
|
414
|
+
|
|
415
|
+
Next steps:
|
|
416
|
+
→ /owflow:dev-verify <task-path> — required: re-verification after new code
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Other options:
|
|
420
|
+
|
|
421
|
+
```
|
|
422
|
+
/owflow:development <task-path> — full workflow view of the task
|
|
423
|
+
/owflow:dev-bugfix <task-path> — fix another emerging problem on this task
|
|
424
|
+
/owflow:reviews-code <task-path> — deeper review of the fix
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
Then STOP.
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
## What This Does
|
|
432
|
+
|
|
433
|
+
1. **Resolves** the argument: bug description → fresh task bootstrap; task path/identifier → consecutive fix on an existing development task
|
|
434
|
+
2. **Creates/bootstraps** a standard development task directory with `orchestrator-state.yml` (dev template, `entry_point: dev-bugfix`)
|
|
435
|
+
3. **Discovers** applicable standards from `.owflow/docs/INDEX.md` and records them in state
|
|
436
|
+
4. **Analyzes** codebase to find root cause, writes `analysis/findings.md`, and assesses complexity
|
|
437
|
+
5. **Escalates** to the full development workflow if the bug is too complex (sets `task.status: escalated`)
|
|
438
|
+
6. **Plans** the fix (`implementation/fix-plan.md`) and presents it for user approval
|
|
439
|
+
7. **Reproduces** the bug with a failing test (TDD red, `tdd-red-proven`)
|
|
440
|
+
8. **Fixes** the bug and verifies the test passes (TDD green, `implementation-done` + `tdd-green-proven`); on consecutive runs, resets downstream verification slugs
|
|
441
|
+
9. **Summarizes** in `summary.md` and keeps the task continuable by any dev-* subskill
|
|
442
|
+
|
|
443
|
+
## Graceful Fallback
|
|
444
|
+
|
|
445
|
+
**If `.owflow/docs/` does not exist:**
|
|
446
|
+
|
|
447
|
+
Proceed with the bug fix normally, then note:
|
|
448
|
+
|
|
449
|
+
```
|
|
450
|
+
"No AI SDLC standards found. Consider running `/owflow:flow-init` to initialize
|
|
451
|
+
project documentation and coding standards for better consistency."
|
|
452
|
+
```
|
|
@@ -0,0 +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.
|