From 5551cf21d2d09d8c05cba67953226b63d0a62455 Mon Sep 17 00:00:00 2001 From: Kaitian Xie Date: Sun, 18 Oct 2026 22:39:26 +0800 Subject: [PATCH] guard undetected rule slugs; cover cloud profile gaps - rule values were mapped to pstack-M / pstack-M-ro profiles on the assumption they are real slugs; a hand-edited or stale rule entry (e.g. a dotted grok-4.7-... or a suffix the family lacks) produced a junk profile plus a failed spawn before the rejected-slug fallback rescued it. treat undetected entries as rejected slugs up front and never provision a profile for them (arena x2, swarm, interrogate, how, why, reflect, poteto-mode). - poteto-mode, no-comments: plugin subagent profiles don't load in cloud Devin sessions, so pstack:poteto-agent and pstack:comment-sicko don't resolve there. name the subagent_general substitute instead of failing on a missing profile. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- skills/arena/SKILL.md | 4 ++-- skills/how/SKILL.md | 2 +- skills/interrogate/SKILL.md | 2 +- skills/no-comments/SKILL.md | 2 +- skills/poteto-mode/SKILL.md | 4 ++-- skills/reflect/SKILL.md | 2 +- skills/swarm/SKILL.md | 2 +- skills/why/SKILL.md | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/skills/arena/SKILL.md b/skills/arena/SKILL.md index c3b4c65..499de16 100644 --- a/skills/arena/SKILL.md +++ b/skills/arena/SKILL.md @@ -14,7 +14,7 @@ Every candidate gets the same prompt, so the prompt is the contract. 1. State the artifact each candidate is producing. 2. Derive the rubric, 3-6 concrete gradeable criteria for what success looks like on *this* task. It is the picker's tool in Phase D. Candidates only see the task. -3. Pick the runners. Use the `arena runners` line in `~/.devin/rules/pstack-models.md`. If the rule or that line is missing, default to one each on `claude-opus-5-5-xhigh` and `swe-2-high`. Map each entry to the spawn's `profile`: a real slug `M` becomes `pstack-M`, and `auto` or `inherit-parent` means the parent model, so use `subagent_general` for it. Create a missing `pstack-M` profile per `/pstack:setup-pstack`. If a pinned slug is rejected at spawn, run that seat on its family's default and say so. Families go by prefix: `claude-*`, `gpt-*`, `swe-*`, `gemini-*`, plus the short aliases (`opus`, `sonnet`, `swe`, `codex`, `gpt`, `gemini`). With no family match, use `claude-opus-5-5-xhigh`. If it rejects a default, use the closest valid slug of the same family `devin models list` reports. Spawn more runners when the arena covers multiple design directions. Use the same model N times when the work is generation-bound rather than judgment-sensitive. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. +3. Pick the runners. Use the `arena runners` line in `~/.devin/rules/pstack-models.md`. If the rule or that line is missing, default to one each on `claude-opus-5-5-xhigh` and `swe-2-high`. Map each entry to the spawn's `profile`: a real slug `M` becomes `pstack-M`, and `auto` or `inherit-parent` means the parent model, so use `subagent_general` for it. Create a missing `pstack-M` profile per `/pstack:setup-pstack`. An entry `devin models list` doesn't report counts as a rejected slug; never create a profile for it. If a pinned slug is rejected at spawn, run that seat on its family's default and say so. Families go by prefix: `claude-*`, `gpt-*`, `swe-*`, `gemini-*`, plus the short aliases (`opus`, `sonnet`, `swe`, `codex`, `gpt`, `gemini`). With no family match, use `claude-opus-5-5-xhigh`. If it rejects a default, use the closest valid slug of the same family `devin models list` reports. Spawn more runners when the arena covers multiple design directions. Use the same model N times when the work is generation-bound rather than judgment-sensitive. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. 4. Give each candidate its own output location (a git worktree where possible, otherwise `/tmp/arena-/candidate-/`), per the **separate-before-serializing-shared-state** principle skill. ## Phase B: Fan out @@ -25,7 +25,7 @@ If a candidate produces no output, proceed with N-1 and note the dropout. ## Phase C: Cross-judge -After all Phase B candidates complete, choose one model from the `arena cross-judge pool` line in `~/.devin/rules/pstack-models.md`. If the rule or that line is missing, choose from `claude-opus-5-5-xhigh` and `swe-2-high`. Prefer a different model family from the parent's. Spawn one read-only judge subagent on it (`pstack-M-ro`, or `subagent_explore` for `auto`/`inherit-parent`). It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with your reading in Phase D. Don't spawn it while candidates are still writing. +After all Phase B candidates complete, choose one model from the `arena cross-judge pool` line in `~/.devin/rules/pstack-models.md`. If the rule or that line is missing, choose from `claude-opus-5-5-xhigh` and `swe-2-high`. Prefer a different model family from the parent's. Spawn one read-only judge subagent on it (`pstack-M-ro`, or `subagent_explore` for `auto`/`inherit-parent`). An entry `devin models list` doesn't report counts as a rejected slug; never create a profile for it. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with your reading in Phase D. Don't spawn it while candidates are still writing. ## Phase D: Pick a base diff --git a/skills/how/SKILL.md b/skills/how/SKILL.md index 980ed16..efe616a 100644 --- a/skills/how/SKILL.md +++ b/skills/how/SKILL.md @@ -8,7 +8,7 @@ triggers: [user] Explore the codebase to answer "how does X work?" questions. Produce architectural explanations at the level of a senior engineer onboarding onto a subsystem, enough to build a working mental model, not so much that it reads like annotated source code. -Every spawn is a read-only `run_subagent` subagent. Explorers use the `how explorer` line in the `pstack-models.md` rule (default `swe-2-high`), and every explainer uses the `how explainer` line (default `claude-opus-5-5-xhigh`). Map each role's value to the spawn's `profile`: a real slug `M` becomes `pstack-M-ro`; `auto`, `inherit-parent`, or a missing rule or line uses `subagent_explore`, or `subagent_general` with a read-only brief when the explorer needs `exec` or MCP. Create a missing `pstack-M-ro` profile per `/pstack:setup-pstack` rather than swapping models. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. +Every spawn is a read-only `run_subagent` subagent. Explorers use the `how explorer` line in the `pstack-models.md` rule (default `swe-2-high`), and every explainer uses the `how explainer` line (default `claude-opus-5-5-xhigh`). Map each role's value to the spawn's `profile`: a real slug `M` becomes `pstack-M-ro`; `auto`, `inherit-parent`, or a missing rule or line uses `subagent_explore`, or `subagent_general` with a read-only brief when the explorer needs `exec` or MCP. Create a missing `pstack-M-ro` profile per `/pstack:setup-pstack` rather than swapping models. An entry `devin models list` doesn't report counts as a rejected slug; never create a profile for it. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. ## 1. Assess complexity diff --git a/skills/interrogate/SKILL.md b/skills/interrogate/SKILL.md index fccd04c..5c6d9ef 100644 --- a/skills/interrogate/SKILL.md +++ b/skills/interrogate/SKILL.md @@ -31,7 +31,7 @@ Launch all reviewers in a single message with run_subagent, one per entry on the | Reviewer A | `claude-opus-5-5-xhigh` | | Reviewer B | `swe-2-high` | -Each reviewer is read-only and gets `profile` from its configured entry, or its table default when there is no configured line. A real slug `M` becomes `pstack-M-ro` (create it per `/pstack:setup-pstack` if missing). An `auto` or `inherit-parent` entry uses `subagent_explore`, so that reviewer runs on the parent-assigned default; use `subagent_general` with a read-only brief when the review needs `exec` or MCP. +Each reviewer is read-only and gets `profile` from its configured entry, or its table default when there is no configured line. A real slug `M` becomes `pstack-M-ro` (create it per `/pstack:setup-pstack` if missing). An entry `devin models list` doesn't report counts as a rejected slug; never create a profile for it. An `auto` or `inherit-parent` entry uses `subagent_explore`, so that reviewer runs on the parent-assigned default; use `subagent_general` with a read-only brief when the review needs `exec` or MCP. If a pinned slug is rejected at spawn, run that reviewer on its family's table default and say so. Families go by prefix: `claude-*`, `gpt-*`, `swe-*`, `gemini-*`, plus the short aliases (`opus`, `sonnet`, `swe`, `codex`, `gpt`, `gemini`). With no family match, use Reviewer A's default. If it rejects a table default, spawn with the closest equivalent `devin models list` reports (prefer the same family and reasoning tier), and open a separate PR to update the default table. Do not block the review on the slug issue. Never treat an alias entry as a rejected slug or apply either fallback to it. diff --git a/skills/no-comments/SKILL.md b/skills/no-comments/SKILL.md index f39e90d..ad74923 100644 --- a/skills/no-comments/SKILL.md +++ b/skills/no-comments/SKILL.md @@ -16,7 +16,7 @@ Use the caller's files or diff. Otherwise use the current diff against the base ## Steps -1. Spawn `run_subagent` with `profile: "pstack:comment-sicko"`. Pass the scope. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. Do not restate its rules. +1. Spawn `run_subagent` with `profile: "pstack:comment-sicko"`. Pass the scope. Plugin subagent profiles don't load in cloud Devin sessions; there read `agents/comment-sicko.md` from the installed plugin and pass its body as the brief to `subagent_general`, or run the pass inline when the file isn't reachable. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. Do not restate its rules. 2. Inspect its report and diff. Reject application-code edits, scope escapes, exception-protected deletions, misstated `MUST KILL` reasons, and flags that treat kept intentional code as guilty. Reshape flags on our-code surprises stay actionable. Do not restore those comments. A keep survives only with proof it is about something we cannot change. Audit missed scoped lint and TypeScript suppressions. Correctness or safety suppressions stay actionable `MUST KILL`s. Restore deletions only with exact exceptions and scoped proof. Before accepting thin `IMPORTANT` or `do not remove` kills or keeps, run `/pstack:how` or `/pstack:why` on their symbol. If a kill is ambiguous, do not restore. If a keep is refuted or still ambiguous, delete it. Revert and rerun one rejected report with the failure named. Reject a second, report it open, and fail `/pstack:no-comments`. 3. Fix trivial accepted flags directly by deleting a dead path, dropping a parameter, or using the real API. If any fix needs a shape, run `/pstack:architect` once for the accepted set and surrounding code. Stop at the sketch. Architect shapes. Step 4 implements. 4. Implement the smallest root-cause fix in scope. Remove every named workaround. If the root cause is out of scope, land the smallest in-scope fix and report the rest open. The **principle-fix-root-causes** and **principle-redesign-from-first-principles** skills guide intent only. Neither authorizes widening the fence nor fixing instances outside it. Never bolt on symptom guards. diff --git a/skills/poteto-mode/SKILL.md b/skills/poteto-mode/SKILL.md index 53145cd..076ee0f 100644 --- a/skills/poteto-mode/SKILL.md +++ b/skills/poteto-mode/SKILL.md @@ -88,9 +88,9 @@ Read the leaf skill in full for any principle you apply. Each entry names when i ## Subagents -**Use `profile: "pstack:poteto-agent"` for any subagent you spawn inside a playbook step** (code-writing delegates, ad-hoc helpers). The chat that receives `/pstack:poteto-mode` runs the playbook. Never spawn a `poteto-agent` to run the playbook itself. Routed workflow skills (`how`, `why`, `interrogate`, `reflect`, `swarm`) set their own `profile` for diverse-model review. Respect what the skill prescribes, don't override to `poteto-agent`. +**Use `profile: "pstack:poteto-agent"` for any subagent you spawn inside a playbook step** (code-writing delegates, ad-hoc helpers). The chat that receives `/pstack:poteto-mode` runs the playbook. Never spawn a `poteto-agent` to run the playbook itself. Plugin subagent profiles don't load in cloud Devin sessions, so there spawn delegates on `subagent_general` and open the brief with the same read-the-`poteto-mode`-SKILL.md-first instruction the profile carries. Routed workflow skills (`how`, `why`, `interrogate`, `reflect`, `swarm`) set their own `profile` for diverse-model review. Respect what the skill prescribes, don't override to `poteto-agent`. -**Defaults for every `run_subagent` call.** `is_background: true`, file pointers not inlined context, explicit model per role (configurable via `/pstack:setup-pstack`. Defaults `swe-2-high` for code, `claude-opus-5-5-xhigh` for prose and judgment). Devin takes a subagent's model from its profile, not a spawn flag, so a role's model becomes the `profile` argument: a real slug `M` maps to `pstack-M` for write work and `pstack-M-ro` for read-only, the model-pinning profiles `/pstack:setup-pstack` writes to `~/.config/devin/agents/`. A role line of `inherit-parent` or `auto` runs that role on the parent chat model: use `subagent_general` for write work and `subagent_explore` for read-only. If the `pstack-M` profile a role needs is missing, create it (see `/pstack:setup-pstack` for the two-file shape) rather than silently swapping models. `subagent_explore` is read-only without MCP or shell, so a read-only spawn that needs MCP lookups or commands uses `subagent_general` or `pstack-M` with a read-only brief. Code delegates tier by difficulty. The hardest changes (cross-cutting design, gnarly concurrency, subtle algorithms) go to your strongest judgment model (`claude-opus-5-5-xhigh`), whether the task needs judgment on vague intent or 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 `/pstack:setup-pstack` rule override these defaults and the model choices in the routed skills (`how`, `why`, `arena`, `swarm`, `architect`, `interrogate`, `reflect`). A role with no line keeps its default. Each code playbook's configured model comes from its line (`feature, refactoring`, `bug-fix`, `perf-issue`, or `hillclimb`), and the hardest changes read `hardest tasks`. Prose and judgment read `judgment and prose`. +**Defaults for every `run_subagent` call.** `is_background: true`, file pointers not inlined context, explicit model per role (configurable via `/pstack:setup-pstack`. Defaults `swe-2-high` for code, `claude-opus-5-5-xhigh` for prose and judgment). Devin takes a subagent's model from its profile, not a spawn flag, so a role's model becomes the `profile` argument: a real slug `M` maps to `pstack-M` for write work and `pstack-M-ro` for read-only, the model-pinning profiles `/pstack:setup-pstack` writes to `~/.config/devin/agents/`. A role line of `inherit-parent` or `auto` runs that role on the parent chat model: use `subagent_general` for write work and `subagent_explore` for read-only. If the `pstack-M` profile a role needs is missing, create it (see `/pstack:setup-pstack` for the two-file shape) rather than silently swapping models. Confirm each role value is a slug `devin models list` reports before mapping: a value it doesn't — a hand-edit, a stale rule, a dotted family form like `grok-4.7-…`, a suffix the family lacks — counts as a rejected slug. Use the role's default and say so, and never write a `pstack-M` profile for it. `subagent_explore` is read-only without MCP or shell, so a read-only spawn that needs MCP lookups or commands uses `subagent_general` or `pstack-M` with a read-only brief. Code delegates tier by difficulty. The hardest changes (cross-cutting design, gnarly concurrency, subtle algorithms) go to your strongest judgment model (`claude-opus-5-5-xhigh`), whether the task needs judgment on vague intent or 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 `/pstack:setup-pstack` rule override these defaults and the model choices in the routed skills (`how`, `why`, `arena`, `swarm`, `architect`, `interrogate`, `reflect`). A role with no line keeps its default. Each code playbook's configured model comes from its line (`feature, refactoring`, `bug-fix`, `perf-issue`, or `hillclimb`), and the hardest changes read `hardest tasks`. Prose and judgment read `judgment and prose`. **Match the model to the job.** Before each spawn, start from the role's line or default and pick the reasoning level and speed the job needs; Devin model slugs encode both (`claude-opus-5-5-xhigh` vs `-max`, `-fast` or `-lightning` or `-priority` for the fast lane). The `/pstack:setup-pstack` budget sets each role's starting level, xhigh by default. Raise it one step, up to max, for the hardest or subtlest work. Lower it one step for judgment and two or more steps for routine work. Use a fast variant only when the job is urgent, meaning CI or trunk is red or a person is blocked on the result right now. Otherwise use standard speed, the same family and level without the fast suffix. Verification is the exception and stays on the `swarm workers` model and speed (`swe-2-high` by default). Change only the effort level and whether the slug is fast, and keep the family the role names, so a diverse panel stays diverse. If the family has no slug at that level and speed, use its nearest slug, and pin that slug in the role's `pstack-` profile. A role on `auto` or `inherit-parent` stays on the parent model via `subagent_general` or `subagent_explore`. If a pinned slug is rejected at spawn, do not try another adjusted slug. Use the role's line or default and say so. diff --git a/skills/reflect/SKILL.md b/skills/reflect/SKILL.md index 711bfc7..4e238b6 100644 --- a/skills/reflect/SKILL.md +++ b/skills/reflect/SKILL.md @@ -26,7 +26,7 @@ Prefer the CLI transcript whose `id` matches this session. Otherwise order candi One message, three `run_subagent` calls. Reviewers need MCP access to look up the tickets, chat threads, and observability traces the transcript references, so do not use `subagent_explore` — it has no MCP tools. -Each reviewer and the synthesizer name a role line in the `pstack-models.md` rule and a default. Map the value to the spawn's `profile`: a real slug `M` becomes `pstack-M-ro`; `auto`, `inherit-parent`, or a missing rule or line uses `subagent_general` with a read-only brief. Create a missing `pstack-M-ro` profile per `/pstack:setup-pstack` rather than swapping models. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. +Each reviewer and the synthesizer name a role line in the `pstack-models.md` rule and a default. Map the value to the spawn's `profile`: a real slug `M` becomes `pstack-M-ro`; `auto`, `inherit-parent`, or a missing rule or line uses `subagent_general` with a read-only brief. Create a missing `pstack-M-ro` profile per `/pstack:setup-pstack` rather than swapping models. An entry `devin models list` doesn't report counts as a rejected slug; never create a profile for it. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. | Lens | Role line | Default `model` | Prompt template | |---|---|---|---| diff --git a/skills/swarm/SKILL.md b/skills/swarm/SKILL.md index 59eccde..7fa96bf 100644 --- a/skills/swarm/SKILL.md +++ b/skills/swarm/SKILL.md @@ -22,7 +22,7 @@ Open a todolist with one entry per phase before launching anything. 1. State the done predicate and the artifact or report the swarm must return. 2. Choose the shape. Partition into slices, race N workers on identical briefs, or mix both. For a race or mixed shape, declare `first pass`, `rank all`, or `best-of` before spawning. 3. Set N from the user or derive it from the shape. N is total workers, not the cloud concurrency limit. -4. Pick the worker model from the `swarm workers` line in `~/.devin/rules/pstack-models.md`. If the rule or that line is missing, use `swe-2-high`. Map the value to the workers' `profile`: a real slug `M` becomes `pstack-M`; `auto` or `inherit-parent` uses `subagent_general`, so the workers run on the parent model. Create a missing `pstack-M` profile per `/pstack:setup-pstack`. If a pinned slug is rejected at spawn, use the default and say so. If it rejects the default, use the closest valid slug of the same family `devin models list` reports. For a model race, name each arm's model up front. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. +4. Pick the worker model from the `swarm workers` line in `~/.devin/rules/pstack-models.md`. If the rule or that line is missing, use `swe-2-high`. Map the value to the workers' `profile`: a real slug `M` becomes `pstack-M`; `auto` or `inherit-parent` uses `subagent_general`, so the workers run on the parent model. Create a missing `pstack-M` profile per `/pstack:setup-pstack`. An entry `devin models list` doesn't report counts as a rejected slug; never create a profile for it. If a pinned slug is rejected at spawn, use the default and say so. If it rejects the default, use the closest valid slug of the same family `devin models list` reports. For a model race, name each arm's model up front. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. 5. Give each worker its own writable output when it writes. When workers verify or measure commits, each brief names the exact SHAs. A measurement brief also names the method (sample count, what one sample is, order). The worker records both in its result. ## Phase B: Fan out diff --git a/skills/why/SKILL.md b/skills/why/SKILL.md index f991212..efbf2c4 100644 --- a/skills/why/SKILL.md +++ b/skills/why/SKILL.md @@ -8,7 +8,7 @@ triggers: [user] Investigate the motivation and intent behind code. The companion `how` skill answers what the code does and how it works. `why` answers what forces led to its shape. -Each spawn below names a role line in the `pstack-models.md` rule and a default. Map the value to the spawn's `profile`: a real slug `M` becomes `pstack-M-ro`; `auto`, `inherit-parent`, or a missing rule or line uses `subagent_general` with a read-only brief. Create a missing `pstack-M-ro` profile per `/pstack:setup-pstack` rather than swapping models. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. +Each spawn below names a role line in the `pstack-models.md` rule and a default. Map the value to the spawn's `profile`: a real slug `M` becomes `pstack-M-ro`; `auto`, `inherit-parent`, or a missing rule or line uses `subagent_general` with a read-only brief. Create a missing `pstack-M-ro` profile per `/pstack:setup-pstack` rather than swapping models. An entry `devin models list` doesn't report counts as a rejected slug; never create a profile for it. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill. **Do not use `subagent_explore` here.** It strips MCP and shell access, which disables the MCP-backed investigators and the synthesizer's citation spot-checks. Investigators still shouldn't write anything.