Skip to content
Merged
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
8 changes: 8 additions & 0 deletions BUGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,11 @@ entries' IDs; manual edits to fix typos are fine.
- **Severity**: medium
- **Proposed fix**: Have fold carry notes into the requirement (e.g. reviewNote) or print them on stderr so Claude must act on them; and either let the page set certainty directly or document that notes are advisory. Omit stage-1 items from the stage-2 record, or mark them as pinned.

## BUG-12: pi-watch dispatch prints nothing when the provider request fails
- **Observed**: 2026-10-15
- **File**: skills/pi-dev/scripts/pi-watch/pi-watch.mjs:442
- **Description**: With an expired anthropic OAuth token, pi-watch --alias sonnet --tools read --require-trailer STATUS wrote empty stdout and exited 6 (missing trailer). Without --require-trailer it exits 0 with empty output. Raw pi -p --provider anthropic --model claude-sonnet-4-6 prints 'OAuth refresh failed for anthropic: ... invalid_grant'. session.prompt() does not throw on a provider error, so pi-watch's catch never runs; the failure sits on the final assistant message (stopReason/errorMessage), which pi-watch never inspects. Callers such as adversarial-review read the empty reply as a reviewer result. This is the dispatch side of the expired-token case in BUG-9. Seen while verifying the 1.x SDK port on zpyoung/fix-pi-watch; BUG-9 shows the same empty-reply symptom on the pre-port SDK.
- **Severity**: high
- **Proposed fix**: After session.prompt(), check the last assistant message's stopReason; on error, write errorMessage to stderr and exit non-zero.
- **Resolved**: 2026-10-15. After session.prompt(), pi-watch reads the last assistant message the way pi's print mode does: stopReason error or aborted exits 1 with errorMessage on stderr, and length exits 1 as truncated. The check runs before --require-trailer, so a provider failure no longer surfaces as exit 6. BUG-9 (--check passing an expired token) stays open.

17 changes: 17 additions & 0 deletions DEFERRED.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,20 @@ Reviewed every sprint planning. Use `/quirk:artifacts:defer` to append.
- **Estimated effort**: M
- **Priority**: P2
- **Proposed owner**: unassigned
- **Resolved**: 2026-10-15. pi-watch.mjs now builds a ModelRuntime and passes it to createAgentSession. package.json pins ^1.2.0, not ^1.0.0, because pi-coding-agent 1.0.0 and 1.1.0 fail on a fresh install: their caret range on pi-codemode resolves to 1.2.0, which dropped an export they import. The launcher reinstalls deps older than that floor, and a committed pnpm-workspace.yaml declines the two dependency build scripts so pnpm 12's install doesn't exit 1.

## DEFER-17: Refresh pi-watch alias ladders for the pi 1.x model catalog
- **Deferred**: 2026-10-15
- **Session context**: pi-watch 1.x SDK port on zpyoung/fix-pi-watch
- **Why deferred**: pi 1.1.0 --list-models lists anthropic/claude-sonnet-5-5, anthropic/claude-haiku-5-5 and openai/gpt-6.1-sol, which no ladder in skills/pi-dev/scripts/pi-watch/pi-watch.mjs ALIASES includes, so sonnet/haiku/codex resolve to older models. The launcher's --where staleness probe greps for gpt-5.6 and needs the same update. Left out of the 1.x SDK port because a ladder refresh is a separate model-choice decision.
- **Estimated effort**: S
- **Priority**: P2
- **Resolved**: 2026-10-15. The ladders now lead with GPT-6.1/6 Sol, GPT-6 Luna, and Claude 5.5. A new opt-in `fable` alias covers Claude Fable, and grok routes to grok-4.7/4.6 via xai, then Copilot. GPT-6 Astra is excluded as pro-priced, and terra stays on GPT-5.6 Terra because GPT-6 has no Terra tier. Entries the pinned pi-ai 1.2.0 catalog doesn't ship were removed. The --where probe now looks for gpt-6.1-sol, and adversarial-review's ALIAS_LADDER heads match.

