Skip to content

fix(pstack): persist pstack-models in the repo - #325

Open
imikushin wants to merge 4 commits into
cursor:mainfrom
imikushin:cursor/pstack-models-repo-path-40f5
Open

fix(pstack): persist pstack-models in the repo#325
imikushin wants to merge 4 commits into
cursor:mainfrom
imikushin:cursor/pstack-models-repo-path-40f5

Conversation

@imikushin

Copy link
Copy Markdown

Why

/setup-pstack wrote ~/.cursor/rules/pstack-models.mdc. A cloud agent VM throws that home directory away. The next cloud agent never sees the mapping.

The file has to live in the workspace at .cursor/rules/pstack-models.mdc. Cursor already loads repo rules for cloud agents. Skills that Read the file find it there too.

Scope

pstack/skills/setup-pstack/SKILL.md writes .cursor/rules/pstack-models.mdc. It seeds from a leftover home rule when the repo file is missing. It tells the user to commit the file and not gitignore it.

arena, swarm, and interrogate read the same repo path.

pstack/docs/guide/01-setup.md and pstack/README.md name the new path.

pstack/skills/setup-pstack/scripts/check-pstack-models-path.sh fails if the home path returns.

Tradeoffs

Setup still reads a leftover home rule once, then writes only the repo file. Readers do not keep a dual path. People who already have a home file need to re-run /setup-pstack or copy the file into the repo.

The mapping is now per repo, not user-global. That is the point for cloud agents. Desktop users who wanted one mapping across every project now keep it in each repo.

Blast Radius

Any agent that runs /setup-pstack or reads the rule path. Skills that only say "configured via /setup-pstack" keep working because alwaysApply: true still injects the rule once it is in the repo.

No runtime application code.

Verification

Ran pstack/skills/setup-pstack/scripts/check-pstack-models-path.sh before the retarget. It printed every home-path hit and exited 1.

Ran the same script after the retarget. Exit 0. git grep finds no home-path contract under skills or docs.

Wrote a dummy rule to a temp workspace .cursor/rules/pstack-models.mdc. The home file stayed absent.

Comment Sicko found no comments. It flagged the check's hidden needle. The script now names the home path as a literal and excludes its own directory.

Open in Web Open in Cursor 

cursoragent and others added 3 commits September 4, 2026 21:25
Lock the contract before the retarget. The check fails while skills still write ~/.cursor/rules/pstack-models.mdc.

Co-authored-by: Ivan Mikushin <imikushin@users.noreply.github.com>
Write and read .cursor/rules/pstack-models.mdc so cloud agents keep the mapping after the VM goes away.

Co-authored-by: Ivan Mikushin <imikushin@users.noreply.github.com>
The check already excludes its own script. Hide-the-needle printf made that harder to see.

Co-authored-by: Ivan Mikushin <imikushin@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 4, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new path-check script excludes an entire scripts directory from its forbidden-path scan, which can let future regressions slip through unnoticed.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates pstack’s model-configuration contract so cloud agents can persist role→model mappings by storing them in the repository (.cursor/rules/pstack-models.mdc) rather than in a VM-local home directory.

Changes:

  • Retarget skill documentation to read/write .cursor/rules/pstack-models.mdc instead of ~/.cursor/rules/pstack-models.mdc.
  • Update setup guidance to seed from an old home rule once (when the repo file is missing) and instruct users to commit the repo rule.
  • Add a verification script that fails if the deprecated home-path contract reappears.
File summaries
File Description
pstack/skills/swarm/SKILL.md Updates swarm’s model lookup path to the repo rule file.
pstack/skills/setup-pstack/SKILL.md Updates setup instructions to write the repo rule and explains cloud-agent persistence/commit expectations.
pstack/skills/setup-pstack/scripts/check-pstack-models-path.sh Adds a guard script to prevent reintroducing the deprecated home-path contract.
pstack/skills/interrogate/SKILL.md Updates interrogate’s reviewer model lookup path to the repo rule file.
pstack/skills/arena/SKILL.md Updates arena’s runner/cross-judge model lookup path to the repo rule file.
pstack/README.md Documents the new repo rule path as the output of /setup-pstack.
pstack/docs/guide/01-setup.md Updates setup guide to the repo rule path and instructs committing it for cloud agents.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pstack/skills/setup-pstack/scripts/check-pstack-models-path.sh Outdated
Keep other files under setup-pstack/scripts in the forbidden-path grep.

Co-authored-by: Ivan Mikushin <imikushin@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The path migration is consistent across setup, consumers, documentation, and the regression check.

Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

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.

3 participants