Repository navigation
release: sync Cursor pstack 0.15.17 as Open Pstack 1.6.0 - #144
ericlitman wants to merge 3 commits into
Conversation
Port the ten skill-content commits from 23e4138 through 978ca6e with the Claude Code and Codex substitutions in CHANGES.md. Adds the benchmark-checklist, correct, ketchup, poteto-help, and principle-explain-the-number skills, and registers them in the verify-open-pstack feature map. df58112 (drop Sol from every default) is not applied. UPSTREAM.md lists it and the other exclusions.
Merge Protections🟠 1 of 2 protections blocking · waiting on 🤖 CI
🟠 Queue ready pull requestsWaiting for
Waiting checks:
|
|
| 4. **Swarm-verify every round before its merge.** A round starts at the owner's code-ready head SHA and at each later push that changes the PR's patch. At that SHA, fan out parallel independent verifiers per the **swarm** skill and aggregate to one verdict. The merge needs a clean verdict from the round whose patch matches the merge-ready head. Audit the receipts in the merge-ready report before the verdict. The lanes: re-run the gates at that SHA. Prove the load-bearing behavior live on the real surface the change touches (the `run` skill for CLIs and TUIs, `verify` for UIs, or a named driver where neither fits). Audit the diff, distrusting the PR body. Run the audit as two or more review lanes with the full brief. Give each lane one main focus, such as consumer parity with trunk, lifetimes and races, or data and config safety. **Regression lane against trunk.** Run the same load-bearing scenario on current trunk. If trunk does not have the feature, record that fact and gate the behavior the diff adds plus the end state the user waits for instead of pretending trunk can produce it. The live lane is the floor, and a verdict without it is not clean. No merge without the root's clean verdict. When the lanes return, send every proven finding against the PR to the owner in one fix-forward. A defect that a lane filed as a note is a finding. For each behavior finding, ask for a red test that covers every site with the same defect. Where no test can show the defect, ask for a repro receipt instead. Add that defect to the next round's review brief. The new head gets a fresh swarm and a fresh verdict, except for lane results that stay valid under the patch-id rule in `playbooks/shipping.md`. | ||
| 5. **On a clean verdict the owner merges and takes the next item.** The owner merges only from a head freshly rebased onto trunk. Merge prep never comes before a round's lanes start, and it ends with a rebase onto current trunk right before the merge. After the merge-prep rebase, the owner reports the new head SHA. CI must pass on that head before the merge, and the patch-id rule decides whether the round's verdict still holds. A private-stack child reaches that state through Shipping step 4 after its parent merges. The merge-ready report records the verdict SHA and the current landing SHA. If trunk moves again before the merge, the patch ID rule in `playbooks/shipping.md` governs re-verification. A changed patch needs a new verdict. An unchanged patch keeps the verdict, but Shipping step 3 records the new `<landing-sha>` after current CI and mergeability pass. The owner lands its own PR only through Shipping step 5's server-enforced expected-head flow bound to `<landing-sha>`; never use a PR-number-only merge or unguarded auto-merge. The owner then picks up its next self-contained item from the queue. The operator's full-autonomy grant plus the root's clean verdict is the merge authorization that babysitting alone never has. Operator-named items stop at merge-ready and wait for the operator's click. | ||
| 6. **Run the root layer.** A genuinely new raise of a pinned gate or budget value (a limit CI only lets tighten) needs your fresh countersign, granted only after verifier proof. If the operator's grant or standing orders cover approvals, that countersign is the approval. The owner records it in the form that the tool's approval contract allows, with a pointer to the root's countersign. A lane checks the record against that countersign. The root never gives or bypasses an approval that the forge enforces. Absorbing values that already landed on main is drift, not a raise. Run an audit tick over all owners roughly every 30 minutes. The tick is an observation cadence, never a lease, deadline, or cancellation threshold. Arm each tick as a real `/loop` in dynamic mode, which schedules its own wake-up rather than blocking on a sleep. Never leave the cadence to memory or lossy completion notifications. At each tick, re-read this playbook from disk (`skills/poteto-mode/playbooks/autopilot-full.md` under the installed plugin), then re-read the standing objective. Audit the operation against both. Fix drift during that tick and treat it as urgent. Probe each owner through its retained handle with a generic liveness or status check, and collect the decision trails. Count commits, pushes, PR or check deltas, store reports, and a live retained process as evidence. Elapsed time or the absence of a new side effect alone never proves a lane is stuck; implementation runs can remain healthy for 90 minutes or much longer. Stand a lane down only on affirmative failure evidence such as a dead process, failed handle, explicit error, or a caller-supplied external deadline. Each tick also runs this stuck test over the parent's background task list and every owner's `children.tsv`. Cancel a stuck lane through its retained handle. Whether or not the cancel succeeds, the root has the owner record it as stuck in `children.tsv` and, if its work is still needed, replace it. Each replacement that fails gets the same steps. The root takes both steps when the owner cannot. A stall never proves or drops the work. When merges batch, run a retro pass and a post-merge bot-comment sweep. End the tick only when no delegated work is left, even after the last merge. | ||
| 5. **On a clean verdict the owner merges, and a fresh owner takes the next item.** The owner merges only from a head freshly rebased onto trunk. Merge prep never comes before a round's lanes start, and it ends with a rebase onto current trunk right before the merge. After the merge-prep rebase, the owner reports the new head SHA. CI must pass on that head before the merge, and the patch-id rule decides whether the round's verdict still holds. A private-stack child reaches that state through Shipping step 4 after its parent merges. The merge-ready report records the verdict SHA and the current landing SHA. Once that head is green and its patch ID matches the verdict's under the patch ID rule in `playbooks/shipping.md`, a later trunk move does not force another rebase. Right before the merge, fetch trunk through `<base-remote>` and check that `git merge-tree` of the head against current trunk is clean. Also check that no path in `git diff --name-only $(git merge-base HEAD "$base_remote/$trunk") "$base_remote/$trunk"` is a path the PR changes or a path that decides which CI runs for it, such as the repo's CI config paths. If either check fails, rebase again through the disarm, captured-SHA, and lease steps of step 2, report the new head SHA, wait for CI to pass on it, and repeat these checks. A changed patch needs a new verdict. An unchanged patch keeps the verdict, but Shipping step 3 records the new `<landing-sha>` after current CI and mergeability pass. The owner lands its own PR only through Shipping step 5's server-enforced expected-head flow bound to `<landing-sha>`; never use a PR-number-only merge or unguarded auto-merge. The owner then returns. A fresh owner picks up the next self-contained item from the queue, per poteto-mode's Subagents section. The operator's full-autonomy grant plus the root's clean verdict is the merge authorization that babysitting alone never has. Operator-named items stop at merge-ready and wait for the operator's click. |
There was a problem hiding this comment.
The new no-rebase shortcut can merge code that was never tested with current trunk. A trunk change can alter an API, schema, or dependency in a file the PR does not edit. That passes the path check and git merge-tree, while CI on the unchanged PR head still tests the old trunk. The patch ID also stays unchanged, so the old verdict survives.
Test the combined PR head and current trunk before allowing this shortcut, or rebase and require CI on the new head.
| - In Codex, ask for `pstack:poteto-mode` by name at the start of each task. | ||
| - In both, start each new task with `/poteto-mode` when it matters. | ||
|
|
||
| Mid-session, "new task" makes the mode match a fresh playbook. `/poteto-mode` already uses `poteto-agent` for the subagents its playbook steps spawn. To get the same style from a subagent of your own, spawn it with `subagent_type: "poteto-agent"`. |
There was a problem hiding this comment.
Help gives Codex wrong instructions
The new help page tells users to spawn subagent_type: "poteto-agent" without limiting that advice to Claude Code. Codex has no such type, as this page and codex-tools.md both state. Codex users asking how to create a subagent can receive an instruction their app cannot use.
Qualify the Claude Code instruction and give Codex users the supported spawn_agent route, with instructions to read poteto-mode first.
🛑 3 blocking findings🔴 Critical · Verify the combined tree before skipping a rebase 🟡 Medium · Identify plugin-dev as a separate dependency 🟡 Medium · Preserve valid absence-only regression tests WalkthroughThis PR moves Open Pstack from Cursor pstack
Advisories (5)
Since the last review
Repair promptRead the Details
First review of this pull request. @unfret review · @unfret status · @unfret help |
There was a problem hiding this comment.
🛑 3 blocking findings
🔴 Critical · Verify the combined tree before skipping a rebase
🟡 Medium · Identify plugin-dev as a separate dependency
🟡 Medium · Preserve valid absence-only regression tests
Check
|
|
||
| Not in pstack: | ||
|
|
||
| - `run` (CLIs and TUIs), `verify` (UIs), `loop`, and `plugin-dev:skill-development` are Claude Code built-ins. [`codex-tools.md`](../poteto-mode/references/codex-tools.md) names the Codex equivalent of each. |
There was a problem hiding this comment.
🟡 Medium · Identify plugin-dev as a separate dependency
plugin-dev:skill-development is not a Claude Code built-in. docs/reference.md explicitly requires installing plugin-dev from claude-plugins-official, and pstack's manifest does not install it automatically. For a user who installed only pstack, this help answer omits the prerequisite and sends skill-authoring work to an unavailable skill. Also reported for this defect: - plugin-dev is incorrectly advertised as built in (plugins/pstack/skills/poteto-help/SKILL.md:106): plugin-dev:skill-development is a separately installed companion plugin, as documented in docs/reference.md, not a Claude Code built-in. A new user following this setup guidance will omit that dependency, and substantive skill-authoring or Reflect routes will fail when they try to invoke the unavailable skill. - poteto-help calls plugin-dev:skill-development a built-in (plugins/pstack/skills/poteto-help/SKILL.md:106): Line 106 lists plugin-dev:skill-development alongside run, verify, and loop as Claude Code built-ins. The Get set up install step (line 37) installs only pstack. docs/reference.md at this head says plugin-dev is a separate companion plugin from claude-plugins-official that users must install themselves. A user who follows /poteto-help setup never installs plugin-dev. When /reflect or the authoring playbook later hands off to plugin-dev:skill-development, no such skill exists, and the help skill tells the user it ships with Claude Code.
| 4. **Swarm-verify every round before its merge.** A round starts at the owner's code-ready head SHA and at each later push that changes the PR's patch. At that SHA, fan out parallel independent verifiers per the **swarm** skill and aggregate to one verdict. The merge needs a clean verdict from the round whose patch matches the merge-ready head. Audit the receipts in the merge-ready report before the verdict. The lanes: re-run the gates at that SHA. Prove the load-bearing behavior live on the real surface the change touches (the `run` skill for CLIs and TUIs, `verify` for UIs, or a named driver where neither fits). Audit the diff, distrusting the PR body. Run the audit as two or more review lanes with the full brief. Give each lane one main focus, such as consumer parity with trunk, lifetimes and races, or data and config safety. **Regression lane against trunk.** Run the same load-bearing scenario on current trunk. If trunk does not have the feature, record that fact and gate the behavior the diff adds plus the end state the user waits for instead of pretending trunk can produce it. The live lane is the floor, and a verdict without it is not clean. No merge without the root's clean verdict. When the lanes return, send every proven finding against the PR to the owner in one fix-forward. A defect that a lane filed as a note is a finding. For each behavior finding, ask for a red test that covers every site with the same defect. Where no test can show the defect, ask for a repro receipt instead. Add that defect to the next round's review brief. The new head gets a fresh swarm and a fresh verdict, except for lane results that stay valid under the patch-id rule in `playbooks/shipping.md`. | ||
| 5. **On a clean verdict the owner merges and takes the next item.** The owner merges only from a head freshly rebased onto trunk. Merge prep never comes before a round's lanes start, and it ends with a rebase onto current trunk right before the merge. After the merge-prep rebase, the owner reports the new head SHA. CI must pass on that head before the merge, and the patch-id rule decides whether the round's verdict still holds. A private-stack child reaches that state through Shipping step 4 after its parent merges. The merge-ready report records the verdict SHA and the current landing SHA. If trunk moves again before the merge, the patch ID rule in `playbooks/shipping.md` governs re-verification. A changed patch needs a new verdict. An unchanged patch keeps the verdict, but Shipping step 3 records the new `<landing-sha>` after current CI and mergeability pass. The owner lands its own PR only through Shipping step 5's server-enforced expected-head flow bound to `<landing-sha>`; never use a PR-number-only merge or unguarded auto-merge. The owner then picks up its next self-contained item from the queue. The operator's full-autonomy grant plus the root's clean verdict is the merge authorization that babysitting alone never has. Operator-named items stop at merge-ready and wait for the operator's click. | ||
| 6. **Run the root layer.** A genuinely new raise of a pinned gate or budget value (a limit CI only lets tighten) needs your fresh countersign, granted only after verifier proof. If the operator's grant or standing orders cover approvals, that countersign is the approval. The owner records it in the form that the tool's approval contract allows, with a pointer to the root's countersign. A lane checks the record against that countersign. The root never gives or bypasses an approval that the forge enforces. Absorbing values that already landed on main is drift, not a raise. Run an audit tick over all owners roughly every 30 minutes. The tick is an observation cadence, never a lease, deadline, or cancellation threshold. Arm each tick as a real `/loop` in dynamic mode, which schedules its own wake-up rather than blocking on a sleep. Never leave the cadence to memory or lossy completion notifications. At each tick, re-read this playbook from disk (`skills/poteto-mode/playbooks/autopilot-full.md` under the installed plugin), then re-read the standing objective. Audit the operation against both. Fix drift during that tick and treat it as urgent. Probe each owner through its retained handle with a generic liveness or status check, and collect the decision trails. Count commits, pushes, PR or check deltas, store reports, and a live retained process as evidence. Elapsed time or the absence of a new side effect alone never proves a lane is stuck; implementation runs can remain healthy for 90 minutes or much longer. Stand a lane down only on affirmative failure evidence such as a dead process, failed handle, explicit error, or a caller-supplied external deadline. Each tick also runs this stuck test over the parent's background task list and every owner's `children.tsv`. Cancel a stuck lane through its retained handle. Whether or not the cancel succeeds, the root has the owner record it as stuck in `children.tsv` and, if its work is still needed, replace it. Each replacement that fails gets the same steps. The root takes both steps when the owner cannot. A stall never proves or drops the work. When merges batch, run a retro pass and a post-merge bot-comment sweep. End the tick only when no delegated work is left, even after the last merge. | ||
| 5. **On a clean verdict the owner merges, and a fresh owner takes the next item.** The owner merges only from a head freshly rebased onto trunk. Merge prep never comes before a round's lanes start, and it ends with a rebase onto current trunk right before the merge. After the merge-prep rebase, the owner reports the new head SHA. CI must pass on that head before the merge, and the patch-id rule decides whether the round's verdict still holds. A private-stack child reaches that state through Shipping step 4 after its parent merges. The merge-ready report records the verdict SHA and the current landing SHA. Once that head is green and its patch ID matches the verdict's under the patch ID rule in `playbooks/shipping.md`, a later trunk move does not force another rebase. Right before the merge, fetch trunk through `<base-remote>` and check that `git merge-tree` of the head against current trunk is clean. Also check that no path in `git diff --name-only $(git merge-base HEAD "$base_remote/$trunk") "$base_remote/$trunk"` is a path the PR changes or a path that decides which CI runs for it, such as the repo's CI config paths. If either check fails, rebase again through the disarm, captured-SHA, and lease steps of step 2, report the new head SHA, wait for CI to pass on it, and repeat these checks. A changed patch needs a new verdict. An unchanged patch keeps the verdict, but Shipping step 3 records the new `<landing-sha>` after current CI and mergeability pass. The owner lands its own PR only through Shipping step 5's server-enforced expected-head flow bound to `<landing-sha>`; never use a PR-number-only merge or unguarded auto-merge. The owner then returns. A fresh owner picks up the next self-contained item from the queue, per poteto-mode's Subagents section. The operator's full-autonomy grant plus the root's clean verdict is the merge authorization that babysitting alone never has. Operator-named items stop at merge-ready and wait for the operator's click. |
There was a problem hiding this comment.
🔴 Critical · Verify the combined tree before skipping a rebase
Disjoint paths and a clean merge-tree do not establish runtime compatibility. For example, a verified PR adds feature.mjs importing an export from api.mjs, then trunk removes that export. Both new checks pass, the unchanged PR retains its green CI and verdict, but the merged application crashes with a missing-export SyntaxError. This was reproduced with a clean merge-tree result. In repositories without an up-to-date-branch requirement, this exception permits landing code whose combined tree was never checked. Also reported for this defect: - Disjoint-path shortcut can merge an untested broken tree (plugins/pstack/skills/poteto-mode/playbooks/autopilot-full.md:9): When trunk changes an API in one file and the PR changes a consumer in another, the path sets are disjoint and git merge-tree is clean, so this new shortcut permits merging without rebasing or running CI on the combined tree. The PR's previously green head can therefore produce a compile failure only after it is combined with the new base and merged into trunk.
|
|
||
| 1. **Eliminate it with architecture.** Give each piece of state one owner and each task one supported way. Hide internals so the wrong import fails. Replace hand-synced lists with one source of truth. Delete old ways and dead code an agent would copy. | ||
| 2. **Enforce it with types so the bad state can't be written.** If bad code still compiles, add a lint or CI check whose error names the file, type, or function to use instead. If the pattern is already common, fail only when a change adds more. | ||
| 3. **Test the behavior.** Fix or delete any test that would still pass if every function it calls returned nothing. |
There was a problem hiding this comment.
🟡 Medium · Preserve valid absence-only regression tests
This blanket criterion marks useful negative-path tests for repair or deletion. The existing core.test.ts case 'ordinary no-runtime has no install requirement' passes when completeEvidence returns nothing, yet correctly fails if documentation-only verification starts requiring installation. The retained test-behavior principle explicitly preserves such tests and requires a relevant defect probe. Following this new instruction can delete meaningful regression coverage merely because the required outcome is absence.
Autopilot-full skipped the merge-prep rebase when the paths were disjoint and git merge-tree was clean. That can still land a combined tree that breaks at runtime, so the skip now needs a forge that tests the head merged with current trunk. poteto-help called plugin-dev:skill-development a Claude Code built-in and gave Codex users the poteto-agent subagent type. It now names plugin-dev as a separate install and gives Codex the spawn_agent route. correct told agents to delete absence-only tests. It now keeps those that fail on a relevant defect, matching the test-behavior principle. docs/reference.md now states 1.6.0, the 0.15.17 sync commit, and 24 principle leaves. UPSTREAM.md records each divergence.
Exclude upstream 23e4138's Autopilot-full rule that merges a green head without another rebase after trunk moves. A clean `git merge-tree` and disjoint paths do not prove the combined tree builds, so step 5 keeps re-verifying through the patch ID rule. UPSTREAM.md and docs/reference.md record the exclusion. Point `correct` step 3 at principle-test-behavior-not-implementation so it keeps negative-path tests, matching the port's test principle. Fix poteto-help's Codex subagent advice, the plugin-dev dependency, and the typed-only skill list. Stop Reflect claiming its glob lists nested and subagent transcripts. Correct two UPSTREAM.md attributions, file the post-1.5.0 changes under 1.6.0, and refresh the stale version, principle count, and /goal row in docs/reference.md. Refs ericlitman#143, ericlitman#144. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #143. Overlaps #128, which covers the 0.15.6 to 0.15.9 part of this range.
@nunoras wrote this sync on a fork branch. GitHub would not let a non-collaborator open the PR, so Eric opened it from their branch unchanged.
Summary
Cursor pstack moved from 0.15.5 to 0.15.17. This PR ports those changes to Claude Code and Codex and releases them as Open Pstack 1.6.0.
UPSTREAM.mdlists what this sync leaves out, with a reason for each:df58112, which drops Sol from every default and cuts the panels to Opus and Grok.disable-model-invocationon principle leaves,figure-it-out, andbenchmark-checklist, because poteto-mode routes to them by name.docs/guide/, the Cursor manifest, andmake-bot-ui.Evidence
main,python3 scripts/upstream-audit.py --port origin/main --upstream cursor/mainreports 67 upstream files changed since the recorded sync point (0.15.5).After: on this head, the same audit reports 0 changed files against 0.15.17.
fbda698, run locally with Bun 1.4.0:bun run test: 225 pass, 0 fail.bun run typecheck: exit 0.PSTACK_STATIC_ONLY=1 bash tests/skill-collision-repro.sh: exit 0, and the verify-open-pstack helper suite passes 107 of 107.claude plugin validateon the marketplace and the plugin: both pass.Merge Danger
Door: two-way. This PR changes skill text and the plan checker's required markers. Reverting the merge commit restores 1.5.0 text. Tagging and releasing 1.6.0 is a separate step.
Blast Radius: wide.
Every pstack session in both harnesses loads the changed poteto-mode index, playbooks, and principles. A lost port adaptation would show up as a skill that names a Cursor tool or path, a skill the model can no longer invoke, or a role that dispatches to the wrong model. The plan checker now requires
hourlyand no longer requiresstanding ordersor30-minute, so existing plan files that follow the old skeleton fail the checker until they are updated.What changed
The full change list is the 1.6.0 section of
CHANGES.md. The highest-risk files are poteto-mode, the two autopilot playbooks, andscripts/check-plan.mjs. The five new skills are in the verify-open-pstack feature map, so this PR changes the verifier.Verification
live-gatestatus on the final head links the evidence comment (installed version, surface, action, observed result).Mergify does not queue a pull request without
live-gateon its exact head. Do not merge, tag, release, or roll out without it.Not verified
🤖 Generated with Claude Code