# Setup Pstack

> Configure how pstack chooses cloud agent modes, local subagent profiles, and permission posture across Devin Cloud and Devin Desktop. Use for /setup-pstack, "co

- Skill: `till3005/setup-pstack` (Agent Skill)
- Install (CLI): `npx get-skill add till3005/setup-pstack`
- Raw SKILL.md: https://api.skillmd.com/api/skills/till3005/setup-pstack/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Author: Till3005 (https://skillmd.com/u/till3005)
- Updated: 2026-12-01
- Page: https://skillmd.com/skills/till3005/setup-pstack

---

---
name: setup-pstack
description: Configure how pstack chooses cloud agent modes, local subagent profiles, and permission posture across Devin Cloud and Devin Desktop. Use for /setup-pstack, "configure pstack models", "pstack budget", or changing pstack execution choices.
---

# Setup pstack

Write `~/.devin/rules/pstack-models.md`, an always-on rule that sets pstack execution choices per role. Cloud values are Devin agent modes. Local values are subagent profiles, not raw model slugs. These are different domains.

Read `../poteto-mode/references/execution-router.md` before changing execution behavior. Every lane decision uses `cloud-native`, `local-full`, or `blocked` language.

## Steps

### 1. Probe the runtime

Classify the current session before asking questions.

1. `cloud-native`: direct cloud orchestration tools are available.
2. `local-full`: any local Desktop/CLI session. All execution is local; there is no cloud control plane.
3. `blocked`: only physical impossibilities (lid-closed execution, Windows platform coverage).

Also probe, without printing secrets:

- Whether local subagents are enabled.
- Whether `scripts/local_schedule.py probe` shows CLI auth, since unattended durability depends on it.
- Whether `devin` is on `PATH` or at the Desktop app bundled path.
- Whether `devin auth status` is authenticated in the shell. Treat this as shell CLI state, not proof of Desktop auth state.
- Whether `devin models list --format json` returns local models. If it fails, use the default subagent model policy rather than inventing model names.

When the plugin checkout is available, `python3 scripts/probe_devin_local.py --json` is the preferred probe. Otherwise inspect the live tool surface directly.

### 2. Load and migrate current state

The current rule is `~/.devin/rules/pstack-models.md`. If it exists, read it before writing anything.

Accepted current shape:

```yaml
cloud_modes:
  feature, refactoring: ultra
local_profiles:
  swarm workers: devin-pstack:poteto-agent
```

Migration rules:

- A file with top-level role lines such as `feature, refactoring: ultra` is format version 3 or older. Move those values under `cloud_modes` and preserve them.
- Retired roles such as `hardest tasks`, `architect runners`, `reflect tooling`, and `why investigators` are dropped.
- Raw Cursor-era effort slugs in cloud values map by effort: `xhigh` → `ultra`, `high` → `normal`, `medium` → `fast`, `low` or unmapped → `lite`.
- Raw model slugs are not valid local profile names. Do not copy them into `local_profiles`.
- `inherit-parent` and `auto` remain valid cloud aliases. In local configuration they mean `subagent_general`, because that profile follows the parent model.

Tell the user which lines you migrated or dropped.

### 3. Choose cloud role modes

Use the existing budget flow for cloud lanes.

Offer these exact budget labels, preferring the structured question tool:

- `large — ultra default`
- `medium — normal default`
- `small — fast default`

Apply the budget on the cloud ladder `ultra` > `fusion` > `normal` > `fast` > `fast-ultra` > `lite`. `large` keeps the default, `medium` lowers one step, and `small` lowers two steps.

Defaults:

```yaml
cloud_modes:
  feature, refactoring: ultra
  bug-fix: ultra
  perf-issue: ultra
  hillclimb: ultra
  judgment and prose: ultra
  arena runners: ultra, fusion, fast-ultra
  arena cross-judge pool: fusion, normal
  swarm workers: normal
  interrogate reviewers: ultra, fusion, fast-ultra
```

