rpi

boshu2/agentops · updated May 7, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/boshu2/agentops --skill rpi
0 commentsdiscussion
summary

Quick Ref: One command, full lifecycle. /discovery → /crank → /validation. Thin wrapper that delegates to phase orchestrators.

  • YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
  • THREE-PHASE RULE + FULLY AUTONOMOUS. Read references/autonomous-execution.md — it defines the mandatory 3-phase lifecycle, autonomous execution rules, anti-patterns, and phase completion logging. Unless --interactive is set, RPI runs hands-free. Do NOT stop after Phase 2. Do NOT ask the user anything between phases
skill.md

/rpi — Full RPI Lifecycle Orchestrator

Quick Ref: One command, full lifecycle. /discovery/crank/validation. Thin wrapper that delegates to phase orchestrators. YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it. THREE-PHASE RULE + FULLY AUTONOMOUS. Read references/autonomous-execution.md — it defines the mandatory 3-phase lifecycle, autonomous execution rules, anti-patterns, and phase completion logging. Unless --interactive is set, RPI runs hands-free. Do NOT stop after Phase 2. Do NOT ask the user anything between phases.

Quick Start

Run /rpi "<goal>" for the full lifecycle. For resume, loop, fast-path, and deep examples, read references/examples.md.

Lifecycle Ownership

Phase orchestrators own all sub-skill sequencing, retry gates, and phase budgets. /discovery handles brainstorm → design (when PRODUCT.md exists) → search → research → plan → pre-mortem and writes the execution packet; /crank owns wave-based implementation and implementation retries; /validation owns vibe → post-mortem → retro → forge and validation retries. /rpi stays thin: it owns setup, complexity classification, phase routing, the implementation gate, the validation-fail-to-crank loop, and the final report.

Execution Steps

Step 0: Setup + Classify

mkdir -p .agents/rpi

Determine starting phase:

  • default: discovery
  • --from=implementation (aliases: crank) → skip to Phase 2
  • --from=validation (aliases: vibe, post-mortem) → skip to Phase 3
  • aliases research, plan, pre-mortem, brainstorm map to discovery
  • If input is a bead ID and --from is not set, resolve it before routing:
    • bd show <id> says issue_type=epic → Phase 2 using that epic ID
    • child issue with parent → Phase 2 using the parent epic ID
  • If beads are absent or the input is plain goal text:
    • preserve the goal as the lifecycle objective
    • use .agents/rpi/execution-packet.json as the phase-2 handoff when discovery does not yield an epic
    • default to Phase 1 unless the user explicitly set --from
  • Do not infer epic scope from ag-* alone. Classify complexity:
Level Criteria Behavior
fast Goal <=30 chars, no complex/scope keywords Full 3-phase. Gates use --quick throughout.
standard Goal 31-120 chars, or 1 scope keyword Full 3-phase. Gates use --quick.
full Complex-operation keyword, 2+ scope keywords, or >120 chars Full 3-phase. Gates use full council.

Complex-operation keywords: refactor, migrate, migration, rewrite, redesign, rearchitect, overhaul, restructure, reorganize, decouple, deprecate, split, extract module, port

Scope keywords: all, entire, across, everywhere, every file, every module, system-wide, global, throughout, codebase

Overrides: --deep forces full. --fast-path forces fast. Log:

RPI mode: rpi-phased (complexity: <level>)

Initialize state:

rpi_state = {
  goal: "<goal string>",
  epic_id: null,
  phase: "<discovery|implementation|validation>",
  complexity: "<fast|standard|full>",
  test_first: <true by default; false only when --no-test-first>,
  cycle: 1,
  max_cycles: <3 when --loop; overridden by --max-cycles>,
  verdicts: {}
}

Phase 1: Discovery

Delegate to /discovery:

Skill(skill="discovery", args="<goal> [--interactive] --complexity=<level>")

