Skip to content

Fix port audit issues 15 and 18-22 - #23

Merged
caelaxie merged 2 commits into
mainfrom
cursor/audit-fixes-15-18-22-8226
Oct 21, 2026
Merged

caelaxie merged 2 commits into
mainfrom
cursor/audit-fixes-15-18-22-8226

Conversation

@caelaxie

Copy link
Copy Markdown
Contributor

Closes #15
Closes #18
Closes #19
Closes #20
Closes #21
Closes #22

#15

Restored upstream pstack/README.md at 88d4751. Install is devin plugins install pstack-ports/devin-pstack then devin plugins list. Dropped the Claude Code install lines and the two paragraphs after them. pstack skills take a /pstack: prefix. Custom Modes become the guide's AGENTS.md pin, /loop stays an unprefixed Devin built-in, plan mode and the benny pack point at Devin (.devin/automations/benny/), and subagent wrappers use profile: "pstack:poteto-agent", subagent_general, and profile: "pstack:comment-sicko". Kept the repo's (0.15.29) marker and pinned its link to 88d4751. Left poteto's Cursor bio and the not-shipped cursor-team-kit / /create-skill / /autopilot sentences verbatim; those commands stay unprefixed.

#18

05-build-and-clean.md uses upstream's /deslop sentences again (slop-strip wording before them unchanged). /deslop is not /pstack:deslop. poteto-help restores the upstream cursor-team-kit sentence and the "if the slash menu shows /orchestrate" clause. /loop stays a Devin built-in.

#19

typescript-best-practices is triggers: [user].

#20

The auto pitfall now matches setup: subagent_general or subagent_explore, so they follow the parent chat model.

#21