## DEFER-18: Replace the per-provider model dumps in pi-dev's models.md
- **Deferred**: 2026-10-15
- **Session context**: DEFER-17 alias ladder refresh on zpyoung/fix-pi-watch
- **Why deferred**: skills/pi-dev/reference/models.md has a hand-copied pi --list-models table for each provider (openai-codex, openai, anthropic, google, github-copilot). It's a pre-1.x snapshot that lacks GPT-6, Claude 5.x and Grok 4.x and still lists grok-code-fast-1. Either regenerate it from the pi-ai catalog or replace it with a pointer to pi --list-models <pattern>. Left out of the DEFER-17 ladder refresh because it's a doc restructure, not a ladder change.
- **Estimated effort**: S
- **Priority**: P3

8 changes: 4 additions & 4 deletions skills/adversarial-review/scripts/adversarial-review
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,11 @@ def run_prepass(
# within each family; the ladder is walked in this order once the author's family
# is filtered out.
ALIAS_LADDER = (
("codex", "openai", "openai-codex/gpt-5.6-sol", "high"),
("gemini", "google", "google/gemini-3.2-pro-preview", "high"),
("codex", "openai", "openai-codex/gpt-6.1-sol", "high"),
("gemini", "google", "google/gemini-3.1-pro-preview", "high"),
("terra", "openai", "openai-codex/gpt-5.6-terra", "high"),
("opus", "anthropic", "anthropic/claude-opus-4-7", "high"),
("sonnet", "anthropic", "anthropic/claude-sonnet-4-7", "high"),
("opus", "anthropic", "anthropic/claude-opus-5-5", "high"),
("sonnet", "anthropic", "anthropic/claude-sonnet-5-5", "high"),
("flash", "google", "google/gemini-flash-latest", "medium"),
)

Expand Down
27 changes: 14 additions & 13 deletions skills/pi-dev/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,22 @@ The ✓/✗ report prints to **stderr** (like pi-watch's other progress output)

| Alias | Default thinking | Routes to |
|---|---|---|
| `codex` (default coding) | `medium` | gpt-5.6-sol → 5.5 → 5.4 → 5.3-codex (across `openai-codex`/`openai`/`github-copilot`) |
| `codex-max` | `max` | gpt-5.6-sol → 5.5-codex-max → 5.4-codex-max → 5.1-codex-max |
| `codex-mini` | `medium` | gpt-5.6-luna → 5.4-mini → 5.1-codex-mini |
| `codex-spark` | `high` | gpt-5.4-codex-spark → 5.3-codex-spark |
| `codex` (default coding) | `medium` | gpt-6.1-sol → 6-sol → 5.6-sol → 5.5 (across `openai-codex`/`openai`/`github-copilot`) |
| `codex-max` | `max` | gpt-6.1-sol → 6-sol → 5.6-sol, at `max` effort |
| `codex-mini` | `medium` | gpt-6-luna → 5.6-luna |
| `codex-spark` | `high` | gpt-5.3-codex-spark |
| `terra` (balanced) | `high` | gpt-5.6-terra → 5.4 |
| `sonnet` | `high` | claude-sonnet-4-7 → 4-6 (anthropic + copilot) |
| `opus` | `high` | claude-opus-4-7 → 4-6 |
| `haiku` | `medium` | claude-haiku-4-6 → 4-5 |
| `gemini` | `high` | gemini-3.2-pro-preview → 3.1 → 3 |
| `flash` | `medium` | gemini-flash-latest → 3-flash-preview |
| `grok` | `medium` | github-copilot/grok-code-fast-1 |
| `sonnet` | `high` | claude-sonnet-5-5 → 5 → 4-6 (anthropic + copilot) |
| `opus` | `high` | claude-opus-5-5 → 5 → 4-8 → 4-7 |
| `haiku` | `medium` | claude-haiku-5-5 → 4-5 |
| `fable` (opt-in) | `high` | claude-fable-5-1 → 5 |
| `gemini` | `high` | gemini-3.1-pro-preview |
| `flash` | `medium` | gemini-flash-latest → 3.8-flash → 3-flash-preview |
| `grok` | `medium` | grok-4.7 → 4.6 (xai, then copilot) |

GPT-5.6 replaced the suffix ladder with three capability tiers: **Sol** (flagship, $5/$30, the only tier that unlocks `max` reasoning effort), **Terra** (balanced, $2.50/$15), **Luna** (fast/cheapest, $1/$6). Sol takes over `codex`/`codex-max`, Luna takes over `codex-mini`, and Terra gets its own `terra` alias.
GPT-6 ships three tiers: **Sol** (flagship, $2/$10) backs `codex` and `codex-max`, **Luna** (fastest and cheapest, $0.10/$0.50) backs `codex-mini`, and **Astra** ($10/$50) is excluded like a pro tier. GPT-6 has no Terra tier, so `terra` stays on GPT-5.6 Terra ($2/$12), which now costs more than GPT-6 Sol. Claude **Fable** ($10/$50, 2.5× Opus 5.5) gets the opt-in `fable` alias and never appears in the `opus` ladder.

Aliases auto-upgrade as new models ship — newest entries at the top of each ladder are speculative and skipped if not yet in `pi --list-models`. **OpenAI pro / deep-research tiers are deliberately excluded** from alias ladders: `gpt-5-pro`, `gpt-5.x-pro`, `o1-pro`, `o3-pro`, `o3-deep-research`, `o4-mini-deep-research` (~10–30× cost, multi-minute latency). GPT-5.6's **Sol Pro** and **Ultra mode** are the same lever — they're request-time params (`reasoning.mode`), not separate model IDs, so there's no alias for them. Dispatch pro-tier only on explicit user request via `--provider`/`--model`. *(Note: `gemini-*-pro-preview` is Google's standard tier, not a pro tier — it routes via the `gemini` alias.)*
Aliases auto-upgrade as new models ship — newest entries at the top of each ladder are speculative and skipped if not yet in `pi --list-models`. **OpenAI pro / deep-research tiers are deliberately excluded** from alias ladders: `gpt-5-pro`, `gpt-5.x-pro`, `o1-pro`, `o3-pro`, `o3-deep-research`, `o4-mini-deep-research` (~10–30× cost, multi-minute latency), and `gpt-6-astra` (5× GPT-6 Sol). GPT-5.6's **Sol Pro** and **Ultra mode** are the same lever — they're request-time params (`reasoning.mode`), not separate model IDs, so there's no alias for them. Dispatch pro-tier only on explicit user request via `--provider`/`--model`. *(Note: `gemini-*-pro-preview` is Google's standard tier, not a pro tier — it routes via the `gemini` alias.)*