After /discovery completes:

  1. Check completion marker: <promise>DONE</promise> or <promise>BLOCKED</promise>
  2. If BLOCKED: stop. Discovery handles its own retries (max 3 pre-mortem attempts). Manual intervention needed.
  3. If DONE: read .agents/rpi/execution-packet.json (or the matching run archive when run_id is known), preserve the execution-packet objective spine, and extract epic_id only when it exists
  4. Store rpi_state.epic_id when present and rpi_state.verdicts.pre_mortem
  5. Log: PHASE 1 COMPLETE ✓ (discovery) — proceeding to Phase 2

Phase 2: Implementation

If the execution packet has epic_id:

Skill(skill="crank", args="<epic-id> [--test-first] [--no-test-first]")

Otherwise:

Skill(skill="crank", args=".agents/rpi/execution-packet.json [--test-first] [--no-test-first]")

Implementation gate (max 3 attempts):

  • <promise>DONE</promise>: proceed to validation
  • <promise>BLOCKED</promise>: retry with block context (max 2 retries)
    • Re-invoke /crank on the same lifecycle objective + block reason
    • If still BLOCKED after 3 total: stop, manual intervention needed
  • <promise>PARTIAL</promise>: retry remaining (max 2 retries)
    • Re-invoke /crank on the same epic or execution packet (picks up remaining work)
    • If still PARTIAL after 3 total: stop, manual intervention needed

Record:

ao ratchet record implement 2>/dev/null || true

Log: PHASE 2 COMPLETE ✓ (implementation) — proceeding to Phase 3

DO NOT STOP HERE. Do not ask the user to commit. Do not summarize and wait. Proceed IMMEDIATELY to Phase 3. Implementation without validation is incomplete work — the flywheel does not turn, learnings are not captured, and quality is unverified.

Phase 3: Validation

MANDATORY for all complexity levels. /validation is the Phase 3 orchestrator — it wraps /vibe + /post-mortem + /retro + /forge. Do NOT call /vibe directly from /rpi — call /validation which handles the full sequence. fast complexity uses inline --quick gates inside /validation; it does not skip closeout. If the execution packet has epic_id:

Skill(skill="validation", args="<epic-id> --complexity=<level> [--strict-surfaces if --quality]")

Otherwise:

Skill(skill="validation", args="--complexity=<level> [--strict-surfaces if --quality]")

Validation-to-crank loop (max 3 total attempts):

  • <promise>DONE</promise>: finish RPI
  • <promise>FAIL</promise>: vibe found defects
    1. Extract findings from validation output
    2. Re-invoke /crank on the same epic or execution packet + findings context (preserve --test-first / --no-test-first from original invocation)
    3. Re-invoke /validation
    4. If still FAIL after 3 total: stop, manual intervention needed

Record:

ao ratchet record vibe 2>/dev/null || true

Log: PHASE 3 COMPLETE ✓ (validation) — RPI DONE

Step Final: Report + Loop

Report: Summarize all phase verdicts and epic status. Optional loop (--loop): If validation verdict is FAIL and cycle < max_cycles:

  1. Extract 3 concrete fixes from the post-mortem report
  2. Increment rpi_state.cycle
  3. Re-invoke /rpi from discovery with a tightened goal
  4. PASS/WARN stops the loop

Optional spawn-next (--spawn-next): After PASS/WARN finish:

  1. Read .agents/rpi/next-work.jsonl for harvested follow-up items
  2. Report with suggested next /rpi command
  3. Do NOT auto-invoke

Read references/report-template.md for full output format. Read references/error-handling.md for failure semantics.

Flags

Flag Default Description
--from=<phase> discovery Start from discovery, implementation, or validation
--interactive off Human gates in discovery
--auto on Fully autonomous (no human gates). Inverse of --interactive. Passed through to /discovery and /plan.
--loop off Post-mortem FAIL triggers new cycle
--max-cycles=<n> 3 Max cycles when --loop enabled (default 3)
--spawn-next off Surface follow-up work after completion
--test-first on Strict-quality (passed to /crank)
--no-test-first off Opt out of strict-quality
--fast-path auto Force fast complexity (uses quick inline gates, still runs full lifecycle)
--deep auto Force full complexity
--quality off Pass --strict-surfaces to /validation, making all 4 surface failures blocking
--dry-run off Report without mutating queue
--no-budget off Disable phase time budgets (passed to phase skills)