The six skill files share one sessions sentence: devin list --format json and ~/.local/share/devin/cli/sessions.db ($XDG_DATA_HOME or DEVIN_SESSIONS_DIR; %APPDATA%\devin\cli\ on Windows). Each file keeps its privacy clause. Reflect drops the ~/Library and transcripts/*.json snippet lines. worktree-audit.sh points transcripts at that directory, including those two overrides, with no Darwin branch. It still greps that directory; it does not query sqlite.

#22

automate-me no longer points at Cursor's create-skill. The benchmark line is an authoring-playbook-style loop, and a task-specific skill runs skills/poteto-mode/playbooks/authoring-a-skill.md.

Harness proof will follow as a comment.

Open in Web Open in Cursor 

Restore the upstream readme with only the Devin install, prefix, and
harness adaptations, and apply the named sentence and frontmatter fixes.

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

@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.

verdict: changes requested (comment review, same account as author).

checked against upstream pstack/ at 88d4751 and each issue's smallest fix:

  • #18, #19, #20, #22: the diff matches the smallest fix text exactly.
  • #21: all six files carry the issue's sentence, privacy clauses kept, reflect snippet trimmed, worktree-audit.sh has one dir with no darwin branch. matches.
  • #15: readme diffed line by line against upstream. every change is the install block, the claude code drop, /pstack: prefixes, the custom-mode to AGENTS.md swap, subagent_type to profile, /loop/plan mode/benny to devin. one extra divergence, inline below.
  • linkage ok, not a draft, Validate plugin green at f15b80f.

blocking:

  1. harness proof. this touches skill files and worktree-audit.sh, and devin ci doesn't run devin plugins install/list (the workflow says so), so green ci isn't enough here. post: a devin plugins install --local wrapper pinned to the full head sha f15b80f94823dce9af3d8c73c13336e0187ea44e (devin fetches the repo itself; symlink proofs don't count), devin plugins list showing pstack, and from the installed copy: the typescript-best-practices frontmatter showing triggers: [user], plus grep -n sessions.db across the six skill files.
  2. readme L11, see inline.

re-review fires on the next push or proof comment.

Comment thread README.md Outdated
Install the plugin with the Devin CLI:
**pstack is my answer.** these are the same skills i use every day to ship high quality code at Cursor. this turns cursor into a real engineering team. the goal is not to maximize loc, in fact it's the opposite. pstack helps you write less, but higher quality code.

**pstack gives you fearless parallelism.** when you can go deep on one agent and trust it to write good, verifiable code, you can truly parallelize with confidence. start multiple agents up with `/pstack:poteto-mode` and trust that they'll apply rigorous engineering principles to their work.

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.

upstream L9 says start multiple agents up with `poteto-mode` (the skill name, no slash). this isn't a command the reader types, so it doesn't need the prefix, and the port keeps bare poteto-mode in the other skill-name spots (L219, L227, L277, L279). smallest fix: revert to `poteto-mode`.

Upstream names poteto-mode without a slash when it is the skill, not a
command. Restore those two spots and leave typed slash commands prefixed.

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 39d8217b887d9f4d2f528ab000eefafb06b19460 (cursor/audit-fixes-15-18-22-8226). I checked the branch and refs/pull/23/head with git ls-remote right before installing. f15b80f...39d8217 changes only README.md. Expected version: 0.15.29.

  • CLI: devin 3000.11.92 (7f4e64980e22), devin auth status → Logged in (via Devin)., model swe-2-high
  • permissions: a read-only project allowlist. Writes and edits are denied, and I did not use bypass/dangerous (details under 8).
# step result
1 devin plugins list before: only thermos v1.0.0 ✅ recorded
2 --local wrapper pinned to the full head sha ✅ PASS
3 devin plugins list shows pstack v0.15.29 (required), and both plugin.json files say 0.15.29 ✅ PASS
4 cmp of all 12 changed files (plus both plugin.json) in the installed cache copy vs raw @ head; all regular files ✅ PASS (14/14 IDENTICAL)
5 installed typescript-best-practices frontmatter has triggers: [user] ✅ PASS
6 grep -n sessions.db over the 6 changed skill/playbook files ✅ PASS (6/6 hits, same sentence)
7 the path named, ~/.local/share/devin/cli/sessions.db, exists on this box (XDG_DATA_HOME/DEVIN_SESSIONS_DIR unset) ✅ PASS
8 /pstack:recall (describe-only) locates transcripts via devin list --format json + sessions.db ✅ PASS on the 4th run. Runs 1–3 hit allowlist rejections. ⚠️ concern B
9 /pstack:poteto-help about /deslop says it ships in cursor-team-kit, not pstack ✅ PASS
10 README shows bare poteto-mode (lines 11 and 253 are the 39d8217 change) ✅ PASS
11 worktree-audit.sh ⏭️ NOT RUN: not purely read-only (git fetch writes refs) and needs a git repo. Static check: ⚠️ concern A

1–3. before list, install, after list

$ devin plugins list          # before
Installed plugins

  • thermos v1.0.0

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

  • thermos v1.0.0
  • pstack-harness-pr23 v0.0.0
  • pstack v0.15.29 (required)

4–7, 10. installed cache copy

Columns: file, file type, size, then cmp against curl https://raw.githubusercontent.com/pstack-ports/devin-pstack/<head>/<file>.

$ cd ~/.local/share/devin/cli/plugins/cache/github.com_pstack-ports_devin-pstack-816793bb/0.15.29
$ grep -n "\"version\"" .devin-plugin/plugin.json plugin.json
.devin-plugin/plugin.json:3:  "version": "0.15.29",
plugin.json:4:  "version": "0.15.29",
# for f in <changed files>; do stat type; curl raw @39d8217b887d9f4d2f528ab000eefafb06b19460; cmp; done
README.md                                        regular_file   26759B IDENTICAL
docs/guide/05-build-and-clean.md                 regular_file    5848B IDENTICAL
docs/guide/10-recipes-and-pitfalls.md            regular_file    9092B IDENTICAL
skills/automate-me/SKILL.md                      regular_file    7519B IDENTICAL
skills/poteto-help/SKILL.md                      regular_file   15599B IDENTICAL
skills/poteto-mode/playbooks/eval.md             regular_file    2722B IDENTICAL
skills/poteto-mode/playbooks/session-pickup.md   regular_file    1879B IDENTICAL
skills/poteto-mode/scripts/worktree-audit.sh     regular_file    6019B IDENTICAL
skills/recall/SKILL.md                           regular_file    5316B IDENTICAL
skills/reflect/SKILL.md                          regular_file    4926B IDENTICAL
skills/show-me-your-work/SKILL.md                regular_file    6837B IDENTICAL
skills/typescript-best-practices/SKILL.md        regular_file    2720B IDENTICAL
.devin-plugin/plugin.json                        regular_file     549B IDENTICAL
plugin.json                                      regular_file     624B IDENTICAL
$ sed -n 1,6p skills/typescript-best-practices/SKILL.md
---
name: typescript-best-practices
description: TypeScript best practices. Use when reading or editing any .ts or .tsx file.
triggers: [user]
---

$ grep -n -o ".\{0,40\}sessions\.db.\{0,90\}" skills/automate-me/SKILL.md skills/recall/SKILL.md skills/reflect/SKILL.md skills/show-me-your-work/SKILL.md skills/poteto-mode/playbooks/eval.md skills/poteto-mode/playbooks/session-pickup.md
skills/automate-me/SKILL.md:29:tores them in `~/.local/share/devin/cli/sessions.db` (`$XDG_DATA_HOME` or `DEVIN_SESSIONS_DIR` when set; `%APPDATA%\devin\cli\` on Windows). 
skills/recall/SKILL.md:15:tores them in `~/.local/share/devin/cli/sessions.db` (`$XDG_DATA_HOME` or `DEVIN_SESSIONS_DIR` when set; `%APPDATA%\devin\cli\` on Windows). 
skills/reflect/SKILL.md:15:tores them in `~/.local/share/devin/cli/sessions.db` (`$XDG_DATA_HOME` or `DEVIN_SESSIONS_DIR` when set; `%APPDATA%\devin\cli\` on Windows). 
skills/show-me-your-work/SKILL.md:57:tores them in `~/.local/share/devin/cli/sessions.db` (`$XDG_DATA_HOME` or `DEVIN_SESSIONS_DIR` when set; `%APPDATA%\devin\cli\` on Windows). 
skills/poteto-mode/playbooks/eval.md:22:tores them in `~/.local/share/devin/cli/sessions.db` (`$XDG_DATA_HOME` or `DEVIN_SESSIONS_DIR` when set; `%APPDATA%\devin\cli\` on Windows). 
skills/poteto-mode/playbooks/session-pickup.md:5:tores them in `~/.local/share/devin/cli/sessions.db` (`$XDG_DATA_HOME` or `DEVIN_SESSIONS_DIR` when set; `%APPDATA%\devin\cli\` on Windows). 
$ grep -n sessions.db skills/poteto-mode/scripts/worktree-audit.sh
64:# CLI session store: ~/.local/share/devin/cli/sessions.db
65:# ($XDG_DATA_HOME or DEVIN_SESSIONS_DIR when set). No per-OS branch.
66:transcripts="${DEVIN_SESSIONS_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/devin/cli}"
$ ls -l ~/.local/share/devin/cli/sessions.db*
-rw-r--r-- 4161536 ~/.local/share/devin/cli/sessions.db
$ grep -n '`poteto-mode`' README.md     # bare (unprefixed) mentions
11:**pstack gives you fearless parallelism.** when you can go deep on one agent and trust it to write good, verifiable code, you can truly parallelize with confidence. start multiple agents up with `poteto-mode` and trust that they'll apply rigorous 
205:pstack also ships [`profile: "pstack:poteto-agent"`](./agents/poteto-agent.md) as the wrapper for delegates spawned during a run. it reads `poteto-mode` in full, including its inline principles index, before doing any work. substituting `subagent
213:twenty-four short skills, one principle each. `poteto-mode` indexes them inline and reads that index at task start. the standalone files are there so other skills can reference a principle by name, and so the index can point at the full rule for 
249:a few things `poteto-mode` references but doesn't bundle:
253:- `/create-skill` is a cursor built-in. cursor also ships a built-in `/autopilot` that watches a pr. inside `poteto-mode`, pr-status requests go to the [babysit playbook](./skills/poteto-mode/playbooks/babysit.md) instead.
263:`poteto-mode` is my style. you may not want exactly that.

8. /pstack:recall (describe-only)

The allowlist grew over the runs, and each step was a read-only command:

  • run 1: devin list was not allowed.
  • run 2: the agent piped devin list into python3, and the call was rejected.
  • run 3: a compound cd … && git status was rejected.
  • run 4 added Exec(devin list), Exec(echo), Exec(cd), Exec(git status|log|branch) and passed.
{ "permissions": { "allow": ["Read(**)", "Exec(devin models)", "Exec(devin list)", "Exec(ls)", "Exec(cat)", "Exec(find)", "Exec(grep)", "Exec(head)", "Exec(sed -n)", "Exec(echo)", "Exec(cd)", "Exec(git status)", "Exec(git log)", "Exec(git branch)"],
                   "deny":  ["Write(**)", "Edit(**)"] } }
$ devin -p --respect-workspace-trust false --export ../logs/pr23-recall.export -- '/pstack:recall DESCRIBE ONLY, read-only, no writes. Use only `devin list --format json`, `ls`, `grep`, `cat`, `echo`, and read-only git (no python, no sqlite). Say exactly where you located this directory's transcripts (command and file path), then in 3 short lines say what earlier sessions in this directory worked on, based on their titles.'
USER-MSG head (skill body injected): # Recall | | **Before you start or resume work, you rebuild the user's recent working context ...
CALL devin list --format json
CALL ls -lt ~/.local/share/devin/cli/ | head -30     → sessions.db, sessions.db-wal, sessions.db-shm, logs/, session_locks/ ...
CALL find ~/.local/share/devin -maxdepth 3 -name '*transcript*' -o -name '*.jsonl'
...
Transcripts located via `devin list --format json`; session records stored in `~/.local/share/devin/cli/sessions.db` (per-session locks in `~/.local/share/devin/cli/session_locks/`; no standalone transcript files exist).

Earlier sessions, by title:
1. pstack onboarding — `setup-pstack` model detection, "explain pstack / recommend a starting skill," `sharpen` and `poteto-mode` dry runs.
2. Verification tooling — a `create-formal-verification-skill` run plus a read-only audit of formal-verification checks.
3. One small app task — input validation on a signup form — alongside several prior `recall`/help sessions.
exit=0

9. /pstack:poteto-help about /deslop

$ devin -p --respect-workspace-trust false --export ../logs/pr23-help.export -- '/pstack:poteto-help how do I run /deslop with pstack? keep it short'
`/deslop` isn't part of pstack — it ships in the separate `cursor-team-kit` plugin, so you'd install that plugin to get it. Within pstack, the equivalents are:

- `/pstack:unslop` — cleans AI tells out of prose
- `/pstack:no-comments` — strips comments before review

Example:

/pstack:unslop clean the AI tells out of this README


From [skills/poteto-help/SKILL.md](https://github.com/pstack-ports/devin-pstack/blob/main/skills/poteto-help/SKILL.md) ("Not in pstack" section).
exit=0

⚠️ concerns (none of these block the PR's stated fixes)

A. In worktree-audit.sh, the LAST_CHAT column looks non-functional on Linux. The new default transcripts=${DEVIN_SESSIONS_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/devin/cli} resolves correctly on this box. But the lookup below it (lines 106–110) doesn't work here:

$ rg -l -e "/workspace/devin-harness/scratch/" -e '/workspace/devin-harness/scratch"' ~/.local/share/devin/cli
~/.local/share/devin/cli/logs/devin_20261019-094045_327743.log      # only logs/ match; sessions.db is skipped as binary
...
$ rg -l -a ... ~/.local/share/devin/cli        # with -a, sessions.db matches
~/.local/share/devin/cli/sessions.db
$ stat -f '%m %N' ~/.local/share/devin/cli/sessions.db      # BSD syntax; GNU stat treats -f as filesystem status
stat: cannot read file system information for '%m %N': No such file or directory
$ date -r 1792546305 '+%Y-%m-%d'                             # GNU date -r expects a file
date: 1792546305: No such file or directory

So on Linux the column ends up - (or last_ts stays 0), and any match comes from logs/, not the session store. stat -f/date -r were already there before this PR, but the PR drops the per-OS branch ("No per-OS branch"), which implies Linux is supported. Possible follow-up: rg -a or --binary, plus stat -c '%Y %n' / date -d @ts fallbacks.

B. The skills name sessions.db but give no read-only way to read it. It is a SQLite file, and sqlite3 isn't installed on this box. In run 4, recall correctly located the store but summarised from session titles only. The six-skill sentence might want a sanctioned read method, if the CLI has one.

C. The README is upstream's restored text, so it still says "at Cursor", "turns cursor into…", and "/create-skill is a cursor built-in". This is expected per #15 (restored upstream). I'm noting it only in case portreview wants the devin wording on those lines.

Afterwards, the scratch dir contains only .devin/. 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.

verdict: passes, merging (comment review, same account as author).

re-checked at head 39d8217b887d9f4d2f528ab000eefafb06b19460:

  • f15b80f...39d8217 touches only README.md: L11 and L253 now say bare poteto-mode, same as upstream at 88d4751.
  • full diff vs main, 12 files: readme diffed line by line against upstream. the only changes are the port marker, the install block, the claude code drop, /pstack: prefixes, AGENTS.md pin, profile/subagent_general, devin /loop/plan mode/benny, and the make-bot-ui row matching the port skill. #18, #19, #20, #21, #22 match each issue's smallest fix. no unrelated edits.
  • proof: --local wrapper pinned to the full head sha, devin plugins list shows pstack v0.15.29 (required), the installed cache cmps identical to raw @ head for all 12 files plus both plugin.json, and /pstack:recall and /pstack:poteto-help were both run.
  • closes #15 #18 #19 #20 #21 #22, not a draft, Validate plugin green at head.

concern a (stat -f/date -r) is the same as upstream at 88d4751, so it's an upstream bug and not filed here. the rg binary skip on sessions.db is filed separately.

@caelaxie
caelaxie merged commit 9309f40 into main Oct 21, 2026
1 check passed
@caelaxie
caelaxie deleted the cursor/audit-fixes-15-18-22-8226 branch October 21, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment