kind: WavePipeline metadata: name: ops-debug description: "Systematic debugging with hypothesis testing" release: true skills: - "{{ project.skill }}" input: source: cli example: "TestPipelineExecutor fails with nil pointer on resume" steps: - id: reproduce persona: debugger model: claude-haiku thread: debug 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 retry: policy: patient max_attempts: 2 handover: contract: type: json_schema source: .wave/output/reproduction.json schema_path: .wave/contracts/debug-reproduction.schema.json on_failure: retry - id: hypothesize persona: debugger thread: debug 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 retry: policy: patient max_attempts: 2 handover: contract: type: json_schema source: .wave/output/hypotheses.json schema_path: .wave/contracts/debug-hypotheses.schema.json on_failure: retry - id: investigate persona: debugger thread: debug 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 handover: contract: type: non_empty_file source: .wave/output/investigation.md - id: fix persona: craftsman dependencies: [investigate] thread: debug max_visits: 3 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 retry: policy: aggressive max_attempts: 3 output_artifacts: - name: fix path: .wave/output/fix-summary.md type: markdown - id: run-tests type: command dependencies: [fix] script: "{{ project.contract_test_command }}" - id: verify-fix type: conditional dependencies: [run-tests] edges: - target: _complete condition: "outcome=success" - target: fix