wogiflow 1.2.0 → 1.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/.claude/commands/wogi-bug.md +457 -29
- package/.claude/commands/wogi-debug-browser.md +229 -214
- package/.claude/commands/wogi-debug-hypothesis.md +164 -0
- package/.claude/commands/wogi-epics.md +9 -0
- package/.claude/commands/wogi-help.md +8 -7
- package/.claude/commands/wogi-init.md +586 -63
- package/.claude/commands/wogi-onboard.md +798 -39
- package/.claude/commands/wogi-ready.md +20 -0
- package/.claude/commands/wogi-review.md +152 -25
- package/.claude/commands/wogi-setup-stack.md +72 -11
- package/.claude/commands/wogi-start.md +362 -106
- package/.claude/commands/wogi-status.md +17 -0
- package/.claude/commands/wogi-test-browser.md +264 -119
- package/.claude/commands/wogi-triage.md +253 -0
- package/.claude/docs/commands.md +0 -8
- package/.claude/docs/knowledge-base/02-task-execution/02-execution-loop.md +1 -2
- package/.claude/docs/knowledge-base/02-task-execution/03-verification.md +3 -77
- package/.claude/docs/knowledge-base/02-task-execution/04-completion.md +1 -3
- package/.claude/docs/knowledge-base/02-task-execution/README.md +1 -2
- package/.claude/docs/knowledge-base/configuration/all-options.md +2 -37
- package/.claude/skills/_template/skill.md +6 -0
- package/.claude/skills/figma-analyzer/skill.md +2 -0
- package/.workflow/templates/claude-md.hbs +3 -51
- package/package.json +1 -1
- package/scripts/flow +18 -34
- package/scripts/flow-adaptive-learning.js +2 -2
- package/scripts/flow-agent-teams.js +616 -0
- package/scripts/flow-bridge.js +2 -2
- package/scripts/flow-diff.js +2 -2
- package/scripts/flow-done.js +1 -20
- package/scripts/flow-durable-session.js +6 -6
- package/scripts/flow-entropy-monitor.js +3 -3
- package/scripts/flow-memory-compactor.js +26 -3
- package/scripts/flow-memory-db.js +323 -13
- package/scripts/flow-memory-sync.js +3 -3
- package/scripts/flow-model-adapter.js +1 -1
- package/scripts/flow-orchestrate-llm.js +3 -3
- package/scripts/flow-parallel.js +58 -4
- package/scripts/flow-pattern-extractor.js +700 -13
- package/scripts/flow-providers.js +4 -2
- package/scripts/flow-skill-generator.js +146 -2
- package/scripts/flow-skill-matcher.js +14 -6
- package/scripts/flow-stack-wizard.js +5 -5
- package/scripts/flow-step-changelog.js +2 -2
- package/scripts/flow-step-regression.js +5 -5
- package/scripts/flow-task-enforcer.js +1 -56
- package/scripts/flow-tech-options.js +5 -5
- package/scripts/flow-template-extractor.js +707 -0
- package/scripts/flow-utils.js +11 -9
- package/scripts/flow-webmcp-generator.js +779 -0
- package/scripts/flow-workflow-steps.js +3 -14
- package/scripts/flow-worktree.js +8 -8
- package/scripts/hooks/adapters/claude-code.js +21 -26
- package/scripts/hooks/core/loop-check.js +48 -1
- package/scripts/hooks/core/observation-capture.js +4 -2
- package/scripts/hooks/core/research-gate.js +147 -1
- package/scripts/hooks/core/session-context.js +81 -1
- package/scripts/hooks/core/task-completed.js +50 -1
- package/scripts/hooks/core/task-gate.js +22 -0
- package/scripts/hooks/core/teammate-idle.js +74 -7
- package/scripts/hooks/entry/claude-code/post-tool-use.js +21 -1
- package/scripts/hooks/entry/claude-code/session-start.js +1 -1
- package/scripts/hooks/entry/claude-code/stop.js +1 -1
- package/.workflow/agents/reviewer.md +0 -81
- package/.workflow/agents/security.md +0 -94
- package/.workflow/agents/story-writer.md +0 -58
- package/scripts/flow-browser-debug.js +0 -732
- package/scripts/flow-browser-error-patterns.js +0 -596
- package/scripts/flow-browser-executor.js +0 -460
- package/scripts/flow-browser-nl-parser.js +0 -574
- package/scripts/flow-browser-suggest.js +0 -392
- package/scripts/flow-figma-pipeline.js +0 -414
- package/scripts/flow-migrate-ids.js +0 -370
- package/scripts/flow-step-browser.js +0 -83
- package/scripts/flow-verification.js +0 -644
- package/templates/browser-test-flow.json +0 -56
|
@@ -1,43 +1,471 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- PINS: bug-protocol, bug-cli, bug-investigation, bug-phases, bug-population, bug-severity, bug-creation, bug-execution, bug-specific-execution, bug-learning, bug-discovery, bug-output, bug-configuration, bug-comparison -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Create a bug report with full investigation and execution. Provide title: `/wogi-bug Login button not responding`
|
|
4
|
+
|
|
5
|
+
**This is NOT a passive template creator.** You are an AI investigator. Your job is to:
|
|
6
|
+
1. **Investigate** the bug (search codebase, analyze errors, form hypotheses)
|
|
7
|
+
2. **Populate** every field in the bug report with real findings
|
|
8
|
+
3. **Create** the bug file via CLI
|
|
9
|
+
4. **Route** to `/wogi-start` for structured fix execution
|
|
10
|
+
|
|
11
|
+
## Quick Reference
|
|
12
|
+
<!-- PIN: bug-cli -->
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/wogi-bug "Login button not responding"
|
|
16
|
+
/wogi-bug "Null pointer in Profile API" --priority P0
|
|
17
|
+
/wogi-bug "Auth token refresh fails intermittently" --severity critical
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## CLI Options
|
|
21
|
+
|
|
22
|
+
Run `./scripts/flow bug "<title>"` to create the bug file.
|
|
4
23
|
|
|
5
|
-
Options:
|
|
6
24
|
- `--from <task-id>` - Task ID that discovered this bug (auto-populated if task in progress)
|
|
7
25
|
- `--priority <P>` - Priority P0-P4 (auto-boosted to P1 if discovered during task)
|
|
8
|
-
- `--severity <
|
|
26
|
+
- `--severity <level>` - Severity: critical, high, medium, low (default: medium)
|
|
9
27
|
- `--json` - Output JSON
|
|
10
28
|
|
|
11
|
-
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Bug Investigation Protocol (MANDATORY)
|
|
32
|
+
<!-- PIN: bug-investigation -->
|
|
33
|
+
|
|
34
|
+
**Do NOT just create a file with empty `[placeholder]` brackets.** You are the investigator. Follow this protocol to populate every field with real data.
|
|
35
|
+
|
|
36
|
+
### Phase 1: Understand the Report
|
|
37
|
+
<!-- PIN: bug-phases -->
|
|
38
|
+
|
|
39
|
+
Parse the user's bug description and extract:
|
|
40
|
+
|
|
41
|
+
1. **Symptom**: What the user observes (error message, wrong behavior, crash)
|
|
42
|
+
2. **Context**: Where it happens (screen, flow, API endpoint, CLI command)
|
|
43
|
+
3. **Trigger**: What action causes it (click, submit, navigate, specific input)
|
|
44
|
+
4. **Frequency**: Always, sometimes, first-time-only, race condition
|
|
45
|
+
|
|
46
|
+
If the report is vague, ask up to 3 clarifying questions using AskUserQuestion:
|
|
47
|
+
- "Can you describe what you see when this happens?"
|
|
48
|
+
- "Does this happen every time, or only sometimes?"
|
|
49
|
+
- "What were you doing right before it happened?"
|
|
50
|
+
|
|
51
|
+
**Skip questions if:** The report is clear enough to investigate, OR you discovered the bug yourself during task work.
|
|
52
|
+
|
|
53
|
+
### Phase 2: Codebase Investigation (Multi-Agent)
|
|
54
|
+
|
|
55
|
+
Launch 2-3 parallel investigation agents to search the codebase.
|
|
56
|
+
|
|
57
|
+
**Graceful fallback**: If Task sub-agents are unavailable, perform the same investigation steps sequentially using Grep, Glob, and Read tools directly. The investigation MUST happen regardless of agent availability.
|
|
58
|
+
|
|
59
|
+
#### Agent 1: Error Source Finder
|
|
60
|
+
|
|
61
|
+
Launch as `Task` with `subagent_type=Explore`:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Investigate bug: "[BUG_TITLE]"
|
|
65
|
+
|
|
66
|
+
Symptom: [parsed symptom]
|
|
67
|
+
Context: [parsed context]
|
|
68
|
+
|
|
69
|
+
1. Search for error messages mentioned in the report
|
|
70
|
+
- Grep for exact error text
|
|
71
|
+
- Grep for related error patterns
|
|
72
|
+
2. Find the file(s) where this behavior originates
|
|
73
|
+
- Search for component/function names from the context
|
|
74
|
+
- Trace the code flow from UI to data layer
|
|
75
|
+
3. Identify the specific function/line where the bug likely lives
|
|
76
|
+
4. Check git log for recent changes to these files (last 2 weeks)
|
|
77
|
+
|
|
78
|
+
Return:
|
|
79
|
+
- Suspected source file(s) with line numbers
|
|
80
|
+
- Recent changes that may have introduced the bug
|
|
81
|
+
- Code flow from trigger to symptom
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### Agent 2: Pattern & History Checker
|
|
85
|
+
|
|
86
|
+
Launch as `Task` with `subagent_type=Explore`:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
Check for patterns related to bug: "[BUG_TITLE]"
|
|
90
|
+
|
|
91
|
+
1. Read .workflow/state/feedback-patterns.md
|
|
92
|
+
- Look for similar bug patterns
|
|
93
|
+
- Check if this type of bug has occurred before
|
|
94
|
+
2. Read .workflow/state/decisions.md
|
|
95
|
+
- Check if there's a rule that should have prevented this
|
|
96
|
+
3. Search .workflow/bugs/ for similar past bugs
|
|
97
|
+
- Check resolution of similar bugs
|
|
98
|
+
4. Read .workflow/state/request-log.md (last 20 entries)
|
|
99
|
+
- Check if recent work touched the affected area
|
|
100
|
+
|
|
101
|
+
Return:
|
|
102
|
+
- Similar past bugs (if any) with their resolutions
|
|
103
|
+
- Relevant patterns from feedback-patterns.md
|
|
104
|
+
- Relevant rules from decisions.md that may apply
|
|
105
|
+
- Recent work that may be related
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### Agent 3: Dependency Impact Analyzer (conditional)
|
|
109
|
+
|
|
110
|
+
Launch as `Task` with `subagent_type=Explore` — only when severity is **high** or **critical** (controlled by `config.bugFlow.investigationAgents.dependencyAnalyzer.minSeverity`):
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Analyze impact of bug in: "[AFFECTED_FILE]"
|
|
114
|
+
|
|
115
|
+
1. Find all files that IMPORT from the affected file
|
|
116
|
+
2. Find all files that the affected file IMPORTS
|
|
117
|
+
3. Check if the bug could cascade to other features
|
|
118
|
+
4. Identify test files that cover this code
|
|
119
|
+
|
|
120
|
+
Return:
|
|
121
|
+
- Dependency map (who uses this, what does this use)
|
|
122
|
+
- Cascade risk assessment
|
|
123
|
+
- Existing test coverage
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Launch all applicable agents in parallel** (single message, multiple Task calls).
|
|
127
|
+
|
|
128
|
+
**If investigation fails to identify a clear root cause**, consider escalating to `/wogi-debug-hypothesis` which spawns parallel agents to investigate competing theories about the root cause.
|
|
129
|
+
|
|
130
|
+
### Phase 3: Populate Bug Report
|
|
131
|
+
<!-- PIN: bug-population -->
|
|
132
|
+
|
|
133
|
+
Using the investigation results, populate EVERY field:
|
|
134
|
+
|
|
135
|
+
#### Bug Summary
|
|
136
|
+
Write 1-2 sentences describing:
|
|
137
|
+
- What is broken (specific behavior)
|
|
138
|
+
- What is the impact (who is affected, severity of impact)
|
|
139
|
+
|
|
140
|
+
**Example:**
|
|
141
|
+
> The login form submits but silently fails when the email contains a `+` character. Users with plus-addressed emails (e.g., user+tag@gmail.com) cannot log in, receiving no error message.
|
|
142
|
+
|
|
143
|
+
#### Reproduction
|
|
144
|
+
- **Steps to Reproduce**: Concrete numbered steps, not vague descriptions
|
|
145
|
+
- **Expected Behavior**: What should happen (reference spec or existing behavior)
|
|
146
|
+
- **Actual Behavior**: What actually happens (include error messages, screenshots if available)
|
|
147
|
+
- **Environment**: Fill in relevant fields (Node version from package.json, OS from context)
|
|
148
|
+
|
|
149
|
+
#### Root Cause Analysis
|
|
150
|
+
- **What Went Wrong**: Technical explanation based on code investigation (reference specific files and lines)
|
|
151
|
+
- **Why Did This Happen**: Check applicable boxes based on your analysis
|
|
152
|
+
- **Source of the Problem**: For AI-assisted bugs, identify if the root cause was a prompt issue, logic gap, or missing context
|
|
153
|
+
|
|
154
|
+
#### Fix Approaches
|
|
155
|
+
Propose at least 2 approaches with:
|
|
156
|
+
- Description of the fix
|
|
157
|
+
- Pros and cons
|
|
158
|
+
- Files affected (specific paths)
|
|
159
|
+
- Choose and justify the recommended approach
|
|
160
|
+
|
|
161
|
+
#### Acceptance Criteria
|
|
162
|
+
Write real Given/When/Then scenarios. At minimum 3 scenarios:
|
|
163
|
+
- **Scenario 1**: The bug is fixed (test the exact trigger)
|
|
164
|
+
- **Scenario 2**: No regression (test related functionality)
|
|
165
|
+
- **Scenario 3**: Edge cases (test boundary conditions the bug revealed)
|
|
166
|
+
|
|
167
|
+
Add more scenarios if the bug has multiple distinct failure modes.
|
|
168
|
+
|
|
169
|
+
#### Prevention & Learning
|
|
170
|
+
- **How to Prevent**: Specific actionable prevention steps
|
|
171
|
+
- **Learnings to Capture**: Draft the actual learning entries (not just "[describe]")
|
|
172
|
+
|
|
173
|
+
### Phase 4: Severity Assessment
|
|
174
|
+
<!-- PIN: bug-severity -->
|
|
175
|
+
|
|
176
|
+
Auto-assess severity based on investigation:
|
|
177
|
+
|
|
178
|
+
| Severity | Criteria |
|
|
179
|
+
|----------|----------|
|
|
180
|
+
| **Critical** | Data loss, security vulnerability, complete feature broken, no workaround |
|
|
181
|
+
| **High** | Major feature degraded, workaround exists but painful |
|
|
182
|
+
| **Medium** | Feature partially broken, easy workaround exists |
|
|
183
|
+
| **Low** | Cosmetic, minor inconvenience, edge case only |
|
|
184
|
+
|
|
185
|
+
Override user-provided severity if investigation reveals it's more/less severe:
|
|
186
|
+
```
|
|
187
|
+
Note: Upgraded severity from medium to high.
|
|
188
|
+
Reason: Investigation shows this affects all users with special characters in email,
|
|
189
|
+
not just plus-addressed emails as originally reported.
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Phase 5: Create Bug File + Verify Population
|
|
193
|
+
<!-- PIN: bug-creation -->
|
|
194
|
+
|
|
195
|
+
Run the CLI to create the file:
|
|
12
196
|
```bash
|
|
13
|
-
flow bug "
|
|
14
|
-
|
|
15
|
-
|
|
197
|
+
./scripts/flow bug "<populated title>" --priority <P> --severity <severity>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Then **immediately edit the generated file** to replace all `[placeholder]` brackets with your investigation findings from Phase 3. The CLI creates the template; you fill it in.
|
|
201
|
+
|
|
202
|
+
**Verification (MANDATORY)**: After editing, grep the bug file for remaining `[placeholder]` or `[Step` or `[What` brackets. If ANY remain, you missed a field — go back and populate it. The bug file must have zero placeholder brackets before proceeding.
|
|
203
|
+
|
|
204
|
+
### Phase 6: Route to Execution
|
|
205
|
+
<!-- PIN: bug-execution -->
|
|
206
|
+
|
|
207
|
+
After the bug file is created and populated:
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
211
|
+
Bug Report Created: wf-XXXXXXXX
|
|
212
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
213
|
+
|
|
214
|
+
Title: [title]
|
|
215
|
+
Priority: P[X] | Severity: [severity]
|
|
216
|
+
Suspected Source: [file:line]
|
|
217
|
+
Fix Approach: [chosen approach name]
|
|
218
|
+
Acceptance Criteria: [N] scenarios
|
|
219
|
+
|
|
220
|
+
File: .workflow/bugs/wf-XXXXXXXX.md
|
|
221
|
+
Added to ready.json: yes
|
|
222
|
+
|
|
223
|
+
Starting structured fix execution...
|
|
224
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Then immediately invoke `/wogi-start wf-XXXXXXXX`** to begin the structured fix execution loop.
|
|
228
|
+
|
|
229
|
+
The bug report IS the specification. `/wogi-start` uses the acceptance criteria from the bug file just like it would from a story spec. (Note: `specificationMode.skipFor` includes `"bugfix"` in config.json — this is intentional because the bug report itself serves as the spec.)
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Bug-Specific Execution (Inside /wogi-start)
|
|
234
|
+
<!-- PIN: bug-specific-execution -->
|
|
235
|
+
|
|
236
|
+
When `/wogi-start` runs on a bug task, these additional steps apply:
|
|
237
|
+
|
|
238
|
+
### Explore Phase: Verify Root Cause
|
|
239
|
+
|
|
240
|
+
Before implementing the fix, verify the root cause hypothesis:
|
|
241
|
+
|
|
242
|
+
1. Read the bug file's Root Cause Analysis section
|
|
243
|
+
2. Trace the code path described in the analysis
|
|
244
|
+
3. Confirm or update the hypothesis
|
|
245
|
+
4. If hypothesis is wrong, update the bug file and re-analyze
|
|
246
|
+
|
|
247
|
+
### Implementation: Fix + Prevent
|
|
248
|
+
|
|
249
|
+
For each acceptance criterion:
|
|
250
|
+
1. Implement the fix
|
|
251
|
+
2. Add regression test (if test infrastructure exists)
|
|
252
|
+
3. Run verification
|
|
253
|
+
|
|
254
|
+
### Bug Status Lifecycle
|
|
255
|
+
|
|
256
|
+
Keep the bug file's Status field in sync with ready.json:
|
|
257
|
+
- When `/wogi-start` begins: Update bug file `**Status**: Open` to `**Status**: In Progress`
|
|
258
|
+
- When fix is verified: Update bug file `**Status**: In Progress` to `**Status**: Fixed`
|
|
259
|
+
- If fix fails: Keep `**Status**: In Progress`
|
|
260
|
+
|
|
261
|
+
### Post-Fix: Learning Enforcement (MANDATORY Quality Gate)
|
|
262
|
+
<!-- PIN: bug-learning -->
|
|
263
|
+
|
|
264
|
+
**This is what makes bug fixing a learning opportunity.**
|
|
265
|
+
See also: CLAUDE.md Continuous Learning Protocol (Part 2: Post-Failure Capture) for the project-wide learning system this integrates with.
|
|
266
|
+
|
|
267
|
+
After all acceptance criteria pass, BEFORE completing the task:
|
|
268
|
+
|
|
269
|
+
**Note**: The quality gates `learningEnforcement` and `resolutionPopulated` in `config.qualityGates.bugfix` are instruction-driven — the AI reads the config and self-enforces these steps. They are not validated by a script; they are enforced by following this protocol.
|
|
270
|
+
|
|
271
|
+
#### Step 1: Populate Resolution Section
|
|
272
|
+
|
|
273
|
+
Edit the bug file's Resolution section:
|
|
274
|
+
```markdown
|
|
275
|
+
## Resolution
|
|
276
|
+
- **Fixed in**: [commit hash]
|
|
277
|
+
- **Root cause confirmed**: yes/no - [was initial analysis correct?]
|
|
278
|
+
- **Learnings applied**: [what was added to decisions.md/skills?]
|
|
279
|
+
- **Tests added**: [what tests were added?]
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
#### Step 2: Capture Learnings to feedback-patterns.md
|
|
283
|
+
|
|
284
|
+
Check if this bug type has a pattern:
|
|
285
|
+
```markdown
|
|
286
|
+
| [date] | [pattern-name] | [what went wrong] | [count] | [action] |
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
- If pattern exists: increment count
|
|
290
|
+
- If count >= 3: promote to `decisions.md` rule
|
|
291
|
+
- If new pattern: add with count = 1
|
|
292
|
+
|
|
293
|
+
#### Step 3: Evaluate Prevention Rules
|
|
294
|
+
|
|
295
|
+
Ask yourself:
|
|
296
|
+
1. "Could a coding standard have prevented this?" → Add to `decisions.md`
|
|
297
|
+
2. "Could a pre-task check have caught this?" → Add to `feedback-patterns.md`
|
|
298
|
+
3. "Could better test coverage have caught this?" → Note in test strategy
|
|
299
|
+
4. "Is this a recurring pattern?" → Create or strengthen a rule
|
|
300
|
+
|
|
301
|
+
#### Step 4: Cross-Reference
|
|
302
|
+
|
|
303
|
+
- If bug was discovered during a task (`discovered-from`): Add a note to that task's log entry
|
|
304
|
+
- If bug reveals a gap in a skill: Update the skill's `learnings.md`
|
|
305
|
+
- If bug was in recently-changed code: Flag in feedback-patterns as "regression"
|
|
306
|
+
|
|
307
|
+
**The task is NOT complete until Steps 1-4 are done.** This is a mandatory quality gate.
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Bug Discovered During Task Work
|
|
312
|
+
<!-- PIN: bug-discovery -->
|
|
313
|
+
|
|
314
|
+
When a bug is found while working on another task:
|
|
315
|
+
|
|
316
|
+
### Auto-Detection Signals
|
|
317
|
+
- Test failure on unrelated code
|
|
318
|
+
- Error in a file you didn't modify
|
|
319
|
+
- User reports something broken that isn't part of current task
|
|
320
|
+
|
|
321
|
+
### Inline Bug Creation
|
|
322
|
+
|
|
16
323
|
```
|
|
324
|
+
Bug discovered while working on wf-XXXXXXXX.
|
|
17
325
|
|
|
18
|
-
|
|
326
|
+
Creating bug report for: "[description]"
|
|
327
|
+
This bug will be tracked separately from the current task.
|
|
19
328
|
```
|
|
20
|
-
Created: wf-f2d409c2
|
|
21
329
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
330
|
+
1. Run the investigation protocol (Phase 1-5) — but lighter:
|
|
331
|
+
- Skip Agent 3 (dependency analysis) unless critical severity
|
|
332
|
+
- Limit to 3 search operations (grep/glob) and 2 file reads maximum
|
|
333
|
+
- Still populate ALL fields (no placeholders)
|
|
334
|
+
2. Create bug file with `--from wf-XXXXXXXX`
|
|
335
|
+
3. **Do NOT start the bug fix** — return to current task
|
|
336
|
+
4. Bug is added to `ready.json` for later execution
|
|
337
|
+
|
|
338
|
+
### Priority Auto-Boost
|
|
339
|
+
|
|
340
|
+
Bugs discovered during task work get priority boost:
|
|
341
|
+
|
|
342
|
+
| Severity | Priority (inline) | Priority (standalone) |
|
|
343
|
+
|----------|-------------------|----------------------|
|
|
344
|
+
| Critical | P0 | P0 |
|
|
345
|
+
| High | P1 | P1 |
|
|
346
|
+
| Medium | P1 (boosted) | P2 (default) |
|
|
347
|
+
| Low | P2 | P2 |
|
|
348
|
+
|
|
349
|
+
If the bug blocks current task: flag as blocker in ready.json.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Output Format
|
|
354
|
+
<!-- PIN: bug-output -->
|
|
355
|
+
|
|
356
|
+
### Full Investigation Output
|
|
27
357
|
```
|
|
358
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
359
|
+
BUG INVESTIGATION: [title]
|
|
360
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
361
|
+
|
|
362
|
+
Phase 1: Understanding Report
|
|
363
|
+
Symptom: [parsed symptom]
|
|
364
|
+
Context: [screen/flow/component]
|
|
365
|
+
Trigger: [user action]
|
|
366
|
+
Frequency: [always/sometimes/rare]
|
|
367
|
+
|
|
368
|
+
Phase 2: Codebase Investigation
|
|
369
|
+
Agent 1 (Error Source): Found in [file:line]
|
|
370
|
+
Agent 2 (Pattern Check): [similar bugs found / no matches]
|
|
371
|
+
Agent 3 (Impact): [N files affected / skipped]
|
|
372
|
+
|
|
373
|
+
Phase 3: Bug Report Populated
|
|
374
|
+
Summary: [1 sentence]
|
|
375
|
+
Root Cause: [technical explanation]
|
|
376
|
+
Fix Approach: [chosen approach]
|
|
377
|
+
Acceptance Criteria: [N scenarios]
|
|
378
|
+
|
|
379
|
+
Phase 4: Severity Assessment
|
|
380
|
+
Original: [user-provided or default]
|
|
381
|
+
Assessed: [after investigation]
|
|
382
|
+
Reason: [if changed]
|
|
383
|
+
|
|
384
|
+
Phase 5: File Created
|
|
385
|
+
Path: .workflow/bugs/wf-XXXXXXXX.md
|
|
386
|
+
Placeholder check: 0 remaining
|
|
387
|
+
Ready: Added to ready.json
|
|
388
|
+
|
|
389
|
+
Phase 6: Routing
|
|
390
|
+
→ Starting /wogi-start wf-XXXXXXXX
|
|
391
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Inline Bug Output (discovered during task)
|
|
395
|
+
```
|
|
396
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
397
|
+
BUG CAPTURED: [title]
|
|
398
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
399
|
+
ID: wf-XXXXXXXX
|
|
400
|
+
Severity: [severity] | Priority: P1
|
|
401
|
+
Discovered from: wf-YYYYYYYY
|
|
402
|
+
Source: [file:line]
|
|
403
|
+
Added to ready.json for later execution.
|
|
404
|
+
|
|
405
|
+
Returning to current task...
|
|
406
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Configuration
|
|
412
|
+
<!-- PIN: bug-configuration -->
|
|
413
|
+
|
|
414
|
+
Bug behavior is controlled by `.workflow/config.json`:
|
|
415
|
+
|
|
416
|
+
```json
|
|
417
|
+
{
|
|
418
|
+
"bugFlow": {
|
|
419
|
+
"investigationAgents": {
|
|
420
|
+
"errorSourceFinder": { "enabled": true },
|
|
421
|
+
"patternChecker": { "enabled": true },
|
|
422
|
+
"dependencyAnalyzer": { "enabled": true, "minSeverity": "high" }
|
|
423
|
+
},
|
|
424
|
+
"autoRoute": true,
|
|
425
|
+
"learningEnforcement": {
|
|
426
|
+
"enabled": true,
|
|
427
|
+
"requireResolution": true,
|
|
428
|
+
"requireFeedbackPattern": true,
|
|
429
|
+
"promotionThreshold": 3
|
|
430
|
+
},
|
|
431
|
+
"inlineDiscovery": {
|
|
432
|
+
"maxSearchOperations": 3,
|
|
433
|
+
"maxFileReads": 2,
|
|
434
|
+
"autoPriorityBoost": true,
|
|
435
|
+
"skipDependencyAnalysis": true
|
|
436
|
+
},
|
|
437
|
+
"severityOverride": {
|
|
438
|
+
"enabled": true,
|
|
439
|
+
"requireJustification": true
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## Comparison: Bug vs Story
|
|
448
|
+
<!-- PIN: bug-comparison -->
|
|
449
|
+
|
|
450
|
+
| Aspect | `/wogi-story` | `/wogi-bug` |
|
|
451
|
+
|--------|--------------|-------------|
|
|
452
|
+
| **Input** | User describes desired feature | User describes broken behavior |
|
|
453
|
+
| **Investigation** | Explore phase (codebase + best practices + versions) | Bug investigation (error source + patterns + impact) |
|
|
454
|
+
| **Output** | Story spec with acceptance criteria | Bug report with root cause + fix approaches |
|
|
455
|
+
| **Execution** | Routes to `/wogi-start` | Routes to `/wogi-start` |
|
|
456
|
+
| **Quality Gates** | Criteria check, wiring check, standards | Same + learning enforcement + resolution |
|
|
457
|
+
| **Post-completion** | Update app-map, request-log | Same + feedback-patterns, prevention rules |
|
|
458
|
+
|
|
459
|
+
**Bugs are NOT second-class citizens.** They get the same structured execution loop as stories, plus additional learning enforcement.
|
|
460
|
+
|
|
461
|
+
---
|
|
28
462
|
|
|
29
|
-
|
|
30
|
-
- Hash-based ID (wf-XXXXXXXX format)
|
|
31
|
-
- Priority (P0-P4, auto-boosted if discovered during task)
|
|
32
|
-
- Discovered From tracking (links bug to source task)
|
|
33
|
-
- Description
|
|
34
|
-
- Steps to reproduce
|
|
35
|
-
- Expected vs Actual
|
|
36
|
-
- Severity
|
|
37
|
-
- Tags (#bug, #screen:X, #component:Y)
|
|
38
|
-
- Status tracking
|
|
463
|
+
## Important
|
|
39
464
|
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
465
|
+
- **Never leave `[placeholder]` brackets** in a bug file. Every field gets populated with real data. Verify with grep after editing.
|
|
466
|
+
- **Always route to `/wogi-start`** after creating the bug file. Bug reports without execution are waste.
|
|
467
|
+
- **Learning enforcement is mandatory.** The Prevention & Learning section is a quality gate, not optional documentation.
|
|
468
|
+
- **Severity assessment is based on investigation**, not just user perception. Override when evidence warrants it.
|
|
469
|
+
- **Inline discovery is lightweight** but still populates all fields. Speed does not mean empty templates.
|
|
470
|
+
- **Cross-reference discovered-from bugs** back to the source task for traceability.
|
|
471
|
+
- **Bug status lifecycle**: Keep the bug file's Status field in sync with ready.json throughout the fix process.
|