From a8a56b9edf1b3d2520b0ca1e5108b788edde8e07 Mon Sep 17 00:00:00 2001 From: Samet Alan Date: Sat, 17 Oct 2026 02:52:56 +0300 Subject: [PATCH] Keep precommit diagnostics non-mutating and diff-scoped --- omp-port/check-port.sh | 3 ++- omp-port/rules.sed | 7 +++---- omp-port/test-gate-mutations.sh | 5 +++++ plugins/pstack/skills/poteto-help/SKILL.md | 2 +- plugins/pstack/skills/poteto-mode/SKILL.md | 2 +- .../pstack/skills/poteto-mode/playbooks/autopilot-full.md | 2 +- .../skills/poteto-mode/playbooks/multi-phase-plan.md | 2 +- .../pstack/skills/poteto-mode/playbooks/opening-a-pr.md | 4 ++-- 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/omp-port/check-port.sh b/omp-port/check-port.sh index 720a05c..2926da8 100755 --- a/omp-port/check-port.sh +++ b/omp-port/check-port.sh @@ -150,11 +150,12 @@ fi runtime_contract() { local bad label pattern - for label in per-call-model pstack-rule-file task-environment; do + for label in per-call-model pstack-rule-file task-environment unscoped-cleanup; do case "$label" in per-call-model) pattern='subagent_type|run_in_background|`model`:\s*[^f]|Set `model`|set `model` to|with `model` from|omit `model` so' ;; pstack-rule-file) pattern='pstack-models\.mdc' ;; task-environment) pattern='environment:[[:space:]]*"?((local)|(cloud))\b|cloud_base_branch' ;; + unscoped-cleanup) pattern='omp[[:space:]]+cleanse[[:space:]]+--all' ;; esac bad=$(grep -rInE "$pattern" --include='*.md' --include='*.mjs' --include='*.ts' --include='*.sh' "${SCOPE[@]}" 2>/dev/null || true) if [ -n "$bad" ]; then diff --git a/omp-port/rules.sed b/omp-port/rules.sed index cb3ed36..90f570b 100644 --- a/omp-port/rules.sed +++ b/omp-port/rules.sed @@ -229,10 +229,9 @@ s#arm a `/goal` with this exact text\.#arm a `/goal` with this exact text. Use ` ## 6. cursor-team-kit. Cursor's companion plugin -> omp's built-in tools. -# `/deslop` -> the `unslop` skill plus `omp cleanse` for diagnostics. -s#the `deslop` skill from the `cursor-team-kit` plugin \(`/deslop`\)#the `unslop` skill (`skill://unslop`) plus `omp cleanse --all` for diagnostics#g -s#Run `/deslop` from `cursor-team-kit` over the diff before commit\.#Run the `unslop` skill (`skill://unslop`) plus `omp cleanse --all` over the diff before commit. A bare `omp cleanse` opens an interactive picker and blocks.# -s#`/deslop`#the `unslop` skill (`skill://unslop`) plus `omp cleanse --all`#g +s#the `deslop` skill from the `cursor-team-kit` plugin \(`/deslop`\)#the `unslop` skill (`skill://unslop`) plus non-mutating repository diagnostics scoped to the diff#g +s#Run `/deslop` from `cursor-team-kit` over the diff before commit\.#Run the `unslop` skill (`skill://unslop`) and non-mutating repository diagnostics scoped to the diff before commit.# +s#`/deslop`#the `unslop` skill (`skill://unslop`)#g # `control-ui` / `control-cli` -> browser, computer, and named bash processes. s#`control-ui` or `control-cli` runtime verification \(from `cursor-team-kit`\)#`browser` or `computer` for UIs, or bash with a unique `name`, a `ready` check, and `proc://` state for CLIs and TUIs# s#\(`control-cli` or `control-ui` from `cursor-team-kit` as the change demands\)#(`browser` or `computer` for UIs, bash with a unique `name`, a `ready` check, and `proc://` state for CLIs and TUIs, as the change demands)# diff --git a/omp-port/test-gate-mutations.sh b/omp-port/test-gate-mutations.sh index 34519a4..8ea17cd 100755 --- a/omp-port/test-gate-mutations.sh +++ b/omp-port/test-gate-mutations.sh @@ -78,6 +78,10 @@ mutate_install_root() { sed -i 's#~/\.omp/plugins/node_modules/pstack/skills#~/.agents/skills#' "$FIXTURE/skills/poteto-mode/playbooks/multi-phase-plan.md" } +mutate_unscoped_cleanup() { + printf '\nRun `omp cleanse --all` before commit.\n' >>"$FIXTURE/skills/poteto-mode/SKILL.md" +} + expect_failure 'unrelated ownership' 'setup config contract' mutate_preserve_ownership expect_failure 'per-agent ownership' 'setup config contract' mutate_override_ownership expect_failure 'alias shape' 'setup config contract' mutate_alias_shape @@ -87,6 +91,7 @@ expect_failure 'setup model lever' 'omp model levers' mutate_setup_lever expect_failure 'router model lever' 'omp model levers' mutate_router_lever expect_failure 'agent hub api' 'agent hub api' mutate_hub_api expect_failure 'install root' 'install root' mutate_install_root +expect_failure 'unscoped cleanup' 'runtime unscoped-cleanup' mutate_unscoped_cleanup mutate_veto_provenance() { sed -i 's/ships no `session_stop` veto/ships a session_stop veto/' "$FIXTURE/README.md" diff --git a/plugins/pstack/skills/poteto-help/SKILL.md b/plugins/pstack/skills/poteto-help/SKILL.md index a832b0a..b3867be 100644 --- a/plugins/pstack/skills/poteto-help/SKILL.md +++ b/plugins/pstack/skills/poteto-help/SKILL.md @@ -106,7 +106,7 @@ Close calls: Not in pstack: -- the `unslop` skill (`skill://unslop`) plus `omp cleanse --all`, bash with a unique `name`, a `ready` check, and `proc://` state, and the `browser` eval prelude ship in the omp's built-in tools plugin. +- the `unslop` skill (`skill://unslop`), bash with a unique `name`, a `ready` check, and `proc://` state, and the `browser` eval prelude ship in the omp's built-in tools plugin. - `/loop` and `/create-skill` are Cursor built-ins. - pstack has no `/orchestrate` skill. Orchestrate is a `/skill:poteto-mode` playbook. If the slash menu shows `/orchestrate`, another plugin provides it. diff --git a/plugins/pstack/skills/poteto-mode/SKILL.md b/plugins/pstack/skills/poteto-mode/SKILL.md index 9af77fb..171f7bb 100644 --- a/plugins/pstack/skills/poteto-mode/SKILL.md +++ b/plugins/pstack/skills/poteto-mode/SKILL.md @@ -27,7 +27,7 @@ Remaining triggers: - Nontrivial multi-step → write the throughput checkpoint (Feature step 3). - Any prose surface, your reply to the user included → the **unslop** skill. Write the reply per **Writing the reply**. Agent-facing prose also follows the **authoring-a-skill** playbook (`skill://poteto-mode/playbooks/authoring-a-skill.md`). - Docs, RFCs, readmes, PR descriptions, or commit messages → the **technical-writing** skill (`/skill:technical-writing`). -- Before commit → the `unslop` skill (`skill://unslop`) plus `omp cleanse --all` for diagnostics. +- Before commit → the `unslop` skill (`skill://unslop`) plus non-mutating repository diagnostics scoped to the diff. - Before review → the **no-comments** skill (`/skill:no-comments`). - Shipping UI / IDE / CLI → the matching control skill. omp provides the levers directly. Bash with a unique `name`, `ready` checks, and `proc://` state drives CLIs and TUIs, the `browser` eval prelude drives browser, Electron, and web UIs over CDP, and the `computer` prelude drives native desktop. Both preludes are code in an `eval` cell and neither is a tool with its own schema. For bug fixes, reproduce first on the same surface yourself. Hand to the user only under the narrow Bug fix step 1 exception. - Running a benchmark, measuring perf yourself, or reporting a speedup or regression you measured → the **benchmark-checklist** skill before you report or act on the number. diff --git a/plugins/pstack/skills/poteto-mode/playbooks/autopilot-full.md b/plugins/pstack/skills/poteto-mode/playbooks/autopilot-full.md index 153906e..95f2008 100644 --- a/plugins/pstack/skills/poteto-mode/playbooks/autopilot-full.md +++ b/plugins/pstack/skills/poteto-mode/playbooks/autopilot-full.md @@ -7,7 +7,7 @@ A verdict covers one patch and green CI covers one head. Step 4 runs a full swar 1. **The operator's gates come first.** The grant covers only the queue's items, so items the operator names as theirs and PRs outside the queue stop at merge-ready. A request to state the plan is not a go. 2. **Spawn one owner in one `task` call with one item in `tasks[]` and the required shared `context` per PR, and keep its work where a replacement can find it.** Resolve the forge once for the program. GitHub CLI (`gh`) is the default. If `command -v origin` succeeds and Origin can resolve the repository, use `origin pr` for every PR operation. Otherwise stay on `gh` and record the fallback. Never require Graphite (`gt`). Each owner is a Cursor isolated subagent that builds, opens its PR per `playbooks/opening-a-pr.md`, proves the change on the real artifact, babysits to green per `playbooks/babysit.md`, and merges once steps 4 and 5 clear it. - Open the PR early so CI and bots run alongside the work. The code is ready only after the slop-strip (the `unslop` skill (`skill://unslop`) plus `omp cleanse --all` for diagnostics) and the `/skill:no-comments` pass, so the full swarm runs on finished code. Then rebase onto current trunk and report the code-ready head before self-proof, so verification runs on the base the patch lands on. Report every later head, and merge-ready once self-proof, CI, and babysit are done. Fix rounds stay on that base unless trunk conflicts or breaks CI, because each rebase restarts CI. Run the repo's checks for the touched paths on the committed head before the code-ready push and before a later push that needs a verifier. + Open the PR early so CI and bots run alongside the work. The code is ready only after the slop-strip (the `unslop` skill (`skill://unslop`) plus non-mutating repository diagnostics scoped to the diff) and the `/skill:no-comments` pass, so the full swarm runs on finished code. Then rebase onto current trunk and report the code-ready head before self-proof, so verification runs on the base the patch lands on. Report every later head, and merge-ready once self-proof, CI, and babysit are done. Fix rounds stay on that base unless trunk conflicts or breaks CI, because each rebase restarts CI. Run the repo's checks for the touched paths on the committed head before the code-ready push and before a later push that needs a verifier. Assume the VM dies. Soon after starting, push and start a decision trail in the root agent's store (path in the system prompt) per the **show-me-your-work** skill, then push after every unit worth keeping. Whoever spawns a subagent records its id, state, and a stuck-after runtime from past runs of its kind in that store, so the root can probe it if the parent dies. Force-push only your own branch, with `--force-with-lease` pinned to the SHA you last pushed or took over, and on any push you did not make, stop and report to the root. 3. **Run owners in parallel off trunk, never stacked,** so each PR lands on its own. diff --git a/plugins/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md b/plugins/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md index ae9af5c..31dfab0 100644 --- a/plugins/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +++ b/plugins/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md @@ -57,7 +57,7 @@ Tests alone are not sufficient verification. A PR is verified only when its unit - [ ] Resolve the forge once. Default to `gh`; if `command -v origin` succeeds and Origin can resolve the repository, use `origin pr` for every PR operation. Record any fallback to `gh`. Never require `gt`. - [ ] Open the PR ready, never draft, per **Opening a PR**. Use the run's built-in PR tool when it has one, else `origin pr create --status open --base ` or `gh pr create --base ` according to the resolved forge. A stack child targets its parent branch. - [ ] Run the repo's lint and typecheck once before the PR-facing push. Push with hooks on. -- [ ] Run the `unslop` skill (`skill://unslop`) plus `omp cleanse --all` before each commit and `/skill:no-comments` before review. +- [ ] Run the `unslop` skill (`skill://unslop`) before each commit and `/skill:no-comments` before review. - [ ] Triage every Bugbot and security-reviewer comment per `../references/bugbot-triage.md`. - [ ] Rebase onto current trunk before the code-ready report and babysit. Keep that merge base in fix rounds. Rebase again only at merge prep, on a `git merge-tree` conflict with trunk, or on a CI failure that comes from a change on trunk. diff --git a/plugins/pstack/skills/poteto-mode/playbooks/opening-a-pr.md b/plugins/pstack/skills/poteto-mode/playbooks/opening-a-pr.md index e6b1336..43e051d 100644 --- a/plugins/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +++ b/plugins/pstack/skills/poteto-mode/playbooks/opening-a-pr.md @@ -6,7 +6,7 @@ Invoked at the end of every other playbook. **Commits.** Commit liberally. Rebase into small, ordered commits before opening PRs. Each commit is a future PR: landable, ordered to tell the story. Amend when the fix belongs in a just-made commit. New commit when separable. Commit bodies don't restate the subject. -**PRs.** Run the `unslop` skill (`skill://unslop`) plus `omp cleanse --all` from omp's built-in tools over the diff before commit and `/skill:no-comments` before review. Write every PR title, description, and commit body with `/skill:technical-writing` (every layer except Diátaxis, and apply the STE vocabulary rules: one word per action, keep articles, a plain verb over `-ing` where one works), then apply `/skill:unslop`. +**PRs.** Run the `unslop` skill (`skill://unslop`) from omp's built-in tools over the diff before commit and `/skill:no-comments` before review. Write every PR title, description, and commit body with `/skill:technical-writing` (every layer except Diátaxis, and apply the STE vocabulary rules: one word per action, keep articles, a plain verb over `-ing` where one works), then apply `/skill:unslop`. **Titles.** Conventional Commits `type(scope): subject`, no trailing period. Type such as `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, or `perf`. Scope is the area, such as `pstack` or `poteto-mode`. Subject is short, imperative, and names a real symbol when one carries the change, for example `fix(pstack): retarget opening-a-pr babysit trigger`. @@ -31,4 +31,4 @@ After the sections, attach videos or screenshots when they prove a claim. Full S **Babysit.** Opening a PR does not start a babysit. Post the URL and keep building. Finish the phase or stack first. Run a separate babysit pass only when the user asks for one after the whole stack exists. A babysit for each new PR stalls the build and spends checks on commits later waves restart. Push back when feedback drifts from intent. -A subagent that opens a PR runs `interrogate`, the `unslop` skill (`skill://unslop`) plus `omp cleanse --all`, and `/skill:no-comments`, and posts the URL. It returns to the parent without babysitting, unless it is an Autopilot-full or Autopilot-stack owner. That owner's brief assigns the babysit loop and is the ask `playbooks/babysit.md` waits for. The owner starts the loop after its code-ready report, reports merge-ready or STACK-READY per its playbook, and is exempt from the rules here and in `playbooks/babysit.md` that hold babysitting until a whole stack is built. +A subagent that opens a PR runs `interrogate`, the `unslop` skill (`skill://unslop`), and `/skill:no-comments`, and posts the URL. It returns to the parent without babysitting, unless it is an Autopilot-full or Autopilot-stack owner. That owner's brief assigns the babysit loop and is the ask `playbooks/babysit.md` waits for. The owner starts the loop after its code-ready report, reports merge-ready or STACK-READY per its playbook, and is exempt from the rules here and in `playbooks/babysit.md` that hold babysitting until a whole stack is built.