---
name: subgo
description: Claude Code Pro Sub-Go runner — wi-sub-go.sh, auto escalation, zero-prefix flow
---

# Sub-Go (Claude Code Pro)

Cross-ref: [CLAUDE.md](../../CLAUDE.md) · [.cursor/rules/wi-sub-go-model-policy.mdc](../../.cursor/rules/wi-sub-go-model-policy.mdc)

## When

- Ship-set **implementation** (default — no `Sub-Go:` prefix needed in Cursor)
- Plan / `go` / P0…Pn phases
- **Not** for pure Q&A (use Cursor Ask + Opus/Fable, not `opusplan`)

## Runner (preferred)

```bash
./scripts/wi-sub-go.sh --axxx A981 --prompt "…" --model auto --dirs inc,assets
./scripts/wi-sub-go.sh --axxx A981 --prompt "…" --model opusplan --plan
./scripts/wi-sub-go.sh bump-fail --axxx A981   # after failed deploy-QA
./scripts/wi-sub-go.sh --dry-run --axxx A981 --prompt "test" --model auto
```

Read `WI_SUBGO_RESULT=…` JSON from stdout.

## Auto model ladder (`--model auto`)

| State | Model | Effort |
|-------|-------|--------|
| Default | sonnet | high |
| `--plan` | opusplan | high |
| fail_count ≥ 1 | opus | high |
| fail_count ≥ 2 | opus | xhigh |
| opus_fail_count ≥ 2 | fable | high (+ ultrathink in prompt) |

## Escape

- `cursor-only:` in Cursor chat → no `claude -p`
- `Sub-Go (sonnet|opus|…):` → manual `--model`

## Preflight

- `ANTHROPIC_API_KEY` unset (else PAYG)
- `claude` in PATH, Pro login via `claude /status`

Cheat sheet: [wi-dev/local/SUBGO-CHEATSHEET.md](../../wi-dev/local/SUBGO-CHEATSHEET.md)
