@juicesharp/rpiv-pi 2.1.0 → 2.3.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 +9 -8
- package/docs/lanes.md +3 -2
- package/docs/models-config.md +6 -6
- package/docs/workflows.md +4 -18
- package/extensions/rpiv-core/artifact-collector.ts +2 -2
- package/extensions/rpiv-core/bash-timeout.ts +16 -0
- package/extensions/rpiv-core/built-in-workflows.ts +2289 -318
- package/extensions/rpiv-core/guidance.ts +35 -19
- package/extensions/rpiv-core/index.ts +2 -2
- package/extensions/rpiv-core/lane-console.ts +62 -5
- package/extensions/rpiv-core/lane-list.ts +84 -32
- package/extensions/rpiv-core/lane-progress.ts +13 -77
- package/extensions/rpiv-core/lane-switcher.ts +114 -33
- package/extensions/rpiv-core/lane-usage.ts +25 -0
- package/extensions/rpiv-core/models-config-validate.ts +1 -1
- package/extensions/rpiv-core/models-config.ts +38 -3
- package/extensions/rpiv-core/register-built-in-workflows.ts +2 -2
- package/extensions/rpiv-core/run-lane-registry.ts +80 -69
- package/extensions/rpiv-core/sdk-workflow-host.ts +43 -3
- package/extensions/rpiv-core/subagent-usage.ts +147 -0
- package/extensions/rpiv-core/workflow-execution-host.ts +24 -7
- package/package.json +3 -3
- package/skills/amend/SKILL.md +7 -3
- package/skills/annotate-guidance/SKILL.md +1 -0
- package/skills/architecture-review/SKILL.md +1 -0
- package/skills/blueprint/SKILL.md +10 -4
- package/skills/changelog/SKILL.md +1 -0
- package/skills/commit/SKILL.md +1 -0
- package/skills/design/SKILL.md +4 -3
- package/skills/design-review/SKILL.md +1 -0
- package/skills/design-slice/SKILL.md +2 -1
- package/skills/discover/SKILL.md +1 -1
- package/skills/elaborate/SKILL.md +21 -9
- 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 +24 -6
- package/skills/implement/SKILL.md +10 -2
- package/skills/plan/SKILL.md +10 -6
- package/skills/research/SKILL.md +9 -8
- package/skills/resume-handoff/SKILL.md +1 -0
- package/skills/revise/SKILL.md +1 -0
- package/skills/slice/SKILL.md +4 -3
- package/skills/synthesize/SKILL.md +16 -7
- package/skills/validate/SKILL.md +1 -0
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Turn "build this feature" into a run of named stages — discover → research → design →
|
|
13
13
|
plan → implement → validate → code-review → commit — each one writing a reviewable
|
|
14
14
|
Markdown artifact under `.rpiv/artifacts/` that the next stage consumes. rpiv-pi adds 27
|
|
15
|
-
skills, 15 specialist subagents, and
|
|
15
|
+
skills, 15 specialist subagents, and three ready-made `/wf` pipelines to
|
|
16
16
|
[Pi Agent](https://github.com/badlogic/pi-mono), and runs every stage in a detached child
|
|
17
17
|
session you watch from a lane dock below your editor. It is for developers who want
|
|
18
18
|
structured, reviewable multi-stage work instead of one very long chat turn.
|
|
@@ -42,12 +42,13 @@ otherwise see [docs/models-config.md](./docs/models-config.md).
|
|
|
42
42
|
Now run a pipeline:
|
|
43
43
|
|
|
44
44
|
```
|
|
45
|
-
/wf
|
|
45
|
+
/wf build "add a --json flag to the export command"
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
`
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
`build` is the default — run `/wf "<task>"` and it resolves here. It captures your
|
|
49
|
+
brief, slices it, designs each slice in parallel, gates the plan, then implements and
|
|
50
|
+
validates; see [docs/workflows.md](./docs/workflows.md) for the full stage list and
|
|
51
|
+
the other pipelines. The run detaches immediately: a lane appears in
|
|
51
52
|
the dock under your editor with live progress while you keep typing. Press `ctrl+q` —
|
|
52
53
|
or `↓` on an empty prompt, or `/lanes` — to step in, replay the transcript, answer a
|
|
53
54
|
parked question with `⏎`, or stop the run with `x`.
|
|
@@ -75,7 +76,7 @@ Prefer one stage at a time? Every skill also stands alone:
|
|
|
75
76
|
- **Questions that never get lost** — when a detached stage needs input it parks the
|
|
76
77
|
question on its lane with a badge instead of hijacking your prompt; `⏎` on the flagged
|
|
77
78
|
lane arms it inline.
|
|
78
|
-
- **
|
|
79
|
+
- **Three pipelines out of the box** — `build`, `vet`, and `polish`, so
|
|
79
80
|
you never have to author a workflow to get value.
|
|
80
81
|
- **Cheap models for cheap stages** — `/rpiv-models` sets model and reasoning-effort
|
|
81
82
|
overrides per skill, per stage, per workflow, or per subagent, with a typo-catcher for
|
|
@@ -101,7 +102,7 @@ no overrides.
|
|
|
101
102
|
|
|
102
103
|
- [docs/skills.md](./docs/skills.md) — all 27 skills: what each consumes, what it writes,
|
|
103
104
|
and which ones the model may pick on its own.
|
|
104
|
-
- [docs/workflows.md](./docs/workflows.md) — the
|
|
105
|
+
- [docs/workflows.md](./docs/workflows.md) — the three `/wf` pipelines stage by stage,
|
|
105
106
|
plus hand-driven recipes for when you don't want a whole pipeline.
|
|
106
107
|
- [docs/lanes.md](./docs/lanes.md) — the dock, the lane browser's full key map, parked
|
|
107
108
|
questions, and the lane environment variables.
|
|
@@ -119,7 +120,7 @@ no overrides.
|
|
|
119
120
|
| [Pi Agent](https://github.com/badlogic/pi-mono) | The host. Install it globally so `pi` is on your PATH |
|
|
120
121
|
| A model provider | Pi's own `/login` or `~/.pi/agent/models.json` — see [docs/models-config.md](./docs/models-config.md) |
|
|
121
122
|
| [`@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
|
|
123
|
+
| [`@juicesharp/rpiv-workflow`](https://www.npmjs.com/package/@juicesharp/rpiv-workflow) | Supplies `/wf`. Without it the three built-in workflows do not register. Installed by `/rpiv-setup` |
|
|
123
124
|
| `git` *(optional)* | Branch, commit, and user context. If it fails, injection is skipped and nothing else changes |
|
|
124
125
|
| Node.js 22+ | Runtime for Pi and rpiv-pi's bundled scripts |
|
|
125
126
|
|
package/docs/lanes.md
CHANGED
|
@@ -35,15 +35,16 @@ The browser replays the selected lane's transcript, tool calls included.
|
|
|
35
35
|
| --- | --- |
|
|
36
36
|
| `↑` / `↓` | Move along the lane spine. `↑` on the top row backs out |
|
|
37
37
|
| `⏎` | Arm the parked question on a flagged lane, inline |
|
|
38
|
-
| `PgUp` / `PgDn` | Scroll the transcript
|
|
38
|
+
| `PgUp` / `PgDn` | Scroll the transcript |
|
|
39
39
|
| `t` | Expand or collapse tool output |
|
|
40
|
+
| `s` | Show or hide the per-stage token breakdown |
|
|
40
41
|
| `x` | Stop the selected run |
|
|
41
42
|
| `esc` / `←` | Back out to the prompt |
|
|
42
43
|
|
|
43
44
|
The footer states the live contract:
|
|
44
45
|
|
|
45
46
|
```
|
|
46
|
-
↑/↓ lanes · ⏎ answer ·
|
|
47
|
+
↑/↓ lanes · ⏎ answer · PgUp/PgDn scroll · t expand · s stages · x stop · ↑/←/esc back
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
## Parked questions
|
package/docs/models-config.md
CHANGED
|
@@ -123,8 +123,8 @@ still parses on read for back-compatibility; new saves emit the slash form.
|
|
|
123
123
|
### Typo detection
|
|
124
124
|
|
|
125
125
|
A session-start check reports record keys that pass schema validation but would silently
|
|
126
|
-
never apply — `skills.committ`, `agents.codebase-analzyer`, `presets.
|
|
127
|
-
`presets.
|
|
126
|
+
never apply — `skills.committ`, `agents.codebase-analzyer`, `presets.buildd`,
|
|
127
|
+
`presets.build.stages.plann`. It warns once per process with the dotted path. The
|
|
128
128
|
`agents` and `skills` axes are always checked; `stages` and `presets` are checked only
|
|
129
129
|
when the workflow runner can supply the universe of names, so you never get a false
|
|
130
130
|
warning from a workflow it could not see.
|
|
@@ -154,22 +154,22 @@ skills inherit the same overrides through the cascade's skill rung.
|
|
|
154
154
|
{
|
|
155
155
|
"defaults": "anthropic/claude-opus-4-7",
|
|
156
156
|
"presets": {
|
|
157
|
-
"
|
|
157
|
+
"build": {
|
|
158
158
|
"stages": {
|
|
159
159
|
"plan": "openai/gpt-5.5",
|
|
160
|
-
"
|
|
160
|
+
"research": { "model": "openai/gpt-5.5", "thinking": "high" }
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
"polish": {
|
|
164
164
|
"stages": {
|
|
165
|
-
"
|
|
165
|
+
"blueprint": "zai/glm-4-7"
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
`/wf
|
|
172
|
+
`/wf build`'s plan and research stages use GPT-5.5, `/wf polish`'s blueprint stage uses GLM, and
|
|
173
173
|
everything else falls through to Opus.
|
|
174
174
|
|
|
175
175
|
**A subagent on a cheaper model**
|
package/docs/workflows.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Workflows and recipes
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The three `/wf` pipelines `@juicesharp/rpiv-pi` contributes, and the hand-driven
|
|
4
4
|
skill chains to reach for when you don't want a whole pipeline.
|
|
5
5
|
|
|
6
6
|
`/wf` itself ships with [`@juicesharp/rpiv-workflow`](https://www.npmjs.com/package/@juicesharp/rpiv-workflow),
|
|
@@ -19,21 +19,7 @@ session start; if the runner is not installed, the built-ins simply do not appea
|
|
|
19
19
|
A run appears as a lane in the dock under your editor. You keep typing in the main
|
|
20
20
|
session while it works — see [lanes.md](./lanes.md).
|
|
21
21
|
|
|
22
|
-
## The
|
|
23
|
-
|
|
24
|
-
### `ship`
|
|
25
|
-
|
|
26
|
-
`blueprint → implement → validate → commit`
|
|
27
|
-
|
|
28
|
-
Fast path with no research and no review. Best when the change is small and the
|
|
29
|
-
approach is already obvious.
|
|
30
|
-
|
|
31
|
-
### `arch`
|
|
32
|
-
|
|
33
|
-
`research → design → plan → implement → validate → code-review → (design loop | commit)`
|
|
34
|
-
|
|
35
|
-
Design-led pipeline for complex changes touching many files or layers. Best when the
|
|
36
|
-
approach itself has to be worked out before planning.
|
|
22
|
+
## The three built-in workflows
|
|
37
23
|
|
|
38
24
|
### `vet`
|
|
39
25
|
|
|
@@ -53,7 +39,7 @@ each phase's plan must build on the ones before it.
|
|
|
53
39
|
|
|
54
40
|
`goal → research → slice → slice gate (+ fix loop) → design-slice (parallel fanout) → design-review → synthesize → plan gate → elaborate (parallel fanout) → re-grade → implement → validate → commit`
|
|
55
41
|
|
|
56
|
-
|
|
42
|
+
Your brief, sliced. It captures your brief verbatim as a goal artifact — the north star the
|
|
57
43
|
quality gates and `validate` anchor against — then decomposes the work into vertical
|
|
58
44
|
slices, designs each in parallel, takes one consolidated developer checkpoint on the
|
|
59
45
|
proposed interfaces, synthesizes hierarchically, and grades the plan before and after
|
|
@@ -61,7 +47,7 @@ code is elaborated into it. Three automated gates plus one human checkpoint.
|
|
|
61
47
|
|
|
62
48
|
## Review loops
|
|
63
49
|
|
|
64
|
-
`
|
|
50
|
+
`vet` and `polish` gate on the numeric `blockers_count` a `code-review`
|
|
65
51
|
artifact reports: greater than zero routes back into a fix stage, zero routes to
|
|
66
52
|
`commit`. The runner's default backward-jump budget is 2, so a review loop runs at
|
|
67
53
|
most three times before the workflow stops looping.
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
type ArtifactParser,
|
|
33
33
|
defineParser,
|
|
34
34
|
type Outcome,
|
|
35
|
-
type
|
|
35
|
+
type ParseContext,
|
|
36
36
|
transcriptPathCollector,
|
|
37
37
|
// Runner-free entry — keeps the ~530ms engine off the startup path.
|
|
38
38
|
} from "@juicesharp/rpiv-workflow/registration";
|
|
@@ -73,7 +73,7 @@ export function rpivBucketCollector(bucket: string): ArtifactCollector {
|
|
|
73
73
|
* with no frontmatter at all already does.
|
|
74
74
|
*/
|
|
75
75
|
export const frontmatterParser: ArtifactParser<undefined, "artifact-md", Record<string, unknown>> = defineParser({
|
|
76
|
-
parse(ctx:
|
|
76
|
+
parse(ctx: ParseContext<undefined>) {
|
|
77
77
|
const primary = ctx.artifacts[0];
|
|
78
78
|
if (primary?.handle.kind !== "fs") {
|
|
79
79
|
return {
|
|
@@ -59,6 +59,14 @@ export interface BashWatchdog {
|
|
|
59
59
|
/** The recorded timeout reason once the watchdog has fired, else `undefined`. Wired to
|
|
60
60
|
* `WorkflowSessionContext.toolTimeout` so the runner can divert the abort to soft-halt. */
|
|
61
61
|
timedOut(): { reason: string } | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Clear the recorded verdict (`fired` → undefined) AND every pending per-`toolCallId`
|
|
64
|
+
* timer WITHOUT unsubscribing — the `subscribe` listener stays live so a resumed turn's
|
|
65
|
+
* new bash `tool_execution_start` re-arms a fresh timer. The strike-recovery path calls
|
|
66
|
+
* this after consuming a strike (before re-prompting the child); `dispose()` (unsubscribe
|
|
67
|
+
* + clear) still runs in the per-stage `finally`. Mirrors `dispose()` minus the unsubscribe.
|
|
68
|
+
*/
|
|
69
|
+
reset(): void;
|
|
62
70
|
/** Unsubscribe + clear any pending timers. The host calls this in its per-stage `finally`. */
|
|
63
71
|
dispose(): void;
|
|
64
72
|
}
|
|
@@ -101,6 +109,14 @@ export function armBashWatchdog(session: WatchableSession, timeoutMs: number = B
|
|
|
101
109
|
|
|
102
110
|
return {
|
|
103
111
|
timedOut: () => fired,
|
|
112
|
+
// Recovery: clear the verdict + pending timers but KEEP the subscribe listener armed,
|
|
113
|
+
// so the resumed turn's next bash call re-arms a fresh per-toolCallId timer. dispose()
|
|
114
|
+
// (below) is the only path that unsubscribes.
|
|
115
|
+
reset: () => {
|
|
116
|
+
fired = undefined;
|
|
117
|
+
for (const timer of timers.values()) clearTimeout(timer);
|
|
118
|
+
timers.clear();
|
|
119
|
+
},
|
|
104
120
|
dispose: () => {
|
|
105
121
|
unsubscribe();
|
|
106
122
|
for (const timer of timers.values()) clearTimeout(timer);
|