setup-pstack
配置 pstack 模型
Write ~/.cursor/rules/pstack-models.mdc, an always-applied rule that sets pstack’s model per role.
写 ~/.cursor/rules/pstack-models.mdc,一条 always-applied 规则,按角色设定 pstack 模型。
Steps
步骤
1. Detect available models
1. 检测可用模型
Enumerate the model slugs you can pass to a Task subagent in this session. That is the dependable source. If Cursor also exposes a models API or CLI that lists the user’s entitled models, prefer it for completeness. 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.
枚举本会话能传给 Task subagent 的模型 slug。这是可靠来源。若 Cursor 还暴露列出用户有权模型的 API 或 CLI,优先用它求完整。检测不到就请用户粘贴他们能用的 slug。未确认可用的真 slug 绝不写入。别名 inherit-parent 和 auto 始终有效,尽管不是检测到的 slug。
2. Load current state
2. 加载当前状态
The default role-to-model mapping is the rule shape shown in step 5 below. If ~/.cursor/rules/pstack-models.mdc already exists, read it and treat its # budget line and its role values as the current choices. Otherwise start from those defaults.
默认角色→模型映射是下面 step 5 的规则形状。若 ~/.cursor/rules/pstack-models.mdc 已存在,读它,把 # budget 行和角色值当当前选择。否则从那些默认起步。
3. Budget, map, and confirm
3. 预算、映射、确认
(a) Ask for a budget. Prefer AskQuestion over free text. Offer these four options with these exact labels, and name the current budget when the rule records one.
(a) 问预算。 优先 AskQuestion 而非自由文本。提供这四个选项(标签精确如下);规则已记录预算时点名当前预算。
unlimited — keep maxlarge — xhigh reasoningmedium — high reasoningsmall — medium reasoning
(b) Apply it. Build the working table from the skill defaults, and on a re-run keep any role you changed by family, list, or alias (inherit-parent, auto). unlimited leaves every effort as in that table. large, medium, and small set the effort token of every real slug, panel entries included, to xhigh, high, or medium. The effort token is the last token, or the one before a trailing fast, on the ladder max > xhigh > high > medium > low. If the result is not a detected slug, use the same family’s detected slug with the highest effort at or below the target, else mark the role as needing a choice. inherit-parent and auto do not change. So small turns claude-opus-5-5-max into claude-opus-5-5-medium, and grok-4.7-xhigh-fast into grok-4.7-medium-fast.
(b) 应用。 从 skill 默认建工作表;重跑时保留你按族、列表或别名(inherit-parent、auto)改过的角色。unlimited 保留表中所有 effort。large/medium/small 把每个真 slug(含 panel 条目)的 effort 标记设为 xhigh/high/medium。effort 标记是最后一个 token,或尾部 fast 前那个,梯子为 max > xhigh > high > medium > low。结果不是检测到的 slug 时,用同族已检测、effort 不超过目标的最高档;否则标该角色需要选择。inherit-parent 和 auto 不变。因此 small 把 claude-opus-5-5-max 变成 claude-opus-5-5-medium,grok-4.7-xhigh-fast 变成 grok-4.7-medium-fast。
(c) Show the roles and confirm. Show every role with its model, marking any real slug not in the detected set as needing a choice. Ask whether to accept as-is or change specific roles, offering the detected models plus inherit-parent and auto (both mean: this role runs on the parent chat model, which is how Auto users stay on Auto) as the options. Prefer AskQuestion over free text. For panel roles (arena runners, architect runners, interrogate reviewers) the value is a list, and one subagent runs per entry, alias entries included, so the list length sets the count. arena cross-judge pool is also a list, but Arena selects one value from it whose model family differs from the parent’s when possible. swarm workers is the default model for every worker unless a race or comparison assigns another model per arm.
(c) 展示角色并确认。 展示每个角色及其模型,不在检测集的真 slug 标为需要选择。问是原样接受还是改特定角色,选项为已检测模型加 inherit-parent 与 auto(都表示该角色跑在 parent 聊天模型上,Auto 用户靠此留在 Auto)。优先 AskQuestion。panel 角色(arena runners、architect runners、interrogate reviewers)值是列表,每条目一个 subagent(含别名条目),所以列表长度定数量。arena cross-judge pool 也是列表,但 Arena 尽量从中选一个与 parent 不同模型族的值。swarm workers 是每个 worker 的默认模型,除非竞速或比较按臂指定其他模型。
4. Validate
4. 校验
Every real slug written must be in the detected set. inherit-parent and auto always pass. If a chosen real slug is not available, stop and ask again.
写入的每个真 slug 必须在检测集。inherit-parent 和 auto 始终通过。选中的真 slug 不可用就停下再问。
5. Write the rule
5. 写规则
Write ~/.cursor/rules/pstack-models.mdc with alwaysApply: true, a # budget line with the chosen label and its target effort, and one line per role, using the same labels poteto-mode uses. Overwrite the whole file so re-runs stay idempotent. Shape:
写 ~/.cursor/rules/pstack-models.mdc,alwaysApply: true,一行 # budget(所选标签与目标 effort),每角色一行,标签与 poteto-mode 相同。整文件覆盖,让重跑幂等。形状:
---
description: pstack per-role model choices (overrides skill defaults)
alwaysApply: true
---
# pstack model configuration. One line per role. Delete a line to fall back to the skill default.
# `inherit-parent` or `auto` as a value: the role runs on the parent chat model (omit Task `model`). Alias entries in a panel list still count toward its fan-out.
# budget: unlimited (max)
feature, refactoring: grok-4.7-xhigh-fast
bug-fix: grok-4.7-xhigh-fast
perf-issue: grok-4.7-xhigh-fast
hillclimb: grok-4.7-xhigh-fast
judgment and prose: claude-opus-5-5-max
hardest tasks: claude-opus-5-5-max
how explorer: grok-4.7-xhigh-fast
how explainer: claude-opus-5-5-max
why investigators: grok-4.7-xhigh-fast
why synthesizer: claude-opus-5-5-max
reflect tooling: gpt-5.6-sol-max
reflect judgment, divergent, synthesizer: claude-opus-5-5-max
arena runners: claude-opus-5-5-max, gpt-5.6-sol-max, grok-4.7-xhigh-fast
arena cross-judge pool: claude-opus-5-5-max, gpt-5.6-sol-max, grok-4.7-xhigh-fast
swarm workers: grok-4.7-xhigh-fast
architect runners: claude-opus-5-5-max, gpt-5.6-sol-max, grok-4.7-xhigh-fast
interrogate reviewers: claude-opus-5-5-max, gpt-5.6-sol-max, grok-4.7-xhigh-fast
6. Confirm
6. 确认
Tell the user the rule was written and that it applies to new sessions. Re-running this skill updates it.
告诉用户规则已写入,对新会话生效。重跑本 skill 会更新它。
7. Offer a verification skill (optional)
7. 提供 verification skill(可选)
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 /create-verification-skill.” On yes, invoke /create-verification-skill (resolves wherever pstack is installed: workspace, user, or plugin). On no, move on without pushing.
检查项目是否有驱动真实应用做证明的方式(verify-* skill,或已有 harness)。没有就提供一次:「要不要项目本地 verification skill,让 agent 像用户一样驱动应用并证明改动管用?我可以用 /create-verification-skill 生成。」是就调用 /create-verification-skill(解析 pstack 安装处:工作区、用户或插件)。否就继续,别纠缠。