setup-pstack

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Setup pstack

配置 pstack

Write
~/.config/pstack/pstack-models.md
, the file that sets pstack's model per role. Skills read it when they delegate.
写入
~/.config/pstack/pstack-models.md
,该文件用于设置 pstack 针对每个角色使用的模型。各项 skill 在进行任务委派时会读取它。

Steps

步骤

1. Detect available models

1. 检测可用模型

Call
orchestrator_capabilities
and keep the providers whose
canRunChildTask
is true. Their models are what you can pass to a
delegate_task
subagent in this session. That is the only source. If it returns no eligible model, say so and offer
inherit-parent
for every role. An entry is
<providerInstanceId>/<model>
, plus
(<effort>)
when the model lists an effort option (
effort
on Claude,
reasoningEffort
on Codex). Never write an entry it did not return. The aliases
inherit-parent
and
auto
are always valid even though they are not detected models.
调用
orchestrator_capabilities
,并保留
canRunChildTask
为 true 的 provider。它们的模型就是当前会话中可以传给
delegate_task
子 Agent 的模型。这是唯一的模型来源。如果未返回任何符合条件的模型,应明确告知用户,并为每个角色提供
inherit-parent
。条目格式为
<providerInstanceId>/<model>
;当模型列出 effort 选项时,还应附加
(<effort>)
(Claude 使用
effort
,Codex 使用
reasoningEffort
)。绝不写入未返回的条目。
inherit-parent
和
auto
这两个别名始终有效,即使它们不是检测到的模型。

2. Load current state

2. 加载当前状态

The default role-to-model mapping is the rule in step 3(b), over the roles shown in step 5. If
~/.config/pstack/pstack-models.md
already exists, read it and treat its
# budget
line and its role values as the current choices. Otherwise start from those defaults. A line whose role is not in step 5, such as
how critics
, is from a retired role. Drop it.
默认的角色到模型映射以步骤 3(b) 中的规则为准,并仅适用于步骤 5 中列出的角色。如果
~/.config/pstack/pstack-models.md
已存在,则读取该文件,并将其中的
# budget
行和角色值视为当前选择;否则从默认值开始。角色不在步骤 5 中的行,例如
how critics
,属于已退役角色,应将其删除。

3. Budget, map, and confirm

3. 预算、映射与确认

(a) Ask for a budget. Ask plainly in the thread. Offer these four options with these exact labels, and name the current budget when the file records one.
  • unlimited - max reasoning
  • large - xhigh reasoning
  • medium - high reasoning
  • small - medium reasoning
(b) Apply it. Build the working table from the skill defaults, and on a re-run keep any role you changed by model, list, or alias (
inherit-parent
,
auto
). By default, code roles (
feature, refactoring
,
bug-fix
,
perf-issue
,
hillclimb
) and the
how explorer
,
why investigators
,
swarm workers
, and
reflect tooling
roles get the fastest strong coding model detected.
judgment and prose
,
hardest tasks
,
how explainer
,
why synthesizer
, and
reflect judgment, divergent, synthesizer
get the most capable model detected. Each panel role (
arena runners
,
arena cross-judge pool
,
architect runners
,
interrogate reviewers
) gets the most capable model of each distinct provider detected, up to three entries.
unlimited
,
large
,
medium
, and
small
set the effort of every real entry, panel entries included, to
max
,
xhigh
,
high
, or
medium
, on the ladder
max
>
xhigh
>
high
>
medium
>
low
. If the model does not list the target, use the highest ladder option at or below it that the model lists, else mark the role as needing a choice. Never pick an option off the ladder, such as
ultra
,
ultracode
, or
ultrathink
. A model with no effort option gets no
(<effort>)
.
inherit-parent
and
auto
do not change. So under
large
, a model that lists
low
,
medium
,
high
, and
max
gets
high
.
(c) Show the roles and confirm. Show every role with its model, marking any real entry not in the detected set as needing a choice. Also list each line step 2 dropped. 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 thread's model) as the options. Ask plainly in the thread. 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.
(a) 询问预算。 在对话中直接询问。提供以下四个选项,并使用完全一致的标签;如果文件中记录了当前预算,还应说明当前预算。
  • unlimited - max reasoning
  • large - xhigh reasoning
  • medium - high reasoning
  • small - medium reasoning
