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 explorer 或 why investigators)来自已退役 role,删除。
没有 # defaults: 2 行的规则来自旧版 setup。旧版会给每个 role 都写一行,因此其中有些值是旧默认值,不是用户选择。旧 slug 指匹配 grok-* 的 slug。步骤 3 前替换以下值:
feature, refactoring、bug-fix、perf-issue、hillclimb、reflect tooling或swarm workers中的旧 slug,改为该 role 在步骤 5 的默认值。hardest tasks中的claude-opus-*值,改为该 role 在步骤 5 的默认值。- panel role(
arena runners、arena cross-judge pool、architect runners、interrogate reviewers)中,若列表恰好有一个claude-opus-*条目和一个旧 slug(顺序不限),改用步骤 5 的列表。其他列表中的每个旧 slug 都改为claude-opus-5-5-high-fast。
其余值都视为用户选择并保留,包括其他 role 中的旧 slug,以及所有 inherit-parent 或 auto。告诉用户替换了哪些值。
3. 预算、映射与确认
Section titled “3. 预算、映射与确认”(a) 询问预算。 优先用 AskQuestion,不用自由文本。提供下列四个选项,标签须完全一致;若规则中已有预算则点明当前预算。没有规则时,说明 large 与 skill 默认值一致。
unlimited — max reasoninglarge — xhigh reasoningmedium — high reasoningsmall — medium reasoning
(b) 应用预算。 从 skill 默认值构建工作表;重跑时保留你按族、列表或别名(inherit-parent、auto)改过的 role。模型族按 arena skill 的 Phase A 定义,Fable 属于独立模型族。每个 role 有一个目标 effort,即默认值按预算调整后的 effort。large 保持不变,unlimited 提高一级,medium 降低一级,small 降低两级,阶梯为 max > xhigh > high > medium > low。达到阶梯两端时保持原级别。大多数默认值为 xhigh,各预算标签说明对应级别。把该 role 中每个真实 slug(包括 panel 条目)的 effort token 设为目标级别。effort token 是最后一个 token,或末尾 fast 前的 token。若结果不是检测到的 slug,使用同族中不高于目标级别的最高 detected slug,否则将该 role 标为需选择。inherit-parent 和 auto 不变。因此 unlimited 会把 claude-opus-5-5-xhigh 变为 claude-opus-5-5-max,把 claude-opus-5-5-high-fast 变为 claude-opus-5-5-xhigh-fast,并保留 claude-fable-5-2-max。Gemini 最高为 high,所以 unlimited 下仍用 gemini-4-carbon-high。small 会把前两者变为 claude-opus-5-5-medium 和 claude-opus-5-5-low-fast。Fable 5.2 和 Gemini 没有 fast slug,不要写入。
(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 只运行一个 judge。它按列表顺序尝试不同于父模型供应商的值,所以应按偏好排序。Fable 和其他 Claude 模型属于同一供应商。inherit-parent 或 auto 不会担任 judge。swarm workers 是每个 worker 的默认模型,除非 race 或 comparison 为各 arm 指定其他模型。
写入的每个真实 slug 须在 detected 集合内。inherit-parent 与 auto 始终通过。若所选真实 slug 不可用,停止并再次询问。
5. 写入规则
Section titled “5. 写入规则”写入 ~/.cursor/rules/pstack-models.mdc,alwaysApply: true,包含 # defaults: 2 行和 # 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.# defaults: 2# budget: large (xhigh)feature, refactoring: claude-opus-5-5-xhighbug-fix: claude-opus-5-5-xhighperf-issue: claude-opus-5-5-xhighhillclimb: claude-opus-5-5-xhighjudgment and prose: claude-opus-5-5-xhighhardest tasks: claude-fable-5-2-maxreflect tooling: claude-opus-5-5-high-fastreflect judgment, divergent, synthesizer: claude-opus-5-5-xhigharena runners: claude-fable-5-2-high, claude-opus-5-5-high-fast, gemini-4-carbon-higharena cross-judge pool: claude-fable-5-2-high, claude-opus-5-5-high-fast, gemini-4-carbon-highswarm workers: claude-opus-5-5-high-fastarchitect runners: claude-fable-5-2-high, claude-opus-5-5-high-fast, gemini-4-carbon-highinterrogate reviewers: claude-fable-5-2-high, claude-opus-5-5-high-fast, gemini-4-carbon-high告知用户规则已写入,对新 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)。若否,继续,不反复推销。
8. 提供 formal verification skill(可选)
Section titled “8. 提供 formal verification skill(可选)”检查项目是否已有 formal verification skill(对代码跑模型检查器、证明或其他验证器的项目 skill)。若无,提供一次:「要不要一个 formal verification skill,让 agent 能证明代码的某个关键性质在所有范围内的情形下都成立,而不只是测试覆盖到的那些?我可以用 /create-formal-verification-skill 生成。」若同意,调用 /create-formal-verification-skill(解析 pstack 安装位置:workspace、user 或 plugin)。若否,继续,不反复推销。
