Important
This is Ethical Capital's fork of juicesharp/rpiv-mono. It adds Claude Code (and other agent harnesses) as first-class hosts alongside Pi, plus unattended-run fixes. Everything upstream still works the same under Pi. What changed, and why, is in How this fork differs from upstream. The badges and npm install / pi install lines below point at upstream's published packages; this fork's additions run from a checkout.
Sixteen packages in one npm workspace: the rpiv-pi pipeline, the Pi Agent extensions it composes, and the internal packages holding them up. Twelve publish to npm; four never leave the repo. Kept together so orchestration and tool surfaces evolve and ship in lockstep.
Where to start:
- You want to use it —
pi install npm:@juicesharp/rpiv-pi, restart Pi, run/rpiv-setup. Full narrative, subagent map, and install walkthrough: rpiv-pi.com. - You want one piece of it — every extension below stands alone. Pick a row from Packages.
- You want to read or hack the code — Repo as a repo has the layout, the conventions, and what the git hooks enforce.
- You want to know where this is going — roadmap.md for the structured view, Roadmap for the reasoning behind it.
The pipeline needs most of them. rpiv-args expands shell-style $1 and $ARGUMENTS placeholders inside skills, rpiv-ask-user-question lets the model put a structured questionnaire to the user instead of guessing, rpiv-todo keeps a live task overlay that survives /reload and compaction, rpiv-advisor escalates to a stronger reviewer model before the agent acts, rpiv-web-tools gives the model web search and fetch with pluggable providers, and rpiv-workflow chains skills into typed multi-stage pipelines (audited JSONL state, predicate routing, per-stage output validation) and ships the /wf command Pi calls to run them. A few exist because I wanted them inside Pi: rpiv-btw is a side-conversation pattern I got used to in Claude Code, rpiv-voice is on-device dictation for when I'd rather talk than type, and rpiv-warp integrates Pi with Warp terminal's notification system, because that's where I actually run Pi. rpiv-i18n is the one that came from users: it started as localization for ask-user-question and grew into a small SDK. And two are plumbing rather than products: rpiv-config is the shared config I/O every sibling depends on, published only so those dependencies resolve, and rpiv-telemetry wires Pi into MLflow — auto-instruments lifecycle events and sub-agent activity so runs are inspectable after the fact — but it stays private: true and is loaded from a checkout, never the registry.
Tip
For the full pipeline narrative, the subagent map, and install instructions, visit rpiv-pi.com.
Each one installs on its own with pi install npm:@juicesharp/rpiv-<name>, then a Pi restart. /rpiv-setup (shipped by rpiv-pi) installs only the siblings the pipeline actually depends on; the rest are opt-in.
| Package | Role | Installed by /rpiv-setup |
npm |
|---|---|---|---|
rpiv-pi |
Pipeline (skills + subagents) | — (it ships /rpiv-setup) |
@juicesharp/rpiv-pi |
rpiv-args |
$1 / $ARGUMENTS placeholders and !`cmd` substitution in skills |
✓ | @juicesharp/rpiv-args |
rpiv-ask-user-question |
Structured questionnaire to the user | ✓ | @juicesharp/rpiv-ask-user-question |
rpiv-todo |
Live task overlay surviving /reload |
✓ | @juicesharp/rpiv-todo |
rpiv-advisor |
Escalate to a stronger reviewer model | ✓ | @juicesharp/rpiv-advisor |
rpiv-web-tools |
Web search + fetch with pluggable providers | ✓ | @juicesharp/rpiv-web-tools |
rpiv-i18n |
Localization SDK for sibling extensions | ✓ | @juicesharp/rpiv-i18n |
rpiv-workflow |
/wf runner — chain skills into typed multi-stage pipelines |
✓ | @juicesharp/rpiv-workflow |
rpiv-btw |
/btw side-conversation slash command |
— | @juicesharp/rpiv-btw |
rpiv-voice |
Local voice dictation (/voice overlay, on-device Whisper) |
— | @juicesharp/rpiv-voice |
rpiv-warp |
Warp terminal notification integration | — | @juicesharp/rpiv-warp |
Five packages you do not pi install. One is on npm as a library; four are private: true and resolve only inside a checkout.
| Package | Role | How you get it |
|---|---|---|
rpiv-config |
Shared XDG-aware JSON config I/O for the siblings | Published as a library: npm install @juicesharp/rpiv-config. Not a Pi extension — it registers nothing, and ten siblings already pull it in as a dependency. npm |
rpiv-telemetry |
MLflow observability — auto-instruments lifecycle + sub-agent activity | Not published. Inside this repo Pi loads it through the workspace symlink; elsewhere, point Pi at a checkout: pi install ./packages/rpiv-telemetry |
rpiv-praxis |
rpiv-wf: runs /wf workflows headless on Claude Code through the Claude Agent SDK |
Not published. Install just this package from a checkout: npm install --workspace @ethicalcapital/rpiv-praxis --ignore-scripts (details) |
rpiv-site |
The rpiv-pi.com site (static Astro build) | Not published. Built from this repo with npm run build:site, deployed to GitHub Pages by CI |
test-utils |
Shared test fixtures (@juicesharp/rpiv-test-utils) |
Not published. Symlinked by npm workspaces; imported by the test suite only |
Upstream is a Pi-only toolkit. This fork keeps every Pi path intact and adds a second host. Changes, grouped by what they do:
| Upstream | This fork | |
|---|---|---|
| Where skills and subagents run | Pi only | Pi, Claude Code (plugin), and Agent Skills harnesses (Codex, OpenCode, Factory, …) |
| How | — | npm run export:hosts renders packages/rpiv-pi/skills/ and agents/ into packages/rpiv-pi/hosts/ (generated, committed). CI's npm run check:hosts fails on drift. .claude-plugin/marketplace.json at the root makes the repo a Claude Code marketplace |
| Source of truth | skills/, agents/ |
unchanged — hosts/ is never edited by hand |
Detail and install steps: Other harnesses.
| Upstream | This fork | |
|---|---|---|
| Workflow runner host | Pi's AgentSession (SdkWorkflowHost in rpiv-pi) |
also the Claude Agent SDK, via packages/rpiv-praxis (rpiv-wf list / run / resume) |
| Built-ins outside Pi | not possible (they imported Pi at runtime) | load without Pi installed |
| Run state | .rpiv/workflows/runs/ |
same files; a run started on one host lists and resumes on the other |
rpiv-workflow itself is unchanged: its runner was already host-agnostic. See packages/rpiv-praxis/README.md for the mapping and the differences from Pi (headless only, Anthropic models only, no lane console).
Same behaviour under Pi; the code moved so a second host can load it.
| Upstream | This fork |
|---|---|
parseFrontmatter imported from @earendil-works/pi-coding-agent in 5 built-in modules |
local copy in extensions/rpiv-core/frontmatter.ts, tested for identical output against Pi's (BOM, CRLF, no fence, invalid YAML, …) |
Contract normalisation lived in skill-contracts-source.ts beside Pi's skill loader |
Pi-free half moved to skill-contracts-core.ts; still re-exported from the old module |
isModuleNotFound in utils.ts, which imports Pi |
moved to module-errors.ts; still re-exported from utils.ts |
Upstream's commit skill always asks for confirmation. In a headless run (Pi without UI, or Claude Code) there is no one to answer: the model asked in chat, committed nothing, and gitCommitOutcome recorded the stage as a successful no-op. Observed in 2 of 4 live runs.
This fork:
-
--reviewedflag on/skill:commit. With it the skill commits without asking. Every built-in commit stage sets it only when the gate that routed the run there passed, read from run state, not assumed per workflow:Workflow --reviewedwhenScope fence build,shiplatest validate verdict is pass--baseline(unchanged)vet,polishlatest code review has blockers_count: 0--evidence <that review>— new; vet/polish previously passed the review path as a message hintmetathe last unit's own gate passed (a unit advanced red by onExhausted: "advance"still asks)--baseline -
Guardrails when it doesn't ask: never stage
.rpiv/artifacts/or.rpiv/workflows/runs/, even in repos that do not gitignore them; stage only paths the baseline or the review's scope ties to this run; if nothing can be tied, do not commit and end with aNOT COMMITTED:line. -
Interactive Pi runs that reach a gated commit also skip the confirmation now. That is the intended trade: the change was already gated.
-
A commit stage that commits nothing fails. When HEAD did not move and the run's scope still has uncommitted files (dirty paths minus
.rpiv/,thoughts/and, forbuild/ship/meta, the run-start baseline), the stage halts withcommit stage made no commit; N files uncommitted …; last error: <the skill's NOT COMMITTED: line>instead of recording the base sha as a commit. Resuming re-runs it. A git hook that rejects the commit is reported on that line; the skill never bypasses one. An empty scope is still an honest no-op.
Verified live (Claude Code, 9 runs): with evidence or baseline, only the run's file was committed; with neither, nothing was committed and the NOT COMMITTED: line appeared. Run logs and a pre-existing unrelated file were never staged.
Upstream parks a stage's question only inside a running Pi window (the lane console); close Pi and it is gone, and headless runs cannot ask at all.
On Claude Code (rpiv-praxis), a stage that calls AskUserQuestion parks the run instead of guessing: the question is saved beside the run log (.rpiv/workflows/runs/<run-id>.parked.json), a kata ticket labelled rpiv-parked is filed when kata is installed, and rpiv-wf exits 75. rpiv-wf inbox lists what is waiting; rpiv-wf answer <run> <n> <choice> resumes the stage in its own session with the answer. So runs go until they need you, and you answer in batches. Nothing is written to a database. Details: packages/rpiv-praxis/README.md.
Verified live: a stage parked on its question (exit 75, ticket filed, nothing guessed), inbox listed it, answer resumed the same session, the stage finished with the chosen answer, the ticket closed, and the inbox emptied — in both bypassPermissions and the default auto mode.
Upstream runs whole workflows; an agent cannot call one step on its own or start a workflow as a tool. rpiv-praxis adds, on public APIs only:
- Steps —
rpiv-wf step <skill> [args]runs any one skill as a single-stage workflow with the full guarantees: output checked against the skill's contract, logged, parkable, resumable.rpiv-wf stepslists them (rpiv's, the project's, the user's). rpiv-mcp— an MCP server exposinglist_workflows,list_steps,run_workflow,run_step,run_status,inbox,answer. Runs start in the background and return a name to poll, so an agent can fan out across steps and workflows itself.- Evals —
rpiv-wf eval spec.jsonruns one workflow or step across variants (model, effort, tool set, which settings and CLAUDE.md memory load, setup commands) in fresh fixture copies, answers parked questions from a script, runs pass/fail checks, and writesresults.jsonlplus a side-by-sidesummary.mdwith cost and tokens. - Unattended runs —
--max-costand--timeoutcaps with distinct, resumable exit codes; eval-widebudgetUsd;rpiv-wf eval --continueafter a crash or Ctrl-C. Guide: overnight and unattended runs.
Verified live: a Claude Code agent given the server ran a step in two projects in parallel and reported both completed; the memory-demo eval showed an instruction in CLAUDE.md followed with memory loaded and ignored without it. Details: packages/rpiv-praxis/README.md.
scripts/check-file-sizes.mjsandbiome.jsonskip the generatedhosts/tree.version:*scripts re-runexport:hostsso the plugin version tracks the packages.rpiv-wf listprints workflow load errors instead of silently omitting broken packs.
This fork tracks juicesharp/rpiv-mono and should keep doing so. The rules:
-
New work goes in
packages/rpiv-praxis, built on upstream's public APIs (runWorkflow,resumeWorkflow,registerBuiltIns, lifecycle listeners, the executor port). Steps, the MCP server, parking and the Claude host touch nothing inrpiv-workflow. -
The footprint inside upstream's packages is small and listed here. As of this writing: nothing in
rpiv-workflow; inrpiv-pi, the host exporter (scripts/export-hosts.ts, generatedhosts/), the Pi-free seams (frontmatter.tsparseFrontmatter,skill-contracts-core.ts,module-errors.ts, re-exported from their old homes), the reviewed-commit change (built-ins/commit-prompt.ts,skills/commit/SKILL.md, the commit stages invet/polish/meta), the no-op commit guard (built-ins/commit-outcome.ts, wired into every built-in commit stage), and the re-quarantine halt inbuilt-ins/scope-checks.ts. Check it any time withgit diff --stat upstream/main...HEAD -- packages/rpiv-pi packages/rpiv-workflow. -
Syncing:
git remote add upstream https://github.com/juicesharp/rpiv-mono.git # once git fetch upstream main git merge upstream/main # into main; conflicts can only be in the files above npm install && npm run export:hosts && npm run check:hosts && npm test
-
Offer the generally useful pieces back. Upstream asks for an issue before a non-trivial PR. Good candidates: the host exporter (skills/subagents for Claude Code and Agent Skills harnesses), the Pi-free seams (they make the runner's own "future non-Pi host" note real), and
--reviewedfor unattended commits. Each one upstream accepts shrinks the footprint above. The author is Sergii Guslystyi (@juicesharp).
- Stages that ask a person —
research(write-gate),slice(decomposition approval),design-review(the human design checkpoint inbuild),blueprint(several approvals),architecture-review(human triage),implement(code/plan mismatch) — now park underrpiv-praxisinstead of failing. Under Pi without a UI they still fail loudly (a missing artifact halts the stage); Pi's in-session lane parking is unchanged. - Upstream issues and releases stay at juicesharp/rpiv-mono; this fork does not publish to npm.
The skills and subagents are authored once, for Pi, in packages/rpiv-pi/skills/ and packages/rpiv-pi/agents/. npm run export:hosts renders them into packages/rpiv-pi/hosts/, which is generated and committed so any harness can install straight from git. CI runs npm run check:hosts and fails when the two drift; never edit hosts/ by hand.
| Host | Output | Install |
|---|---|---|
| Claude Code | hosts/claude/, a plugin named rpiv (31 skills, 15 subagents) |
/plugin marketplace add ethicalcapital/rpiv-mono, then /plugin install rpiv@rpiv. Skills run as /rpiv:plan, /rpiv:implement, …; subagents register as rpiv:codebase-locator, … For one session: claude --plugin-dir packages/rpiv-pi/hosts/claude |
| Agent Skills (Codex, OpenCode, Factory, Cursor, …) | hosts/agents/ (skills/, agents/, scripts/) |
Copy or symlink hosts/agents/skills/* into the harness's skills directory (for example .agents/skills/), keeping _shared/ beside them and scripts/ two levels up |
What the export changes, and what it cannot carry:
- Claude Code keeps
$ARGUMENTSand```!context blocks, which rpiv-args already mirrors. It swaps${SKILL_DIR}for${CLAUDE_SKILL_DIR},/skill:xfor/rpiv:x,ask_user_questionforAskUserQuestion, Pi tool names for Claude's, and namespaces subagent names. Each skill gets an exactallowed-toolsgrant for thenodehelpers its```!blocks run, because Claude Code refuses to load a skill whose context commands are not approved. - Agent Skills frontmatter is cut to
nameanddescription;```!blocks become "run these commands first" steps, and a preamble tells the model what to do when a harness lacks subagents or a named tool. - Workflows on Claude Code:
/wfitself is a Pi command, butrpiv-praxisruns the same workflows (built-ins and your packs) headless through the Claude Agent SDK, sharing run state with Pi. - Pi-only:
advisor(skills already fall back to an inline path when it is absent), per-agent model routing frommodels.json, the lane console, and the rpiv-pi extension itself. - The exporter fails closed: an agent tool with no Claude mapping, a
/skill:that names no skill, or a positional$1(1-based in rpiv-args, 0-based in Claude Code) stops the export.
Note
For the structured, directional view — what's done, what's next, and what's possible — see the companion roadmap.md. This section keeps the philosophy.
The realization shaping AI-assisted development right now is that LLMs produce correct code, not aligned code. The output compiles and passes tests, but it isn't enterprise-grade in the way human engineers produce: fitting the codebase's existing patterns, respecting conventions that aren't written down anywhere, making the boring choices mature systems rely on, staying reviewable and extensible by the next person who touches it. Closing that gap takes a driver: an experienced engineer who carries the context the model can't have, who frames the task correctly upfront, who steers architecture, who pushes back when output drifts. Without that active driver, the codebase fills with locally-correct, globally-misaligned diffs that look fine in PR review and erode the team's confidence over time.
Misaligned code isn't zero-value, it's negative-value: it compiles, it ships, then it taxes every engineer who reads that file afterward and costs the next refactor a half-day of reasoning about near-duplicates that shouldn't exist. Worse, it quietly subtracts from the architecture's coherence in a way no PR review catches. Misaligned-diff throughput is alignment-debt throughput. The cost of a driver-in-the-loop pipeline is latency, paid up front and visible on a dashboard; the cost of skipping it is alignment debt, paid later, by someone else, and rarely traced back to the diff that caused it.
rpiv-pi exists to keep the driver meaningfully in the loop while the work moves at LLM speed. The pipeline asks the right questions at the right moments (ask-user-question), surfaces architectural decisions where they matter, and structures human involvement as participation rather than approval. The bet isn't that models will plateau. They'll keep getting better. The bet is that the structural conditions for fully autonomous coding (institutional knowledge availability, connector maturity, correctness and latency at enterprise scale) are a decade-scale problem absent a real breakthrough. For that whole interval, the realistic operating model is a driver in the loop. rpiv-pi is the engine for that loop: it writes and verifies code under expert supervision. A real enterprise harness, the layer that connects an engine like this to ticketing, CI, and an organization's institutional context, is a separate piece of work and not what this project is today. At Codemasters, we're about to start exploring how an engine like rpiv-pi could fit as part of a broader multi-chain experiment. Whether any of that surfaces back here is open.
In parallel, the pipeline is already viable on affordable open-weight models today (GLM-5.1, Kimi K2.5, MiMo-V2-Pro), and produces genuinely good results in practice. Output isn't yet at parity with frontier on the same task: more mistakes than I'd want, longer runs than I'd want. Closing that residual gap is the next set of work below. I'm assessing this as a CTO leading AI adoption at a mid-size company with no frontier-lab budget, where the cost difference matters: as of May 2026, GLM-5.1 lists at roughly a third of Claude Sonnet 4.6's output token price, and around a fifth of Opus 4.7's.
- Verification under affordable-model runs. The failure mode I see today on GLM/Kimi/MiMo isn't loud breakage; it's self-validation blindness, and it has two roots, not one. Same model is the obvious one: affordable-model work passes affordable-model verifiers, and only escalation to a frontier judge (currently Opus 4.7, May 2026) reliably catches the residual issues. The less obvious one is same context: a verifier that inherits the author's chat anchors on the same framings, ratifies instead of attacks, and writes tests that encode the author's mental model rather than probe it. Frontier escalation defeats the cost argument; isolation doesn't. The next round of work is experimenting with verification setups that lean on fresh-context isolation first and frontier escalation only where it earns its keep.
- Delegation strategy. The pipeline's runtime cost is a function of how work is delegated across skills and subagents: what runs in parallel, what serially, which model handles which step, where verification fires. Some of the slowness on affordable-model runs is infrastructure-side and outside scope. The part that's tractable is finding the delegation pattern that minimizes total run cost without sacrificing output quality. This is an open optimization question, not a planned feature; the next round of work is experimenting with combinations and measuring what actually trades off against what.
Sergii Guslystyi. Software Architect and CTO at Codemasters International. Two decades building software, currently leading AI-first development adoption inside the company. rpiv-mono is a personal initiative, on my own time, where I prototype the patterns I'm working through professionally and put them in public for anyone to use, fork, or push back on.
Find me on X: @juicesharp.
npm workspaces monorepo. Clone, npm install at the root, that's it. Node 22+ and npm 11+ (the engines floor).
A few choices worth naming up front:
- No build step. Packages publish raw
.ts; Pi loads TypeScript directly. Nodist/, no per-package tsconfig. - One Vitest runner at the root walks every package. No per-package vitest configs.
- Lockstep versions. All fifteen workspace packages share one version, enforced by
scripts/sync-versions.js— published or not. - Releases are local-only by design.
node scripts/release.mjs <patch|minor|major|x.y.z>cuts a release; no CI publish workflow. - Husky gates the work.
pre-commitruns Biome andtsc --noEmit(fast);pre-pushruns the full test suite with coverage thresholds. Tests don't block commits, they block pushes. - Single shared config across the workspace: one
biome.json, onetsconfig.base.json, onevitest.config.ts. - Every README follows one shape — see docs/readme-standard.md before rewriting one.
Issues are welcome. PRs too, but please open an issue first if the change isn't trivial. The project has a definite shape and direction, and a quick conversation up front saves both of us a round-trip.
Started April 2026. MIT licensed.
Single maintainer (me); Claude Code is a co-author on most commits.
Actively maintained as a personal project. Issues triaged on best effort. Cadence may slow when the day job runs hot.
- Site: rpiv-pi.com
- Roadmap: roadmap.md
- README standard: docs/readme-standard.md
- License: MIT
- X: @juicesharp