Skip to content

feat(pstack): make Orchestrate agentic and delete the orch scripts - #1043

Merged
poteto merged 2 commits into
mainfrom
lauren/pstack-agentic-orchestrate-fecb
Oct 27, 2026
Merged

poteto merged 2 commits into
mainfrom
lauren/pstack-agentic-orchestrate-fecb

Conversation

@poteto

@poteto poteto commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Why

Bring the pstack Orchestrate playbook up to date with its source skill. The coordinator now runs the program with its own agent tools instead of a bookkeeping CLI and store. Everything internal stays out of this public repo.

What changed

  • poteto-mode/playbooks/orchestrate.md: The playbook is rewritten. The coordinator decides which agent does each piece of work, checks what each one produces, and never writes code. It spawns workers with Task, keeps the program's state in the Project tracker (notes.md) and the Project store, and watches PRs with PR and CI event subscriptions when the harness has them. It calls no scripts and runs no polling loops.
    • A new Topology section: one owner per PR, a fresh worker for each independent task, sub-coordinators only for areas with many parallel workers (at most three levels), forks for work that needs a worker's built state, a verifier from a different model family for each PR, and one pilot unit before fan-out.
    • A new Supervision section: each kickoff names the evidence that proves the work is done. The coordinator reads the diff or the artifact, not only the summary. It sends back scope drift, checks a PR's live state with gh pr view and gh pr checks (or the forge's equivalents) before it reports, retries stalled workers by cause, and asks the user only for real decisions or blockers.
    • The Reply line is shorter: what landed, each PR's live state and verdict, what was dropped, and the decisions waiting on the user.
  • poteto-mode/scripts/orch/ (orch.ts, store.ts, orch.test.ts): deleted. The playbook no longer uses them.
  • poteto-mode/scripts/package.json: the test script no longer runs orch. commander and bun-types stay, because watch-pr still uses them. bun.lock does not change.
  • docs/guide/07-overnight.md: the Orchestrate paragraph describes the new coordinator and no longer calls it "deliberately heavy machinery".
  • The generated Claude Code harness tree is regenerated.
  • pstack is bumped to 0.15.36, in a separate commit.

Scope

  • Internal-only tool names, commands, and paths are replaced with public equivalents or generic wording. Runtime checks point to control-ui and control-cli from cursor-team-kit.
  • Workers default to environment: "cloud", as in the old playbook.
  • The source also removed orch entries from TypeScript and test-runner configs. pstack has no such entries, because Bun runs these scripts, so nothing was ported for that.
  • No other drift is synced. The public model defaults do not change.
  • Other pages that mention Orchestrate (the README, poteto-help, poteto-mode/SKILL.md, multi-phase-plan.md, and guide pages 02 and 07) still describe it correctly. No pstack or harness file refers to the orch scripts now.

Verification

  • node scripts/generate-pstack-harness-trees.mjs --check: up to date
  • node scripts/validate-plugins.mjs: all plugins valid
  • node scripts/check-pstack-docs.mjs: 0 problems
  • poteto-mode script tests: 61 pass, 0 fail. There were 82 before; the 21 removed tests were in the deleted orch.test.ts.
  • poteto-mode script typecheck: pass
  • statechart script tests: 267 pass, 67 skipped, 0 fail
  • A scan of the added lines and changed files found no internal references.
  • A comment review of the diff found no comments to remove.
Open in Web Open in Cursor 

The Orchestrate playbook now runs the program with the coordinator's own
tools: Task for workers, the Project tracker and store for state, and PR
and CI event subscriptions where the harness has them. It no longer calls
the orch CLI, so the orch scripts and their test entry are removed. The
overnight guide's description of the coordinator matches the new playbook.
@poteto
poteto merged commit c742dd6 into main Oct 27, 2026
2 checks passed
@poteto
poteto deleted the lauren/pstack-agentic-orchestrate-fecb branch October 27, 2026 23:12
caelaxie added a commit to pstack-ports/devin-pstack that referenced this pull request Oct 28, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
synced to
[`c742dd6`](cursor/plugins@c742dd6).
compared `e73df47..c742dd6` for `pstack/`. that range is the whole
upstream pstack history after the previous sync, and `origin/main` of
cursor/plugins is that commit. version is `0.15.36` in `plugin.json`,
`.devin-plugin/plugin.json`, and the readme marker.

