Skip to content

feat(pstack): support Claude Code as a harness - #629

Draft
sirine707 wants to merge 5 commits into
cursor:mainfrom
sirine707:sirine/pstack-claude-code-support
Draft

sirine707 wants to merge 5 commits into
cursor:mainfrom
sirine707:sirine/pstack-claude-code-support

Conversation

@sirine707

@sirine707 sirine707 commented Oct 14, 2026 •

Copy link
Copy Markdown

Builds on #455 (harness-aware model routing). Until #455 merges, this PR also shows its commit f721e2e; review the last two commits.

Summary

Makes pstack installable and working in Claude Code without changing Cursor behavior.

  • One source of truth: a new Harness reference section in pstack/docs/model-routing.md translates Cursor's subagent fields, agent frontmatter, plugin and skill paths, and transcript locations for Claude Code. Skills keep their Cursor text as written and add a pointer to it, so Cursor agents read the same instructions as before.
  • Packaging: pstack/.claude-plugin/plugin.json and a pstack entry in .claude-plugin/marketplace.json.
  • Agents: poteto-agent gets background: true next to is_background: true and searches the Claude Code plugin root. poteto-mode passes delegates the absolute SKILL.md path and uses pstack:poteto-agent in Claude Code.
  • Skills: transcript lookups (recall, reflect, show-me-your-work, automate-me, session-pickup, eval), project skill paths (create-/maintain-verification-skill, automate-me), and subagent fields (swarm, arena, interrogate, reflect, no-comments, orchestrate, why) point to the reference.
  • worktree-audit.sh also reads Claude Code transcripts (~/.claude/projects/<slug>).
  • CI: validate-plugins.mjs checks Claude marketplace entries and that all of a plugin's manifests carry the same version; the workflow runs claude plugin validate ..
  • automations/benny stays Cursor-only.

No version bump. It follows the separate chore(pstack): bump convention. The next bump must update all three manifests, and CI now enforces that.

Test plan

Claude Code 2.1.299, claude -p --plugin-dir ./pstack:

  • Plugin loads: pstack:poteto-agent, pstack:comment-sicko, 53 /pstack:* commands
  • /pstack:poteto-help answers with Claude Code names
  • /pstack:poteto-mode spawns pstack:poteto-agent with the skill path; the delegate reads SKILL.md
  • /pstack:recall resolves ~/.claude/projects/<slug>/
  • /pstack:interrogate spawns read-only Explore reviewers, with no rejected calls and no edits
  • worktree-audit.sh with Claude-only, Cursor-only, and empty transcript homes
  • node scripts/validate-plugins.mjs and claude plugin validate . pass; each fails on version drift, name mismatch, missing manifest, or a bad agents field
  • /pstack:setup-pstack writes a claude-code profile (manual)
  • Cursor smoke test: /poteto-mode and /recall unchanged, and Cursor accepts the extra background key

🤖 Generated with Claude Code


Note

Low Risk
Changes are mostly plugin packaging, documentation, and agent instructions; Cursor keeps the legacy rule export, with CI guarding manifest consistency rather than touching runtime product code.

Overview
pstack can be installed and run in Claude Code while keeping Cursor instructions as the canonical text. Packaging adds pstack/.claude-plugin/plugin.json and a pstack entry in .claude-plugin/marketplace.json; the README documents Claude install (/pstack:poteto-mode, etc.) and notes Benny automations stay Cursor-only.

Harness-aware behavior centers on new pstack/docs/model-routing.md: ~/.config/pstack/models.json profiles per harness (cursor, claude-code, …), runner/model/effort resolution, and a Harness reference that maps Cursor Task fields, agent frontmatter, paths, and transcript locations to Claude Code. /setup-pstack is rewritten to detect the active harness, confirm runnable models/runners, write the JSON profile, and still export pstack-models.mdc in Cursor only.

Skills and agents are updated to read profiles via model routing instead of relying solely on pstack-models.mdc: arena/interrogate/swarm/reflect/how/why, playbooks, transcript mining (recall, reflect, automate-me, …), and verification skill paths. poteto-agent gains background: true, Claude plugin discovery, and delegates get explicit SKILL.md paths / pstack:-prefixed agent names where needed.

Tooling: worktree-audit.sh also searches Claude Code transcript dirs; validate-plugins.mjs validates Claude marketplace manifests and fails when manifest versions diverge across harnesses.

Reviewed by Cursor Bugbot for commit 6bcc06b. Bugbot is set up for automated code reviews on this repo. Configure here.

dodeja and others added 3 commits October 13, 2026 22:13
Package pstack as a Claude Code plugin and make the skills work there without
changing Cursor behavior. Cursor fields, paths, and agent names stay as written;
a single Harness reference in docs/model-routing.md translates them for other
harnesses (subagent fields, agent frontmatter, plugin and skill paths,
transcript locations and slugs).

- Add pstack/.claude-plugin/plugin.json and a pstack marketplace entry.
- poteto-agent: add background: true and the Claude Code plugin root;
  poteto-mode passes delegates the absolute SKILL.md path.
- Point transcript, skill-path, and subagent-field instructions at the
  Harness reference.
- worktree-audit.sh also reads Claude Code transcripts.
- README: Claude Code install and /pstack: prefix; benny stays Cursor-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- validate-plugins.mjs checks Claude marketplace entries and that every
  manifest of a plugin carries the same version.
- The workflow runs `claude plugin validate .` and triggers on the Claude
  marketplace, the validator, and the workflow itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 8543ac8. Configure here.

Comment thread pstack/skills/how/SKILL.md
Comment thread pstack/skills/why/SKILL.md
Comment thread pstack/skills/setup-pstack/SKILL.md
sirine-jnayeh and others added 2 commits October 15, 2026 17:32
…r#455

- how: restore the spawn contract (generalPurpose, readonly: true,
  explorer and explainer roles, rule lines and defaults).
- why: restore the rule-line fallback and the readonly: false contract
  ahead of the per-spawn model lines.
- setup-pstack: rebuild roles from defaults before applying the budget,
  overlay only family, list, or alias customizations, and write
  `# budget: <label> (<target effort>)` to the Cursor rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Running it needs maintainer approval on a fork PR. The step is kept on
a separate branch to add later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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