setup-pstack
Setup pstack
Section titled “Setup pstack”写入 ~/.cursor/rules/pstack-models.mdc,一条始终生效的规则,按角色设置 pstack 模型。
1. 检测可用模型
Section titled “1. 检测可用模型”枚举本 session 中可传给 Task 子 agent 的 model slug。这是最可靠的来源。若 Cursor 还暴露列出用户 entitled 模型的 models API 或 CLI,优先用它以求完整。若检测不到任何 slug,请用户粘贴其可用的 slug。切勿写入未确认可用的真实 slug。别名 inherit-parent 与 auto 始终有效,尽管它们不是检测到的 slug。
2. 加载当前状态
Section titled “2. 加载当前状态”默认角色到模型的映射即下方步骤 5 的规则形态。若 ~/.cursor/rules/pstack-models.mdc 已存在,读取它,将其 # budget 行与各 role 值视为当前选择。否则从默认开始。步骤 5 中不存在的 role 行(如 how critics)来自已退役 role,删除。
3. 预算、映射与确认
Section titled “3. 预算、映射与确认”(a) 询问预算。 优先用 AskQuestion,不用自由文本。提供下列四个选项,标签须完全一致;若规则中已有预算则点明当前预算。
unlimited — keep maxlarge — xhigh reasoningmedium — high reasoningsmall — medium reasoning
(b) 应用预算。 从 skill 默认值构建工作表;重跑时保留你按族、列表或别名(inherit-parent、auto)改过的 role。unlimited 保持表中每项 effort 不变。large、medium、small 将每个真实 slug(含 panel 条目)的 effort token 设为 xhigh、high 或 medium。effort token 是最后一个 token,或在末尾 fast 之前的那个,阶梯为 max > xhigh > high > medium > low。若结果不是检测到的 slug,用同族中 effort 不高于目标的最高 detected slug,否则将该 role 标为需选择。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) 展示 role 并确认。 展示每个 role 及其模型,将 detected 集合外的真实 slug 标为需选择。同时列出步骤 2 删掉的行。问是否按现状接受或改特定 role,选项为 detected 模型加 inherit-parent 与 auto(二者均表示该 role 跑在父聊天模型上,Auto 用户借此保持 Auto)。优先 AskQuestion。panel role(arena runners、architect runners、interrogate reviewers)的值为列表,每个条目 spawn 一个子 agent,含别名条目,列表长度即数量。arena cross-judge pool 也是列表,但 Arena 会从中选一个与父模型不同 model family 的值(若可能)。swarm workers 是每个 worker 的默认模型,除非 race 或 comparison 为各 arm 指定其他模型。
写入的每个真实 slug 须在 detected 集合内。inherit-parent 与 auto 始终通过。若所选真实 slug 不可用,停止并再次询问。
5. 写入规则
Section titled “5. 写入规则”写入 ~/.cursor/rules/pstack-models.mdc,alwaysApply: true,# budget 行为所选标签及其目标 effort,每个 role 一行,标签与 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-fastbug-fix: grok-4.7-xhigh-fastperf-issue: grok-4.7-xhigh-fasthillclimb: grok-4.7-xhigh-fastjudgment and prose: claude-opus-5-5-maxhardest tasks: claude-opus-5-5-maxhow explorer: grok-4.7-xhigh-fasthow explainer: claude-opus-5-5-maxwhy investigators: grok-4.7-xhigh-fastwhy synthesizer: claude-opus-5-5-maxreflect tooling: gpt-5.6-sol-maxreflect judgment, divergent, synthesizer: claude-opus-5-5-maxarena runners: claude-opus-5-5-max, gpt-5.6-sol-max, grok-4.7-xhigh-fastarena cross-judge pool: claude-opus-5-5-max, gpt-5.6-sol-max, grok-4.7-xhigh-fastswarm workers: grok-4.7-xhigh-fastarchitect runners: claude-opus-5-5-max, gpt-5.6-sol-max, grok-4.7-xhigh-fastinterrogate reviewers: claude-opus-5-5-max, gpt-5.6-sol-max, grok-4.7-xhigh-fast告知用户规则已写入,对新 session 生效。重跑本 skill 会更新它。
7. 提供 verification skill(可选)
Section titled “7. 提供 verification skill(可选)”检查项目是否有驱动真实应用作证明的方式(verify-* skill 或现有 harness)。若无,提供一次:「要不要项目本地 verification skill,让 agent 像用户一样驱动应用并证明改动有效?我可以用 /create-verification-skill 生成。」若同意,调用 /create-verification-skill(解析 pstack 安装位置:workspace、user 或 plugin)。若否,继续,不反复推销。