| name | rezero |
| description | Orchestrate the Re:ZERO Loop. Use for /rezero requests in Pi: split large work, let Subaru implement, call Seven Witches, send warnings to Rem, reset on fail, and commit on pass. |
| license | MIT |
Re:ZERO
Goal → finish request through small Re:ZERO attempts.
Flow
- If request is
init, use rezero-init and stop.
- If request is
bgm <value>, configure Return by Death BGM and stop:
- Off values:
false, off, 0, no, disable, disabled.
- On values:
true, on, 1, yes, enable, enabled.
- Create or update
.rezero/memory/config.json in the current project with { "bgm": false } or { "bgm": true } so the setting survives Return by Death resets.
- Preserve other existing JSON keys when possible.
- Do not run init, witches, reset, or commit for this configuration-only command.
- Before any non-init request, check init state:
.rezero/tools.md exists.
.rezero/tools.md contains <!-- rezero-init:.
git check-ignore -q .rezero/memory/subaru-deaths.md succeeds.
- If init state is missing, run
rezero-init, commit init changes, then continue the original request.
- For every non-init, non-BGM request, use
rezero-plan before implementation. Do not decide request size yourself before invoking it; rezero-plan returns one task when the request is already small.
- Treat the
rezero-plan output as the authoritative task list. If planned tasks are independent, run safe groups in parallel via subagents.
- Isolate parallel implementation work, merge the group, then verify the combined result.
- Use
rezero-witches once for the whole merged group; witches must use fresh context, not Subaru's context.
- In pi subagent mode, spawn witches with actual agent aliases
echidna, typhon, minerva, daphne, carmilla, sekhmet, satella, never generic reviewer.
- Treat witch verdicts as valid only when backed by tool-call evidence that all seven exact witch agents/aliases were spawned and returned; never simulate or roleplay missing witch results.
- Aggregate every verified witch result and show the witch verdict table in the assistant chat as a hard barrier.
- Do not reset, retry, call Rem, commit, continue another loop, or give a final summary until the verified verdict table has been shown in chat.
- If any witch is missing spawn/return evidence, stop and report the witches step as blocked; do not reset, retry, call Rem, commit, continue another loop, or produce a final success/failure summary.
- Any
fail → after the chat verdict table, record minimal death memory → announce in chat which Death/Return by Death number is happening → git reset --hard HEAD → git clean -fd → retry with changed route.
- Only
pass|warning → after the chat verdict table, use rezero-rem for warnings; if .rezero/memory/rem.md is written, show the newly written Rem entries in chat → commit accepted route → delete death memory.
- If processing Rem warnings, use
rezero-rem resolution rules.
Language
Use the user's language for chat output.
Always use English names for spawned subagents, display names, session names, and verdict tables, regardless of the user's language.
Parallel implementer names are names only; no character behavior.
Use these English names for parallel implementers: Beatrice, Emilia, Ram, Garfiel, Julius.
Use these English names for witch reviewers: Echidna, Typhon, Minerva, Daphne, Carmilla, Sekhmet, Satella.
In pi subagent mode, use lowercase runtime aliases: echidna, typhon, minerva, daphne, carmilla, sekhmet, satella.
Death Memory
Before reset, append to .rezero/memory/subaru-deaths.md:
## Death <number>
- Fail: <witch + reason>
- Evidence: <minimal test/review/error/defect>
- Next route: <specific change>
Rules
- Sequential task = implement → verify → witches → chat verdict table → commit or reset.
- Parallel group = parallel implement → merge → verify combined result → one witches evaluation → chat verdict table → one commit or reset.
- Parallel implementer names must be English names only; names only, no character behavior.
- Do not parallelize tasks that touch the same files, migrations, shared state, or dependency graph.
- Never fabricate witch results; each verdict row must be derived from an actual returned message from that exact named witch agent.
- Never reset, retry, call Rem, or commit before showing the aggregated, evidence-backed witch verdict table in chat.
- Never reset before death memory.
- Before every Return by Death reset, announce the exact death number in chat in English (for example:
Executing Return by Death #<number>.).
- Never retry without new info.
- Dangerous ambiguity → ask 1 focused question.