Skip to content

state ~/.devin as the only pstack-models source - #11

Merged
caelaxie merged 2 commits into
mainfrom
cursor/pstack-model-state-fixes-1c99
Oct 19, 2026
Merged

caelaxie merged 2 commits into
mainfrom
cursor/pstack-model-state-fixes-1c99

Conversation

@caelaxie

@caelaxie caelaxie commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

setup-pstack step 2 now says ~/.devin/rules/pstack-models.md is the only source of truth for current pstack model state. pstack-models config under other tool dirs (~/.cursor/rules/, ~/.claude/, project .cursor/, etc.) is not current state, even if injected into context.

left the optional "offer to remove stray config" out. afe207a dropped cross-tool detection on purpose: the text it removed treated other tools' rule files as the current choices and then deleted them. putting removal back is not a one-line, clearly-scoped addition. it would mutate another tool's rule file.

poteto-mode's Subagents section now says to copy the pstack-M.md block in /pstack:setup-pstack step 6 exactly, so a missing write profile is not hand-rolled. asks 1 and 3 are devin-cli, not this plugin.

Refs #8
Closes #9
Refs #7

Open in Web Open in Cursor 

setup-pstack step 2 ignores other tools' rule files, even when injected,
and flags existing slugs `devin models list` does not report. poteto-mode
points missing write profiles at the setup-pstack step 6 block.

Co-authored-by: Kaitian Xie <caelaxie@users.noreply.github.com>
@cursor

cursor Bot commented Oct 19, 2026

Copy link
Copy Markdown

harness blocker. devin cli is installed (devin 3000.11.92) and not logged in. no credentials at /home/ubuntu/.local/share/devin/credentials.toml. plugin install and the slash commands did not run.

$ devin auth status
Not logged in.
  Credentials path: /home/ubuntu/.local/share/devin/credentials.toml
Run `devin auth login` to authenticate.

$ devin plugins install pstack-ports/devin-pstack@cursor/pstack-model-state-fixes-1c99
Error: You must be logged in to manage plugins. Run `devin auth login` first.

$ devin plugins list
Error: You must be logged in to manage plugins. Run `devin auth login` first.

$ devin -p '/pstack:setup-pstack'
Error: Login canceled

$ devin -p '/pstack:poteto-mode'
Error: Login canceled

local ci validator (the plugin check in .github/workflows/ci.yml) passed: Validated 55 skills, 2 agents, and 23 playbooks.

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes requested (posting as COMMENT since author and reviewer are the same account).

  1. minimum changes: the ~/.devin only-source-of-truth sentences are a fair harness adaptation (#9: devin's compat layer injects ~/.cursor/rules/*.mdc as always-on, cursor upstream can't hit this). keeping removal out is right. the poteto-mode swap to "copy the pstack-M.md block in step 6 exactly" is devin-only text replacing devin-only text, fine, and Refs #7 is right.
  2. the step 2 re-validation sentences are not harness-specific and duplicate what upstream already does: step 3(c) marks "any real slug not in the detected set as needing a choice" and step 4 refuses to write one. that's upstream text, kept verbatim in this port. drop them (see line comment) and switch Closes #8 to Refs #8, with a note on #8 that 3(c)/4 already cover re-runs.
  3. harness proof: missing. the comment shows devin auth status not logged in, so no devin plugins install / devin plugins list, and setup-pstack / poteto-mode were not exercised. need that before merge. Validate plugin was still running at review time.

non-blocking, separate pr: upstream setup-pstack now has an "offer a formal verification skill" step after the verification-skill offer; the port's setup-pstack ends at step 8 without it. check whether that's in an upstream release the port already claims.

Comment thread skills/setup-pstack/SKILL.md Outdated
### 2. Load current state

The default role-to-model mapping is the rule shape shown in step 5 below. If `~/.devin/rules/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.
The default role-to-model mapping is the rule shape shown in step 5 below. `~/.devin/rules/pstack-models.md` is the only source of truth for current pstack model state. pstack-models config found under other tool dirs (`~/.cursor/rules/`, `~/.claude/`, project `.cursor/`, etc.), even if injected into context, is not current state. If `~/.devin/rules/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. On a re-run, validate each existing role value against the slugs `devin models list` reported in step 1. A real slug `devin models list` doesn't report counts as needing a choice, the same check step 4 applies to new picks. `inherit-parent` and `auto` always pass. A line whose role is not in step 5, such as `how critics`, is from a retired role. Drop it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop "On a re-run, validate each existing role value ... inherit-parent and auto always pass." upstream step 2 has no such check because 3(c) already marks undetected real slugs as needing a choice and step 4 blocks writing them; both are in this file unchanged. adding it here is divergence for a case upstream already handles. keep the ~/.devin source-of-truth sentences.

upstream step 3(c) and step 4 already flag and refuse undetected
slugs on re-run. keep the ~/.devin source-of-truth sentences.

Co-authored-by: Kaitian Xie <caelaxie@users.noreply.github.com>

Copy link
Copy Markdown
Contributor Author

harness proof

Real Devin CLI on a local box (no cloud agent, no git clone). PR head e61d7d9 (cursor/pstack-model-state-fixes-1c99), expected version 0.15.26 (from this branch's .devin-plugin/plugin.json).

  • CLI: devin 3000.11.92 (7f4e64980e22)
  • devin auth status → Logged in (via Devin). (Devin Pro, team membership Approved)
  • scratch dir: /workspace/devin-harness/scratch
  • model used by every run: swe-2-high
# step result
0 clean removal of the PR #10 install ✅ PASS
1 install pinned to the PR head sha (wrapper plugin) ✅ PASS
2 devin plugins list shows pstack v0.15.26 ✅ PASS
2b installed skill files match e61d7d9, not main ✅ PASS
3 /pstack:setup-pstack (describe-only) ✅ PASS (nothing written; ignored the ~/.cursor rule as current state)
4 /pstack:poteto-mode (short read-only prompt) ✅ PASS on the second try. The first try had a narrower allowlist and its find exec was rejected.

0. clean slate

$ devin plugins remove pstack-harness-pr10 --local
✓ Removed pstack-harness-pr10.
$ devin plugins remove pstack -y
✓ Removed pstack from your personal plugins.
$ devin plugins list
No plugins installed.
$ ls ~/.local/share/devin/cli/plugins/cache/*
ls: cannot access '/home/box/.local/share/devin/cli/plugins/cache/*': No such file or directory

1–2. install + list

devin plugins install has no owner/repo@branch syntax: it reads that form as a local path (see the #10 proof). So I pinned the sha through a local wrapper plugin:

$ cat /workspace/devin-harness/wrap-pr11/.devin-plugin/plugin.json
{ "name": "pstack-harness-pr11", "version": "0.0.0",
  "requiredPlugins": [ { "source": "github", "repo": "pstack-ports/devin-pstack",
                         "sha": "e61d7d9f20ac52efaf65dd7e60725870c7e7963b" } ] }
$ devin plugins install --local -y /workspace/devin-harness/wrap-pr11
  ...
✓ Installed pstack-harness-pr11.
  auto-installed required plugins: pstack
$ devin plugins list
Installed plugins

  • pstack-harness-pr11 v0.0.0
  • pstack v0.15.26 (required)

Content check: sha256 prefixes of the installed files vs raw.githubusercontent at e61d7d9 and at main:

skills/setup-pstack/SKILL.md installed=4e9fd877510d762c pr11=4e9fd877510d762c main=c0563aa8cc6ae693
skills/poteto-mode/SKILL.md  installed=b901a79dda039a35 pr11=b901a79dda039a35 main=e64a73ffe326f293

3. setup-pstack (describe-only)

Project allowlist used for both runs. Writes are denied, and I did not use dangerous/bypass:

{ "permissions": { "allow": ["Read(**)", "Exec(devin models)", "Exec(ls)", "Exec(cat)", "Exec(find)", "Exec(grep)", "Exec(head)", "Exec(sed -n)"],
                   "deny":  ["Write(**)", "Edit(**)"] } }

setup-pstack ran with the first four allow entries; find/grep/head/sed -n were added for the poteto-mode rerun.

$ devin -p --respect-workspace-trust false --export ../logs/pr11-setup.export -- '/pstack:setup-pstack DESCRIBE ONLY: do not write, edit, or create any files or config. Run step 1 (detect available models) and list what you detect, say what you treat as the current pstack model state and why, then briefly describe the remaining steps you would take.'
TOOL: skill {"skill": "setup-pstack"}
OBS:  Source: ~/.local/share/devin/cli/plugins/cache/github.com_pstack-ports_devin-pstack-816793bb/0.15.26/skills/setup-pstack/SKILL.md
TOOL: exec {"command": "devin models list"}
TOOL: exec {"command": "ls -la ~/.devin/rules/ 2>/dev/null; echo \"---\"; ls -la ~/.config/devin/agents/ 2>/dev/null"}

## 1. Detected models (`devin models list`)
54 families are available. The slugs relevant to the skill defaults are all present:
- **SWE-2**: `swe-2-medium`, `swe-2-high`, `swe-2-max` (plus `-lightning` variants of each)
- **Claude Opus 5.5**: `claude-opus-5-5-low` / `-medium` / `-high` / `-xhigh` / `-max` (plus `-fast` variants)
- **Adaptive**: `adaptive` ...

## 2. Current pstack model state
**There is no `~/.devin/rules/pstack-models.md`** (the `~/.devin/rules/` directory doesn't exist), so per the skill, the current state is the **skill defaults** ...
One caveat worth flagging: a `pstack-models.mdc` rule exists at `/home/box/.cursor/rules/pstack-models.mdc` and was injected into this session's context — it pins **every role to `inherit-parent`** ... The skill explicitly says config under other tool dirs is *not* current state, so I'd treat defaults as the baseline ...

## 3. Remaining steps I'd take (in a real run)
1. Ask for a budget ... 2. Apply the budget ... 3. Show the full role table and confirm ... 4. Validate ...
5. Write `~/.devin/rules/pstack-models.md` ... 6. Write profiles `~/.config/devin/agents/pstack-M.md` / `pstack-M-ro.md` ... 7. Confirm and optionally offer ...
exit=0
$ ls ~/.devin/rules ~/.config/devin/agents
ls: cannot access '/home/box/.devin/rules': No such file or directory
ls: cannot access '/home/box/.config/devin/agents': No such file or directory

This exercises the PR's change directly. The box has a real ~/.cursor/rules/pstack-models.mdc, and the CLI injects it into context. The skill still treated ~/.devin/rules/pstack-models.md as the only source of truth.

4. poteto-mode

The first try ran with the four-entry allowlist (no find/grep/head/sed -n), and its exec was rejected:

I'll quickly check the bundled playbooks to ground the answer.warning: rejected a tool call that requires confirmation. Running in non-interactive mode. Use --permission-mode dangerous to auto-approve all tools.
exit=0

The rerun used the full read-only allowlist above:

$ devin -p --respect-workspace-trust false --export ../logs/pr11-poteto.export -- '/pstack:poteto-mode read-only, no edits, no subagents: in 3 short lines, say which playbook you would pick for "fix a typo in a README" and what the done-check would be. Then stop.'
USER-MSG head: # Poteto mode | | Bundled skills live at `../<name>/SKILL.md` from this file, so put this file's absolute path in every `poteto-agent` prompt. | | ## Non-negotiables | ...

Playbook: Bug fix, since a typo is a small defect, though honestly it sits below the nontrivial threshold and could be done directly.
Done-check: read the README back and confirm the corrected spelling in place, then render or diff it once.
Nothing else applies. No tests, no subagents, just the verified edit.
exit=0

No code was changed and no secrets appear in this comment.

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved at e61d7d9 (posting as COMMENT since author and reviewer are the same account).

  1. minimum changes: e61d7d9 removes the step 2 re-validation sentences. the diff is now two lines: the ~/.devin only-source-of-truth sentences in setup-pstack step 2 (#9, a devin harness adaptation) and the poteto-mode pointer to the step 6 pstack-M.md block (#7). everything else in step 2, 3(c), and 4 matches upstream f9be7aa word for word.
  2. parity: this PR touches no version files. 0.15.26 in the proof is just the base it was cut from. #10 is now merged (c86c059, 0.15.27). its hunks are setup-pstack step 9, appended at the end, plus docs and manifests. none of them overlap this PR's setup-pstack step 2 line or its poteto-mode line. so the squash lands cleanly on top, main stays at 0.15.27, and nothing regresses.
  3. harness proof (#11 (comment)): accepted. it starts from a clean slate with both earlier plugins removed and the cache empty. a wrapper's requiredPlugins pins the full head sha e61d7d9f…, and devin fetched pstack from github into its plugin cache, so this is a real install, not a symlink or subset. devin plugins list shows pstack v0.15.26. the sha256 of the installed setup-pstack and poteto-mode SKILL.md matches e61d7d9 and differs from main. authenticated /pstack:setup-pstack ran with a real ~/.cursor/rules/pstack-models.mdc injected into context and still treated defaults as current state, which exercises exactly this change. /pstack:poteto-mode loaded and answered.
  4. Refs #8 (the re-check is dropped, and upstream 3(c)/4 cover re-runs), Closes #9 (the required ask is fully met, and stray removal is declined with a reason), Refs #7. all correct.

CI Validate plugin is green on e61d7d9, and the head has not moved past the proof sha. squash-merging pinned to e61d7d9f20ac52efaf65dd7e60725870c7e7963b.

@caelaxie
caelaxie merged commit 69b3539 into main Oct 19, 2026
1 check passed
@caelaxie
caelaxie deleted the cursor/pstack-model-state-fixes-1c99 branch October 19, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup-pstack: only ~/.devin should count as pstack-models state

2 participants