jie-xu/software-debugpublicNo description.
jie-xu/software-debugpublicNo description.
/stagent:start --flow=cloud://jie-xu/software-debug <task_description>Paste in Claude Code and replace <task_description>
Click any stage above to view its instructions below.
planninginline· interruptible · transitions: approved → debugging
Runtime config (canonical): workflow.json → stages.planning
Purpose: Reproduce the bug, understand its root cause, and produce an agreed fix plan — including acceptance criteria and test strategy.
Output artifact: <project>/.dev-workflow/<session_id>/planning-report.md
Valid results this stage writes: pending (plan drafted, awaiting user approval), approved (user has explicitly confirmed)
This is an interruptible stage — the stop hook allows natural pauses for Q&A.
Note: the workflow (
setup-workflow.sh) has already run. By the time you read this file,state.mdalready exists withstatus: planningandepochis set.
Understand the project: language, tech stack, test framework, existing test coverage, and the specific area of code affected by the bug.
Ask the user clarifying questions (one at a time, prefer A/B/C options, cap at 5 questions):
Stop asking once you can draft a fix plan.
Attempt to reproduce the bug in the codebase:
2–3 options with trade-offs; lead with your recommendation. Examples:
Write the output artifact once you and the user agree on the approach:
---
epoch: <epoch>
result: pending
---
# Planning Report: <Bug Title>
## Bug Summary
<Symptom, expected behavior, actual behavior, reproduction steps>
## Root Cause Hypothesis
<Most likely cause based on code exploration>
## Fix Strategy
<Chosen approach and rationale>
## Files to Change
- `<file>` — <what will change and why>
## Acceptance Criteria
- [ ] Bug is no longer reproducible
- [ ] Existing tests pass
- [ ] <any additional criteria>
## Testing Strategy
### Quick Tests
- Framework: <e.g. jest / pytest / go test — or "none">
- Key cases:
- [ ] Regression test covering the exact bug scenario
- [ ] Edge cases around the fix
### E2E / Journey Tests
- Framework: <e.g. playwright / cypress / none>
- Key user paths:
- [ ] <path that exercises the buggy behavior end-to-end>result: pending signals "plan written but not approved yet."
"Plan saved. Please review and confirm to start debugging, or request changes."
If the user requests changes, iterate on the plan — keep result: pending.
Once the user explicitly approves, edit the output artifact: change result: pending → result: approved.
That is the only action needed here. The SKILL.md main loop's step (e) reads the artifact's result: and calls update-status.sh to advance the state machine — do NOT call it yourself.
drives the state machine above