diff --git a/pstack/.cursor-plugin/plugin.json b/pstack/.cursor-plugin/plugin.json index e44346ad..e6204341 100644 --- a/pstack/.cursor-plugin/plugin.json +++ b/pstack/.cursor-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "pstack", "displayName": "pstack", - "version": "0.11.7", + "version": "0.11.8", "description": "if you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence.", "author": { "name": "Lauren Tan" diff --git a/pstack/skills/architect/SKILL.md b/pstack/skills/architect/SKILL.md index 470eb012..8bfde568 100644 --- a/pstack/skills/architect/SKILL.md +++ b/pstack/skills/architect/SKILL.md @@ -30,7 +30,7 @@ Skip Phase A only when the work is genuinely greenfield with no surrounding syst Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt. Each candidate produces a design package shaped per `references/rationale-template.md`: the caller's usage written first, then the type sketch, function signatures, module map, and prose rationale derived from it. -Use your configured `architect runners`. The routed **how** and **arena** skills resolve model values per `~/.cursor/rules/pstack-models.mdc`, including omitting Task `model` for `inherit-parent`/`auto`. If the role line is absent, use defaults `claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.5-fast-xhigh`. +Use your configured architect runners (defaults `claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.5-fast-xhigh`). This is the **exhaust-the-design-space** principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape. diff --git a/pstack/skills/arena/SKILL.md b/pstack/skills/arena/SKILL.md index 207cb806..88ec51b6 100644 --- a/pstack/skills/arena/SKILL.md +++ b/pstack/skills/arena/SKILL.md @@ -25,7 +25,7 @@ The N candidates will receive the same prompt, so the prompt is the contract. Ge 1. State the artifact each candidate is producing. 2. Derive the rubric. State what success looks like for *this* task, then turn it into 3-6 concrete gradeable criteria. Concrete: `Adds a --dry-run flag that skips writes`. Vague: `code is correct`. The rubric is the picker's tool in Phase D; candidates only see the task. -3. Pick the runners. Resolve each entry in your configured `arena runners` list per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. If the role line is absent, use defaults `claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.5-fast-xhigh`. If every entry is `inherit-parent`/`auto`, keep the same fan-out count and omit `model` for every runner. Spawn more when the arena covers multiple design directions. Same model N times when the work is generation-bound rather than judgment-sensitive. +3. Pick the runners. Use `arena runners` from `~/.cursor/rules/pstack-models.mdc` when present. Otherwise default to one each on `claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.5-fast-xhigh`. Spawn more when the arena covers multiple design directions. Same model N times when the work is generation-bound rather than judgment-sensitive. 4. Assign output paths. Each candidate writes to its own location (a git worktree where possible, otherwise `/tmp/arena-/candidate-/`). N candidates writing to the same path is shared mutable state and fails the the **separate-before-serializing-shared-state** principle skill test. ## Phase B: Fan out @@ -38,9 +38,7 @@ If a candidate fails to produce output, proceed with N-1 and note the dropout in ## Phase C: Cross-judge -After all Phase B candidates complete, choose one value from the configured `arena cross-judge pool` in `~/.cursor/rules/pstack-models.mdc`. If the role line is absent, choose from defaults `claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.5-fast-xhigh`. Prefer a model family different from the parent's when possible. Pass a selected real slug as Task `model`. For selected `inherit-parent`/`auto`, omit `model`. A pool containing only `inherit-parent`/`auto` cannot provide a different family; still spawn the judge with `model` omitted. - -Spawn one readonly judge subagent with the resolved value. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with the parent's reading in Phase D, not with the candidates themselves. Spawning while candidates are still writing means the judge sees partial or empty outputs and reports them as dropouts. +After all Phase B candidates complete, choose one model from the `arena cross-judge pool` in `~/.cursor/rules/pstack-models.mdc` when present. Otherwise use `claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.5-fast-xhigh`. Prefer a different model family from the parent's. Spawn one readonly judge subagent on that model. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with the parent's reading in Phase D, not with the candidates themselves. Spawning while candidates are still writing means the judge sees partial or empty outputs and reports them as dropouts. ## Phase D: Pick a base diff --git a/pstack/skills/how/SKILL.md b/pstack/skills/how/SKILL.md index 4e9076dc..941655be 100644 --- a/pstack/skills/how/SKILL.md +++ b/pstack/skills/how/SKILL.md @@ -45,7 +45,7 @@ The right decomposition depends on the question. Use your judgment. Narrow quest Spawn all explorers in a single message: - `subagent_type`: `generalPurpose` -- `model`: resolve the configured `how explorer` role per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. If the role line is absent, default to `grok-4.5-fast-xhigh`. +- `model`: your configured how-explorer model (default `grok-4.5-fast-xhigh`) - `readonly`: `true` Each explorer gets the same base prompt from `references/explorer-prompt.md` plus a specific exploration angle naming its slice. Each explorer should: @@ -64,7 +64,7 @@ Then proceed to Step 3. Spawn a single Task subagent that explores and explains in one pass: - `subagent_type`: `generalPurpose` -- `model`: resolve the configured `how explainer` role per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. If the role line is absent, default to `claude-fable-5-thinking-max`. +- `model`: your configured how-explainer model (default `claude-fable-5-thinking-max`) - `readonly`: `true` The agent does its own exploration (Glob, Grep, Read) and writes the explanation directly. Read `references/explainer-prompt.md` for the communication style and output format. Same structure, just no explorer findings as input. @@ -76,7 +76,7 @@ Proceed to Step 4. Once all explorers return, spawn a single Task subagent to synthesize their findings into one coherent explanation: - `subagent_type`: `generalPurpose` -- `model`: resolve the configured `how explainer` role per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. If the role line is absent, default to `claude-fable-5-thinking-max`. +- `model`: your configured how-explainer model (default `claude-fable-5-thinking-max`) - `readonly`: `true` The explainer gets all explorers' findings and writes the human-facing explanation (output format below). Read `references/explainer-prompt.md` for the full prompt template. The explainer reconciles overlapping findings, resolves contradictions, and weaves the slices into a unified picture. @@ -109,11 +109,11 @@ Run the full explain flow above (Steps 1-4). You must understand the architectur ### Step 2. Spawn Critics -After the explanation is complete, spawn one architectural critic per entry in your configured `how critics` list, all in a single message. If the role line is absent, use defaults `claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.5-fast-xhigh`. +After the explanation is complete, spawn one architectural critic per model in your configured how-critics list (defaults `claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.5-fast-xhigh`), all in a single message. For each critic: - `subagent_type`: `generalPurpose` -- `model`: resolve that `how critics` entry per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. Real slugs are minimum reasoning levels, and the lead should escalate them when the architecture warrants deeper analysis. +- `model`: one model from the configured how-critics list. These are minimum reasoning levels. The lead should escalate any model when the architecture warrants deeper analysis. - `readonly`: `true` Read `references/critic-prompt.md` for the prompt template. Each critic gets: diff --git a/pstack/skills/interrogate/SKILL.md b/pstack/skills/interrogate/SKILL.md index 7b0f48ac..9bd91043 100644 --- a/pstack/skills/interrogate/SKILL.md +++ b/pstack/skills/interrogate/SKILL.md @@ -33,14 +33,20 @@ Write one clear paragraph. Reviewers challenge whether the work achieves the int ## Step 3, Spawn Reviewers -Launch one reviewer per entry in your configured `interrogate reviewers` list, all in a single message. If the role line is absent, use defaults `claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.5-fast-xhigh`. +Launch all reviewers in a single message using the Task tool. Use the `interrogate reviewers` list from `~/.cursor/rules/pstack-models.mdc` when present, one reviewer per entry, extending or shrinking the Reviewer A/B/C labels below to the configured entry count; otherwise use the table defaults. + +| Subagent | Default model | +|----------|---------------| +| Reviewer A | `claude-fable-5-thinking-max` | +| Reviewer B | `gpt-5.6-sol-max` | +| Reviewer C | `grok-4.5-fast-xhigh` | For each reviewer: - `subagent_type`: `generalPurpose` -- `model`: resolve that `interrogate reviewers` entry per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. +- `model`: the configured `interrogate reviewers` entry, or the table default with no configured line - `readonly`: `true` -If a resolved real model slug is rejected as unresolvable when you try to spawn the subagent, check the valid slugs in the Task tool's error message, pick the closest equivalent (prefer the highest-reasoning tier of the same family), spawn with the valid slug, and open a separate PR to update the configured defaults. Do not block the review on the slug issue. If the configured value is `inherit-parent` or `auto`, omit `model` instead. Never treat those aliases as slugs or enter this fallback for them. +If a model slug is rejected as unresolvable when you try to spawn the subagent, check the valid slugs in the Task tool's error message, pick the closest equivalent (prefer the highest-reasoning tier of the same family), spawn with the valid slug, and open a separate PR to update the configured value or default table. Do not block the review on the slug issue. If the configured value is `inherit-parent` or `auto`, omit `model` instead; never treat those aliases as broken slugs or enter this fallback for them. Read `references/reviewer-prompt.md` and fill in the template with: 1. The stated intent @@ -88,7 +94,7 @@ Present the verdict in this structure: > [The stated intent paragraph from Step 2] ### Reviewers -List each reviewer on its own line like `- : [N findings]` +- Reviewer [label]: [model name], [N findings] (one bullet per reviewer) ### Act On [Findings that should be addressed. For each: description, which models raised it, why it matters.] diff --git a/pstack/skills/interrogate/references/lead-judgment.md b/pstack/skills/interrogate/references/lead-judgment.md index 99775115..ea6262eb 100644 --- a/pstack/skills/interrogate/references/lead-judgment.md +++ b/pstack/skills/interrogate/references/lead-judgment.md @@ -1,6 +1,6 @@ # Lead Judgment Framework -You are the lead reviewer. The model reviewers have produced their findings. Apply pragmatic engineering judgment. Don't aggregate; filter, contextualize, and decide. +You are the lead reviewer. The configured reviewers have produced their findings. Apply pragmatic engineering judgment. Don't aggregate; filter, contextualize, and decide. ## Why This Step Matters diff --git a/pstack/skills/poteto-mode/SKILL.md b/pstack/skills/poteto-mode/SKILL.md index b926754e..304f2b01 100644 --- a/pstack/skills/poteto-mode/SKILL.md +++ b/pstack/skills/poteto-mode/SKILL.md @@ -84,7 +84,7 @@ Read the leaf skill in full for any principle you apply. Each entry names when i **Use `subagent_type: "poteto-agent"` for any subagent you spawn inside a playbook step** (code-writing delegates, ad-hoc helpers). `/poteto-mode` and `poteto-agent` route through the same wrapper. Routed workflow skills (`how`, `why`, `interrogate`, `reflect`) set their own `subagent_type` for diverse-model review; respect what the skill prescribes, don't override to `poteto-agent`. -**Defaults for every `Task` call.** `run_in_background: true`, agent mode (readonly strips MCP), file pointers not inlined context, and a per-role model from the `/setup-pstack` rule. Pass a real slug as `model`. For `inherit-parent`/`auto`, omit `model` so the subagent inherits the parent chat model. If a role line is absent, default to `grok-4.5-fast-xhigh` for code and `claude-fable-5-thinking-max` for prose and judgment. Code delegates tier by difficulty. The hardest changes (cross-cutting design, gnarly concurrency, subtle algorithms) go to your strongest judgment model (`claude-fable-5-thinking-max`) when the task needs judgment or the intent is vague, and to your strongest instruction-following model (`gpt-5.6-sol-max`) when the work is a precisely specified sequence of steps to execute to the letter; trivial mechanical edits go to your fast code model. Per-role lines in the `/setup-pstack` rule override these defaults and the model choices in the routed skills (`how`, `why`, `arena`, `architect`, `interrogate`, `reflect`); a role with no line keeps its default. +**Defaults for every `Task` call.** `run_in_background: true`, agent mode (readonly strips MCP), file pointers not inlined context, explicit model per role (configurable via `/setup-pstack`; defaults `grok-4.5-fast-xhigh` for code, `claude-fable-5-thinking-max` for prose and judgment). Code delegates tier by difficulty. The hardest changes (cross-cutting design, gnarly concurrency, subtle algorithms) go to your strongest judgment model (`claude-fable-5-thinking-max`) when the task needs judgment or the intent is vague, and to your strongest instruction-following model (`gpt-5.6-sol-max`) when the work is a precisely specified sequence of steps to execute to the letter; trivial mechanical edits go to your fast code model. Per-role lines in the `/setup-pstack` rule override these defaults and the model choices in the routed skills (`how`, `why`, `arena`, `architect`, `interrogate`, `reflect`); a role with no line keeps its default, and a role line of `inherit-parent` or `auto` runs that role on the parent chat model (omit Task `model`). You own every subagent's work. Review the diff and write your own summary, don't pass through what it said. Interrupt-chained resumes silently drop directives, so fire a fresh subagent with consolidated scope rather than trusting a "done" summary. A second opinion is the same prompt against a different model. Agreement is high-signal. diff --git a/pstack/skills/reflect/SKILL.md b/pstack/skills/reflect/SKILL.md index e41130cf..a0e50f7e 100644 --- a/pstack/skills/reflect/SKILL.md +++ b/pstack/skills/reflect/SKILL.md @@ -34,21 +34,19 @@ For each candidate, read the first JSONL line and check that `message.content[0] ### 2. Spawn three reviewers in parallel -One message, three `Task` calls, `subagent_type: generalPurpose`, model resolved per role, agent mode (`readonly: false`). Reviewers need MCP access for context lookups (tickets, chat threads, observability traces referenced in the transcript); readonly strips MCPs. The prompt forbids file writes; the parent applies edits. - -Resolve each role in the table per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. If the role line is absent, use the listed default. +One message, three `Task` calls, `subagent_type: generalPurpose`, explicit `model:` on each, agent mode (`readonly: false`). Reviewers need MCP access for context lookups (tickets, chat threads, observability traces referenced in the transcript); readonly strips MCPs. The prompt forbids file writes; the parent applies edits. | Lens | `model` | Prompt template | |---|---|---| -| Judgment | `reflect judgment, divergent, synthesizer` (default `claude-fable-5-thinking-max`) | `references/judgment-reviewer.md` | -| Tooling | `reflect tooling` (default `gpt-5.6-sol-max`) | `references/tooling-reviewer.md` | -| Divergent | `reflect judgment, divergent, synthesizer` (default `claude-fable-5-thinking-max`) | `references/divergent-reviewer.md` | +| Judgment | your configured reflect-judgment model (default `claude-fable-5-thinking-max`) | `references/judgment-reviewer.md` | +| Tooling | your configured reflect-tooling model (default `gpt-5.6-sol-max`) | `references/tooling-reviewer.md` | +| Divergent | your configured reflect-judgment model (default `claude-fable-5-thinking-max`) | `references/divergent-reviewer.md` | Pass each template verbatim, substituting the transcript path or digest where marked. Reviewers return findings in the `Task` response body. ### 3. Synthesize -One `Task` call, `subagent_type: generalPurpose`, using the configured `reflect judgment, divergent, synthesizer` role. Resolve it per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. If the role line is absent, default to `claude-fable-5-thinking-max`. Use agent mode (`readonly: false`). The synthesizer's quality check includes spot-verifying citations, which can require MCP access; readonly strips MCPs. Use `references/synthesizer.md` verbatim, with each reviewer's full output inlined where marked. The synthesizer returns a structured Accepted / Rejected / Backlog list. +One `Task` call, `subagent_type: generalPurpose`, using your configured reflect-judgment model (default `claude-fable-5-thinking-max`), agent mode (`readonly: false`). The synthesizer's quality check includes spot-verifying citations, which can require MCP access; readonly strips MCPs. Use `references/synthesizer.md` verbatim, with each reviewer's full output inlined where marked. The synthesizer returns a structured Accepted / Rejected / Backlog list. ### 4. Structural enforcement check diff --git a/pstack/skills/setup-pstack/SKILL.md b/pstack/skills/setup-pstack/SKILL.md index a22eb0fb..762f4d7e 100644 --- a/pstack/skills/setup-pstack/SKILL.md +++ b/pstack/skills/setup-pstack/SKILL.md @@ -7,13 +7,11 @@ description: Configure which models pstack uses per role. Detects your available Write `~/.cursor/rules/pstack-models.mdc`, an always-applied rule that sets pstack's model per role. The skills read it and fall back to their inline defaults when a line is absent, so this is an override layer, not a requirement. -`inherit-parent` and `auto` are aliases. Either value means omit `model` from the Task call so the subagent inherits the parent chat model. Auto-plan users can use either value to stay on Auto. Do not invent an Auto Task slug. - ## Steps ### 1. Detect available models -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 real slugs, still offer `inherit-parent` / `auto` and ask the user to paste any real slugs they want to use. The aliases are always valid and do not need to appear in the detected slug set. Never write a real slug you have not confirmed is available. +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. ### 2. Load current state @@ -21,11 +19,11 @@ The default role-to-model mapping is the rule shape shown in step 5 below. If `~ ### 3. Map and confirm -Show every role with its current model, marking any real slug that is 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` / `auto` as options. Label the aliases as "inherit parent chat model (Auto)." Prefer AskQuestion over free text. For panel roles (how critics, arena runners, architect runners, interrogate reviewers) the value is a list, and one subagent runs per entry, so the list length sets the count. `arena cross-judge pool` is also a list, but Arena selects one entry from it whose family differs from the parent's when possible. +Show every role with its current 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 (how critics, 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. ### 4. Validate -Require detected-set membership only for real slugs. `inherit-parent` and `auto` always pass validation. If a chosen real slug is not available, stop and ask again. A rule pointing at a model the user cannot use breaks every delegation that reads it. +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. A rule pointing at a model the user cannot use breaks every delegation that reads it. ### 5. Write the rule @@ -36,12 +34,8 @@ Write `~/.cursor/rules/pstack-models.mdc` with `alwaysApply: true` and one line description: pstack per-role model choices (overrides skill defaults) alwaysApply: true --- -# Resolve each role value before every Task spawn: -# - a real model slug → pass it as Task `model` -# - `inherit-parent` or `auto` → OMIT the `model` field entirely so the subagent inherits the parent chat model -# - never substitute a skill's inline default when the role line is set to inherit-parent/auto -# Panel roles (lists): inherit-parent/auto on every entry keeps fan-out count but loses model diversity (all runners share the parent model). That is intentional for Auto-only users. # 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. feature, refactoring: grok-4.5-fast-xhigh bug-fix: gpt-5.6-sol-max perf-issue: gpt-5.6-sol-max diff --git a/pstack/skills/why/SKILL.md b/pstack/skills/why/SKILL.md index 22e87783..0be90443 100644 --- a/pstack/skills/why/SKILL.md +++ b/pstack/skills/why/SKILL.md @@ -117,7 +117,7 @@ Launch all matching investigators in a single message so they run concurrently. Subagent config (each): - `subagent_type`: `generalPurpose` -- `model`: resolve the configured `why investigators` role per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. If the role line is absent, default to `grok-4.5-fast-xhigh`. +- `model`: your configured why-investigators model (default `grok-4.5-fast-xhigh`) - `readonly`: `false` (agent mode). **Do not use readonly/Ask mode.** It strips MCP access, which disables MCP-backed investigators entirely. The source control investigator would be safe in readonly, but keep modes uniform. Investigators still shouldn't write anything. That's a posture, not a sandbox. Each investigator gets: @@ -163,7 +163,7 @@ If your scope assessment suggests a single-commit trivial target where the PR de Spawn one synthesizer subagent: - `subagent_type`: `generalPurpose` -- `model`: resolve the configured `why synthesizer` role per `~/.cursor/rules/pstack-models.mdc`. Pass a real slug as `model`. Omit `model` for `inherit-parent`/`auto`. If the role line is absent, default to `claude-fable-5-thinking-max`. +- `model`: your configured why-synthesizer model (default `claude-fable-5-thinking-max`) - `readonly`: `false` (agent mode). The synthesizer's quality check spot-verifies citations, which can require MCP access. Readonly/Ask mode strips MCPs and defeats that. The synthesizer gets: