Repository navigation
fix(pstack): close three gaps in the Claude Code plugin - #705
Merged
Merged
Conversation
Claude Code never read pstack-models.mdc, so /pstack:setup-pstack stopped without writing anything. Claude Code loads every .md file in ~/.claude/rules/ into each new session, so the adapter now maps the model rule to ~/.claude/rules/pstack-models.md, tells setup-pstack how to detect models from the Agent tool and write that file, and maps a role value such as "opus high" to Agent model and effort.
A step that needs Cursor Automations, Bugbot, a Cursor cloud agent, or the built-in PR tool now writes "Skipped in Claude Code: <step>. <reason>." and goes on, leaving a named placeholder when a later step needs its output. The adapter maps each feature, and the generator's term list now catches "built-in PR tool" so a skill that names it must have a row.
/pstack:poteto-help linked the README and guide on GitHub main, so Claude Code asked for WebFetch permission to answer. The generator now copies pstack/docs/guide and pstack/README.md into the tree, so --check catches drift in them, and their links to each other resolve locally. The adapter maps a GitHub main link to a pstack file to the local copy when the tree ships it.
poteto
marked this pull request as ready for review
October 17, 2026 23:40
caelaxie
added a commit
to pstack-ports/devin-pstack
that referenced
this pull request
Oct 18, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> baseline `2418e86` matches upstream pstack at [`e5136d8`](cursor/plugins@e5136d8) ([#633](cursor/plugins#633)). diffed the baseline tree against `pstack/` at `e5136d8` and at its parent `850d7f2`. the parent still has the pre-#633 principle text. the only path in `e5136d8` that the baseline lacks is `pstack/.cursor-plugin/`, which this port never carried (devin uses `.devin-plugin/plugin.json`). upstream `main` has no pstack commits after `019a6a2`. version is still `0.15.25` upstream, so plugin.json, `.devin-plugin/plugin.json`, and the readme stay at `0.15.25`. synced to `019a6a20592c10bf92869e5740368f578a9997fd`. ported: - [`99743e9`](cursor/plugins@99743e9) ([#634](cursor/plugins#634)) cut marginal sections from `interrogate/references/lead-judgment.md`, `principle-migrate-callers-then-delete-legacy-apis`, `principle-type-system-discipline`, and `swarm`. kept the existing devin frontmatter (`triggers: [user]`) and the existing devin swarm wording. the #634 readme table edit drops "refuse to lie to the compiler" from the upstream principle index. this port's readme no longer has that index, and the phrase lived only in the skill description, which is updated. - [`0317eb8`](cursor/plugins@0317eb8) ([#700](cursor/plugins#700)) brand via a type guard in `typescript-best-practices` `SKILL.md` and `references/patterns.md`. kept `triggers: [user, model]` and the dropped `paths` frontmatter. - [`a968159`](cursor/plugins@a968159) ([#702](cursor/plugins#702)) `poteto-mode` frontmatter `name` is now `poteto-mode`. `make-bot-ui` already had `name: make-bot-ui` from the devin port. other skills already matched their folders. - [`019a6a2`](cursor/plugins@019a6a2) ([#704](cursor/plugins#704)) guide prose and the autopilot-full claim in `docs/guide/02` through `10`. kept existing devin wording (`/pstack:` prefixes, cloud sessions, `.devin` paths). skipped: - [`e5136d8`](cursor/plugins@e5136d8) ([#633](cursor/plugins#633)) is already the baseline. - [`182f2ce`](cursor/plugins@182f2ce) ([#637](cursor/plugins#637)) is claude code generated-tree install. core `pstack/skills` is unchanged. the "benny is cursor-only" sentence is skipped because this port already runs benny as devin sessions. - [`a968159`](cursor/plugins@a968159) generator check in `scripts/generate-pstack-harness-trees.mjs`. that script builds the claude code tree and does not apply to this repo. - [`1b80080`](cursor/plugins@1b80080) ([#705](cursor/plugins#705)) is claude code packaging. it edits `docs/harness/claude-code.md`, the generated `harness/pstack/claude-code` tree, the generator, and the claude code install blurb in the upstream readme. no skill text under `pstack/skills` changes. this port has no claude code adapter. - [`019a6a2`](cursor/plugins@019a6a2) `scripts/check-pstack-docs.mjs` and the regenerated claude code copies. the check hardcodes a `pstack/` subdirectory, the full upstream readme tables, and a sibling `cursor-team-kit`. this repo is the plugin at the root with a short devin readme, so the script does not apply as-is. the upstream readme edits that only touch the claude code install blurb, the cursor custom-mode paragraph, and the built-in `/babysit` to `/autopilot` rename are also skipped. this port's readme does not have those sections, and `docs/guide/01-setup.md` already tells devin to pin the style in `AGENTS.md` instead of a cursor custom mode. the autopilot-full claim from that readme table is ported in `docs/guide/07-overnight.md`. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-5e99de38-babb-516d-92d0-296b6550796a?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-5e99de38-babb-516d-92d0-296b6550796a&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Kaitian Xie <caelaxie@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Three things in the pstack Claude Code plugin did not work the way a user expects:
/pstack:setup-pstackstopped without writing anything. The adapter told it that Claude Code does not readpstack-models.mdcand that it had nothing to write, so no skill could use the user's model choices./pstack:poteto-helplinked to them on GitHubmain, so Claude Code fetched them with WebFetch and asked the user for permission first.What changed
All of the changes are in the Claude Code adapter, the generator, the generated tree, and two paragraphs of
pstack/README.md.pstack/skills/**is byte-identical tomain, so Cursor loads the same files as before.Model choices. Claude Code loads every
.mdfile in~/.claude/rules/into each new session. The adapter now maps the Cursor rule~/.cursor/rules/pstack-models.mdcto~/.claude/rules/pstack-models.md. A newsetup-pstacksection in the adapter tells setup to:Agenttool schema,<model> <effort>, such asopus high,It still never writes role lines into
CLAUDE.mdorAGENTS.md. A new Models row maps a role value such asopus hightomodel: "opus"andeffort: "high".Cursor-only steps. The adapter now gives one exact line,
Skipped in Claude Code: <step>. <reason>., then the model goes to the next step without stopping, asking, or retrying. When a later step needs what the skipped step made, such as a webhook URL or a key, the model leaves a placeholder and names it in that line. A table says what each feature maps to:environment: "cloud"maps to a worktree.The generator's term check now also matches "built-in PR tool", so a skill that names it gets the adapter line.
Guide and README. The generator now copies
pstack/docs/guide/(pages and images) andpstack/README.mdintoharness/pstack/claude-code/, the same way it copies the skills. Relative links to these files now resolve in the tree, sopoteto-helplinks to../../docs/guide/01-setup.mdinstead of GitHub. The adapter's Paths table maps agithub.com/cursor/plugins/blob/main/pstack/<path>URL to the local copy and tells the model never to fetch it.--checkcompares the guide and README the same way it compares the skills, so it catches drift in them too.pstack/README.mdand the generatedharness/pstack/README.mdlist the new sources and say where Claude Code writes model choices.Tradeoffs
--checkwould not catch image drift and the guide would not work offline.main: two in the README and two in guide page 7. They point atpstack/automations/benny, which is Cursor-only and is not in the tree. No skill tells the model to follow them.Verification
All runs used real Claude Code 2.1.302 through the Agent SDK, each with a new
HOMEand the plugin loaded as a local plugin from a copy of the tree. In each pair, one run used the tree onmainand one run used the tree from this PR.Setup writes a file that a later skill reads. On
main, setup wrote nothing and told the user that per-role models do not work in Claude Code. With this PR, setup asked for a budget, wrote~/.claude/rules/pstack-models.md(how explainer: opus high), and wrote nothing toCLAUDE.mdorAGENTS.md. A new session in the sameHOMEthen ran/pstack:how, which started its explainer withmodel: "opus", effort: "high". With no rule file, the same prompt started it witheffort: "xhigh", the skill default. In a third session with a copy of that file,/pstack:poteto-helpread the role from it.A Cursor-only step degrades cleanly.
/pstack:make-bot-uineeds a Cursor Automations webhook routine. Onmain, the reply described the missing routine over several paragraphs and numbered steps. With this PR, the reply has one line:Skipped in Claude Code: creating the webhook routine, getting its URL and sender key, and requesting the key through a secret card. Claude Code has no Cursor Automations, so the URL and key are placeholders.The model then built the page with placeholder values.poteto-help works without WebFetch. When asked to quote guide page 1, the
maintree made 1 WebFetch call toraw.githubusercontent.comand asked for permission. The tree from this PR made 0 WebFetch calls and quoted the page fromdocs/guide/01-setup.mdin the plugin. When asked about an overnight run that finished nothing, the tree from this PR answered from the bundled guide page 7 with 0 WebFetch calls.Links. All 235 relative links in the bundled guide and README resolve inside the tree. 0 links leave the tree, and 0 links are broken.
Drift. Each of these changes made
--checkexit 1 and name the path:After each restore,
--checkexited 0.node scripts/generate-pstack-harness-trees.mjs --checkandnode scripts/validate-plugins.mjsexit 0.git diff --stat origin/main -- pstack/skillsis empty.Note
Low Risk
Docs, adapter, and generated harness output only; Cursor skill sources are unchanged and behavior is scoped to Claude Code installs.
Overview
Closes three Claude Code parity gaps without changing
pstack/skills/**(Cursor still loads the same skill files).Model setup. The adapter no longer tells
/pstack:setup-pstackto bail out. It maps Cursor’spstack-models.mdcrule to~/.claude/rules/pstack-models.md, documents how to detect models from theAgentschema, write<model> <effort>role lines, and map those values when spawning agents.Cursor-only steps. Steps that need Automations, Bugbot, cloud agents, or similar must emit a single
Skipped in Claude Code: …line, continue without blocking, and use placeholders when later steps need skipped outputs. Built-in PR actions fall through to forge commands likegh(not a skip). The harness generator’s Cursor-term check now includes built-in PR tool.Bundled docs. The harness tree generator copies
docs/guide/andpstack/README.mdintoharness/pstack/claude-code/so help and guide links resolve locally instead of triggering WebFetch to GitHub. The adapter’s Paths table steers agents to read the bundled copy. README and harness README list the new regen sources (docs/guide/, this readme).Reviewed by Cursor Bugbot for commit 3ac256b. Bugbot is set up for automated code reviews on this repo. Configure here.