| name | qrspi-pi |
|---|---|
| description | Orchestrates phased agentic software development (Questions → Research → Design → Structure → Plan → Worktree → Implement → Review). Use as the entry point when starting a new project. Pronounced "crispy". |
| model_tier | frontier-mid |
| inputs | user prompt, project artifact state |
| outputs | phase routing decision |
| forbidden_inputs | none |
This is the QRSPI orchestrator. The phases are Questions → Research → Design → Structure → Plan → Worktree → Implement → Review. Pronounced "crispy."
- Reads: the user's prompt and the project's artifact state (which files exist in the working directory and what
mode:is set instructure.md). - Writes: routing decisions (which phase skill to load next). Does not write artifacts directly.
- Does not read: the contents of phase artifacts in detail. The orchestrator picks the next phase; the phase skill reads its own inputs.
- Tier:
frontier-mid. Routing logic is bounded but the model needs to handle escalation messages and resume from arbitrary states.
[gated] Questions → Research → Design → Structure
[mode] └──────────── per-slice loop ────────────┐
[loop] │ Plan → Worktree* → Implement → Review │
│ (* worktree runs once at slice 1) │
└────────────────────────────────────────┘
[final] Review (heavy, optional pr.md)
The first four phases are human-gated. The per-slice loop runs autonomously by default, with opt-in gating via mode: gated in structure.md.
- Provide a project description.
- The orchestrator detects where you are by checking which artifacts exist.
- It loads the appropriate phase skill and runs it.
- For human-gated phases (Q, R, D, S): stop after each and wait for approval before moving to the next.
- For the per-slice loop: behavior depends on
mode:instructure.md:mode: autonomous(default) — Plan-slice → Implement-slice → Review-slice runs without checkpoints, advancing to the next slice on Green/Yellow assessments.mode: gated— Plan-slice waits for human approval before Implement-slice on every slice.
- After all slices reviewed Green/Yellow: optional final Review (heavy, with optional
pr.mdif a git remote is detected). - If anything escalates: the phase stops, names the most likely upstream cause, and waits for the user.
Check the working directory and pick the next action by walking this sequence:
- No
questions.md? → run Questions (gated). questions.mdexists, noresearch.md? → run Research (gated).research.mdexists, nodesign.md? → run Design (gated).design.mdexists, nostructure.md? → run Structure (gated).structure.mdexists? Read it. For each slice in order:- No
slices/slice-N/plan.md? → run Plan-slice-N. (Run Worktree first if it's slice 1 and worktree state isn't set up.) plan.mdexists, slice tasks not all[x]or verification not run? → run Implement-slice-N.- Slice complete, no
slices/slice-N/review.md? → run Review (per-slice, light). - Per-slice review is Red? → escalate.
- Per-slice review is Green/Yellow? → continue to next slice.
- No
- All slices reviewed Green/Yellow, no final
review.md? → run Review (final, heavy). Ask user about PR mode if a git remote exists. - Final
review.mdexists? → flow complete.
| Artifact | Produced by | Read by |
|---|---|---|
questions.md |
Questions | Research |
research.md |
Research | Design |
design.md |
Design | Structure, Plan |
structure.md |
Structure | Plan, Worktree, Implement, Review (final) |
slices/slice-N/plan.md |
Plan | Implement, Review (per-slice) |
slices/slice-N/review.md |
Review (per-slice) | user; final Review aggregates |
review.md |
Review (final) | user |
pr.md |
Review (final, optional) | user |
The orchestrator loads each phase's SKILL.md when entering that phase:
questions/SKILL.md—frontier-topresearch/SKILL.md—frontier-middesign/SKILL.md—frontier-topstructure/SKILL.md—frontier-topplan/SKILL.md—localworktree/SKILL.md—localimplement/SKILL.md—localreview/SKILL.md—frontier-mid(per-slice) /frontier-top(final)
A harness that supports per-phase model routing should consult each phase's model_tier frontmatter; otherwise the prose tier note in each Phase Contract section guides the user / executing model.
The mode: field at the top of structure.md controls the per-slice loop:
autonomous(default) — Plan / Implement / Review-per-slice run without human checkpoints. Phases stop only on escalation.gated— Plan-slice waits for human approval on every slice before Implement starts.
The mode: field is human-decided. Structure phase asks the user explicitly at its checkpoint; the orchestrator reads mode: before each slice's Plan to decide whether to gate.
When a phase escalates, it stops and surfaces:
- What it was trying to do.
- What went wrong (with evidence).
- The most likely upstream cause (named).
- A suggested user action.
Review does not auto-iterate with Implement. The user reads the relevant review.md and decides whether to re-run Implement, edit a plan, or loop further upstream. There is no automatic loop-back machinery.
Each phase's ## Triggers for Escalation to the User section lists its own escalation triggers and likely causes.
Re-running the orchestrator with no arguments picks up where the last run stopped — the phase detection sequence above is idempotent. To re-run a specific phase deliberately (e.g., after the user wants to revise Design after seeing slice 3 surface a problem), the user invokes that phase's skill directly; the orchestrator's auto-detection will then see stale downstream artifacts and the user decides what to keep vs. regenerate.
Tell me what you want to build, and we'll get started.