--- name: setup-pstack description: Configure which models pstack uses per role and at what reasoning budget. Detects the providers and models T3 can run and writes ~/.config/pstack/models.md, which overrides the skill defaults. Use for /setup-pstack, "configure pstack models", "pstack budget", or changing pstack's model choices. --- # Setup pstack Write `~/.config/pstack/models.md`, the file that sets pstack's model seat per role. [`../../docs/models.md`](../../docs/models.md) defines the seat format, the defaults, and the fallback rule. Read it in full first. ## Steps ### 1. Detect available seats Call `orchestrator_capabilities` once. A provider is usable only when its `canRunChildTask` is true. Record each usable provider's instance id, the models it lists, and the effort values each model offers (`effort` for Claude, `reasoningEffort` for Codex). That catalog is the only dependable source. If the T3 tools are not in your tool list, run one `ToolSearch` for `t3-code` before concluding they are absent. Without T3, the session's own provider is the only one, and its native subagent tool takes the model aliases it documents. If you still cannot detect any models, ask the user to paste the provider and model ids they have. Never write a seat you have not confirmed is available. `session` is always valid. It runs the role on the lead's own model. ### 2. Load current state Start from the defaults block in `docs/models.md`. If `~/.config/pstack/models.md` already exists, read it and treat its `# budget` line and its role lines as the current choices. A line whose role is not in the defaults block, such as `how critics`, is from a retired role. Drop it. ### 3. Budget, map, and confirm **(a) Ask for a budget.** Use `AskUserQuestion`. Offer these four options with these exact labels, and name the current budget when the file records one. With no file, say that `large` matches the defaults. - `unlimited — max reasoning` - `large — xhigh reasoning` - `medium — high reasoning` - `small — medium reasoning` **(b) Apply it.** Build the working table from the defaults, and on a re-run keep any role whose provider, model, list, or `session` value differs from the default. `unlimited`, `large`, `medium`, and `small` set the `@` of every seat, panel entries included, to `max`, `xhigh`, `high`, or `medium`. If the model does not offer that effort, use the highest effort it offers below it, on the ladder in `docs/models.md`. `session` does not change. If a seat's provider or model is not in the catalog, apply the fallback rule in `docs/models.md` and mark the role as substituted. So `unlimited` turns `claudeAgent/claude-opus-5-5@xhigh` into `claudeAgent/claude-opus-5-5@max`, and keeps `cursor/grok@xhigh` when Grok tops out at `xhigh`. `small` turns them into `@medium`. **(c) Show the roles and confirm.** Show every role with its seat, marking each substituted seat and naming what it replaced. Also list each line step 2 dropped. Use `AskUserQuestion` to ask whether to accept as-is or change specific roles. Offer the detected seats plus `session` as the options. Panel roles (arena runners, architect runners, interrogate reviewers) take a list, and one subagent runs per entry, `session` entries included, so the list length sets the count. `arena cross-judge pool` is also a list, but Arena picks one entry whose family differs from the lead's when it can. `swarm workers` is every worker's seat unless a race assigns one per arm. Tell the user when a panel holds two seats of one family, since cross-family review is the point of those panels. ### 4. Validate Every seat written must name a usable provider, a model the catalog lists for it, and an effort that model offers. The alias `grok` passes when the `cursor` provider lists any `grok-*` model. `session` always passes. If a chosen seat is not available, stop and ask again. ### 5. Write the file Create `~/.config/pstack/` if needed. Write `~/.config/pstack/models.md` with a `# budget` line naming the chosen label and its target effort, then one line per role, using the role labels from the defaults block. Overwrite the whole file so re-runs stay idempotent. Shape: ``` # pstack model seats. One line per role: /@. # Delete a line to fall back to the default in pstack's docs/models.md. # `session` runs the role on the lead's own model. It still counts as a panel seat. # budget: large (xhigh) feature, refactoring: cursor/grok@xhigh bug-fix: cursor/grok@xhigh perf-issue: cursor/grok@xhigh hillclimb: cursor/grok@xhigh judgment and prose: claudeAgent/claude-opus-5-5@xhigh hardest tasks: claudeAgent/claude-opus-5-5@xhigh how explorer: cursor/grok@xhigh how explainer: claudeAgent/claude-opus-5-5@xhigh why investigators: cursor/grok@xhigh why synthesizer: claudeAgent/claude-opus-5-5@xhigh reflect tooling: cursor/grok@xhigh reflect judgment, divergent, synthesizer: claudeAgent/claude-opus-5-5@xhigh arena runners: claudeAgent/claude-opus-5-5@xhigh, cursor/grok@xhigh arena cross-judge pool: claudeAgent/claude-opus-5-5@xhigh, cursor/grok@xhigh, codex/gpt-6.1-sol@xhigh swarm workers: cursor/grok@xhigh architect runners: claudeAgent/claude-opus-5-5@xhigh, cursor/grok@xhigh interrogate reviewers: claudeAgent/claude-opus-5-5@xhigh, cursor/grok@xhigh, codex/gpt-6.1-sol@xhigh ``` Write `grok` as the model when the user keeps the default Grok seat, so it resolves to the newest `grok-*` model at spawn time. Write a concrete model id only when the user picks one. ### 6. Confirm Tell the user the file was written and print its path. Skills read it at spawn time, so the next spawn uses it. Re-running this skill updates it. ### 7. Offer a verification skill (optional) Check whether the project has a way to drive the real app for proof (a `verify-*` skill, or an existing harness). If not, offer once: "want a project-local verification skill, so agents can drive the app the way a user does and prove changes work? I can generate one with /pstack:create-verification-skill." On yes, read `../create-verification-skill/SKILL.md` and follow it. On no, move on without pushing.