upstream range, oldest first:

-
[`34b1b7c`](cursor/plugins@34b1b7c)
([#977](cursor/plugins#977)) statechart compiler
-
[`7c7bde7`](cursor/plugins@7c7bde7)
([#978](cursor/plugins#978)) bump to 0.15.33
-
[`740d2c0`](cursor/plugins@740d2c0)
([#982](cursor/plugins#982)) qualified action
names in property traces
-
[`164ced1`](cursor/plugins@164ced1)
([#983](cursor/plugins#983)) bump to 0.15.34
-
[`519d36a`](cursor/plugins@519d36a)
([#981](cursor/plugins#981)) wait for the reap
in the statechart SIGKILL view test
-
[`ab1f702`](cursor/plugins@ab1f702)
([#986](cursor/plugins#986)) skill updates
(poteto-mode, autopilot playbooks, interrogate, arena, ketchup-video,
principle-explain-the-number, orchestrate, readme and guide) and bump to
0.15.35
-
[`c742dd6`](cursor/plugins@c742dd6)
([#1043](cursor/plugins#1043)) agentic
Orchestrate, delete the orch scripts, bump to 0.15.36

`deslop`, `control-cli`, and `control-ui` are byte-identical at
`e73df47` and at `c742dd6` (same blobs as devin-pstack #44). not
recopied.

verbatim, no devin edits:

- `skills/statechart/scripts/**` replaced with the compiler, corpus, and
tests. old `.mjs` scripts deleted.
- `skills/statechart/references/render.md` added.
- `skills/poteto-mode/playbooks/autopilot-stack.md` replaced.
- `skills/poteto-mode/scripts/package.json` test script drops `orch`.
- `skills/poteto-mode/scripts/orch/` deleted (`orch.ts`, `orch.test.ts`,
`store.ts`).
- `skills/interrogate/references/` deleted (the four review docs the
rewrite removed).

devin-only changes, per file:

- `plugin.json` and `.devin-plugin/plugin.json`: version `0.15.36`.
homepage and repository stay on this port.
- `README.md`: marker points at `c742dd6` / `0.15.36`. table rows for
autopilot-stack, ketchup-video, interrogate, and statechart take the
upstream wording with the existing `/pstack:` prefix.
- `docs/guide/04-design.md`, `06-verify-and-ship.md`, `07-overnight.md`:
upstream wording, `/pstack:` prefix kept, existing Devin session wording
kept.
- `docs/guide/10-recipes-and-pitfalls.md`: same, plus the `auto` pitfall
stays "spawn the role's subagents with `subagent_general` or
`subagent_explore`".
- `skills/statechart/SKILL.md`: upstream compiler skill. `triggers:
[user]`. `/statechart` is `/pstack:statechart`.
- `skills/principle-explain-the-number/SKILL.md`: upstream text.
`triggers: [user]`.
- `skills/create-formal-verification-skill/SKILL.md`: drops "which of
those violations a change fixes". `/pstack:statechart` kept.
- `skills/ketchup-video/SKILL.md`: subtitled video. `triggers: [user]`.
`/pstack:ketchup` and `/pstack:ketchup-video` kept.
- `skills/poteto-help/SKILL.md` and `references/recipes.md`: upstream
rows and prompts. `/pstack:` prefix, cloud Devin session wording, and
the Devin webhook row kept.
- `skills/arena/SKILL.md`: new drop-a-seat rule and the skip-the-judge
rule, in the existing profile language
(`~/.devin/rules/pstack-models.md`, `pstack-M` / `pstack-M-ro`,
`subagent_general` / `subagent_explore`, `devin models list`,
`swe-2-high`). `auto` on the cross-judge line never judges. On Fusion,
prefer a judge outside both the lead's and the sidekick's families, else
outside the lead's. a `fusion-*` slug is still a rejected slug.
- `skills/interrogate/SKILL.md`: upstream rewrite (findings survive only
when a rerun proves them; it calls arena phases). `triggers: [user]`.
`generalPurpose` is the write profile arena phase A step 3 maps
(`pstack-M`, or `subagent_general` for `auto` / `inherit-parent`).
- `skills/setup-pstack/SKILL.md`: the cross-judge sentence is the new
one (one judge, other family, list order, alias never judges). Fusion
note, `ask_user_question`, and Adaptive wording stay.
- `skills/poteto-mode/SKILL.md`: new first-message trigger, Explain the
Number applies before you measure, `is_background: true` also covers a
steer or resume, and a rejected adjusted slug falls through the calling
skill's fallback then `devin models list` / the `auto` mapping.
Autopilot-stack is autopilot-full without the merge. Fusion paragraphs
stay.
- `skills/poteto-mode/playbooks/autonomous-run.md`: mid-run discoveries
that support the goal. `ask_user_question` and Devin's `/loop` stay.
- `skills/poteto-mode/playbooks/autopilot-full.md`: upstream rebase,
verify, blocking, and reply rules. owners stay cloud Devin sessions
(`devin --cloud`). `/deslop` and `/pstack:no-comments` stay. control-cli
and control-ui stay plain skill names.
- `skills/poteto-mode/playbooks/babysit.md`: an Autopilot-stack owner
rebases its own branch the same way an Autopilot-full owner does. Origin
and GitHub watcher wording stays.
- `skills/poteto-mode/playbooks/opening-a-pr.md`: the subagent runs
`/deslop` and `/pstack:no-comments` and reports merge-ready.
`interrogate` and STACK-READY are gone.
- `skills/poteto-mode/playbooks/multi-phase-plan.md`: pick
autopilot-full when the run may merge, autopilot-stack when the operator
lands the PRs. verdict checklist matches upstream. explores with
`profile: "pstack:poteto-agent"`.
- `skills/poteto-mode/playbooks/orchestrate.md`: replaced with the short
agentic playbook. `Task` is `run_subagent`. workers are cloud Devin
sessions (`devin --cloud -p`), leaf-level, because a cloud session
cannot spawn `pstack-*` profiles. program state goes in the current
agent's store (path in the system prompt), not a project tracker.
control-cli and control-ui are named with no plugin qualifier. no orch
script calls.

skipped:

- `pstack/.cursor-plugin/plugin.json`. cursor plugin manifest. the only
change in range is the version bump, and this port's manifests are
`plugin.json` and `.devin-plugin/plugin.json`.
- no `.claude-plugin` file changed in the range.
- `docs/harness/claude-code.md` did not change in the range and is not
part of this port.

tests:

- plugin validator: 61 skills, 2 agents, 23 playbooks.
- `bash -n` on `skills/poteto-mode/scripts/worktree-audit.sh` and
`skills/show-me-your-work/scripts/log.sh`.
- `skills/poteto-mode/scripts`: `bun run typecheck` and `bun run test`
(watch-pr and check-plan). 61 pass, 0 fail.
- `skills/statechart/scripts`: `node --test test/*.test.ts` on Node
v22.23.4. 267 pass, 0 fail, 67 skipped. the skips are the plain-TLC
differential cases, which the suite itself skips unless `TLA2TOOLS`
points at `tla2tools.jar`. corpus replay, the SIGKILL reap test, and the
Pele render tests ran.
- the `devin` CLI was not run. it needs a login. harness proof for
regular mode and fusion mode stays with the owner.

<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-f227771c-5753-540a-b70e-a0934a1cb366?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-f227771c-5753-540a-b70e-a0934a1cb366&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 <[email protected]>
Co-authored-by: Kaitian Xie <[email protected]>
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