Phase Data Contracts

All transitions use filesystem artifacts (no in-memory coupling). The execution packet (.agents/rpi/execution-packet.json as the latest alias, plus .agents/rpi/runs/<run-id>/execution-packet.json as the per-run archive) carries the repo execution profile via contract_surfaces, plus done_criteria and queue claim/finalize metadata between phases. For detailed schemas, read references/phase-data-contracts.md.

Complexity-Scaled Council Gates

Pre-mortem

  • complexity == "low" or complexity == "fast": inline review, no spawning (--quick)
  • complexity == "medium" or complexity == "standard": inline fast default (--quick)
  • complexity == "high" or complexity == "full": full council, 2-judge minimum; retry gate max 3 total attempts

Final Vibe

  • complexity == "low" or complexity == "fast": inline review, no spawning (--quick)
  • complexity == "medium" or complexity == "standard": inline fast default (--quick)
  • complexity == "high" or complexity == "full": full council, 2-judge minimum; retry gate max 3 total attempts

Post-mortem (STEP 2)

  • complexity == "low" or complexity == "fast": inline review, no spawning (--quick)
  • complexity == "medium" or complexity == "standard": inline fast default (--quick)
  • complexity == "high" or complexity == "full": full council, 2-judge minimum; retry gate max 3 total attempts

Examples

Read references/examples.md for full lifecycle, resume, and interactive examples. --fast-path still runs validation; it only forces the fast/inline gate profile.

Troubleshooting

Read references/troubleshooting.md for common problems and solutions.

Runtime Compatibility

RPI runs in three runtime modes. All must produce identical phase artifacts.

Concern gc (default) Hook-capable (Claude Code) Hook-less (Codex)
Session start gc controller starts session session-start.sh hook fires automatically ao codex start called explicitly
Session stop gc controller stops session session-end.sh hook fires automatically ao codex stop called explicitly
Phase execution gcExecutor via gc sessions streamExecutor via Claude CLI directExecutor via Codex CLI
Event capture gc event bus (ao:phase, ao:gate, ao:failure, ao:metric) local events.jsonl (legacy) local events.jsonl (legacy)
Phase state .agents/rpi/phased-state.json .agents/rpi/phased-state.json .agents/rpi/phased-state.json
Phase numbering 1 = discovery, 2 = implementation, 3 = validation Same Same
Ratchet checkpoints ao ratchet check ao ratchet check ao ratchet check
Agent health gc status --json manual / tmux inspection manual

gc is the default when available. ao rpi auto-selects gcExecutor when gc binary is on PATH, version >= 0.13.0, and city.toml exists. Falls back to streamExecutor otherwise. Use --runtime stream or --runtime tmux to force legacy executors.

Minimal contract across all modes: phase state is always written to .agents/rpi/phased-state.json; phase numbering stays 1=discovery, 2=implementation, 3=validation; ao ratchet check reads that shared state unchanged; the close-loop flywheel still runs at stop time.

Reference Documents

how to use rpi

How to use rpi on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add rpi
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/boshu2/agentops --skill rpi

The skills CLI fetches rpi from GitHub repository boshu2/agentops and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/rpi

Reload or restart Cursor to activate rpi. Access the skill through slash commands (e.g., /rpi) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.542 reviews
  • Yash Thakker· Dec 16, 2024

    rpi reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • James Dixit· Dec 16, 2024

    rpi fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Nikhil Singh· Dec 4, 2024

    Registry listing for rpi matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Hana Li· Dec 4, 2024

    Solid pick for teams standardizing on skills: rpi is focused, and the summary matches what you get after install.

  • Kwame Singh· Nov 23, 2024

    Useful defaults in rpi — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ira Ghosh· Nov 23, 2024

    We added rpi from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Hana Verma· Nov 15, 2024

    Keeps context tight: rpi is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Dhruvi Jain· Nov 7, 2024

    I recommend rpi for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Oshnikdeep· Oct 26, 2024

    Useful defaults in rpi — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Aanya Ramirez· Oct 14, 2024

    I recommend rpi for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 42

1 / 5