setup-pstack
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSetup pstack
设置pstack
Configure one portable model sheet for the current parent harness. Read before probing or writing anything. Its model matrix, descriptor grammar, and route table are the contract. Choose one requested effort per matrix family. Do not add a second configuration file, a runtime resolver, or a weaker-model fallback.
provider-dispatch.mdClaude Code writes and loads it from with:
~/.claude/pstack-models.md~/.claude/CLAUDE.mdtext
@~/.claude/pstack-models.mdCodex writes . Codex has no include, so mirror the sheet's exact bytes inside one bounded block in and retain the sheet as the editable source of truth:
~/.codex/pstack-models.md@~/.codex/AGENTS.mdtext
<!-- pstack:models:begin -->
<exact contents of ~/.codex/pstack-models.md>
<!-- pstack:models:end -->为当前父级宿主环境配置一份可移植的模型配置表。在探测或写入任何内容前,请先阅读。该文档中的模型矩阵、描述符语法和路由表是约定标准。每个矩阵模型族选择一个请求推理强度。请勿添加第二个配置文件、运行时解析器或弱模型降级方案。
provider-dispatch.mdClaude Code会写入文件,并通过以下方式从中加载该文件:
~/.claude/pstack-models.md~/.claude/CLAUDE.mdtext
@~/.claude/pstack-models.mdCodex会写入文件。Codex不支持包含语法,因此需要将配置表的完整内容复制到的一个边界块中,同时保留原配置表作为可编辑的唯一真值源:
~/.codex/pstack-models.md@~/.codex/AGENTS.mdtext
<!-- pstack:models:begin -->
<exact contents of ~/.codex/pstack-models.md>
<!-- pstack:models:end -->Steps
步骤
1. Establish the parent
1. 确认父级宿主
Use the harness and tool surface running this skill: Claude Code or Codex. Environment markers may corroborate that top-level answer, but do not launch a child and ask it to detect where it came from. Record the parent because the same descriptor takes a different route in each harness.
使用运行本skill的宿主环境和工具接口:Claude Code或Codex。环境标记可以辅助验证这个顶层判断,但请勿启动子Agent并让其检测自身来源。请记录父级宿主,因为同一个描述符在不同宿主中会走不同的路由。
2. Load current state
2. 加载当前状态
Read the current parent-specific sheet when it exists. Before matrix validation, normalize only the rolling-alias predecessors that earlier pstack releases generated. A provider-qualified Claude model is migratable when its model component starts with or and the remaining revision contains only digits and hyphens. Replace that component in memory with or , preserving the provider, effort, role, and lane order. Record each original and normalized descriptor for the confirmation in step 7. This migration is valid loaded state and does not require a separate operator choice.
claude-fable-claude-opus-fableopusTreat the normalized values as current role-to-family assignments. Overlay those rows on the complete first-run role map in step 7. Materialize any missing documented role row from that map on the next successful write. A duplicate or unknown role row is inconsistent state; report it and resolve it before probing. A bare host-native slug from an older sheet is also invalid because it does not say which provider owns it. A versioned Claude model outside the two migration families remains inconsistent state. If the sheet is missing, use the complete first-run role map and the model matrix's Default effort cells.
如果当前父级对应的配置表已存在,则读取该表。在矩阵验证前,仅对早期pstack版本生成的滚动别名旧格式进行归一化处理。对于带提供商标识的Claude模型,若其模型部分以或开头,且剩余的版本号仅包含数字和连字符,则可进行迁移。在内存中将该模型部分替换为或,保留提供商、推理强度、角色和通道顺序。记录每个原始描述符和归一化后的描述符,用于步骤7的确认。该迁移属于有效的加载状态,无需操作人员额外选择。
claude-fable-claude-opus-fableopus将归一化后的值作为当前的角色-模型族分配关系。将这些行叠加到步骤7中的完整首次运行角色映射上。在下一次成功写入时,从该映射中补全所有缺失的已记录角色行。重复或未知的角色行属于不一致状态;请先报告并解决该问题,再进行探测。旧配置表中不带提供商标识的宿主原生slug也属于无效格式,因为它没有说明所属的提供商。不在上述两个迁移族内的带版本号Claude模型仍属于不一致状态。如果配置表不存在,则使用完整的首次运行角色映射和模型矩阵的默认推理强度单元格。
3. Parse per-family efforts
3. 解析各模型族的推理强度
Read the model matrix. Every non-alias value must match . Map it to exactly one matrix family by , require its effort to appear in that row's Selectable efforts cell, and collect the effort. and rows carry no family effort.
<provider>:<model>@<effort>(provider, model)inherit-parentautoAn unmatched provider/model, out-of-domain effort, duplicate role, or unknown role is inconsistent state. Stop, show the conflicting rows verbatim, and ask for an explicit matrix family or alias replacement. If one or more families have mixed efforts, show every conflicting family and role row, then ask for one normalized effort per family from its Selectable efforts cell. Do not invent a precedence rule. Do not probe or write while any inconsistency is unresolved.
One distinct effort per family is the current value. A family with no non-alias occurrence is unassigned; use its matrix Default effort as the proposed value and label it unassigned rather than calling it current.
读取模型矩阵。每个非别名值都必须符合格式。通过将其精确映射到一个矩阵模型族,要求其推理强度必须出现在该行的「可选推理强度」单元格中,并收集该推理强度。和行不包含模型族推理强度。
<provider>:<model>@<effort>(提供商, 模型)inherit-parentauto未匹配的提供商/模型、超出范围的推理强度、重复角色或未知角色都属于不一致状态。请停止操作,原样展示冲突的行,并要求提供明确的矩阵模型族或别名替换方案。如果一个或多个模型族存在混合推理强度,展示所有冲突的模型族和角色行,然后要求从该族的「可选推理强度」单元格中为每个模型族选择一个归一化的推理强度。请勿自行设定优先级规则。在所有不一致问题解决前,请勿进行探测或写入操作。
每个模型族的唯一推理强度即为当前值。没有非别名出现的模型族为未分配状态;使用其矩阵默认推理强度作为建议值,并标记为未分配,而非当前值。
4. Collect one requested effort per family
4. 收集每个模型族的请求推理强度
Ask exactly four effort questions, one each for Fable, Sol, Grok, and Opus. Name each model, its current or proposed value, and the Selectable efforts from its matrix row. Empty input keeps a current value or accepts the matrix proposal for an unassigned family. On a first run, state the four matrix defaults before asking. On a rerun, state the four parsed values without offering to reset customized role lanes.
仅询问四个推理强度问题,分别对应Fable、Sol、Grok和Opus四个模型族。说明每个模型的名称、当前值或建议值,以及其矩阵行中的可选推理强度。空输入表示保留当前值,或对于未分配的模型族接受矩阵建议值。首次运行时,在询问前先说明四个矩阵默认值。重新运行时,说明四个解析后的值,但不提供重置自定义角色通道的选项。
5. Probe the four requested pairs
5. 探测四个选定的配置对
Probe only the four selected pairs. Run one probe per family, even when two families share a provider. Do not enumerate or offer older models as substitutes. A failed probe writes nothing: report the failing pair and provider, stop, and keep the active sheet plus parent integration bytes unchanged. A failed first run creates neither artifact.
provider:model@effort| Family | Pair source | Claude parent route | Codex parent route | Availability proof |
|---|---|---|---|---|
| Fable | Fable matrix row + selected effort | native Agent | Claude CLI | native one-turn probe or |
| Sol | Sol matrix row + selected effort | | native | |
| Grok | Grok matrix row + selected effort | Grok CLI | Grok CLI | |
| Opus | Opus matrix row + selected effort | native Agent | Claude CLI | native one-turn probe or |
Use a tiny read-only probe that returns a unique marker. A login-status command alone proves credentials, not that the requested model and effort flags run. Record native and external results separately. Never call the external launcher for the parent's own provider. On a Claude parent, the Fable and Opus probes are one-turn runs of the mapped agent. On a Codex parent, the Sol probe is native with the selected . Every other pair uses the external runner with the selected effort flag.
pstack-<stem>-<effort>spawn_agentreasoning_effortReceipts and native transcripts prove the requested effort and the route. They do not prove a provider's hidden applied reasoning depth. There is no implicit timeout, weaker-model fallback, same-provider external fallback, or second mutable configuration source.
仅探测四个选定的配置对。每个模型族运行一次探测,即使两个模型族共享同一个提供商。请勿枚举或提供旧模型作为替代。探测失败时不写入任何内容:报告失败的配置对和提供商,停止操作,保持当前生效的配置表和父级集成内容不变。首次运行失败时不会创建任何产物。
provider:model@effort| 模型族 | 配置对来源 | Claude父级路由 | Codex父级路由 | 可用性证明 |
|---|---|---|---|---|
| Fable | Fable矩阵行 + 选定的推理强度 | 原生Agent | Claude CLI | 原生单轮探测,或 |
| Sol | Sol矩阵行 + 选定的推理强度 | | 原生 | |
| Grok | Grok矩阵行 + 选定的推理强度 | Grok CLI | Grok CLI | |
| Opus | Opus矩阵行 + 选定的推理强度 | 原生Agent | Claude CLI | 原生单轮探测,或 |
使用一个返回唯一标记的小型只读探测。仅登录状态命令只能证明凭证有效,不能证明请求的模型和推理强度参数可以正常运行。分别记录原生和外部探测结果。绝对不要为父级自身的提供商调用外部启动器。在Claude父级中,Fable和Opus的探测是通过运行映射的 Agent进行单轮执行。在Codex父级中,Sol的探测是使用选定的参数调用原生。所有其他配置对都使用外部运行器,并传入选定的推理强度参数。
pstack-<stem>-<effort>reasoning_effortspawn_agent调用回执和原生运行记录可以证明请求的推理强度和路由是正确的。它们不能证明提供商隐藏的实际推理深度。不存在隐式超时、弱模型降级、同提供商外部降级或第二个可修改的配置源。
6. Render, preserving role families
6. 生成配置表(保留角色-模型族关系)
Build the new sheet in memory. Do not write it yet.
- First run: start from the complete role assignments in step 7.
- Rerun: start from the normalized complete role map from step 2, preserving each loaded row's lane order and family (or alias) per lane.
After effort selection, ask whether to keep those role-to-family assignments or change named roles. Keeping them is the default. Apply only role changes the operator names; never offer a reset of a customized sheet to the first-run assignments. A changed role may use one of the four probed matrix families, , or .
inherit-parentautoRequire the final role map to contain at least one descriptor from each matrix family. The sheet stores effort only in role descriptors, so an unassigned family's selection cannot persist without adding a second source of truth.
Rewrite every matrix-family descriptor to . Leave and unchanged. An effort-only rerun cannot change a role's family. Changing Grok's effort updates every Grok occurrence and does not move a Sol role onto Grok. Refuse an unqualified slug, an unavailable route, a model other than the four matrix families, or a provider/model mismatch.
provider:model@<requested effort for that family>inherit-parentauto在内存中构建新的配置表。暂不写入磁盘。
- 首次运行:从步骤7中的完整角色分配开始。
- 重新运行:从步骤2中归一化后的完整角色映射开始,保留每个已加载行的通道顺序以及每个通道对应的模型族(或别名)。
推理强度选择完成后,询问是保留当前的角色-模型族分配,还是修改指定角色的分配。默认选项为保留。仅应用操作人员明确指定的角色修改;绝对不要提供将自定义配置表重置为首次运行分配的选项。修改后的角色可以使用四个已探测的矩阵模型族之一、或。
inherit-parentauto要求最终的角色映射至少包含每个矩阵模型族的一个描述符。配置表仅在角色描述符中存储推理强度,因此如果不添加第二个真值源,未分配模型族的选择将无法持久化。
将所有矩阵模型族的描述符重写为格式。和保持不变。仅修改推理强度的重运行不能更改角色的模型族。修改Grok的推理强度会更新所有Grok相关的角色,但不会将Sol角色切换为Grok。拒绝不符合要求的slug、不可用的路由、四个矩阵模型族之外的模型,以及提供商/模型不匹配的情况。
provider:model@<该模型族的请求推理强度>inherit-parentauto7. Confirm and commit
7. 确认并提交
Show any rolling-alias migrations as original and normalized descriptors. Then show the route table for this parent and every rendered role and descriptor. Ask for confirmation before writing.
Why and Reflect require the parent's live MCP surface. Keep their investigator, reviewer, and synthesizer roles on or ; the bounded external runner deliberately omits ambient MCPs. and always validate, but say when they reduce a panel's provider diversity. For panel roles, one lane runs per entry. The list length is the fan-out count. is a list from which Arena chooses a provider different from the parent and base candidate when possible. is the default for every worker unless a race explicitly assigns another descriptor.
inherit-parentautoinherit-parentautoarena cross-judge poolswarm workersEvery non-alias value must match and must have passed step 5.
<provider>:<model>@<effort>After the operator confirms, write the in-memory render from step 6. Never paste the example below as the result. It is only the complete first-run role map used to seed step 2; selected efforts and explicit role changes always replace its example values before writing.
markdown
undefined展示所有滚动别名迁移的原始描述符和归一化后描述符。然后展示该父级对应的路由表,以及所有生成的角色和描述符。写入前请请求确认。
Why和Reflect功能需要父级的实时MCP接口。请将它们的调查员、评审员和合成器角色保持为或;受限的外部运行器会故意省略环境MCP。和始终可以通过验证,但需要说明它们是否会降低面板的提供商多样性。对于面板角色,每个条目运行一个通道。列表长度即为扇出数。是一个列表,Arena会尽可能从中选择与父级和基础候选者不同的提供商。是所有工作节点的默认配置,除非竞态任务明确分配了其他描述符。
inherit-parentautoinherit-parentautoarena cross-judge poolswarm workers所有非别名值都必须符合格式,且必须已通过步骤5的探测。
<provider>:<model>@<effort>操作人员确认后,写入步骤6中在内存里生成的配置表。绝对不要将下面的示例直接作为结果粘贴。它仅用于为步骤2提供初始的完整首次运行角色映射;在写入前,选定的推理强度和明确的角色修改始终会替换示例中的值。
markdown
undefinedpstack model configuration
pstack model configuration
Provider-qualified per-role choices. Read the installed pstack provider-dispatch reference before dispatching a configured role. Every documented role remains present. and use the parent model natively and still count as one panel lane.
inherit-parentautofeature, refactoring: grok:grok-4.6@xhigh
bug-fix: codex:gpt-5.6-sol@max
perf-issue: codex:gpt-5.6-sol@max
hillclimb: codex:gpt-5.6-sol@max
judgment and prose: claude:fable@max
hardest tasks: claude:fable@max
how explorer: grok:grok-4.6@xhigh
how explainer: claude:fable@max
why investigators, synthesizer: inherit-parent
reflect tooling, judgment, divergent, synthesizer: inherit-parent
arena runners: claude:fable@max, codex:gpt-5.6-sol@max, grok:grok-4.6@xhigh, claude:opus@xhigh
arena cross-judge pool: claude:fable@max, codex:gpt-5.6-sol@max, grok:grok-4.6@xhigh, claude:opus@xhigh
swarm workers: grok:grok-4.6@xhigh
architect runners: claude:fable@max, codex:gpt-5.6-sol@max, grok:grok-4.6@xhigh, claude:opus@xhigh
interrogate reviewers: claude:fable@max, codex:gpt-5.6-sol@max, grok:grok-4.6@xhigh, claude:opus@xhigh
undefinedProvider-qualified per-role choices. Read the installed pstack provider-dispatch reference before dispatching a configured role. Every documented role remains present. and use the parent model natively and still count as one panel lane.
inherit-parentautofeature, refactoring: grok:grok-4.6@xhigh
bug-fix: codex:gpt-5.6-sol@max
perf-issue: codex:gpt-5.6-sol@max
hillclimb: codex:gpt-5.6-sol@max
judgment and prose: claude:fable@max
hardest tasks: claude:fable@max
how explorer: grok:grok-4.6@xhigh
how explainer: claude:fable@max
why investigators, synthesizer: inherit-parent
reflect tooling, judgment, divergent, synthesizer: inherit-parent
arena runners: claude:fable@max, codex:gpt-5.6-sol@max, grok:grok-4.6@xhigh, claude:opus@xhigh
arena cross-judge pool: claude:fable@max, codex:gpt-5.6-sol@max, grok:grok-4.6@xhigh, claude:opus@xhigh
swarm workers: grok:grok-4.6@xhigh
architect runners: claude:fable@max, codex:gpt-5.6-sol@max, grok:grok-4.6@xhigh, claude:opus@xhigh
interrogate reviewers: claude:fable@max, codex:gpt-5.6-sol@max, grok:grok-4.6@xhigh, claude:opus@xhigh
undefined8. Wire it in
8. 接入父级环境
Render the parent integration in memory before either write. On Claude, the integration is the single include in . On Codex, it is the exact sheet bytes between one and pair in . Replace that whole bounded block on a rerun. Insert one block at the end on first run. If either marker is missing, duplicated, or reversed, stop and report inconsistent state instead of guessing a boundary.
@~/.claude/pstack-models.md~/.claude/CLAUDE.md<!-- pstack:models:begin --><!-- pstack:models:end -->~/.codex/AGENTS.mdSnapshot every target's current bytes. Write the sheet and parent integration only after all four probes pass and the operator confirms. Read both targets back and compare them with the in-memory render. If either write or readback fails, restore every snapshot and report the failure. An unchanged rerun must produce byte-identical sheet and integration content after normalization.
Do not copy the model sheet between harnesses without rerunning the parent-specific probes; route availability can differ even on the same host.
在执行任何写入操作前,先在内存中生成父级集成内容。对于Claude,集成内容是中的一行包含语句。对于Codex,集成内容是中一对和之间的完整配置表内容。重新运行时会替换整个边界块。首次运行时在文件末尾插入一个块。如果任何一个标记缺失、重复或顺序颠倒,请停止并报告不一致状态,不要猜测边界位置。
~/.claude/CLAUDE.md@~/.claude/pstack-models.md~/.codex/AGENTS.md<!-- pstack:models:begin --><!-- pstack:models:end -->对每个目标文件的当前内容进行快照。仅当所有四个探测都通过且操作人员确认后,才写入配置表和父级集成内容。回读两个目标文件并与内存中的生成内容进行比较。如果写入或回读失败,恢复所有快照并报告失败。未做修改的重运行在归一化后必须生成与原内容字节完全一致的配置表和集成内容。
请勿在不同宿主环境之间直接复制模型配置表而不重新运行对应父级的探测;即使在同一台主机上,路由的可用性也可能不同。
9. Behavioral smoke
9. 行为冒烟验证
Before declaring setup complete, run one small read-only mixed panel from this parent: all four chosen descriptors, distinct output/receipt paths, and an independent cross-judge. Launch Claude-native agents and every external process in the background with retained handles, then drain them. Verify the native transcript entries and every external receipt. A structural config check or unit test is not a substitute.
Report the sheet path, parent route table, requested-effort probe results, smoke results, and external elapsed/token/cost receipts. Re-running this skill re-probes and updates the same sheet. Do not claim the provider exposed hidden applied-effort observability.
在宣布设置完成前,请从该父级运行一个小型只读混合模型面板:包含所有四个选定的描述符、不同的输出/回执路径,以及一个独立的交叉评审。将Claude原生Agent和所有外部进程在后台启动并保留句柄,然后等待全部执行完成并收集结果。验证原生运行记录条目和所有外部回执。结构配置检查或单元测试不能替代冒烟验证。
报告配置表路径、父级路由表、请求推理强度的探测结果、冒烟验证结果,以及外部调用的耗时/Token/成本回执。重新运行本skill会重新探测并更新同一份配置表。请勿声称提供商暴露了隐藏的实际推理强度可观测性。