(b) 应用预算。 根据 skill 默认值构建工作表;重新运行时,保留用户此前通过模型、列表或别名(
inherit-parent
、
auto
)修改过的任何角色。默认情况下,代码角色(
feature, refactoring
、
bug-fix
、
perf-issue
、
hillclimb
),以及
how explorer
、
why investigators
、
swarm workers
和
reflect tooling
角色,使用检测到的速度最快的强代码模型。
judgment and prose
、
hardest tasks
、
how explainer
、
why synthesizer
和
reflect judgment, divergent, synthesizer
使用检测到的能力最强模型。每个面板角色(
arena runners
、
arena cross-judge pool
、
architect runners
、
interrogate reviewers
)使用每个不同 provider 检测到的能力最强模型,最多包含三个条目。
unlimited
、
large
、
medium
和
small
会将每个实际条目的 effort(包括面板条目)分别设置为
max
、
xhigh
、
high
或
medium
,其中阶梯顺序为
max
>
xhigh
>
high
>
medium
>
low
。如果模型未列出目标 effort,则使用该模型已列出的、不高于目标值的最高阶梯选项;否则将该角色标记为需要选择。绝不选择阶梯之外的选项,例如
ultra
、
ultracode
或
ultrathink
。没有 effort 选项的模型不应附加
(<effort>)
。
inherit-parent
和
auto
保持不变。因此,在
large
下,如果一个模型列出了
low
、
medium
、
high
和
max
,则应使用
high
。
(c) 展示角色并确认。 展示每个角色及其模型,将任何不在检测结果中的实际条目标记为需要选择。同时列出步骤 2 中删除的每一行。询问用户是按当前配置接受,还是修改特定角色;可提供检测到的模型以及
inherit-parent
和
auto
作为选项(两者均表示:该角色在父线程的模型上运行)。应在对话中直接询问。对于面板角色(
arena runners
、
architect runners
、
interrogate reviewers
),其值是一个列表,每个条目对应运行一个子 Agent,别名条目也包含在内,因此列表长度决定运行数量。
arena cross-judge pool
同样是一个列表,但在可能的情况下,Arena 会从中选择一个模型系列与父线程不同的值。
swarm workers
是所有 worker 的默认模型,除非 race 或 comparison 为某个 arm 分配了另一个模型。

4. Validate

4. 验证

Every real entry written must be in the
orchestrator_capabilities
result. Its provider has
canRunChildTask
true, its model is listed under that provider, and its effort, when it has one, is one of that model's effort options. A model with no effort option has no
(<effort>)
.
inherit-parent
and
auto
always pass. If a chosen real entry is not available, stop and ask again.
写入的每个实际条目都必须存在于
orchestrator_capabilities
结果中。其 provider 的
canRunChildTask
必须为 true,模型必须列在该 provider 下;如果条目包含 effort,该 effort 还必须是该模型的 effort 选项之一。没有 effort 选项的模型不应包含
(<effort>)
。
inherit-parent
和
auto
始终通过验证。如果选择的实际条目不可用,应停止操作并重新询问用户。

5. Write the file

5. 写入文件

Write
~/.config/pstack/pstack-models.md
(create
~/.config/pstack/
if it is missing) as a plain file with the header comments, 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:
undefined
将
~/.config/pstack/pstack-models.md
写入为普通文件(如果
~/.config/pstack/
不存在则创建),其中包含头部注释、一行带有所选标签及目标 effort 的
# budget
,以及每个角色对应的一行,并使用与 poteto-mode 相同的标签。覆盖整个文件,使重复运行保持幂等。格式如下:
undefined

pstack model configuration. One line per role. Delete a line to fall back to the skill default.

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 thread's model (omit delegate_task
target
). Alias entries in a panel list still count toward its fan-out.

inherit-parent
or
auto
as a value: the role runs on the parent thread's model (omit delegate_task
target
). Alias entries in a panel list still count toward its fan-out.

budget: large (xhigh)

budget: large (xhigh)

feature, refactoring: <providerInstanceId>/<model> (<effort>) bug-fix: <entry> perf-issue: <entry> hillclimb: <entry> judgment and prose: <entry> hardest tasks: <entry> how explorer: <entry> how explainer: <entry> why investigators: <entry> why synthesizer: <entry> reflect tooling: <entry> reflect judgment, divergent, synthesizer: <entry> arena runners: <entry>, <entry>, <entry> arena cross-judge pool: <entry>, <entry>, <entry> swarm workers: <entry> architect runners: <entry>, <entry>, <entry> interrogate reviewers: <entry>, <entry>, <entry>
undefined
feature, refactoring: <providerInstanceId>/<model> (<effort>) bug-fix: <entry> perf-issue: <entry> hillclimb: <entry> judgment and prose: <entry> hardest tasks: <entry> how explorer: <entry> how explainer: <entry> why investigators: <entry> why synthesizer: <entry> reflect tooling: <entry> reflect judgment, divergent, synthesizer: <entry> arena runners: <entry>, <entry>, <entry> arena cross-judge pool: <entry>, <entry>, <entry> swarm workers: <entry> architect runners: <entry>, <entry>, <entry> interrogate reviewers: <entry>, <entry>, <entry>
undefined

6. Confirm

6. 确认

Tell the user the file was written and that it applies the next time a skill delegates, since skills read it then. Re-running this skill updates it.
告知用户文件已写入,并说明它会在 skill 下一次进行委派时生效,因为 skill 届时才会读取该文件。重新运行此 skill 会更新该文件。

7. Offer a verification skill (optional)

7. 提供验证 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, read
../create-verification-skill/SKILL.md
from this skill's directory (the one your harness gave when it loaded this file, else
~/.claude/skills/setup-pstack/
on Claude Code and
~/.agents/skills/setup-pstack/
on Codex) and follow it. On no, move on without pushing.
检查项目是否有可用于驱动真实应用进行验证的方式(
verify-*
skill 或现有 harness)。如果没有,仅提供一次以下选项:“需要创建一个项目本地的验证 skill 吗?这样 Agent 就能像用户一样驱动应用并证明更改可用?我可以通过 /create-verification-skill 生成一个。”如果用户同意,则从当前 skill 所在目录读取
../create-verification-skill/SKILL.md
(即 harness 加载此文件时提供的目录;如果未提供,则在 Claude Code 上使用
~/.claude/skills/setup-pstack/
,在 Codex 上使用
~/.agents/skills/setup-pstack/
),并按照其中的说明执行。如果用户拒绝,则不再继续推进。