ADR, changelog, code-review, debug, doc-sync, explain, feature, hotfix, improve, onboard, plan, prototype, refactor, security-scan, smoke-test, speckit-flow, supervise, test-gen, and more. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
139 lines
3.5 KiB
YAML
139 lines
3.5 KiB
YAML
kind: WavePipeline
|
|
metadata:
|
|
name: debug
|
|
description: "Systematic debugging with hypothesis testing"
|
|
release: true
|
|
|
|
input:
|
|
source: cli
|
|
example: "TestPipelineExecutor fails with nil pointer on resume"
|
|
|
|
steps:
|
|
- id: reproduce
|
|
persona: debugger
|
|
workspace:
|
|
mount:
|
|
- source: ./
|
|
target: /project
|
|
mode: readonly
|
|
exec:
|
|
type: prompt
|
|
source: |
|
|
Reproduce and characterize the issue: {{ input }}
|
|
|
|
1. Understand expected vs actual behavior
|
|
2. Create minimal reproduction steps
|
|
3. Identify relevant code paths
|
|
4. Note environmental factors (OS, versions, config)
|
|
output_artifacts:
|
|
- name: reproduction
|
|
path: .wave/output/reproduction.json
|
|
type: json
|
|
handover:
|
|
contract:
|
|
type: json_schema
|
|
source: .wave/output/reproduction.json
|
|
schema_path: .wave/contracts/debug-reproduction.schema.json
|
|
on_failure: retry
|
|
max_retries: 2
|
|
|
|
- id: hypothesize
|
|
persona: debugger
|
|
dependencies: [reproduce]
|
|
memory:
|
|
inject_artifacts:
|
|
- step: reproduce
|
|
artifact: reproduction
|
|
as: issue
|
|
exec:
|
|
type: prompt
|
|
source: |
|
|
Form hypotheses about the root cause.
|
|
|
|
For each hypothesis:
|
|
1. What could cause this behavior?
|
|
2. What evidence would confirm/refute it?
|
|
3. How to test this hypothesis?
|
|
|
|
Rank by likelihood and ease of testing.
|
|
output_artifacts:
|
|
- name: hypotheses
|
|
path: .wave/output/hypotheses.json
|
|
type: json
|
|
handover:
|
|
contract:
|
|
type: json_schema
|
|
source: .wave/output/hypotheses.json
|
|
schema_path: .wave/contracts/debug-hypotheses.schema.json
|
|
on_failure: retry
|
|
max_retries: 2
|
|
|
|
- id: investigate
|
|
persona: debugger
|
|
dependencies: [hypothesize]
|
|
memory:
|
|
inject_artifacts:
|
|
- step: reproduce
|
|
artifact: reproduction
|
|
as: issue
|
|
- step: hypothesize
|
|
artifact: hypotheses
|
|
as: hypotheses
|
|
workspace:
|
|
mount:
|
|
- source: ./
|
|
target: /project
|
|
mode: readonly
|
|
exec:
|
|
type: prompt
|
|
source: |
|
|
Test each hypothesis systematically.
|
|
|
|
1. Start with most likely / easiest to test
|
|
2. Use git bisect if needed to find regression
|
|
3. Add diagnostic logging to trace execution
|
|
4. Examine data flow and state changes
|
|
5. Document findings for each hypothesis
|
|
|
|
Continue until root cause is identified.
|
|
output_artifacts:
|
|
- name: findings
|
|
path: .wave/output/investigation.md
|
|
type: markdown
|
|
|
|
- id: fix
|
|
persona: craftsman
|
|
dependencies: [investigate]
|
|
memory:
|
|
inject_artifacts:
|
|
- step: investigate
|
|
artifact: findings
|
|
as: root_cause
|
|
workspace:
|
|
mount:
|
|
- source: ./
|
|
target: /project
|
|
mode: readwrite
|
|
exec:
|
|
type: prompt
|
|
source: |
|
|
Fix the root cause identified in the investigation.
|
|
|
|
1. Implement the minimal fix
|
|
2. Add a regression test that would have caught this
|
|
3. Remove any diagnostic code added during debugging
|
|
4. Verify the original reproduction no longer fails
|
|
5. Check for similar issues elsewhere
|
|
handover:
|
|
contract:
|
|
type: test_suite
|
|
command: "{{ project.test_command }}"
|
|
|
|
must_pass: false
|
|
on_failure: retry
|
|
max_retries: 3
|
|
output_artifacts:
|
|
- name: fix
|
|
path: .wave/output/fix-summary.md
|
|
type: markdown
|