To see the full ladders: `pi-watch --list-aliases`.

Expand Down Expand Up @@ -120,7 +121,7 @@ QUIRK="$(node -e 'const fs=require("fs"),os=require("os"),p=require("path");cons
install -m755 "$QUIRK/skills/pi-dev/scripts/pi-watch/pi-watch" ~/.local/bin/pi-watch # or any PATH dir
```

Verify: `pi --version` → expect ≥ 0.65.1. `pi /login` for any subscription provider you want (Claude, ChatGPT, Copilot). Then `pi-watch --check` to confirm which aliases resolve to an authed model — the first run also auto-installs the current version's Node deps if they're missing.
Verify: `pi --version` → expect ≥ 0.65.1, and `node --version` → expect ≥ 22.19 (the pi SDK's floor). `pi /login` for any subscription provider you want (Claude, ChatGPT, Copilot). Then `pi-watch --check` to confirm which aliases resolve to an authed model — the first run also auto-installs the current version's Node deps if they're missing or outdated.

**Updating:** `claude plugin update quirk` is enough — `pi-watch` auto-follows. Run `pi-watch --where` to see which version/dir it resolves to (and whether that copy has the current alias ladder). Re-run the `install` line above only if the launcher script itself changes (rare); mjs/alias updates are picked up automatically.

Expand Down
Loading
Loading