Validate every real cloud mode before writing it. In a `cloud-native` session use the available direct evidence you have, including a `devin_session_create` 400 that lists allowed modes. In a local session without cloud evidence, offer the documented set and let the user remove unavailable modes. Never write a mode the user rejects. `inherit-parent` and `auto` are always valid aliases and mean omit `devin_mode` for cloud children.

### 4. Choose local role profiles

Local execution uses profiles because `run_subagent` takes a profile, not a model or `devin_mode`.

Defaults:

```yaml
local_profiles:
  research: subagent_explore
  workers: devin-pstack:poteto-agent
  verification: devin-pstack:poteto-agent
  swarm workers: devin-pstack:poteto-agent
  judgment and prose: devin-pstack:poteto-agent
```

Meanings:

- `subagent_explore` is read-only research on the default subagent model.
- `devin-pstack:poteto-agent` is the plugin's write-capable pstack delegate.
- `subagent_general` follows the parent's model and can cost as much as another parent session. Use it only when the user chooses parent-model parity.

If the user wants pinned local models and detection proves the model ids or aliases, generate user-level profiles under `~/.config/devin/agents/` with distinct names such as `pstack-worker-opus.md` or `pstack-worker-swe.md`. Each profile needs only `name`, `description`, `model`, and the system prompt. Do not pin a model that detection did not find or the user did not confirm. Do not overwrite a user file without showing the diff.

If local models cannot be detected, write the default profile mapping above and record `local_model_policy: default-subagent-model`. This is a safe configuration, not a failure.

### 5. Choose permission posture

Background local subagents cannot prompt for new permission. Unapproved tools are denied. Offer three choices:

1. `foreground-first` — safest default. Write-capable workers start in the foreground.
2. `preflight-then-background` — the parent first runs or requests the small command set workers need, then backgrounds them.
3. `explicit-rules` — the user writes exact permission rules in Devin settings. Do not write broad bypass rules for them.

Never enable Bypass as part of setup. A background worker that fails on permissions may be resumed once in the foreground. A second failure is blocked.

### 6. Write the rule

Write `~/.devin/rules/pstack-models.md` atomically enough for a config file: build the full contents, show or summarize them, then overwrite the file. Use Devin-native rule frontmatter. Shape:

```markdown
---
description: pstack per-role execution choices for cloud modes and local subagent profiles
trigger: always_on
---
# pstack execution configuration

Cloud values are Devin agent modes. Local values are subagent profiles. `inherit-parent` or `auto` in `cloud_modes` means omit `devin_mode`. In `local_profiles` it means `subagent_general`.

# defaults: 4
# budget: large (ultra)
# local_model_policy: default-subagent-model
# permission_posture: foreground-first

cloud_modes:
  feature, refactoring: ultra
  bug-fix: ultra
  perf-issue: ultra
  hillclimb: ultra
  judgment and prose: ultra
  arena runners: ultra, fusion, fast-ultra
  arena cross-judge pool: fusion, normal
  swarm workers: normal
  interrogate reviewers: ultra, fusion, fast-ultra

local_profiles:
  research: subagent_explore
  workers: devin-pstack:poteto-agent
  verification: devin-pstack:poteto-agent
  swarm workers: devin-pstack:poteto-agent
  judgment and prose: devin-pstack:poteto-agent
```

Preserve user overrides on reruns unless the user asks for a reset.

### 7. Confirm the lanes

Report four lines:

- Cloud lane: configured modes, or `unavailable in this session`.
- Local lane: profile mapping and permission posture.
- Durability posture: whether CLI auth is present for launchd unattended runs, or modes degrade to session-scoped. Physical limits: lid-closed execution and Windows coverage.

Local sessions have no cloud dependency. Report what the local lane provides and the two physical limits (lid-closed, Windows).

### 8. Offer verification skills

Keep the existing optional offers:

1. If the project has no way to drive the real app for proof, offer `/create-verification-skill` once.
2. If the project has no formal verification skill, offer `/create-formal-verification-skill` once.

Do not push either offer after a no.

