jie-worldstatelabs/root-cause-analysispublicSimplified RCA flow — repro, diagnose with cited evidence, fix, then independently re-validate. Same discipline as before, one fewer stage.
jie-worldstatelabs/root-cause-analysispublicSimplified RCA flow — repro, diagnose with cited evidence, fix, then independently re-validate. Same discipline as before, one fewer stage.
/stagent:start --flow=cloud://jie-worldstatelabs/root-cause-analysis <task_description>Paste in Claude Code and replace <task_description>
Click any stage above to view its instructions below.
reproduceinline· interruptible · transitions: done → diagnose
Runtime config (canonical): workflow.json → stages.reproduce
Purpose: interview the bug reporter, capture symptoms, and produce a minimal reproduction plus an expected vs actual table that downstream stages can rely on.
Output artifact: write to the absolute path provided in your prompt
Valid results this stage writes: pending (gathering info / repro in progress), done (repro and expected-vs-actual table are locked in)
This is an interruptible inline stage — the stop hook allows natural pauses for Q&A.
Note: by the time you read this file,
state.mdalready exists withstatus: reproduceand the current epoch.
diagnose report — present only on loop-back when the prior diagnosis was inconclusive. Read it first: its "Why Inconclusive" section names the exact missing information that prevented confirmation. Use that to focus this round's interview questions instead of starting from scratch.Read the current epoch from state.md. Before doing any work, write the output artifact at the path shown in your I/O context with:
---
epoch: <epoch>
result: pending
---
# Reproduce Report (in progress)This signals the stop hook that the stage is mid-work and is safe to pause for user input.
Ask the user for the report. Pull on the loose threads — one question per message, multiple-choice when possible, typically 3–6 questions:
If the optional diagnose report is present, prioritise the gaps it called out — ask the user the specific question(s) that would have let the previous diagnose round confirm a hypothesis.
Stop asking when you have enough to attempt a repro.
A "minimal repro" is the smallest set of steps or smallest script that triggers the bug deterministically. Keep cutting until removing one more thing makes the bug disappear.
Forms the repro can take, in order of preference:
python repro.py, curl …, a failing test).Write the repro into the body of the report under ## Repro. If you created a script or test file in the project, list its path.
| # | Step / Input | Expected | Actual |
|---|-----------------------|-------------------------|--------------------------|
| 1 | <action> | <observable result> | <observed result> |Be specific — "an error" is not actual behavior, "TypeError: cannot read 'id' of undefined at user.js:42" is.
Show the user the repro and the expected-vs-actual table. Iterate until they confirm it matches the bug they were reporting. Do NOT advance until they explicitly confirm.
Once the user confirms, overwrite the output artifact:
---
epoch: <epoch>
result: done
---
# Reproduce Report
## Bug Summary
<one-line description>
## Environment
<OS, runtime/version, branch + commit hash, any relevant config>
## Repro
<exact commands, script path, or step-by-step sequence>
## Expected vs Actual
| # | Step / Input | Expected | Actual |
|---|---|---|---|
| 1 | ... | ... | ... |
## Notes
<frequency, recent changes, anything else the next stage should know>
## Loop-back Notes
(Include this section ONLY if the optional prior diagnose report was provided.)
- Diagnose gap that motivated this round: <quoted from the prior diagnose's "Why Inconclusive">
- New information gathered to close it: <one or two sentences>That is the only action needed here. The main loop reads the artifact's result: and calls update-status.sh to advance the state machine — do NOT call it yourself.
done until the expected-vs-actual table has at least one concrete row.drives the state machine above