Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .omp-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
},
"metadata": {
"description": "pstack, poteto's engineering methodology for Cursor, ported to oh-my-pi. Model and provider agnostic.",
"version": "0.15.4803"
"version": "0.15.4804"
},
"plugins": [
{
"name": "pstack",
"description": "60 skills, 22 playbooks, 24 principles, the poteto-mode pin, and two agents. Upstream cursor/plugins pstack 0.15.48 at 9e278fe.",
"version": "0.15.4803",
"version": "0.15.4804",
"category": "development",
"license": "MIT",
"source": "./plugins/pstack"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Preconditions:
- The run id is new, so `$C evidence gate-<n>` prints a directory that did not exist before.

- **Refuse a bash force-push.** Run `$C type-file gate-<n> $P/gate-force-push-main.txt`, `$C press gate-<n> Enter`, `$C wait gate-<n> 'refused force-pushing a default or trunk branch'`, `$C wait gate-<n> 'tool result received'`, and `$C capture gate-<n> irreversible-action-gate.gate-refuse-force-push`. The pane shows the typed `tool:bash` prompt, a tool block whose command line is `git -C . push --force origin main`, and output starting `pstackpolicy: refused force-pushing a default or trunk branch.` `irreversible-action-gate.gate-refuse-force-push.git-calls.log` is empty.
- **Agent receives the refusal.** Run `jq -r 'select(.body.messages[-1].role=="tool") | .body.messages[-1].content' "$($C evidence gate-<n>)/irreversible-action-gate.gate-refuse-force-push.model-requests.jsonl"`. It prints the same `pstackpolicy: refused` text, which ends with `Stop here and return this step to the operator`.
- **Agent receives the refusal.** Run `jq -r 'select(.body.messages[-1].role=="tool") | .body.messages[-1].content' "$($C evidence gate-<n>)/irreversible-action-gate.gate-refuse-force-push.model-requests.jsonl"`. It prints the same `pstackpolicy: refused` text, which contains `Stop here and return this step to the operator` and `Ask them to confirm it and run it themselves`.
- **Refuse an eval force-push.** Run `$C type-file gate-<n> $P/gate-eval-force-push.txt`, `$C press gate-<n> Enter`, `$C wait gate-<n> 'refused force-pushing a default or trunk branch'`, `$C wait gate-<n> 'tool result received'`, and `$C capture gate-<n> irreversible-action-gate.gate-refuse-eval`. The pane shows the `tool:eval` prompt followed by the refusal. The git-calls log is still empty.
- **Refuse a repository delete.** Run `$C type-file gate-<n> $P/gate-repo-delete.txt`, `$C press gate-<n> Enter`, `$C wait gate-<n> 'refused deleting the repository'`, `$C wait gate-<n> 'tool result received'`, and `$C capture gate-<n> irreversible-action-gate.gate-refuse-repo-delete`. The gh-calls log is empty.
- **Allowed merge.** Run `$C type-file gate-<n> $P/gate-merge.txt`, `$C press gate-<n> Enter`, `$C wait gate-<n> 'gh-shim: pr merge'`, `$C wait gate-<n> 'tool result received'`, and `$C capture gate-<n> irreversible-action-gate.gate-allow-merge`. The tool block output is `gh-shim: pr merge 1 --repo pstack-verify/no-such-repo --squash`, and that capture's gh-calls log has exactly that one line. This is the control that proves the shim was reachable while the refusals above ran.
Expand Down
2 changes: 1 addition & 1 deletion omp-port/RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3
4
4 changes: 0 additions & 4 deletions omp-port/rules.sed
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,6 @@ s#\*\*You own the merge frontier\. Declare a mode, clear one PR at a time, stop
## contradicted another sentence in the same tree. None is a Cursor residue; they are the port's
## own claims about itself, which is the class nothing upstream can fix for us.

# `trash` is macOS, so the step could not be followed on this host, and the sentence forbade the one
# fallback that would work. Handled in zz-live-runtime-routing.patch instead, because that line is
# the patch's own output and a sed rule cannot see it.

## 12. Graphite. Four playbooks say "Never require Graphite (`gt`)", so no sentence may make `gt`
## mandatory or authoritative.

Expand Down
5 changes: 4 additions & 1 deletion plugins/pstack/extensions/pstackpolicy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@ const baseDirectory = (event, ctx) =>
resolve(ctx.cwd, typeof event.input?.cwd === "string" ? event.input.cwd : "");

const STOP = "Stop here and return this step to the operator, saying what is blocked.";
const HANDOFF =
"Ask them to confirm it and run it themselves. A different command for the same push or delete " +
"is the same blocked action.";

export default function pstackpolicy(pi) {
pi.on("tool_call", async (event, ctx) => {
Expand All @@ -457,7 +460,7 @@ export default function pstackpolicy(pi) {
reason:
`pstackpolicy: refused ${why}. pstack's pause list says to always pause for ` +
`irreversible writes, and a force-push to the default branch and repository deletion ` +
`are two of them. ${STOP} Do not look for another way to run it.`,
`are two of them. ${STOP} ${HANDOFF}`,
};
});
}
8 changes: 7 additions & 1 deletion plugins/pstack/extensions/pstackpolicy/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,21 @@ describe("pstackpolicy", () => {
const result = await run("git push --force origin main");
expect(result?.reason).toContain("pause list");
expect(result?.reason).toContain("Stop here and return this step to the operator");
expect(result?.reason).toContain("Ask them to confirm it and run it themselves");
expect(result?.reason).not.toContain("write its name out literally");
});

test("a repository delete is handed back to the operator", async () => {
const result = await run("gh repo delete o/r --yes");
expect(result?.reason).toContain("Ask them to confirm it and run it themselves");
});

test("a shell-named forced destination is told to write the branch out, and the literal passes", async () => {
const named = await run('git push --force-with-lease="$BRANCH:$SHA" origin "$BRANCH"');
expect(named?.block).toBe(true);
expect(named?.reason).toContain("If the branch is not the default branch, write its name out literally and retry");
expect(named?.reason).toContain("Stop here and return this step to the operator");
expect(named?.reason).not.toContain("Do not look for another way");
expect(named?.reason).not.toContain("run it themselves");
expect(await run('git push --force-with-lease="feature/x:$SHA" origin "feature/x"')).toBeUndefined();
expect(await run("git push --force-with-lease=feature/x:abc123 origin feature/x")).toBeUndefined();
});
Expand Down
2 changes: 1 addition & 1 deletion plugins/pstack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pstack",
"version": "0.15.4803",
"version": "0.15.4804",
"license": "MIT",
"omp": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/pstack/skills/omp-mechanics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ Before `recall`, `reflect`, `eval`, `session-pickup`, `show-me-your-work`, or `a
- `poteto-mode` warns against Cursor's built-in `babysit` skill. OMP has no such skill, so the warning is inert.
- `bugbot-triage` still applies to OMP's security reviewer and other review comments.
- `make-bot-ui` names `api2.cursor.sh` and the Grok Bot routine panel. Neither maps to OMP.
- `worktree-cleanup` used to name a macOS `trash` step this host does not have. It now moves each approved worktree somewhere recoverable, using `trash` where it exists and `mv` where it does not, and still forbids `rm -rf`. Nothing in it is platform-specific any more, so there is no step to skip.
- `worktree-cleanup` here is stricter than upstream. It removes each approved worktree with plain `git worktree remove`, keeps the worktree when git refuses, and never uses `--force`, `rm -rf`, or `git worktree prune`.