Loading...
Loading...
Full RPI lifecycle orchestrator. Research → Plan → Pre-mortem → Crank → Vibe → Post-mortem. One command, sequential skill invocations with human gates and hands-free validation. Triggers: "rpi", "full lifecycle", "end to end", "research to production".
npx skill4agent add boshu2/agentops rpiQuick Ref: One command, full lifecycle. Research → Plan → Pre-mortem → Crank → Vibe → Post-mortem. The session IS the lead. Sub-skills manage their own teams.
/rpi "add user authentication" # Full lifecycle, fully autonomous (default)
/rpi --interactive "add user authentication" # Human gates at research + plan
/rpi --from=plan "add auth" # Skip research, start from plan
/rpi --from=crank ag-23k # Skip to crank with existing epic
/rpi --from=vibe # Just run final validation + post-mortem
/rpi --loop --max-cycles=3 "add auth" # Gate 4 loop: post-mortem FAIL -> spawn another /rpi cycle
/rpi --test-first "add auth" # Spec-first TDD (contracts → tests → impl)/rpi <goal | epic-id> [--from=<phase>] [--interactive]
│ (session = the lead, no TeamCreate)
│
├── Phase 1: /research ── auto (default) or human gate (--interactive)
├── Phase 2: /plan ────── auto (default) or human gate (--interactive)
├── Phase 3: /pre-mortem ── auto (FAIL → retry loop)
├── Phase 4: /crank ────── autonomous (manages own teams)
├── Phase 5: /vibe ──────── auto (FAIL → retry loop)
└── Phase 6: /post-mortem ── auto (council + retro + flywheel)--loopreferences/phase-data-contracts.md/rpi <goal | epic-id> [--from=<phase>] [--interactive]mkdir -p .agents/rpiscripts/rpi/context-window-contract.shreferences/context-windowing.md--from=plan--from=pre-mortem--from=crank--from=vibe--from=post-mortemag-*if [ -f .agents/rpi/next-work.jsonl ]; then
# Read unconsumed entries (consumed: false)
# Schema: .agents/rpi/next-work.schema.md
fi.agents/rpi/next-work.jsonl--auto--interactiverpi_state = {
goal: "<goal string>",
epic_id: null, # populated after Phase 2
phase: "<starting phase>",
auto: <true unless --interactive flag present>,
test_first: <true if --test-first flag present>,
fast_path: false, # auto-detected after Phase 2, or forced via --fast-path
cycle: 1, # RPI iteration number (incremented on --spawn-next)
parent_epic: null, # epic ID from prior cycle (if spawned from next-work)
verdicts: {} # populated as phases complete
}--fromSkill(skill="research", args="<goal> --auto") # always --auto unless --interactive--auto--interactiveRead the research output file.
Write a 500-token summary to .agents/rpi/phase-1-summary.mdao ratchet record research 2>/dev/null || true--fromSkill(skill="plan", args="<goal> --auto") # always --auto unless --interactive--auto--interactive# Find most recent epic
EPIC_ID=$(bd list --type epic --status open 2>/dev/null | head -1 | grep -o 'ag-[a-z0-9]*')rpi_state.epic_idISSUE_COUNT=$(bd children <epic-id> 2>/dev/null | wc -l | tr -d ' ')
BLOCKED_COUNT=$(bd children <epic-id> 2>/dev/null | grep -c 'blocked' || echo 0)ISSUE_COUNT <= 2BLOCKED_COUNT == 0--fast-pathrpi_state.fast_path = true--quick.agents/rpi/phase-2-summary.mdao ratchet record plan 2>/dev/null || true--fromSkill(skill="pre-mortem", args="--quick") # if rpi_state.fast_path
Skill(skill="pre-mortem") # otherwise (full council)references/gate-retry-logic.mdrpi_state.verdicts.pre_mortem.agents/rpi/phase-3-summary.mdao ratchet record pre-mortem 2>/dev/null || truerpi_state.epic_idSkill(skill="crank", args="<epic-id> --test-first") # if --test-first set
Skill(skill="crank", args="<epic-id>") # otherwise<promise>references/gate-retry-logic.md.agents/rpi/phase-4-summary.mdao ratchet record implement 2>/dev/null || trueSkill(skill="vibe", args="--quick recent") # if rpi_state.fast_path
Skill(skill="vibe", args="recent") # otherwise (full council)references/gate-retry-logic.mdrpi_state.verdicts.vibe.agents/rpi/phase-5-summary.mdao ratchet record vibe 2>/dev/null || trueSkill(skill="post-mortem", args="--quick <epic-id>") # if rpi_state.fast_path
Skill(skill="post-mortem", args="<epic-id>") # otherwise (full council)--loopao ratchet record post-mortem --cycle=<rpi_state.cycle> --parent-epic=<rpi_state.parent_epic> 2>/dev/null || truereferences/gate4-loop-and-spawn.md--loopreferences/report-template.mdreferences/error-handling.md| Flag | Default | Description |
|---|---|---|
| | Start from this phase (research, plan, pre-mortem, crank, vibe, post-mortem) |
| off | Enable human gates in /research and /plan. Without this flag, /rpi runs fully autonomous. |
| on | (Legacy, now default) Fully autonomous — zero human gates. Kept for backwards compatibility. |
| off | Enable Gate 4 loop: after /post-mortem, iterate only when post-mortem verdict is FAIL (spawns another /rpi cycle). |
| | Hard cap on total /rpi cycles when |
| off | After post-mortem, read harvested next-work items and report suggested next |
| off | Pass |
| auto | Force fast path (--quick for gates). Auto-detected when ≤2 issues and 1 wave. |
| off | With |
/rpi "add user authentication"ag-5k2/rpi/rpi --from=crank ag-5k2ag-5k2/rpi --interactive "refactor payment module"| Problem | Cause | Solution |
|---|---|---|
| Pre-mortem retry loop hits max attempts | Plan has fundamental issues that retry loop cannot fix | Review council findings, manually revise plan, re-run |
| Vibe retry loop hits max attempts | Implementation has critical flaws that re-crank cannot fix | Review vibe findings, manually fix code, re-run |
| Crank blocks on missing dependency | Epic issue references unavailable blocker | Check |
| Post-mortem harvests no next-work | Council found no tech debt or improvements | Flywheel stable — no follow-up needed |
| Gate 4 loop enabled but post-mortem always returns FAIL | Set |
| Large repo context overflow | Repo has >1500 files and agents run out of context | Enable context-windowing via |
skills/research/SKILL.mdskills/plan/SKILL.mdskills/pre-mortem/SKILL.mdskills/crank/SKILL.mdskills/vibe/SKILL.mdskills/post-mortem/SKILL.md