Skip to content

Latest commit

 

History

History
122 lines (91 loc) · 27.3 KB

UPSTREAM.md

File metadata and controls

122 lines (91 loc) · 27.3 KB

Upstream synchronization

open-pstack tracks Cursor's pstack while adapting Cursor-specific primitives for Claude Code, Codex and T3 Code.

Current sync point

Source Value
Repository https://github.com/cursor/plugins.git
Path pstack/
Commit 43fc4fd50d73f4f32cca95cf8563a4c7b24b80c9
Upstream version 0.15.50
open-pstack version 1.22.0

The table above is the current Cursor sync point. Open Pstack 1.22.0 tracks Cursor pstack 0.15.50 at 43fc4fd50d73f4f32cca95cf8563a4c7b24b80c9. Open Pstack 1.17.0 to 1.21.0 tracked 0.15.36 at 2776ddd2355d6d6c8747d3964600f28daf62f049. README-UPSTREAM.md preserves the upstream pstack README verbatim. CHANGES.md and NOTICE.md describe the adaptations and provenance.

Upstream-only exclusions

  • Commits 799151d and 6fecddb add and relocate make-bot-ui, and a968159 renames it after its folder. It depends on Cursor routines, webhook events, and UI primitives that Claude Code and Codex do not share. a968159's other hunk names poteto-mode after its folder, which the port's poteto-mode/SKILL.md already does.
  • Four disable-model-invocation: true lines from 73f8be4 are not applied to how, why, unslop, or typescript-best-practices. Poteto-mode invokes those skills by name, and the flag blocks that route on Claude Code.
  • The default-model hunks for bug-fix, perf-issue, and hillclimb from 23a56e2, 889ec4b, 70b2dc8 and 2f87c85 are not applied. Those frequent code-writing roles stay on Sol at xhigh.
  • 5bf2b15's setup budget question, its # budget line, and its step down to a lower detected effort are not applied. Setup already asks one requested effort per assigned family, and the step-down would silently lower a requested effort.
  • 12d587d's rule that reruns a rejected configured entry on its family default or the closest valid slug is not applied, and neither is ce649c0's rule that puts cursor-grok-* and composer-* entries in the Grok family for that fallback. An unavailable model stays a named dropout per provider-dispatch.md.
  • The expected-runtime column in 70b2dc8's children.tsv and its expected-runtime stuck test are not applied, and neither are ce649c0's stuck-after runtime and its rule that an owner with no push or trail row by the first tick is stuck. A lane is stuck only on affirmative failure evidence. An owner with no push or trail row at a tick is drift for that owner to record.
  • The Claude manifest does not take the logo field from efa2a53 because Claude Code has no schema for it. The shared asset is exposed through the Codex manifest instead.
  • Commit df58112 (pstack 0.15.15) is not applied. It drops Sol from every default, cuts the panels to Opus and Grok, and moves Opus from max to xhigh. Open Pstack keeps its own model defaults and three-model panels.
  • The disable-model-invocation: true lines that 23e4138 puts on benchmark-checklist and principle-explain-the-number, and that ab1f702 puts back on principle-explain-the-number, are not applied. The same flag, which upstream carried on principle leaves and figure-it-out before 0.15.5, stays off as in earlier syncs. Principle leaves keep user-invocable: false, and figure-it-out and benchmark-checklist stay model-invocable because poteto-mode routes to them by name. The typed-only correct, ketchup, ketchup-video, poteto-help, in-your-own-words, sharpen, statechart, and reframe keep the flag.
  • The Built-in PR tool paragraph from 23e4138 and 00b14f1 is not applied. It describes a Cursor run tool that Claude Code and Codex do not have.
  • The 40-line squash-body cutoff returns in 00b14f1 and stays omitted, as in the 0.15.0 sync.
  • Autopilot-full step 5's trunk-move rule from 23e4138, and its revision in ce649c0, are not applied. The 23e4138 rule merged without another rebase when git merge-tree was clean and trunk touched none of the PR's paths or CI paths, and both checks pass when trunk removes an export that the PR's new code imports. ce649c0 replaces those checks with the owner's judgment: merge when trunk's changes cannot affect the patch, and run the patch's checks on the merge result when trunk changed a caller or a dependency. An owner who misses a dependency still merges an untested tree. Step 5 keeps the rebase at merge prep and sends a trunk move before the merge through the patch ID rule in playbooks/shipping.md. ce649c0's lockfile exception and its hold before a third rebase go with the rule.
  • poteto-agent.md does not take is_background: true from 2bd5dd4. Claude Code documents background, not is_background, in agent frontmatter, and Codex defines agents in TOML and maps concurrency at dispatch. The port keeps general-purpose in the description and the skills: [pstack:poteto-mode] preload.
  • The root Agent Plugins v1 pstack/plugin.json from e5a02f8 and its version bumps through 0.15.25 are not applied. The port keeps its current Claude manifest at plugins/pstack/.claude-plugin/plugin.json and Codex manifest at plugins/pstack/.codex-plugin/plugin.json. Agent Plugins v1 is revisited with #13.
  • unslop takes bc697d0's description without its disable-model-invocation: true line, as for 73f8be4 above.
  • pstack/.cursor-plugin/plugin.json and pstack/docs/guide/ are not imported. The Cursor manifest has no Claude Code or Codex consumer, and the guide shows Cursor's interface; poteto-help links to the guide upstream. That covers the 0.15.21 to 0.15.25 version bumps and e5136d8's guide edit.
  • Upstream's own Claude Code install is not applied. That covers 182f2ce's and 1b80080's generated tree under harness/pstack/claude-code/, scripts/generate-pstack-harness-trees.mjs, scripts/validate-plugins.mjs, the root .claude-plugin/marketplace.json entry, the adapter at pstack/docs/harness/claude-code.md, and a968159's generator change. That install runs grok-* and gpt-* roles on the session's Claude model, has no Codex, and maps Cursor names at runtime from the adapter, which would be a second mapping layer on top of the port's own. README-UPSTREAM.md takes the README text from 182f2ce, 1b80080 and 019a6a2 verbatim.
  • 019a6a2's guide refresh and scripts/check-pstack-docs.mjs are not applied. The port does not import pstack/docs/guide/, so that check has nothing to compare. The same covers the guide edits in 7b353f7, f9be7aa and d457567.
  • The two harness paragraphs that f9be7aa puts in poteto-help/SKILL.md, which install upstream's Claude Code tree and describe other tools, are not applied. The port keeps its own paragraph on Claude Code and Codex.
  • The 0.15.26 to 0.15.29 manifest bumps in pstack/plugin.json and pstack/.cursor-plugin/plugin.json from 0b8e952, 0148b78 and d457567 are not applied, as for the earlier bumps above.
  • create-formal-verification-skill takes 4382e68 without its disable-model-invocation: true line, because setup's formal verification offer invokes it and the flag blocks that route on Claude Code. tests/skill-collision-repro.sh lists it in routed_model_skills. maintain-formal-verification-skill keeps the flag and runs only when typed.
  • Setup's verification offers are steps 10 and 11 in the port, after its step 9 smoke test. The port never took upstream's step 7, "Offer a verification skill", which upstream has carried since 0.11.3. This sync restores it as step 10, and f9be7aa's formal verification offer becomes step 11. Each keeps upstream's check for a project that already has one.
  • poteto-agent.md does not take b93e811's search of ~/.cursor/plugins/ for poteto-mode, its highest-version rule, or its note that the skill catalog hides poteto-mode. The Claude agent preloads pstack:poteto-mode, the port's poteto-mode is not hidden, and Codex has no poteto-agent type. The agent keeps upstream's "Use the absolute path your parent gave you."
  • ab1f702's disable-model-invocation: true on interrogate is not applied. Poteto-mode and the feature playbook route to it by name, and the flag blocks that route on Claude Code. A skill that needs a typed-only skill, such as interrogate with in-your-own-words or create-formal-verification-skill with statechart from 00d5dec, reads that skill's SKILL.md and follows it.
  • ab1f702's fallback chains for a rejected model slug are not applied: the rule in poteto-mode's Match the model to the job that walks the calling skill's fallback and then the closest valid slug or the parent model, Arena step 3's family defaults and closest-slug rule, Swarm step 3's default and closest-slug rule, and the arena judge's same-model closest slug and default-pool retry. Neither is Arena step 3's rule that refills dropped runner seats on a remaining runner's model or the parent model. Each conflicts with the named-dropout rule in provider-dispatch.md. The arena judge keeps upstream's rule that it is never from the parent's provider, and when no configured entry runs, Arena skips the judge and says so.
  • 2f87c85 retires the Orchestrate playbook and the plan checker. The port deletes playbooks/orchestrate.md, scripts/check-plan.mjs, its test and the port's check-plan.tsconfig.json, and with them c742dd6's Orchestrate mappings.
  • bf0c7cd and 2f87c85 put disable-model-invocation: true on how, why, reflect and architect, which is not applied. Poteto-mode, teach, recall and the playbooks route to them by name, and the flag blocks that route on Claude Code.
  • The model: line that 2f87c85 puts on poteto-agent.md is not applied, and neither is its is_background: true. Grok's agent check requires model-free agents, and the Claude agent keeps its skills: [pstack:poteto-mode] preload.
  • Upstream's role defaults from bf0c7cd, 2f87c85, e58dd04 and dd24b67 are replaced by the port's nine roles in runner/registry/models.ts. Upstream's -fast model rules, the Gemini panel-seat migration, the # budget line, the rule that no role runs above xhigh, and setup's rule that every written model is at xhigh or below are not applied. They would lower an effort the operator chose, as 5bf2b15's step-down would. Per-spawn raising stops at xhigh instead. Eval's dispatch-only model becomes the swarm workers descriptor lowered one step.
  • 2f87c85's fallback chains for a rejected slug and Arena's rule that uses the first slug when the parent's model is unknown are not applied, as for ab1f702 below. The arena judge stays off the parent's provider.
  • 2f87c85's shortened Babysit, Opening a PR and Multi-phase plan are not applied. They fail the landing invariants in tests/skill-collision-repro.sh: Babysit's reply command puts placeholder text inside a shell command, Opening a PR's bare gh pr create drops --repo "$base_repo", and the short Multi-phase plan drops the fork and stack rules. Multi-phase plan loses only its plan-checker step.
  • The relative "Guide page" links that 2f87c85 puts in poteto-help are not applied; the port keeps its GitHub links to the guide.
  • Upstream's 0.15.30 to 0.15.36 manifest bumps in pstack/plugin.json and pstack/.cursor-plugin/plugin.json from eb4db2b, 642289e, b1a1298, 7c7bde7, 164ced1, ab1f702 and c742dd6, and the guide edits in eb4db2b, 3c0fdb4, 34b1b7c, ab1f702 and c742dd6, are not applied, as for the earlier bumps and guide edits above. So are the matching updates to upstream's generated harness/pstack/claude-code/ tree. The same holds for the 0.15.37 to 0.15.50 manifest bumps, guide edits, harness tree updates and automations/benny/ edits.

Local port-patch ledger

  • #296 — heads with no check rollup: upstream's watch-pr treats a GraphQL statusCheckRollup of null as an unreadable rollup and retries until --max-query-errors, so a repository with no CI never settles. The port reads a null rollup as no checks: --status-only reports ✅ no checks at once, and watch mode confirms with one re-read after one backoff before it reports ready. A rollup with no readable contexts, or a PR with no commits, still fails closed. Preserve this divergence during syncs.

  • #293 — dependency cache outside the plugin: upstream's bootstrap.ts installs watch-pr dependencies into the plugin, where Bun's TypeScript bin symlink breaks Codex hook fingerprinting. The port runs bun install --frozen-lockfile --production in a user cache keyed by the hash of package.json and bun.lock, under an absolute XDG_CACHE_HOME, Windows local app data, or ~/.cache, and publishes it by atomic rename. It then registers Commander from that cache with Bun before the CLI imports it. Preserve this divergence and the early Bun guard during syncs; never install into the plugin tree.

  • #235 — Claude transcript folder encoding: the port wrote Claude Code's per-project transcript path into recall, automate-me and the session-pickup playbook. Claude Code encodes each / and each . in the workspace path as -, so a .claude/worktrees/ session's folder holds --claude-worktrees-. Keep both characters in those three lines during syncs.

  • #140 — Reflect transcript resolution: Cursor's Reflect reads the transcript its system prompt names; the port had substituted Claude Code's per-project directory, which left Codex without a lookup. Since bf0c7cd made Reflect one file, its "Read the whole transcript" sentence carries the port's pointer to plugins/pstack/skills/poteto-mode/references/codex-tools.md#active-transcripts, and the rest of reflect/SKILL.md is upstream's. That mapping section holds the harness specifics: the Claude per-project scope, layouts, candidate and scan limits, opening-message verification, the Codex resolver call, and the 2,000-word digest fallback. The port-authored Bun resolver plugins/pstack/skills/poteto-mode/scripts/resolve-codex-transcript.ts, started through the sh launcher resolve-codex-transcript next to it so project Bun config and .env files cannot affect it, looks up the parent's known chat ID in Codex's read-only threads index, checks rollout scope and ownership, and prints opening-message metadata without transcript text. Preserve this divergence during upstream syncs: keep the pointer on that sentence and keep the mapping section and resolver.

  • #120 — harness config homes (tracked for #105): Cursor's setup destination is ~/.cursor/rules/. The shared port resolves nonempty CLAUDE_CONFIG_DIR / CODEX_HOME, otherwise $HOME/.claude / $HOME/.codex, once at plugins/pstack/skills/poteto-mode/references/codex-tools.md#harness-config-homes. setup-pstack/SKILL.md reuses that home for reads, sheet/integration writes, snapshots, restoration, and readback; Claude preserves the literal legacy import at the default home and renders exactly @./pstack-models.md for redirected homes, keeping spaces and # in the config-directory name out of the import line; reruns replace the one import whose target basename is pstack-models.md, append if absent, and stop if duplicated. Preserve this intentional divergence during upstream syncs. The named config-home invariant in tests/skill-collision-repro.sh rejects literal default destinations outside the legacy import, requires the literal default-home rendering and zero/one/many import rules, and verifies unset/empty/space-containing resolution without daily writes. See CHANGES.md for the port correction and tests/setup-config-home-repro.sh for redirected live-evidence preparation. The Cursor sync point is unchanged.

  • #157 — role pointers: Cursor names model descriptors in the Arena, Interrogate, and Swarm skills, the bug-fix, feature, hillclimb, perf-issue, and refactoring playbooks, poteto-mode's delegation defaults, and setup's probe table and first-run sheet. The port replaces each with a role pointer: the role's backticked sheet label and a link to plugins/pstack/skills/poteto-mode/references/model-catalog.md#role-defaults, which registry/render.ts generates from plugins/pstack/skills/poteto-mode/scripts/runner/registry/models.ts. Interrogate's reviewer table and setup's probe table and example sheet are deleted. The Architect and How pointers went with their retired roles in the 0.15.50 sync. When an upstream sync changes a model slug on one of these lines, keep the port's line and put the model change in registry/models.ts. runner/registry.test.ts enforces the rule: ROLE_POINTERS names each file's roles, and its text scan rejects any descriptor or versioned model name in plugins/pstack/**/*.md, README.md, and docs/reference.md outside the generated catalog and agents.

  • #46 — quiet setup reruns: Upstream's setup has no keep-roles, per-family effort, or write-confirmation questions, so this is a port patch. setup-pstack/SKILL.md states one qualifying-rerun exception before step 2's keep-roles question. On a rerun whose sheet loaded with a valid writer sandbox line for each provider setup asks about, with no change named and no inconsistency or kept-predecessor proposal that needs a choice, setup validates in step 3, keeps and prints the roles and efforts instead of asking steps 2 and 4, and writes without step 7's confirmation when every step 5 probe passes. Steps 4, 7 and 8 and the offers in steps 10 and 11 each name the exception. It skips no validation, permission check, snapshot, readback, or the step 9 smoke test, and a failed probe still stops without writing. poteto-help says the same for reruns. Preserve this divergence during upstream syncs.

  • #191 — landing playbooks and per-spawn effort: ce649c0 cuts Shipping to six steps and both autopilots to principles. The port takes the cut's rules and reasons but keeps the landing procedure from 1.3.0: Shipping keeps steps 1 to 9, and Autopilot-full step 2 holds the guarded rebase and push. Since ab1f702 made Autopilot-stack Autopilot-full without the merge, Autopilot-full step 2's stacked-owner paragraph also holds the fork, split-remote and parent-tip rules that Autopilot-stack step 2 held, and each owner restacks its own branch through them. Those steps disarm auto-merge and merge-queue entries before verification and before any rewrite, keep the verdict head and base apart from the landing head and base, resolve the base fetch remote apart from the head push URL, bind each push to a captured SHA, and merge only through a server-enforced expected head. The named landing invariants in tests/skill-collision-repro.sh check those rules by step and phrase, so a sync that moves them updates the invariants in the same change. ce649c0's Match the model to the job rule is taken with port adaptations: the starting level is the role's configured effort, an unlisted effort moves to the nearest effort the catalog row lists, and the fast and standard speed sentences are dropped because the port's descriptors carry no speed selector. From 2f87c85, panel seats keep their configured effort and per-spawn raising stops at xhigh; a configured effort above xhigh stays as configured and is never raised. 2f87c85 also shortens Babysit, Opening a PR and Multi-phase plan, and the port keeps their landing text, as the exclusions above say.

  • #232 — subagent waits in babysit: Cursor's babysit step 6 runs drive and background under /loop. Claude Code subagents have no ScheduleWakeup, so /loop cannot run in them. The port adds one sentence after the /loop sentence that limits /loop to the main session and points a Claude Code subagent to plugins/pstack/skills/poteto-mode/references/codex-tools.md#waits-on-claude-code, which holds the wait rules. Preserve this sentence during upstream syncs.

  • #262 — interrogate adversaries: ab1f702 spawns each adversary as a Cursor subagent that keeps repros in its own worktree. The port routes each adversary's descriptor with isolated-write in a dedicated worktree that the parent prepares at the reviewed HEAD, with the scope's uncommitted tracked and untracked changes copied in, because Claude external writers cannot write the shared .git. A provider whose route has no isolated-write mode is a named dropout, the output lists each adversary or its dropout, and no completed adversary is reported as incomplete coverage. Keep the dispatch-contract paragraph and the interrogate reviewers role pointer. Setup counts interrogate reviewers among the roles whose lanes write files. From #297, the adversary brief asks for each command run and its output even with no findings, and an adversary whose report quotes no command it ran is a named dropout (no command run), not a completed adversary.

  • #262 — reflect skill copies: 7054003 copies a skill out of the plugin cache to .cursor/skills/ or ~/.cursor/skills/ before editing it. The port names the destinations per harness once, in plugins/pstack/skills/poteto-mode/references/codex-tools.md#reflect-skill-copies, and reflect/SKILL.md points there.

  • #262 — statechart types, no test corpus: statechart/scripts/test/ is not imported. It is 2.9 MB of upstream test data and TLC output, more than the review service's reviewers can read, and upstream's CI runs it. The root bun run typecheck checks statechart's scripts: statechart/scripts/package.json adds pinned typescript and @types/node and a typecheck script, with a bun.lock, and the port annotates exitClass in run.ts with its 0 | 1 | 2 return type, which upstream's code needs under strict checking. Keep these lines during syncs until upstream fixes the type, and keep scripts/test/ out, including the lean-corpus/ and lean-*.test.ts files from 4d5593e.

  • #263, #258 — writer sandbox lines and Muse: upstream has no external runner, provider write modes or Muse provider. provider-dispatch.md's Writer sandbox section and setup-pstack/SKILL.md's <provider> writer sandbox: lines, opt-in question and writer-role check are port patches. Keep them, and the runner's providers/muse.ts, through syncs.

  • #310 — old defaults in existing sheets: upstream marks its sheet with # defaults: 3 and replaces old defaults in an unmarked sheet. The port adapts that to its provider-qualified sheet. registry/render.ts puts # defaults: 3 under the sheet's title, and setup step 2 reads it as a header comment, not a role. In an unmarked sheet only, setup replaces an old Grok default in feature, refactoring or swarm workers, and an old Opus, Sol and Grok panel in arena runners, arena cross-judge pool or interrogate reviewers, with the role's current default. It then lowers each @max to its family's default effort, capped at xhigh, lists every change at step 7, and writes the marker. A marked sheet keeps every value, including a Grok role or a @max effort chosen later. Upstream's write cap stays out, as the exclusions above say. Keep this during syncs.

  • #310 — worker kickoff rules: 2f87c85's poteto-mode/worker.md opens every PR ready for review and fixes the PR title and body. The port opens a PR ready for review unless repository instructions require a draft until named evidence exists, which matches Opening a PR, and applies the title and body format unless repository instructions name another. Keep both clauses during syncs.

  • #253 — T3 Code parent: Cursor has no T3 Code route. The port adds the T3 host section to provider-dispatch.md: a lane whose provider T3 offers and has enabled goes through delegate_task, and any other lane takes the standalone route of the Claude Code or Codex runtime. codex-tools.md points to it, and setup-pstack/SKILL.md routes its probes and smoke panel the same way at its existing steps. No other skill body changes. Keep these lines during syncs.

  • #281 — Grok parent: Cursor has no Grok parent. Started from max-metaplanet's PR #282. The port adds grok to PARENTS with explicitLaneRoute: "runner", so the generated route table has a Grok parent column and the runner accepts --parent grok, including a Grok provider. Claude and Codex keep native and stay native-only for their own provider. It adds plugins/pstack/.grok-plugin/plugin.json and the generated grok-agents/ directory, a Grok column and a Waits on Grok section in codex-tools.md, the Grok rules in provider-dispatch.md, and the Grok sheet in setup-pstack/SKILL.md at its existing steps. Keep these lines during syncs.

Check for changes

The repository already names Cursor's repository as the cursor remote in the maintainer checkout. A fresh clone can add it once:

git remote add cursor https://github.com/cursor/plugins.git

Fetch and inspect only commits that touched pstack after the recorded sync point:

git fetch cursor main
git log --oneline 2776ddd2355d6d6c8747d3964600f28daf62f049..cursor/main -- pstack
git diff --stat 2776ddd2355d6d6c8747d3964600f28daf62f049..cursor/main -- pstack

No output means the tracked pstack tree has not changed. This comparison does not need a polling service or generated mirror branch.

Incorporate a change

  1. Create or update a GitHub issue in ericlitman/open-pstack and branch from current main. Pin the upstream target commit in the issue.

  2. Read each upstream pstack commit in order, and record a decision for each one in the issue as a table: adopt, adapt (name the adaptation), or exclude (give the reason). Bring over each adopted commit's intent and content, then apply only the Claude Code, Codex and T3 Code substitutions documented in CHANGES.md and the adaptations in this file.

  3. Run the audit and the mechanical merge from a clean checkout:

    python3 scripts/upstream-audit.py --port HEAD --upstream <target> > audit.json
    python3 scripts/upstream-merge.py audit.json

    The merge checks out files the port never changed, merges the rest three ways, and prints counts of verbatim, clean, review and unmapped paths. It exits 1 when any path needs review.

  4. Resolve each review row by hand. A conflict hunk keeps the port's adaptation and takes upstream's new intent beside it. A change to an excluded path stays out and extends that exclusion's line in this file. Each unmapped path, such as a Cursor manifest or the guide, is excluded or mapped by a decision in step 2. Record every hand resolution and every new adaptation or exclusion in this file.

  5. Keep one shared plugins/pstack/skills/ tree. Put harness translation in the existing codex-tools.md and provider routing, including T3 Code's, in provider-dispatch.md; do not fork a skill per harness.

  6. Add every new skill to the skills list in .claude/skills/verify-open-pstack/features/registry.json.

  7. Update the commit and version in this file, add a provenance row to NOTICE.md, and take README-UPSTREAM.md when upstream changes its README.

  8. Run CI-equivalent checks locally, then run the installed Claude Code and Codex behavioral lanes required by the changed surface with verify-open-pstack. A sync that edits the verifier runs from the candidate head with --self-test. A run above the session limit needs --wide "<reason>". Unit tests alone are not a release gate.

  9. Merge the reviewed PR before tagging the next open-pstack release. Publish a release only when every PR merged since the previous release has an Unfret verdict on its merged head and each material finding among them has a merged fix-forward PR. Publish it with python3 scripts/release.py publish from a clean checkout of main.

Cursor's version and open-pstack's version are independent. Cursor's version identifies the imported content; open-pstack's version identifies the cross-harness distribution.