@juicesharp/rpiv-pi 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -271
- package/agents/scope-tracer.md +1 -1
- package/docs/agents.md +70 -0
- package/docs/architecture.md +136 -0
- package/docs/lanes.md +82 -0
- package/docs/models-config.md +200 -0
- package/docs/skills.md +86 -0
- package/docs/workflows.md +109 -0
- package/extensions/rpiv-core/bash-timeout.ts +16 -0
- package/extensions/rpiv-core/built-in-workflows.ts +2363 -278
- package/extensions/rpiv-core/guidance.ts +35 -19
- package/extensions/rpiv-core/lane-list.ts +5 -29
- package/extensions/rpiv-core/lane-progress.ts +5 -76
- package/extensions/rpiv-core/models-config.ts +35 -0
- package/extensions/rpiv-core/run-lane-registry.ts +0 -65
- package/extensions/rpiv-core/sdk-workflow-host.ts +4 -0
- package/extensions/rpiv-core/workflow-execution-host.ts +24 -7
- package/package.json +7 -3
- package/skills/amend/SKILL.md +7 -3
- package/skills/annotate-guidance/SKILL.md +2 -3
- package/skills/annotate-inline/SKILL.md +1 -3
- package/skills/architecture-review/SKILL.md +5 -4
- package/skills/blueprint/SKILL.md +14 -6
- package/skills/changelog/SKILL.md +1 -0
- package/skills/commit/SKILL.md +1 -0
- package/skills/design/SKILL.md +8 -5
- package/skills/design-review/SKILL.md +2 -1
- package/skills/design-slice/SKILL.md +2 -1
- package/skills/discover/SKILL.md +3 -4
- package/skills/elaborate/SKILL.md +17 -5
- package/skills/elaborate/_helpers/validate-workflow-invariant.mjs +88 -0
- package/skills/explore/SKILL.md +1 -0
- package/skills/frontend-design/SKILL.md +1 -0
- package/skills/grade/SKILL.md +20 -3
- package/skills/implement/SKILL.md +10 -2
- package/skills/plan/SKILL.md +10 -6
- package/skills/research/SKILL.md +14 -12
- package/skills/resume-handoff/SKILL.md +2 -1
- package/skills/revise/SKILL.md +1 -0
- package/skills/slice/SKILL.md +3 -2
- package/skills/synthesize/SKILL.md +16 -7
- package/skills/validate/SKILL.md +2 -1
package/README.md
CHANGED
|
@@ -1,309 +1,159 @@
|
|
|
1
|
-
# rpiv-pi
|
|
1
|
+
# @juicesharp/rpiv-pi
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@juicesharp/rpiv-pi)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
2
5
|
|
|
3
6
|
<div align="center">
|
|
4
7
|
<a href="https://github.com/juicesharp/rpiv-mono/tree/main/packages/rpiv-pi">
|
|
5
|
-
<
|
|
6
|
-
<img src="https://raw.githubusercontent.com/juicesharp/rpiv-mono/main/packages/rpiv-pi/docs/cover.png" alt="rpiv-pi cover" width="50%">
|
|
7
|
-
</picture>
|
|
8
|
+
<img src="https://raw.githubusercontent.com/juicesharp/rpiv-mono/main/packages/rpiv-pi/docs/cover.png" alt="rpiv-pi cover art showing the six-stage skill pipeline: discover, research, design, plan, implement, validate" width="70%">
|
|
8
9
|
</a>
|
|
9
10
|
</div>
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Turn "build this feature" into a run of named stages — discover → research → design →
|
|
13
|
+
plan → implement → validate → code-review → commit — each one writing a reviewable
|
|
14
|
+
Markdown artifact under `.rpiv/artifacts/` that the next stage consumes. rpiv-pi adds 27
|
|
15
|
+
skills, 15 specialist subagents, and five ready-made `/wf` pipelines to
|
|
16
|
+
[Pi Agent](https://github.com/badlogic/pi-mono), and runs every stage in a detached child
|
|
17
|
+
session you watch from a lane dock below your editor. It is for developers who want
|
|
18
|
+
structured, reviewable multi-stage work instead of one very long chat turn.
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
## Install
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## What you get
|
|
20
|
-
|
|
21
|
-
- **A pipeline of chained AI skills** - discover → research → design → plan → implement → validate, each producing a reviewable artifact under `.rpiv/artifacts/`.
|
|
22
|
-
- **Named subagents for parallel analysis** - `codebase-analyzer`, `codebase-locator`, `codebase-pattern-finder`, `claim-verifier`, and 11 more, dispatched automatically by skills.
|
|
23
|
-
- **Session lifecycle hooks** - agent profiles and guidance files install themselves on first launch.
|
|
24
|
-
|
|
25
|
-
## Prerequisites
|
|
26
|
-
|
|
27
|
-
- **Node.js** - required by Pi Agent
|
|
28
|
-
- **[Pi Agent](https://github.com/badlogic/pi-mono)** - install globally so the `pi` command is available:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm install -g @earendil-works/pi-coding-agent
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
- **Model provider** *(first-time Pi Agent users only - skip if `/login` already works or `~/.pi/agent/models.json` is configured)*. Pick one:
|
|
35
|
-
|
|
36
|
-
- **Subscription login** - start Pi Agent and run `/login` to authenticate with Anthropic Claude Pro/Max, ChatGPT Plus/Pro, GitHub Copilot, or Gemini.
|
|
37
|
-
- **BYOK (API key)** - edit `~/.pi/agent/models.json` and add a provider entry with `baseUrl`, `api`, `apiKey`, and `models[]`. Example (z.ai GLM coding plan):
|
|
38
|
-
|
|
39
|
-
```json
|
|
40
|
-
{
|
|
41
|
-
"providers": {
|
|
42
|
-
"zai": {
|
|
43
|
-
"baseUrl": "https://api.z.ai/api/coding/paas/v4",
|
|
44
|
-
"api": "openai-completions",
|
|
45
|
-
"apiKey": "XXXXXXXXX",
|
|
46
|
-
"compat": {
|
|
47
|
-
"supportsDeveloperRole": false,
|
|
48
|
-
"thinkingFormat": "zai"
|
|
49
|
-
},
|
|
50
|
-
"models": [
|
|
51
|
-
{
|
|
52
|
-
"id": "glm-5.1",
|
|
53
|
-
"name": "glm-5.1 [coding plan]",
|
|
54
|
-
"reasoning": true,
|
|
55
|
-
"input": ["text"],
|
|
56
|
-
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
|
|
57
|
-
"contextWindow": 204800,
|
|
58
|
-
"maxTokens": 131072
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
- **git** *(recommended)* - rpiv-pi works without it, but branch and commit context won't be available to skills.
|
|
67
|
-
|
|
68
|
-
## Quick Start
|
|
69
|
-
|
|
70
|
-
1. Install rpiv-pi:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
22
|
+
```sh
|
|
73
23
|
pi install npm:@juicesharp/rpiv-pi
|
|
74
24
|
```
|
|
75
25
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
/rpiv-setup
|
|
80
|
-
```
|
|
26
|
+
Restart your Pi session.
|
|
81
27
|
|
|
82
|
-
|
|
28
|
+
## Quick start
|
|
83
29
|
|
|
84
|
-
|
|
30
|
+
rpiv-pi registers no tools of its own — it drives the ones its sibling extensions
|
|
31
|
+
provide. Install them in one step, then restart Pi again:
|
|
85
32
|
|
|
86
33
|
```
|
|
87
|
-
/
|
|
34
|
+
/rpiv-setup
|
|
88
35
|
```
|
|
89
36
|
|
|
90
|
-
|
|
37
|
+
The dialog previews every change and applies nothing until you confirm.
|
|
91
38
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- Detects outdated or removed agents on subsequent starts
|
|
95
|
-
- Migrates legacy pipeline-artifact content into `.rpiv/artifacts/` (one-way) when an old `thoughts/shared/` tree is found; otherwise `.rpiv/artifacts/` is created lazily by the first skill that writes an artifact
|
|
96
|
-
- Shows a warning if any sibling plugins are missing
|
|
97
|
-
|
|
98
|
-
## Usage
|
|
99
|
-
|
|
100
|
-
### Typical Workflow
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
/skill:discover "add a /skill:fast that runs research+design+plan in one shot"
|
|
104
|
-
/skill:research .rpiv/artifacts/discover/<latest>.md
|
|
105
|
-
/skill:design .rpiv/artifacts/research/<latest>.md
|
|
106
|
-
/skill:plan .rpiv/artifacts/designs/<latest>.md
|
|
107
|
-
/skill:implement .rpiv/artifacts/plans/<latest>.md Phase <N>
|
|
108
|
-
```
|
|
39
|
+
You also need a model configured in Pi. If `/login` already works you are set;
|
|
40
|
+
otherwise see [docs/models-config.md](./docs/models-config.md).
|
|
109
41
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
### Recipes
|
|
113
|
-
|
|
114
|
-
Skills compose. Pick the entry point that matches your intent:
|
|
115
|
-
|
|
116
|
-
- **Capture intent before research** - `/skill:discover "[feature description]"`. Walks you through a one-question-at-a-time interview to settle Goals/Non-Goals, Functional/Non-Functional Requirements, Acceptance Criteria, and a Decisions log into a Feature Requirements Document under `.rpiv/artifacts/discover/`. Use as the canonical entry point of the pipeline before research, or to stress-test a feature idea before any codebase work. The FRD's Decisions are inherited by `design` through `research`'s Developer Context.
|
|
117
|
-
- **Form context before a task** - `/skill:research "[topic]"` (or `/skill:research .rpiv/artifacts/discover/<latest>.md` if you ran discover first). Produces a high-signal subspace of the codebase relevant to your topic, ready to feed directly into the next prompt. The `scope-tracer` subagent runs in-band to formulate trace-quality questions before analysis dispatch; when chained from discover, FRD Decisions translate into Developer Context Q/A entries verbatim.
|
|
118
|
-
- **Compare approaches before designing** - `/skill:explore "[problem]"` → `/skill:design <solutions artifact>`. Use when multiple valid solutions exist; the solutions artifact is a first-class input to `design` alongside a `research` artifact.
|
|
119
|
-
- **One-shot plan from research** - `/skill:research <questions>` → `/skill:blueprint <research artifact>` → `/skill:implement`. Fuses `design` + `plan` into a single pass with the same slice-by-slice rigor, but spawns only `codebase-pattern-finder` upfront (vs `design`'s 4-agent fan-out) by trusting the research artifact's integration/precedent sections. Use for solo work or when no one else needs to review the design before implementation; pick `design` → `plan` when the design is itself a deliverable or when research is thin and you want the fuller verification sweep.
|
|
120
|
-
- **Full feature build** - `/skill:discover` → `research` → `design` → `plan` → `implement` → `validate` → (`code-review` ↔ `commit`). The default pipeline; jump in at any stage if you already have the input artifact.
|
|
121
|
-
- **Investigate a bug** - `/skill:discover "why does X fail"` → `/skill:research .rpiv/artifacts/discover/<latest>.md`. The discover interview surfaces what you actually want to know before research grounds it; fix from research output without writing a plan when the change is small.
|
|
122
|
-
- **Adjust mid-implementation** - `/skill:revise <plan artifact>` → resume `/skill:implement`. Use when new constraints land after the plan is drafted.
|
|
123
|
-
- **Review before shipping** - `/skill:code-review` ↔ `/skill:commit`. Order is your call: review `staged`/`working` before committing to catch issues at the smallest blast radius, or commit first and review the resulting branch (empty scope defaults to feature-branch-vs-default-branch, first-parent). Produces a Quality/Security/Dependencies artifact under `.rpiv/artifacts/reviews/` with claim-verifier-grounded findings and `status: approved | needs_changes`.
|
|
124
|
-
- **Audit a specific scope** - `/skill:code-review <commit|staged|working|hash|A..B|branch>`. Targeted lenses over a commit, range, staged/working tree, or PR branch; advisor adjudication applies when configured (`/advisor`).
|
|
125
|
-
- **Review-driven plan revision** - `/skill:code-review` → `/skill:revise <plan artifact>` → resume `/skill:implement`. When a mid-stream review surfaces structural findings that the existing plan can't absorb as spot fixes.
|
|
126
|
-
- **Hand off across sessions** - `/skill:create-handoff` → (new session) `/skill:resume-handoff <doc>`. Preserves context when stopping mid-task.
|
|
127
|
-
- **Onboard a fresh repo** - `/skill:annotate-guidance` once, then use the rest of the pipeline normally. Use `annotate-inline` instead if the project follows the `CLAUDE.md` convention.
|
|
128
|
-
|
|
129
|
-
### Skills
|
|
130
|
-
|
|
131
|
-
Invoke via `/skill:<name>` from inside a Pi Agent session.
|
|
132
|
-
|
|
133
|
-
#### Research & Design
|
|
134
|
-
|
|
135
|
-
| Skill | Input | Output | Description |
|
|
136
|
-
|---|---|---|---|
|
|
137
|
-
| `discover` | Free-text feature description or existing artifact path | `.rpiv/artifacts/discover/` | Interview-driven Feature Requirements Document producer; one question at a time with a recommended answer at every step. FRD Decisions inherited by `design` via `research`'s Developer Context |
|
|
138
|
-
| `research` | Free-text prompt or `discover` artifact path | `.rpiv/artifacts/research/` | Frame scope via the `scope-tracer` subagent, then answer via parallel analysis agents |
|
|
139
|
-
| `explore` | - | `.rpiv/artifacts/solutions/` | Compare solution approaches with pros/cons |
|
|
140
|
-
| `design` | Research or solutions artifact | `.rpiv/artifacts/designs/` | Design features via vertical-slice decomposition |
|
|
141
|
-
|
|
142
|
-
#### Implementation
|
|
143
|
-
|
|
144
|
-
| Skill | Input | Output | Description |
|
|
145
|
-
|---|---|---|---|
|
|
146
|
-
| `plan` | Design artifact | `.rpiv/artifacts/plans/` | Create phased implementation plans |
|
|
147
|
-
| `blueprint` | Research or solutions artifact | `.rpiv/artifacts/plans/` | Fused `design` + `plan`: vertical-slice decomposition with micro-checkpoints, emits implement-ready phased plan in one pass. Lighter on subagent fan-out than `design` - trusts the research artifact's integration/precedent sections instead of re-dispatching. Use when a separate design artifact isn't needed for review or handoff |
|
|
148
|
-
| `implement` | Plan artifact | Code changes | Execute plans phase by phase |
|
|
149
|
-
| `revise` | Plan artifact | Updated plan | Revise plans based on feedback |
|
|
150
|
-
| `validate` | Plan artifact | Validation report | Verify plan execution |
|
|
151
|
-
|
|
152
|
-
#### Annotation
|
|
153
|
-
|
|
154
|
-
| Skill | Input | Output | Description |
|
|
155
|
-
|---|---|---|---|
|
|
156
|
-
| `annotate-guidance` | - | `.rpiv/guidance/*.md` | Generate architecture guidance files |
|
|
157
|
-
| `annotate-inline` | - | `CLAUDE.md` files | Generate inline documentation |
|
|
158
|
-
| `migrate-to-guidance` | CLAUDE.md files | `.rpiv/guidance/` | Convert inline docs to guidance format |
|
|
159
|
-
|
|
160
|
-
#### Utilities
|
|
161
|
-
|
|
162
|
-
| Skill | Description |
|
|
163
|
-
|---|---|
|
|
164
|
-
| `code-review` | Comprehensive code reviews using specialist row-only agents (`diff-auditor`, `peer-comparator`, `claim-verifier`) at narrativisation-prone dispatch sites |
|
|
165
|
-
| `architecture-review` | Top-down, layer-by-layer architecture review with a uniform 10-dimension checklist per layer; emits a phased polish plan under `.rpiv/artifacts/architecture-reviews/` |
|
|
166
|
-
| `pr-triage` | Read-only triage of a GitHub PR: disposition (Review / Request changes / Hold / Decline) plus a security tier (0 SAFE / 1 REVIEW / 2 BLOCK); never mutates the working tree |
|
|
167
|
-
| `commit` | Structured git commits grouped by logical change |
|
|
168
|
-
| `changelog` | Regenerate `[Unreleased]` CHANGELOG.md sections from Conventional-Commit history - Keep-a-Changelog style, monorepo-aware, idempotent |
|
|
169
|
-
| `frontend-design` | Inject tailored visual design guidance for web-frontend work; auto-adapts from a 2-question micro-interview to scan-only injection based on the project's style system |
|
|
170
|
-
| `create-handoff` | Context-preserving handoff documents for session transitions |
|
|
171
|
-
| `resume-handoff` | Resume work from a handoff document |
|
|
172
|
-
|
|
173
|
-
### Commands
|
|
174
|
-
|
|
175
|
-
| Command | Description |
|
|
176
|
-
|---|---|
|
|
177
|
-
| `/rpiv-setup` | Install all sibling plugins in one go |
|
|
178
|
-
| `/rpiv-update-agents` | Refresh `~/.pi/agent/agents/` from bundled agent definitions and clean up legacy per-project agent directories. Re-reads `models.json` before syncing, so mid-session per-agent `model`/`thinking` overrides take effect on disk |
|
|
179
|
-
| `/advisor` | Configure advisor model and reasoning effort |
|
|
180
|
-
| `/btw` | Ask a side question without polluting the main conversation _(requires `@juicesharp/rpiv-btw`, opt-in)_ |
|
|
181
|
-
| `/languages` | Pick the UI language for rpiv-* TUI strings (Deutsch / English / Español / Français / Português / Português (Brasil) / Русский / Українська) |
|
|
182
|
-
| `/todos` | Show current todo list |
|
|
183
|
-
| `/web-tools` | Pick the active search provider and set its API key |
|
|
184
|
-
| `/wf` | Run a workflow: `/wf` previews every flow, `/wf <name>` shows one's graph, `/wf <name> "task"` runs it, `/wf @<run-id>` resumes _(ships with `@juicesharp/rpiv-workflow`, installed by `/rpiv-setup`)_ |
|
|
185
|
-
| `/rpiv-models` | Pick model + reasoning-effort overrides per default, agent, skill, workflow stage, or preset stage (see **Model configuration** below) |
|
|
186
|
-
|
|
187
|
-
### Agents
|
|
188
|
-
|
|
189
|
-
Agents are dispatched automatically by skills via the `Agent` tool - you don't invoke them directly.
|
|
190
|
-
|
|
191
|
-
| Agent | Purpose |
|
|
192
|
-
|---|---|
|
|
193
|
-
| `claim-verifier` | Grounds each supplied code-review claim against repository state and tags it Verified / Weakened / Falsified |
|
|
194
|
-
| `codebase-analyzer` | Analyzes implementation details for specific components |
|
|
195
|
-
| `codebase-locator` | Locates files, directories, and components relevant to a feature or task |
|
|
196
|
-
| `codebase-pattern-finder` | Finds similar implementations and usage examples with concrete code snippets |
|
|
197
|
-
| `diff-auditor` | Walks a patch against a caller-supplied surface-list and emits `file:line \| verbatim \| surface-id \| note` rows |
|
|
198
|
-
| `integration-scanner` | Maps inbound references, outbound dependencies, config registrations, and event subscriptions for a component |
|
|
199
|
-
| `peer-comparator` | Compares a new file against a peer sibling and tags each invariant Mirrored / Missing / Diverged / Intentionally-absent |
|
|
200
|
-
| `precedent-locator` | Finds similar past changes in git history - commits, blast radius, and follow-up fixes |
|
|
201
|
-
| `scope-tracer` | Sweeps anchor terms and reads key files to bound a research investigation - returns a Discovery Summary plus dense numbered questions |
|
|
202
|
-
| `slice-verifier` | Adversarially audits each freshly-generated slice of a phased plan or design before it is locked - catches forward-references, cross-slice symbol mismatches, and decision drift |
|
|
203
|
-
| `artifact-code-reviewer` | Reviews each slice code fence in a finalized artifact for code quality, codebase fit, and actionability - one severity-tagged row per finding |
|
|
204
|
-
| `artifact-coverage-reviewer` | Verifies every Verification Note and Precedent entry in a finalized artifact lands somewhere actionable - success criterion or emitted code |
|
|
205
|
-
| `artifacts-analyzer` | Performs deep-dive analysis on a research topic in `.rpiv/artifacts/` |
|
|
206
|
-
| `artifacts-locator` | Discovers relevant documents in the `.rpiv/artifacts/` directory |
|
|
207
|
-
| `web-search-researcher` | Researches modern web-only information via deep search and fetch |
|
|
208
|
-
|
|
209
|
-
## Architecture
|
|
42
|
+
Now run a pipeline:
|
|
210
43
|
|
|
211
44
|
```
|
|
212
|
-
|
|
213
|
-
├── extensions/rpiv-core/ - runtime extension: hooks, commands, guidance injection
|
|
214
|
-
├── skills/ - AI workflow skills (research → design → plan → implement)
|
|
215
|
-
├── agents/ - named subagent profiles dispatched by skills
|
|
216
|
-
└── .rpiv/artifacts/ - pipeline artifact store
|
|
45
|
+
/wf ship "add a --json flag to the export command"
|
|
217
46
|
```
|
|
218
47
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
- **Models & reasoning effort** - run `/rpiv-models` to pick a model and reasoning level for the global default, a specific bundled agent, a workflow stage, a skill, or a per-preset stage; the picker writes `~/.config/rpiv-pi/models.json`. See **Model configuration** below for the cascade ladder and worked examples.
|
|
226
|
-
- **Side questions** _(opt-in: `pi install npm:@juicesharp/rpiv-btw`)_ - type `/btw <question>` anytime (even mid-stream) to ask the primary model a one-off question; answer appears in a borderless bottom overlay and never enters the main conversation
|
|
227
|
-
- **UI language** - run `/languages` to pick the locale for rpiv-* TUI strings, or pass `pi --locale <code>` at startup. Detection priority: flag → `~/.config/rpiv-i18n/locale.json` → `LANG` / `LC_ALL` → English. LLM-facing copy stays English by design
|
|
228
|
-
- **Agent concurrency** - open the `/agents` overlay and tune `Settings → Max concurrency` to match your provider's rate limits. `@tintinweb/pi-subagents` owns this setting; rpiv-pi does not seed it.
|
|
229
|
-
- **Agent profiles** - synced to `~/.pi/agent/agents/` from bundled defaults; refresh with `/rpiv-update-agents` (overwrites rpiv-managed files, preserves your custom agents).
|
|
230
|
-
- **Non-default agent directory** - if you set `PI_CODING_AGENT_DIR` (e.g. `~/.config/pi/agent` for an XDG-style layout), rpiv-pi reads and writes the same `settings.json` Pi does — sibling detection, `/rpiv-setup`, and `/rpiv-update-agents` all follow the env var. Leading `~` is expanded.
|
|
231
|
-
|
|
232
|
-
### Model configuration (models.json)
|
|
233
|
-
|
|
234
|
-
`rpiv-pi` reads `~/.config/rpiv-pi/models.json` to apply per-agent, per-stage, per-skill, and per-preset model + reasoning-effort overrides. The file is optional — missing or malformed JSON degrades to no overrides. Run `/rpiv-models` to edit it via cascade pickers, or hand-edit.
|
|
235
|
-
|
|
236
|
-
**Cascade ladder** (most specific first; each layer composes per-field against `defaults`):
|
|
237
|
-
|
|
238
|
-
1. `presets[workflow].stages[stage]` — per-workflow per-stage override (e.g. `ship.plan`).
|
|
239
|
-
2. `stages[stage]` — flat per-stage override (applies across every workflow that has it).
|
|
240
|
-
3. `skills[skill]` — per-skill override; applies to **both** `/wf` workflow stages AND user-typed standalone `/skill:<name>` invocations.
|
|
241
|
-
4. `defaults` — global fallback.
|
|
48
|
+
`ship` chains `blueprint → implement → validate → commit` — `blueprint` collapses
|
|
49
|
+
design and planning into one phased plan; see [docs/workflows.md](./docs/workflows.md)
|
|
50
|
+
for the other pipelines' stage lists. The run detaches immediately: a lane appears in
|
|
51
|
+
the dock under your editor with live progress while you keep typing. Press `ctrl+q` —
|
|
52
|
+
or `↓` on an empty prompt, or `/lanes` — to step in, replay the transcript, answer a
|
|
53
|
+
parked question with `⏎`, or stop the run with `x`.
|
|
242
54
|
|
|
243
|
-
|
|
55
|
+
Prefer one stage at a time? Every skill also stands alone:
|
|
244
56
|
|
|
245
|
-
**Worked example A — per-skill overrides for everyday short turns**:
|
|
246
|
-
|
|
247
|
-
```json
|
|
248
|
-
{
|
|
249
|
-
"defaults": "anthropic/claude-opus-4-7",
|
|
250
|
-
"skills": {
|
|
251
|
-
"commit": "zai/glm-4-7",
|
|
252
|
-
"changelog": "zai/glm-4-7",
|
|
253
|
-
"research": { "model": "openai/gpt-5.5", "thinking": "high" }
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
57
|
```
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
**Worked example B — per-workflow stage overrides for full pipelines**:
|
|
261
|
-
|
|
262
|
-
```json
|
|
263
|
-
{
|
|
264
|
-
"defaults": "anthropic/claude-opus-4-7",
|
|
265
|
-
"presets": {
|
|
266
|
-
"ship": {
|
|
267
|
-
"stages": {
|
|
268
|
-
"plan": "openai/gpt-5.5",
|
|
269
|
-
"design": { "model": "openai/gpt-5.5", "thinking": "high" }
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
"polish": {
|
|
273
|
-
"stages": {
|
|
274
|
-
"plan": "zai/glm-4-7"
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
58
|
+
/skill:research "how does session state survive /reload"
|
|
59
|
+
/skill:blueprint .rpiv/artifacts/research/<latest>.md
|
|
60
|
+
/skill:implement .rpiv/artifacts/plans/<latest>.md
|
|
279
61
|
```
|
|
280
62
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
**Model key form** — canonical is `provider/modelId` (slash-separated). The legacy `provider:modelId` (colon) form still parses for back-compatibility with persisted advisor configs; new saves emit slash form, and legacy values auto-migrate on the next save.
|
|
63
|
+
## What you get
|
|
284
64
|
|
|
285
|
-
|
|
65
|
+
- **Reviewable artifacts instead of one long turn** — every skill declares a contract
|
|
66
|
+
(`produces` / `consumes`) and writes timestamped Markdown into
|
|
67
|
+
`.rpiv/artifacts/<bucket>/`, so you can read, edit, or reject a design before a line
|
|
68
|
+
of code is written.
|
|
69
|
+
- **Runs that don't hold your session hostage** — each `/wf` stage executes in its own
|
|
70
|
+
detached child session with bounded parallel fan-out; your interactive session stays a
|
|
71
|
+
launcher and an observer.
|
|
72
|
+
- **A dock that shows what is happening** — one row per run with live progress,
|
|
73
|
+
streaming thinking, per-unit fan-out sub-rows, token usage, and failure reasons. Step
|
|
74
|
+
in for a faithful transcript replay with full tool rendering.
|
|
75
|
+
- **Questions that never get lost** — when a detached stage needs input it parks the
|
|
76
|
+
question on its lane with a badge instead of hijacking your prompt; `⏎` on the flagged
|
|
77
|
+
lane arms it inline.
|
|
78
|
+
- **Five pipelines out of the box** — `ship`, `arch`, `vet`, `polish`, and `build`, so
|
|
79
|
+
you never have to author a workflow to get value.
|
|
80
|
+
- **Cheap models for cheap stages** — `/rpiv-models` sets model and reasoning-effort
|
|
81
|
+
overrides per skill, per stage, per workflow, or per subagent, with a typo-catcher for
|
|
82
|
+
keys that would otherwise silently never apply.
|
|
83
|
+
- **Your architecture docs, injected where they matter** — touch a file and the nearest
|
|
84
|
+
`AGENTS.md`, `CLAUDE.md`, or `.rpiv/guidance/<sub>/architecture.md` at each depth is
|
|
85
|
+
sent to the model, once per session, hidden from your transcript.
|
|
286
86
|
|
|
287
|
-
##
|
|
87
|
+
## Configuration
|
|
288
88
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
89
|
+
`/rpiv-models` writes `~/.config/rpiv-pi/models.json` (or `$XDG_CONFIG_HOME/rpiv-pi/…`
|
|
90
|
+
when that is set to an absolute path, or a `~` / `~/…` path, which is tilde-expanded
|
|
91
|
+
first), with mode `0600`. The file is optional — missing or malformed JSON degrades to
|
|
92
|
+
no overrides.
|
|
93
|
+
|
|
94
|
+
| Setting | What it does | Default |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| `/rpiv-models` | Pick model + reasoning effort for the global default, a subagent, a skill, a workflow stage, or a preset stage | no overrides |
|
|
97
|
+
| `RPIV_LANES_HOTKEY` | Rebind the lane-browser hotkey to any Pi key id, or set `off` to register none | `ctrl+q` |
|
|
98
|
+
| `RPIV_BASH_TIMEOUT_MS` | Per-command bash watchdog inside detached child sessions, clamped to 5 s–30 min | `180000` (3 min) |
|
|
99
|
+
|
|
100
|
+
## Reference
|
|
101
|
+
|
|
102
|
+
- [docs/skills.md](./docs/skills.md) — all 27 skills: what each consumes, what it writes,
|
|
103
|
+
and which ones the model may pick on its own.
|
|
104
|
+
- [docs/workflows.md](./docs/workflows.md) — the five `/wf` pipelines stage by stage,
|
|
105
|
+
plus hand-driven recipes for when you don't want a whole pipeline.
|
|
106
|
+
- [docs/lanes.md](./docs/lanes.md) — the dock, the lane browser's full key map, parked
|
|
107
|
+
questions, and the lane environment variables.
|
|
108
|
+
- [docs/models-config.md](./docs/models-config.md) — giving Pi a provider, then the
|
|
109
|
+
complete `models.json` schema, cascade, and worked examples.
|
|
110
|
+
- [docs/agents.md](./docs/agents.md) — the 15 bundled subagents and how the on-disk sync
|
|
111
|
+
decides what to overwrite.
|
|
112
|
+
- [docs/architecture.md](./docs/architecture.md) — what gets registered, guidance and
|
|
113
|
+
git-context injection, sibling coupling, and uninstall.
|
|
114
|
+
|
|
115
|
+
## Requirements
|
|
116
|
+
|
|
117
|
+
| Requirement | Why |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| [Pi Agent](https://github.com/badlogic/pi-mono) | The host. Install it globally so `pi` is on your PATH |
|
|
120
|
+
| A model provider | Pi's own `/login` or `~/.pi/agent/models.json` — see [docs/models-config.md](./docs/models-config.md) |
|
|
121
|
+
| [`@tintinweb/pi-subagents`](https://www.npmjs.com/package/@tintinweb/pi-subagents) | Supplies the `Agent` tool. Without it the parallel-analysis skills cannot dispatch. Installed by `/rpiv-setup` |
|
|
122
|
+
| [`@juicesharp/rpiv-workflow`](https://www.npmjs.com/package/@juicesharp/rpiv-workflow) | Supplies `/wf`. Without it the five built-in workflows do not register. Installed by `/rpiv-setup` |
|
|
123
|
+
| `git` *(optional)* | Branch, commit, and user context. If it fails, injection is skipped and nothing else changes |
|
|
124
|
+
| Node.js 22+ | Runtime for Pi and rpiv-pi's bundled scripts |
|
|
125
|
+
|
|
126
|
+
You need no build step and no native dependency.
|
|
292
127
|
|
|
293
128
|
## Troubleshooting
|
|
294
129
|
|
|
295
130
|
| Symptom | Cause | Fix |
|
|
296
|
-
|
|
297
|
-
|
|
|
298
|
-
|
|
|
299
|
-
| `/rpiv-setup` says
|
|
300
|
-
| `
|
|
301
|
-
| `
|
|
302
|
-
|
|
|
131
|
+
| --- | --- | --- |
|
|
132
|
+
| Session-start banner: *N sibling extension(s) missing* | Sibling plugins not installed | Run `/rpiv-setup`, then restart Pi |
|
|
133
|
+
| Session-start banner: *bundled agents need attention* | A bundled agent changed upstream and your on-disk copy was edited | Run `/rpiv-update-agents` — it overwrites rpiv-managed files, and never touches agents you added yourself |
|
|
134
|
+
| `/rpiv-setup` or `/rpiv-models` says it requires interactive mode | Running headless | Install manually with `pi install npm:<pkg>`, or hand-edit `models.json` |
|
|
135
|
+
| `/rpiv-setup` fails on one package | Network or registry issue | Retry that package with `pi install npm:<pkg>`, then re-run `/rpiv-setup` |
|
|
136
|
+
| `/lanes` reports *No in-flight runs* (and `ctrl+q` does nothing) | Nothing is running | Expected — the browser only opens over live lanes |
|
|
137
|
+
| `ctrl+q` does nothing | `RPIV_LANES_HOTKEY` is set to `off`, empty, or an unrecognized key id | Unset it, or use `/lanes` |
|
|
138
|
+
| A stage stalls, then reports a per-command timeout | A bash command wedged past the watchdog | Raise `RPIV_BASH_TIMEOUT_MS` (max 1800000) before starting Pi |
|
|
139
|
+
| `/rpiv-models` reports *No models available* | Pi has no provider configured | Run `/login`, or add a provider to `~/.pi/agent/models.json` |
|
|
140
|
+
|
|
141
|
+
## Related
|
|
142
|
+
|
|
143
|
+
`/rpiv-setup` installs the ones marked auto; the rest are standalone
|
|
144
|
+
`pi install npm:@juicesharp/rpiv-<name>`.
|
|
145
|
+
|
|
146
|
+
| Package | Role | Auto |
|
|
147
|
+
| --- | --- | :---: |
|
|
148
|
+
| [`@juicesharp/rpiv-workflow`](https://www.npmjs.com/package/@juicesharp/rpiv-workflow) | `/wf` runner — chains skills into typed multi-stage pipelines | ✓ |
|
|
149
|
+
| [`@juicesharp/rpiv-args`](https://www.npmjs.com/package/@juicesharp/rpiv-args) | `$1` / `$ARGUMENTS` placeholders in skill bodies | ✓ |
|
|
150
|
+
| [`@juicesharp/rpiv-ask-user-question`](https://www.npmjs.com/package/@juicesharp/rpiv-ask-user-question) | Structured questionnaires back to you | ✓ |
|
|
151
|
+
| [`@juicesharp/rpiv-todo`](https://www.npmjs.com/package/@juicesharp/rpiv-todo) | Live task overlay surviving `/reload` | ✓ |
|
|
152
|
+
| [`@juicesharp/rpiv-advisor`](https://www.npmjs.com/package/@juicesharp/rpiv-advisor) | Escalate to a stronger reviewer model | ✓ |
|
|
153
|
+
| [`@juicesharp/rpiv-web-tools`](https://www.npmjs.com/package/@juicesharp/rpiv-web-tools) | Web search + fetch with pluggable providers | ✓ |
|
|
154
|
+
| [`@juicesharp/rpiv-i18n`](https://www.npmjs.com/package/@juicesharp/rpiv-i18n) | Localization SDK for the rpiv TUI strings | ✓ |
|
|
155
|
+
| [`@juicesharp/rpiv-warp`](https://www.npmjs.com/package/@juicesharp/rpiv-warp) | Warp Blocked badge on parked lane questions | — |
|
|
303
156
|
|
|
304
157
|
## License
|
|
305
158
|
|
|
306
|
-
[
|
|
307
|
-
[](https://opensource.org/licenses/MIT)
|
|
308
|
-
|
|
309
|
-
MIT
|
|
159
|
+
[MIT](./LICENSE)
|
package/agents/scope-tracer.md
CHANGED
|
@@ -16,7 +16,7 @@ You are a specialist at tracing the scope of a research investigation. Your job
|
|
|
16
16
|
2. **Sweep Anchor Terms Sequentially**
|
|
17
17
|
- Decompose the topic into 5-9 narrow slices, each naming one capability/seam, one search objective, and 2-6 anchor terms
|
|
18
18
|
- Run `grep` / `find` / `ls` per slice — one slice at a time, capture matches, then move on
|
|
19
|
-
- Because this agent cannot dispatch
|
|
19
|
+
- Because this agent cannot dispatch subagents, the anchor sweep is sequential by construction; keep each pass single-objective so the working context does not drift toward storytelling
|
|
20
20
|
|
|
21
21
|
3. **Read Key Files for Depth**
|
|
22
22
|
- Rank the file references gathered in Step 2 by cross-slice overlap (files mentioned by 2+ slices), entry points, type/interface files, and config/wiring files
|
package/docs/agents.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Bundled subagents
|
|
2
|
+
|
|
3
|
+
The 15 named specialists `@juicesharp/rpiv-pi` installs, what each one is for, and how
|
|
4
|
+
they get onto disk.
|
|
5
|
+
|
|
6
|
+
Skills dispatch these through the `Agent` tool — you do not invoke them directly. That
|
|
7
|
+
tool comes from [`@tintinweb/pi-subagents`](https://www.npmjs.com/package/@tintinweb/pi-subagents)
|
|
8
|
+
(or the API-compatible `@gotgenes` fork), which `/rpiv-setup` installs. Without it the
|
|
9
|
+
parallel-analysis skills have nothing to dispatch to.
|
|
10
|
+
|
|
11
|
+
## Codebase specialists
|
|
12
|
+
|
|
13
|
+
| Agent | Purpose |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `codebase-locator` | Finds *where* code lives — files, directories, components — and ranks the most load-bearing rows. A "super grep/find/ls"; reach for it instead of grepping twice. |
|
|
16
|
+
| `codebase-analyzer` | Traces one component end to end and reports its implementation details. |
|
|
17
|
+
| `codebase-pattern-finder` | Finds similar implementations and usage examples, with concrete code snippets to model after. |
|
|
18
|
+
| `integration-scanner` | The reverse-reference counterpart to `codebase-locator`: inbound references, outbound dependencies, config registrations, event subscriptions for a component. |
|
|
19
|
+
| `scope-tracer` | Bounds a research investigation. Sweeps anchor terms, reads 5–10 key files for depth, returns a Discovery Summary plus 5–10 dense numbered questions. `research` dispatches it in-band before analysis. |
|
|
20
|
+
| `precedent-locator` | Finds similar past changes in git history — commits, blast radius, follow-up fixes, and lessons from related artifacts. Use it to learn what went wrong last time. |
|
|
21
|
+
|
|
22
|
+
## Review and verification specialists
|
|
23
|
+
|
|
24
|
+
| Agent | Purpose |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `claim-verifier` | Grounds each supplied claim against actual repository state and tags it Verified / Weakened / Falsified with a justification. |
|
|
27
|
+
| `diff-auditor` | Row-only patch auditor. Walks a patch against a caller-supplied surface list and emits `file:line \| verbatim \| surface-id \| note` rows — evidence only, no narrative or severity. |
|
|
28
|
+
| `peer-comparator` | Given `(new_file, peer_file)` pairs, tags each peer invariant Mirrored / Missing / Diverged / Intentionally-absent. Use when a new entity parallels an existing sibling. |
|
|
29
|
+
| `slice-verifier` | Adversarially audits a freshly generated slice before it is locked, catching forward references, cross-slice symbol mismatches, decision drift, and atomicity violations that a post-finalization reviewer cannot find. |
|
|
30
|
+
| `artifact-code-reviewer` | Walks each slice code fence in a finalized artifact against code quality, codebase fit, and actionability; one severity-tagged row per finding (`blocker`, `concern`, `suggestion`). |
|
|
31
|
+
| `artifact-coverage-reviewer` | Verifies every Verification Note and Precedent entry in a finalized artifact lands somewhere actionable — a success criterion or emitted code — and flags the ones that do not. |
|
|
32
|
+
|
|
33
|
+
## Artifact and web specialists
|
|
34
|
+
|
|
35
|
+
| Agent | Purpose |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `artifacts-locator` | Discovers prior research, designs, plans, and reviews in `.rpiv/artifacts/`. The research equivalent of `codebase-locator`. |
|
|
38
|
+
| `artifacts-analyzer` | Deep-dives one research topic across `.rpiv/artifacts/`. The research equivalent of `codebase-analyzer`. |
|
|
39
|
+
| `web-search-researcher` | Researches information that only exists on the web, via deep search and fetch. Needs [`@juicesharp/rpiv-web-tools`](https://www.npmjs.com/package/@juicesharp/rpiv-web-tools) for `web_search` / `web_fetch`. |
|
|
40
|
+
|
|
41
|
+
## How they reach disk
|
|
42
|
+
|
|
43
|
+
Agents are **not** registered through the Pi manifest. On first session load, rpiv-pi
|
|
44
|
+
copies them into `<agent dir>/agents/` — `~/.pi/agent/agents/` by default, or under
|
|
45
|
+
`PI_CODING_AGENT_DIR` if you set it. That location is user-global, so every project
|
|
46
|
+
shares one copy.
|
|
47
|
+
|
|
48
|
+
A manifest, `.rpiv-managed.json`, records a sha256 per managed file, which is what lets
|
|
49
|
+
the sync respect your edits:
|
|
50
|
+
|
|
51
|
+
| Situation at session start | What happens |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| File missing | Copied |
|
|
54
|
+
| File matches the bundled source | Left alone |
|
|
55
|
+
| Bundled source changed, your copy still matches the recorded hash | Updated automatically |
|
|
56
|
+
| Bundled source changed **and** your copy was edited | Flagged as pending; you get a banner asking you to run `/rpiv-update-agents` |
|
|
57
|
+
| File no longer bundled, unedited | Flagged as pending removal |
|
|
58
|
+
|
|
59
|
+
`/rpiv-update-agents` runs the same sync in force mode: it adds, updates, and removes
|
|
60
|
+
regardless of the recorded hash, so it **will** overwrite an rpiv-managed file you
|
|
61
|
+
edited. Files you added yourself are never touched. It also re-reads `models.json`
|
|
62
|
+
first, so per-agent `model` and `thinking` overrides land in the frontmatter on disk —
|
|
63
|
+
see [models-config.md](./models-config.md).
|
|
64
|
+
|
|
65
|
+
Manifest keys are allowlisted against path traversal: a single basename, no `/`, `\`,
|
|
66
|
+
`..`, or NUL, not absolute, and it must end in `.md`.
|
|
67
|
+
|
|
68
|
+
Older versions kept a per-project copy in `<cwd>/.pi/agents/`. That directory is cleaned
|
|
69
|
+
up all-or-nothing — only when a manifest exists, every managed file still matches its
|
|
70
|
+
source, and no unmanaged file is present.
|