Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ setup_macos() {

setup_skills() {
title "Linking Pi skills, agents, extensions, models, and settings"
node "$DOTFILES/skills/scripts/check-model-diversity.mjs"
bash "$DOTFILES/skills/scripts/link-skills.sh"
}

Expand Down
50 changes: 50 additions & 0 deletions pi/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,61 @@
"defaultContext": "fresh",
"fallbackModels": []
},
"candidate-sol": {
"model": "peter@backpack.app/gpt-5.6-sol",
"thinking": "xhigh",
"defaultContext": "fresh",
"fallbackModels": []
},
"candidate-grok": {
"model": "opencode/grok-4.6",
"thinking": "high",
"defaultContext": "fresh",
"fallbackModels": []
},
"candidate-fable": {
"model": "opencode/claude-fable-5-1",
"thinking": "max",
"defaultContext": "fresh",
"fallbackModels": []
},
"candidate-terra": {
"model": "peter@backpack.app/gpt-5.6-terra",
"thinking": "xhigh",
"defaultContext": "fresh",
"fallbackModels": []
},
"reviewer": {
"description": "Independent review of supplied paths, patches, and validation evidence",
"model": "xai/grok-4.6",
"thinking": "xhigh",
"defaultContext": "fresh",
"fallbackModels": []
},
"reviewer-sol": {
"model": "peter@backpack.app/gpt-5.6-sol",
"thinking": "xhigh",
"defaultContext": "fresh",
"fallbackModels": []
},
"reviewer-grok": {
"model": "opencode/grok-4.6",
"thinking": "xhigh",
"defaultContext": "fresh",
"fallbackModels": []
},
"reviewer-fable": {
"model": "opencode/claude-fable-5-1",
"thinking": "max",
"defaultContext": "fresh",
"fallbackModels": []
},
"reviewer-terra": {
"model": "peter@backpack.app/gpt-5.6-terra",
"thinking": "xhigh",
"defaultContext": "fresh",
"fallbackModels": []
},
"comment-sicko": {
"model": "peter@backpack.app/gpt-5.6-luna",
"thinking": "medium",
Expand Down Expand Up @@ -86,6 +134,8 @@
"xai/grok-4.5-fast",
"xai/grok-4.6",
"xai/grok-4.6-fast",
"opencode/claude-fable-5-1",
"opencode/grok-4.6",
"opencode/deepseek-v4-pro",
"opencode/deepseek-v4-flash",
"opencode/kimi-k3"
Expand Down
2 changes: 1 addition & 1 deletion skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ Capsule at [`ppstack/`](./ppstack). Pi skill tree and agent set. `petey` is the

- **[petey](./ppstack/skills/petey/SKILL.md)** — Router for concise, verified work.
- Sibling skills (`how`, `why`, `grill`, `proof-plan`, `night-watch`, `peer-review`, `no-stupid-tests`, `tdd`, principles, `unslop`, ...) live next to it in `ppstack/skills/`.
- Agents (`petey-agent`, `comment-sicko`, `test-butcher`, `council-sol`) live in `ppstack/agents/`.
- Agents (`petey-agent`, `candidate-*`, `reviewer-*`, `comment-sicko`, `test-butcher`, `council-sol`) live in `ppstack/agents/`.
12 changes: 12 additions & 0 deletions skills/ppstack/agents/candidate-fable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: candidate-fable
description: Fresh Fable writer for model-diverse arena candidates.
async: true
tools: read, grep, find, ls, bash, edit, write
inheritSkills: true
systemPromptMode: append
skills: petey
acceptanceRole: writer
---

Produce only the assigned arena candidate in the assigned worktree or output path. Follow the supplied rubric and verification command. End with the artifact path, rationale, and verification result.
12 changes: 12 additions & 0 deletions skills/ppstack/agents/candidate-grok.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: candidate-grok
description: Fresh Grok writer for model-diverse arena candidates.
async: true
tools: read, grep, find, ls, bash, edit, write
inheritSkills: true
systemPromptMode: append
skills: petey
acceptanceRole: writer
---

Produce only the assigned arena candidate in the assigned worktree or output path. Follow the supplied rubric and verification command. End with the artifact path, rationale, and verification result.
12 changes: 12 additions & 0 deletions skills/ppstack/agents/candidate-sol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: candidate-sol
description: Fresh Sol writer for model-diverse arena candidates.
async: true
tools: read, grep, find, ls, bash, edit, write
inheritSkills: true
systemPromptMode: append
skills: petey
acceptanceRole: writer
---

Produce only the assigned arena candidate in the assigned worktree or output path. Follow the supplied rubric and verification command. End with the artifact path, rationale, and verification result.
12 changes: 12 additions & 0 deletions skills/ppstack/agents/candidate-terra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: candidate-terra
description: Fresh Terra writer for model-diverse arena candidates.
async: true
tools: read, grep, find, ls, bash, edit, write
inheritSkills: true
systemPromptMode: append
skills: petey
acceptanceRole: writer
---

Produce only the assigned arena candidate in the assigned worktree or output path. Follow the supplied rubric and verification command. End with the artifact path, rationale, and verification result.
11 changes: 11 additions & 0 deletions skills/ppstack/agents/reviewer-fable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: reviewer-fable
description: Fresh read-only Fable reviewer for divergent review lanes.
async: true
tools: read, grep, find, ls
inheritSkills: false
systemPromptMode: replace
acceptanceRole: read-only
---

Apply the supplied review brief exactly. Inspect only the named evidence. Do not edit files. Return concise findings with evidence paths and explicit gaps.
11 changes: 11 additions & 0 deletions skills/ppstack/agents/reviewer-grok.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: reviewer-grok
description: Fresh read-only Grok reviewer for tooling-sensitive review lanes.
async: true
tools: read, grep, find, ls
inheritSkills: false
systemPromptMode: replace
acceptanceRole: read-only
---

Apply the supplied review brief exactly. Inspect only the named evidence. Do not edit files. Return concise findings with evidence paths and explicit gaps.
11 changes: 11 additions & 0 deletions skills/ppstack/agents/reviewer-sol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: reviewer-sol
description: Fresh read-only Sol reviewer for judgment-sensitive review lanes.
async: true
tools: read, grep, find, ls
inheritSkills: false
systemPromptMode: replace
acceptanceRole: read-only
---

Apply the supplied review brief exactly. Inspect only the named evidence. Do not edit files. Return concise findings with evidence paths and explicit gaps.
11 changes: 11 additions & 0 deletions skills/ppstack/agents/reviewer-terra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: reviewer-terra
description: Fresh read-only Terra reviewer for cross-judging model-diverse arena candidates.
async: true
tools: read, grep, find, ls
inheritSkills: false
systemPromptMode: replace
acceptanceRole: read-only
---

Apply the supplied review brief exactly. Inspect only the named evidence. Do not edit files. Return concise findings with evidence paths and explicit gaps.
11 changes: 8 additions & 3 deletions skills/ppstack/docs/pi-subagents.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The package supplies the normal roles below. Model routing and role overrides li
| `delegate` | Thin parent-shaped helper | yes | Only when parent-like behavior is intentional |
| `researcher` | Web and documentation brief | notes only | Cited external research |

The package also exposes external CLI adapters (`claude-code`, `codex-exec`, `cursor-agent`, and their `-writer` variants). They take no model or thinking options, so they cannot pin Fable 5.1 or Sol. The **peer-review** skill uses bash lanes for `claude` and `codex` instead, and the configured `reviewer` role for Grok. Never invoke the adapters. The peer-review lanes replace them.
The package also exposes external CLI adapters (`claude-code`, `codex-exec`, `cursor-agent`, and their `-writer` variants). They take no model or thinking options. Never use them to approximate a pinned review lane; the house review roles below own that routing.

## Discovery

Expand All @@ -37,6 +37,8 @@ Do not eject a builtin unless its persona must change. Keep deployment choices i
| Name | Parent skill | Job | Mutation boundary |
|---|---|---|---|
| `petey-agent` | playbooks | Fresh writer that loads Petey policy | Normal writer tools |
| `candidate-{sol,grok,fable,terra}` | **arena** | Model-diverse Petey-aware candidate writers | One assigned worktree or output path |
| `reviewer-{sol,grok,fable,terra}` | **reflect**, **how**, **interrogate**, **arena**, **peer-review** | Pinned fresh review families | No writes |
| `comment-sicko` | **no-comments** | Scoped comment deletion with `how` and `why` available | Comments and resulting whitespace only |
| `test-butcher` | **no-stupid-tests** | Keeps one cut per function, trims tests not worth keeping, flags `MUST KILL` and `NO PROOF` | Test files only, deletions only |
| `council-sol` | councils | Fresh read-only Sol council judgment | No writes |
Expand All @@ -54,12 +56,15 @@ Do not eject a builtin unless its persona must change. Keep deployment choices i
| Web research | `researcher` |
| Standard implementation | `worker` |
| Petey-aware implementation or prose | `petey-agent` |
| Evidence review | `reviewer` |
| One evidence review | `reviewer` |
| Cross-model review | `reviewer-sol`, `reviewer-grok`, and `reviewer-fable` |
| Model-diverse writable candidates | `candidate-sol`, `candidate-grok`, `candidate-fable`, and `candidate-terra` |
| Model-diverse cross-judge | One unused `reviewer-*` family |
| Comment pass | `comment-sicko` |
| Test pass | `test-butcher` |
| Inherited-context judgment | `oracle` |
| Fresh Sol council judgment | `council-sol` |
| Second opinion from another model family | **peer-review**: bash `claude` on Fable 5.1, bash `codex` on Sol, `reviewer` on Grok 4.6 |
| Neutral second opinions | **peer-review** with the configured `reviewer-*` lanes |

Use one async `workflowScript` for composed work. Do not select models per run. Fresh children receive standalone briefs. Give each writer its own checkout or managed worktree.

Expand Down
2 changes: 1 addition & 1 deletion skills/ppstack/skills/architect/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Skip arena when the parent already named one invariant and data shape and no str

Otherwise run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt. Each candidate produces a design package shaped per `references/rationale-template.md`. The caller's usage is written first, then the type sketch, function signatures, module map, and prose rationale derived from it.

Arena owns candidate selection and spawning through the installed `pi-subagents` workflow. Do not select models per run.
Arena owns candidate selection and the model-diverse candidate roles through the installed `pi-subagents` workflow. Do not select models per run.

When arena runs, require at least two structurally distinct candidates before synthesis. This is the **exhaust-the-design-space** principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape.

Expand Down
11 changes: 6 additions & 5 deletions skills/ppstack/skills/arena/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: arena
description: "Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape."
description: "Spawn model-diverse parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape."
disable-model-invocation: true
---

Expand All @@ -25,20 +25,21 @@ The N candidates will receive the same prompt, so the prompt is the contract. Ge

1. State the artifact each candidate is producing.
2. Derive the rubric. State what success looks like for *this* task, then turn it into 3-6 concrete gradeable criteria. Concrete: `Adds a --dry-run flag that skips writes`. Vague: `code is correct`. The rubric is the picker's tool in Phase D; candidates only see the task.
3. Set N from the task. Spawn more when the arena covers multiple design directions. When the work is generation-bound rather than judgment-sensitive, race identical briefs through the configured writer role rather than introducing artificial differences.
4. Assign output paths. Each candidate writes to its own location (a git worktree where possible, otherwise `/tmp/arena-<slug>/candidate-<n>/`). N candidates writing to the same path is shared mutable state and fails the **separate-before-serializing-shared-state** principle skill test.
3. Set N from the task. Spawn more when the arena covers multiple design directions. Choose distinct families from the configured Sol, Grok, Fable, and Terra candidate roles before repeating a family.
4. Reserve an unused reviewer family for cross-judging when the candidate count permits it.
5. Assign output paths. Each candidate writes to its own location (a git worktree where possible, otherwise `/tmp/arena-<slug>/candidate-<n>/`). N candidates writing to the same path is shared mutable state and fails the **separate-before-serializing-shared-state** principle skill test.

## Phase B: Fan out

Spawn all N candidates in one async `workflowScript` with `await runs.all`. Use `agent: "petey-agent"` and `worktree: true` for writable candidates, then return the outputs. Read-only design candidates may use the configured council and reviewer roles. Do not select models per run. Each gets the task, the shared grounding path, its own output path, and must produce the artifact plus a short rationale.
Spawn all N candidates in one async `workflowScript` with `await runs.all`, then return the outputs. Writable candidates use distinct `candidate-sol`, `candidate-grok`, `candidate-fable`, and `candidate-terra` roles with `worktree: true`. Read-only design candidates use the matching `reviewer-*` roles. Model routing lives in `pi/settings.json`; do not select models per run or collapse a model-diverse arena onto repeated copies of one role. Each candidate gets the task, the shared grounding path, its own output path, and must produce the artifact plus a short rationale.

The rationale is mandatory. Without it, the parent cannot tell whether a candidate's structure is principled or accidental, which makes Phase E grafting unreliable. Each rationale names the alternatives the candidate considered and what it rejected.

If a candidate fails to produce output, proceed with N-1 and note the dropout in the synthesis record.

## Phase C: Cross-judge

After all Phase B candidates complete, spawn one read-only judge through the installed `pi-subagents` workflow. Use `reviewer` for fresh independent judgment or `oracle` when inherited context matters. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with the parent's reading in Phase D, not with the candidates themselves. Spawning while candidates are still writing means the judge sees partial or empty outputs and reports them as dropouts.
After all Phase B candidates complete, spawn one fresh read-only judge through the installed `pi-subagents` workflow. Choose an unused `reviewer-sol`, `reviewer-grok`, `reviewer-fable`, or `reviewer-terra` family when available. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with the parent's reading in Phase D, not with the candidates themselves. Spawning while candidates are still writing means the judge sees partial or empty outputs and reports them as dropouts.

## Phase D: Pick a base

Expand Down
2 changes: 1 addition & 1 deletion skills/ppstack/skills/how/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Run the full explain flow above (Steps 1-4). You must understand the architectur

### Step 2. Spawn Critics

After the explanation is complete, spawn multiple fresh critics in one `workflowScript` with `runs.all` of `reviewer`. Give each a distinct architectural angle and the same grounded explanation, paths, prompt, and rubric. Use `oracle` only when inherited context matters. Do not select models per run.
After the explanation is complete, spawn three fresh critics in one `workflowScript` with `runs.all`: `reviewer-sol`, `reviewer-grok`, and `reviewer-fable`. Their model routing lives in `pi/settings.json`; do not select models per run or replace an unavailable family with a duplicate. Give each a distinct architectural angle and the same grounded explanation, paths, prompt, and rubric.

Read `references/critic-prompt.md` for the prompt template. Each critic gets:
1. The explanation from Step 1 (so they don't re-explore)
Expand Down
2 changes: 1 addition & 1 deletion skills/ppstack/skills/interrogate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Write one clear paragraph. Reviewers challenge whether the work achieves the int

## Step 3, Spawn Reviewers

Read the installed `pi-subagents` skill first. Launch all reviewers in one async `workflowScript` with `await runs.all` of fresh `reviewer` children, then return the outputs. Give each reviewer one distinct named source seam or review angle, the same intent statement, rubric, and materialized evidence. Do not select models per run.
Read the installed `pi-subagents` skill first. Launch `reviewer-sol`, `reviewer-grok`, and `reviewer-fable` in one async `workflowScript` with `await runs.all`, then return the outputs. Their model routing lives in `pi/settings.json`; do not select models per run or replace an unavailable family with a duplicate. Give each reviewer one distinct named source seam or review angle, the same intent statement, rubric, and materialized evidence.

Read `references/reviewer-prompt.md` and fill in the template with:
1. The stated intent
Expand Down
Loading