You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(pstack): route reflect edits out of the plugin cache - #800
Replaces #623 by @jhonnyisaacc. It keeps that PR's commit, rebased onto main, and adds one commit on top. The fork branch refused the rebased push, because main's commits change .github/workflows/validate-plugins.yml and the push token has no workflows permission on the fork.
Why
/reflect step 5 edits a skill in place. When the skill was read from the installed plugin cache (~/.cursor/plugins/cache/<marketplace>/<id>/<hash>/), a plugin update installs a new folder and the approved edit is lost.
#623 fixed that, but it sent every third-party skill edit to a PR on the repository in the plugin's plugin.json. All 119 plugin manifests on main have a repository field, so an approved local edit could become a public PR that the user never saw.
What changed
Step 5 gets one paragraph:
Never edit a skill under plugins/cache/.
Before approval, show its destination: .cursor/skills/<skill>/ or ~/.cursor/skills/<skill>/.
After approval, copy the skill folder there and edit the copy.
Never open a PR or push.
Other rows already show their path in the synthesizer's Routing cell, so the rest of step 5 and step 6 are unchanged from main. Regenerated harness/pstack/claude-code/skills/reflect/SKILL.md.
Tradeoffs
A local copy does not get later plugin updates for that skill, so it can drift from the plugin.
Cursor's docs list the project, user, and plugin skill locations, but they do not say which skill loads when a local skill and a plugin skill have the same name. I did not test which skill Cursor loads.
Verification
node scripts/validate-plugins.mjs printed All plugins validated successfully.
node scripts/generate-pstack-harness-trees.mjs --check printed harness/pstack is up to date.
Reflect wrote approved skill edits into the installed plugin cache.
A plugin update moved to a new hash and dropped them.
Apply refuses a plugins/cache path.
For a third-party skill, the edit is a PR against the repo named by plugin.json repository.
Apply writes any other skill under .cursor/skills or ~/.cursor/skills.
The summary names the PR URL or the destination path.
Co-authored-by: Jhonny <jhonnyisaacc@users.noreply.github.com>
Edit only at the approved destination. Never open a PR, push, or write to a remote repository for an approved edit. The user decides what to share.
To make a local copy, copy the skill's whole folder with every file at the same relative path, so its links to `references/` and its scripts still resolve. Keep the skill's name, and change nothing in the copy except the approved edit. If the copy already exists, edit it and do not copy over it.
The reason will be displayed to describe this comment to others. Learn more.
Copied skills lose sibling paths
High Severity · Logic Bug
The new apply path copies only one plugin skill folder into .cursor/skills/ or ~/.cursor/skills/ and keeps its name. pstack skills resolve siblings and plugin-root files with paths like ../<name>/SKILL.md and ../../docs/. After that copy those links point at empty local trees, so a loaded local poteto-mode cannot find bundled skills or principles that poteto-agent expects next to it.
…proval
The first commit sent a third-party skill edit to a PR on the plugin's
repository. Every plugin manifest has a repository field, so an approved
local edit could become a public PR the user never saw.
Step 5 now copies a plugins/cache/ skill folder to .cursor/skills/ or
~/.cursor/skills/, shows that destination before approval, and edits the
copy. It never opens a PR or pushes.
Regenerate the Claude Code harness copy.
Co-authored-by: lauren <poteto@users.noreply.github.com>
File each Backlog item to your team's devex or backlog tracker without waiting. Only the Accepted list waits for approval.
Never edit a skill under `plugins/cache/`. Before approval, show its destination, `.cursor/skills/<skill>/` or `~/.cursor/skills/<skill>/`. After approval, copy the skill folder there and edit the copy. Never open a PR or push.
The reason will be displayed to describe this comment to others. Learn more.
Recopy wipes existing local skills
Medium Severity · Logic Bug
After approval, step 5 always copies the plugin skill folder onto .cursor/skills/<skill>/ or ~/.cursor/skills/<skill>/. A later /reflect whose Routing still points at plugins/cache/ replaces that folder, so earlier approved edits in the local copy are lost.
File each Backlog item to your team's devex or backlog tracker without waiting. Only the Accepted list waits for approval.
Never edit a skill under `plugins/cache/`. Before approval, show its destination, `.cursor/skills/<skill>/` or `~/.cursor/skills/<skill>/`. After approval, copy the skill folder there and edit the copy. Never open a PR or push.
The reason will be displayed to describe this comment to others. Learn more.
Handoffs still target plugin cache
Medium Severity · Logic Bug
Substantive, tune, and new-skill rows still hand to create-skill using the row's Routing. Reviewers put the transcript's plugins/cache/ path in that column, and create-skill does not have the new never-edit rule, so those loops can write the approved edit back into the cache.
Closes#34.
Upstream: cursor/plugins@9580c23696ac, which brings 13 pstack commits.
The daily sync stopped on one conflict and opened #34, so this is the
manual merge from `pstack/port/merge-upstream.py`, plus the ports that
#34 lists.
## What changes
- **Merge (`914da34`)**: `merge-upstream.py` resolved everything except
`poteto-mode/scripts/worktree-audit.sh`.
- Upstream cursor#805 fixed GNU vs. BSD `stat`/`date` with new `stat_fmt` and
`fmt_day` helpers. The port had fixed the same problem its own way (an
`mtime` array and a `date -r || date -d` fallback).
- The resolution keeps the port's transcript list, which also scans
Claude Code and Codex session logs, and takes upstream's helpers in
place of the port's own. The port's diff to this file is now only the
transcript list.
- **`feat(pstack): port ketchup-video` (`732c804`)**: upstream cursor#797's
new skill follows `ketchup` and ends with "the embedded video", which a
terminal can't show.
- It gets the `pstack-harness` pointer, its Codex policy file (it's
user-only), a `SKILLS` entry, and a README row.
- `pstack-harness` gets a Tools row: give an embedded image or video by
its absolute path.
- `check.py` requires that mapping for any skill that embeds a video.
- **`fix(pstack): keep reflect's edits out of the pstack clone and
plugin cache` (`76b5790`)**: upstream cursor#800 made `reflect` refuse to edit
a skill under `plugins/cache/`, because an update moves to a new folder
and drops the edit. The port has the same trap in two places:
- Claude Code installs upstream's plugin under
`~/.claude/plugins/cache/`, one folder per version.
- pstack's own skills link into the clone behind `~/.agents/pstack/`,
which `pstack update` moves to each new release.
`pstack-harness` now names both. It says to copy the skill to the
project or personal skill folder and edit the copy, unless the clone is
the repo being worked in. `check.py` requires that mapping.
- **Not ported**: #34 also flags two `swarm` lines. They're the lines
upstream cursor#807 renumbered (the fix from cursor#751), and every Cursor term in
them is already mapped.
## Risk
- The `worktree-audit.sh` change is the only hand-written code. On macOS
it now goes through upstream's BSD branch (`stat -f '%m %N'`, `date -r`)
in place of the port's. The `pstack macOS` workflow covers that after
merge.
- `statechart` changed a lot upstream (+7k/−2k lines). The port doesn't
modify it, and this repository's CI doesn't run its tests. On first run
it can now install TLC and Java with `mise`, about 305 MB. `TLA2TOOLS`
still takes precedence.
## Proof
- `check.py`: 0 problems, 0 warnings across 56 pstack skills, on each
commit.
- Removing either new harness mapping, or `ketchup-video`'s pointer,
makes `check.py` name the problem.
- Port unit tests: 257 pass. `install_test.sh` passes with 59 skills.
`test_worktree_audit.py` passes with both GNU and system tools.
- `poteto-mode` bun tests (`orch`, `watch-pr`, `check-plan`): 82 pass.
- `statechart` on Node 18.19.1: its test file can't load, because it
imports `zlib.crc32`, which only Node 20.15+ has. The skill's scripts
don't use it. A real `from-chart` run on upstream's `test/sync.mmd`
wrote the spec, ran TLC, and drew one bug path.
- `statechart`'s full suite: not run. Upstream cursor#977, which the next sync
brings in (cursor/plugins@519d36a), rewrites these scripts in TypeScript
and replaces this suite. The next sync's pull request runs the new
suite.
- Smoke test: after release. `smoke.py` runs the installed clone behind
`~/.agents/pstack`, not this branch, so it can't test this branch before
merge. After `pstack update`, run `smoke.py --only reflect,swarm`, the
scenarios for the changed skills.
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
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.
Replaces #623 by @jhonnyisaacc. It keeps that PR's commit, rebased onto main, and adds one commit on top. The fork branch refused the rebased push, because main's commits change
.github/workflows/validate-plugins.ymland the push token has noworkflowspermission on the fork.Why
/reflectstep 5 edits a skill in place. When the skill was read from the installed plugin cache (~/.cursor/plugins/cache/<marketplace>/<id>/<hash>/), a plugin update installs a new folder and the approved edit is lost.#623 fixed that, but it sent every third-party skill edit to a PR on the repository in the plugin's
plugin.json. All 119 plugin manifests on main have arepositoryfield, so an approved local edit could become a public PR that the user never saw.What changed
Step 5 gets one paragraph:
plugins/cache/..cursor/skills/<skill>/or~/.cursor/skills/<skill>/.Other rows already show their path in the synthesizer's Routing cell, so the rest of step 5 and step 6 are unchanged from main. Regenerated
harness/pstack/claude-code/skills/reflect/SKILL.md.Tradeoffs
A local copy does not get later plugin updates for that skill, so it can drift from the plugin.
Cursor's docs list the project, user, and plugin skill locations, but they do not say which skill loads when a local skill and a plugin skill have the same name. I did not test which skill Cursor loads.
Verification
node scripts/validate-plugins.mjsprintedAll plugins validated successfully.node scripts/generate-pstack-harness-trees.mjs --checkprintedharness/pstack is up to date.node scripts/check-pstack-docs.mjsprinted0 problems.plugin.json, or marketplace file changed.