Skip to content

pstack: restate four overspecified principles as reasoning, not rules - #633

Merged
cursor[bot] merged 3 commits into
mainfrom
lauren/principles-durability-pass-e359
Oct 15, 2026
Merged

cursor[bot] merged 3 commits into
mainfrom
lauren/principles-durability-pass-e359

Conversation

@poteto

@poteto poteto commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR is a durability pass on the 24 principle-* skills. I audited all of them. I rewrote 4 that gave rules instead of the idea behind the rules. I kept 20 without change, because they already state the idea and use specific names only as examples.

Rewritten:

  • principle-test-behavior-not-implementation (the operator's example). The old text banned assertion shapes (not.toHaveBeenCalled, toEqual([]), restated constants). The new text defines behavior as what a user of the code can observe. It judges each test against two imagined edits: "break the behavior" (the test must fail) and "change the internals" (the test must pass). The contract decides, not the shape of the assertion.
  • principle-fix-root-causes. "Do not add guards" became the test that decides the case: a guard is a fix only when the state it handles is legitimate. If the state must never exist, find what produced it.
  • principle-attack-the-premise. "Take a census of which actors hold the imbalance" became "find an observation that would come out differently if the premise were false". The census was one example of that test. It does not fit failures that are not distributed by actor, for example failures distributed by time of day.
  • principle-make-operations-idempotent. "Use PID-based stale lock detection" is wrong when each run is a new pod or host. The new text says to judge staleness by evidence that stays true wherever the previous run stopped.

The one-line summaries in poteto-mode/SKILL.md, README.md, and docs/guide/08-principles.md now agree with the new descriptions. Step 3 of skills/correct/SKILL.md also restated the old test rule ("would still pass if every function it calls returned nothing"). It now uses the same two imagined edits, with the wording from the everysphere port, so the two copies are byte-identical. This PR does not change skills/ketchup/ or the version.

Eval

I ran 10 held-out decision cases. Each case has 3 candidate models (Claude Opus 5.5, GPT-5.6 Sol, Gemini 4 Argon) and 2 repetitions. Each case ran with three arms: the old text, the new text, and no principle. That is 180 runs in total. A blinded Grok 4.7 judge graded each run against a rubric that the candidates did not see. Each criterion has a tag that shows what it tests.

Criterion kind Old New No principle
The old text bans the correct move 23/30 30/30 30/30
The old text does not catch the wrong move 28/30 30/30 28/30
The old text points at the wrong move 20/24 22/24 21/24
The old text already covers the case 119/132 119/132 117/132

The largest effects:

  • Order tests. With the old text, 0 of 6 runs kept the test that pins the stored status codes, which a billing service reads. With the new text, 6 of 6 runs kept it. The old ban on "restated constants" caused the models to delete a contract test.
  • Stuck export lock. With the old text, 4 of 6 runs made a PID liveness check decide if the lock is stale. With the new text, 1 of 6 runs did this.

The new text scores lower than the old text on only 2 criteria, each by one run, both in attack-the-premise (old 37, new 35). The judge reads only the diff and the final message. The transcripts show that both of those GPT-5.6 Sol runs wrote down the premise and tested it against the data before they changed code. They did not repeat it in the final message. Both principle texts are better than no principle on this skill (29 points).

The /correct change was not part of the eval. It applies the same test as the evaluated principle.

Test plan

  • node scripts/validate-plugins.mjs passes.
  • Each edited skill has name and description frontmatter, and all relative links resolve.
  • Eval: 180 runs, blinded judge, transcripts checked for every new-arm failure.
  • skills/correct/SKILL.md is byte-identical to everysphere's .cursor/skills/lauren/correct/SKILL.md on lauren/principles-durability-pass-6acc (commit 440ed6fe).
Open in Web Open in Cursor 

Note

Low Risk
Documentation and agent skill text only; no runtime, auth, or data-path changes.

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

cursoragent and others added 3 commits October 14, 2026 23:30
test-behavior-not-implementation, fix-root-causes, attack-the-premise, and
make-operations-idempotent each banned or prescribed specific mechanisms
(matcher names, nil-check guards, an actor census, PID locks). Restate each
as the idea an agent needs to derive the call in cases the text never names.

Co-authored-by: lauren <poteto@users.noreply.github.com>
Co-authored-by: lauren <poteto@users.noreply.github.com>
Co-authored-by: lauren <poteto@users.noreply.github.com>
@cursor
cursor Bot merged commit e5136d8 into main Oct 15, 2026
1 check passed
leegmoore added a commit to liminal-ai/pstack-lim that referenced this pull request Oct 17, 2026
… not rules

Port of upstream e5136d8 (cursor#633). test-behavior-not-implementation,
fix-root-causes, attack-the-premise and make-operations-idempotent
drop the mechanisms they banned or prescribed (matcher names, the
nil-check guard ban, the actor census, PID locks) and state the idea an
agent needs to make the call itself. poteto-mode's Principles index,
the README table and the principles guide carry the new summaries, and
/correct's test step names the two imagined edits.

Adapted for T3: the three rewritten descriptions keep the fork's
"Use only when the user or another skill names it." ending and drop
disable-model-invocation (Skill visibility row). No other fork text
named the removed mechanisms.

(cherry picked from commit e5136d8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leegmoore added a commit to liminal-ai/pstack-lim that referenced this pull request Oct 17, 2026
… not rules

Port of upstream e5136d8 (cursor#633). test-behavior-not-implementation,
fix-root-causes, attack-the-premise and make-operations-idempotent
drop the mechanisms they banned or prescribed (matcher names, the
nil-check guard ban, the actor census, PID locks) and state the idea an
agent needs to make the call itself. poteto-mode's Principles index,
the README table and the principles guide carry the new summaries, and
/correct's test step names the two imagined edits.

Adapted for T3: the three rewritten descriptions keep the fork's
"Use only when the user or another skill names it." ending and drop
disable-model-invocation (Skill visibility row). No other fork text
named the removed mechanisms.

(cherry picked from commit e5136d8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leegmoore added a commit to liminal-ai/pstack-lim that referenced this pull request Oct 17, 2026
… not rules

Port of upstream e5136d8 (cursor#633). test-behavior-not-implementation,
fix-root-causes, attack-the-premise and make-operations-idempotent
drop the mechanisms they banned or prescribed (matcher names, the
nil-check guard ban, the actor census, PID locks) and state the idea an
agent needs to make the call itself. poteto-mode's Principles index,
the README table and the principles guide carry the new summaries, and
/correct's test step names the two imagined edits.

Adapted for T3: the three rewritten descriptions keep the fork's
"Use only when the user or another skill names it." ending and drop
disable-model-invocation (Skill visibility row). No other fork text
named the removed mechanisms.

(cherry picked from commit e5136d8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leegmoore added a commit to liminal-ai/pstack-lim that referenced this pull request Oct 17, 2026
…ments and section cuts (#7)

* feat(pstack): show /ketchup decisions as before/after visuals

Port of upstream ea32d95 (cursor#570). Each /ketchup action item gets a side
by side before and after, and the turn stays read-only except for
visuals made from what the agent already has.

Adapted for T3: charts and diagrams go on a self-contained HTML page
checked with html_preview and published with html_render, in place of
Mermaid and generated images. "Video" reads "recording". The version
bump is left out, as in earlier syncs.

(cherry picked from commit ea32d95)

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

* feat(pstack): shorten /ketchup replies and build them on real visuals

Port of upstream d00ba6e (cursor#595). The reply text is capped at 250 words,
what happened is shown in one status visual with at most three results,
each action item gets three lines, and options and costs move into a
before and after visual. A Markdown table no longer counts as a visual.
README and poteto-help take upstream's new one-line summary.

Adapted for T3: diagrams and charts are drawn on a self-contained HTML
page, checked with html_preview and published with html_render, which
shows above the reply's text. This replaces Mermaid, /visualize and
generated images, which T3 does not have. The description keeps the
fork's named-only ending (Skill visibility row).

(cherry picked from commit d00ba6e)

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

* refactor(pstack): make /ketchup read like /bro in 150 words

Port of upstream c86f349 (cursor#609). /ketchup takes /bro's voice but not its
task, caps the whole reply at 150 words, sums up in at most four boxes
written as spoken sentences, gives each action item two lines, and
fits unasked irreversible steps into one line. README and poteto-help
take upstream's new one-line summary.

Adapted for T3: the same HTML page, html_preview and html_render
wording as the previous port in place of Mermaid, /visualize and
generated images. The description keeps the named-only ending (Skill
visibility row).

(cherry picked from commit c86f349)

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

* feat(pstack): have /ketchup explain changes with screenshots, videos and diagrams

Port of upstream afd51cf (cursor#628). /ketchup helps the user understand
each change, not only where it stands. It shows pictures first, sums up
in spoken bullets, lists action items as plain bullets, draws only
where a picture explains better than words, never gives a fact twice,
and stops counting visuals toward the 150 words.

Adapted for T3: screenshots come from the control skill or T3's
preview_snapshot with save: true, recordings from preview_recording_start
and preview_recording_stop, and both are embedded as ![alt](path).
Diagrams, charts and drawn option comparisons go on one HTML page checked
with html_preview and published with html_render. That page shows above
the reply's text, so the skill says where a drawn choice lands. Mermaid,
/visualize and generated images are left out, since T3 has none of them.

(cherry picked from commit afd51cf)

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

* refactor(pstack): restate four overspecified principles as reasoning, not rules

Port of upstream e5136d8 (cursor#633). test-behavior-not-implementation,
fix-root-causes, attack-the-premise and make-operations-idempotent
drop the mechanisms they banned or prescribed (matcher names, the
nil-check guard ban, the actor census, PID locks) and state the idea an
agent needs to make the call itself. poteto-mode's Principles index,
the README table and the principles guide carry the new summaries, and
/correct's test step names the two imagined edits.

Adapted for T3: the three rewritten descriptions keep the fork's
"Use only when the user or another skill names it." ending and drop
disable-model-invocation (Skill visibility row). No other fork text
named the removed mechanisms.

(cherry picked from commit e5136d8)

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

* refactor(pstack): cut unneeded sections from seven skills

Port of upstream 08bd59b (cursor#571). Removes sections the agent already
follows without the text: restated rules, generic search steps,
evidence checklists and return-format blocks in how, why, the babysit
and worktree-cleanup playbooks, and four principles (encode lessons in
structure, laziness protocol, exhaust the design space, guard the
context window).

Adapted for T3: worktree-cleanup drops only its opening paragraph. Its
steps stay the fork's, with T3 thread exports and T3 worktree paths in
place of upstream's Cursor chat scan. The version bump is left out.

(cherry picked from commit 08bd59b)

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

* refactor(pstack): cut marginal sections from four skills

Port of upstream 99743e9 (cursor#634). Removes sections agents follow as well
without the text in interrogate's lead-judgment reference, swarm, and
the type-system and migrate-callers principles. type-system summaries
drop "refuse to lie to the compiler" with the bullet that backed it.

Adapted for T3: swarm keeps its fork item 4 (the role file's swarm
workers line, delegate_task, orchestrator_capabilities and the Sol rule
for browser lanes) and drops only upstream's cut item 3. The
type-system description keeps its named-only ending (Skill visibility
row).

(cherry picked from commit 99743e9)

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

* chore(fork): guard /ketchup's T3 visuals in the port check

The /ketchup port replaced upstream's Mermaid, /visualize and generated
image wording with T3's html_preview and html_render page, saved
screenshots and recordings. Nothing kept that from drifting back on the
next sync, so the port check now bans /visualize and requires
html_render in /ketchup, each with a planted-regression test. FORK.md
gains a Visuals row that states the rule and why.

Mermaid is not banned, because how and teach still use it in replies
outside /ketchup.

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

* docs(fork): record the sync PR D decisions and close the Sync 1 log

Sets ea32d95, d00ba6e, c86f349, afd51cf, e5136d8, 08bd59b and 99743e9 to
their final adapt decisions for PR D, each naming the FORK.md rows
applied. The version bumps, the Agent Plugins manifest and the Claude
Code generated tree move from "skip (planned)" to "skip" with their
reasons unchanged, so no row in Sync 1 is still planned.

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

* fix(pstack): keep /ketchup to captures the work already made

Upstream's /ketchup uses only artifacts the work produced. The T3 wording named the capture tools without saying so, which read as permission to drive the app during a catch-up.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
caelaxie added a commit to pstack-ports/devin-pstack that referenced this pull request Oct 18, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
baseline `2418e86` matches upstream pstack at
[`e5136d8`](cursor/plugins@e5136d8)
([#633](cursor/plugins#633)). diffed the
baseline tree against `pstack/` at `e5136d8` and at its parent
`850d7f2`. the parent still has the pre-#633 principle text. the only
path in `e5136d8` that the baseline lacks is `pstack/.cursor-plugin/`,
which this port never carried (devin uses `.devin-plugin/plugin.json`).

upstream `main` has no pstack commits after `019a6a2`. version is still
`0.15.25` upstream, so plugin.json, `.devin-plugin/plugin.json`, and the
readme stay at `0.15.25`. synced to
`019a6a20592c10bf92869e5740368f578a9997fd`.

ported:
-
[`99743e9`](cursor/plugins@99743e9)
([#634](cursor/plugins#634)) cut marginal
sections from `interrogate/references/lead-judgment.md`,
`principle-migrate-callers-then-delete-legacy-apis`,
`principle-type-system-discipline`, and `swarm`. kept the existing devin
frontmatter (`triggers: [user]`) and the existing devin swarm wording.
the #634 readme table edit drops "refuse to lie to the compiler" from
the upstream principle index. this port's readme no longer has that
index, and the phrase lived only in the skill description, which is
updated.
-
[`0317eb8`](cursor/plugins@0317eb8)
([#700](cursor/plugins#700)) brand via a type
guard in `typescript-best-practices` `SKILL.md` and
`references/patterns.md`. kept `triggers: [user, model]` and the dropped
`paths` frontmatter.
-
[`a968159`](cursor/plugins@a968159)
([#702](cursor/plugins#702)) `poteto-mode`
frontmatter `name` is now `poteto-mode`. `make-bot-ui` already had
`name: make-bot-ui` from the devin port. other skills already matched
their folders.
-
[`019a6a2`](cursor/plugins@019a6a2)
([#704](cursor/plugins#704)) guide prose and the
autopilot-full claim in `docs/guide/02` through `10`. kept existing
devin wording (`/pstack:` prefixes, cloud sessions, `.devin` paths).

skipped:
-
[`e5136d8`](cursor/plugins@e5136d8)
([#633](cursor/plugins#633)) is already the
baseline.
-
[`182f2ce`](cursor/plugins@182f2ce)
([#637](cursor/plugins#637)) is claude code
generated-tree install. core `pstack/skills` is unchanged. the "benny is
cursor-only" sentence is skipped because this port already runs benny as
devin sessions.
-
[`a968159`](cursor/plugins@a968159)
generator check in `scripts/generate-pstack-harness-trees.mjs`. that
script builds the claude code tree and does not apply to this repo.
-
[`1b80080`](cursor/plugins@1b80080)
([#705](cursor/plugins#705)) is claude code
packaging. it edits `docs/harness/claude-code.md`, the generated
`harness/pstack/claude-code` tree, the generator, and the claude code
install blurb in the upstream readme. no skill text under
`pstack/skills` changes. this port has no claude code adapter.
-
[`019a6a2`](cursor/plugins@019a6a2)
`scripts/check-pstack-docs.mjs` and the regenerated claude code copies.
the check hardcodes a `pstack/` subdirectory, the full upstream readme
tables, and a sibling `cursor-team-kit`. this repo is the plugin at the
root with a short devin readme, so the script does not apply as-is. the
upstream readme edits that only touch the claude code install blurb, the
cursor custom-mode paragraph, and the built-in `/babysit` to
`/autopilot` rename are also skipped. this port's readme does not have
those sections, and `docs/guide/01-setup.md` already tells devin to pin
the style in `AGENTS.md` instead of a cursor custom mode. the
autopilot-full claim from that readme table is ported in
`docs/guide/07-overnight.md`.

<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-5e99de38-babb-516d-92d0-296b6550796a?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-5e99de38-babb-516d-92d0-296b6550796a&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Kaitian Xie <caelaxie@users.noreply.github.com>
@cursor
cursor Bot deleted the lauren/principles-durability-pass-e359 branch October 18, 2026 19:50
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.

2 participants