setup-pstack
Setup pstack
Write pstack's model settings, one model per role:
- Cursor:
~/.cursor/rules/pstack-models.mdc, an always-applied rule. - Every other harness (Claude Code, Codex, Pi, OpenCode, and others):
~/.agents/pstack-models.md. These harnesses don't load Cursor rules, so pstack skills read this file when they pick a model.
"The settings file" below means the file for your harness. When reading, check both paths and use the one that exists.
Steps
1. Detect available models
Enumerate the model slugs you can pass to a subagent in this session (Cursor Task, Claude Code Agent, OpenCode task, Codex spawn_agent). That is the dependable source. If your harness also has a command that lists the user's models, prefer it for completeness (for example opencode models or pi --list-models). If you cannot detect any, ask the user to paste the slugs they have access to. Never write a real slug you have not confirmed is available. The aliases inherit-parent and auto are always valid even though they are not detected slugs.
2. Load current state
The default role-to-model mapping is the rule shape shown in step 5 below. If the settings file already exists, read it and treat its # budget line and its role values as the current choices. Otherwise start from those defaults.