This is a Grok Build port of official pstack. Playbooks and principles are poteto's; only the harness call layer is swapped.
The 22 playbooks and 23 principles are poteto's, from official pstack. This repository is tommy-ca/pstack, adapted from aa2246740/pstack-grokbuild. Harness calls use Grok Build tools named in grok-tools.md. This port did not author those playbooks or principles.
poteto's idea is less slop, go deep first, and parallelize only after one agent can be trusted to write verifiable code. That philosophy is theirs. This README does not speak as poteto.
grok plugin install tommy-ca/pstack --trust
grok plugin enable pstackxAI Official also lists a plugin named pstack that points at cursor/plugins. Use owner/repo. Do not treat bare grok plugin install pstack as this port. This repo is a single-plugin tree. Do not nest it as plugins/pstack. Do not move it into grok-build-plugins as pstack/. Optional catalog: tommy-ca/grok-build-plugins.
A local checkout also works:
grok plugin install /path/to/pstack --trust
grok plugin enable pstackThis checkout also projects a native Factory Droid package: .factory-plugin/ plus generated droids/. Install from a local checkout into your own Droid config:
droid plugin marketplace add /path/to/pstack
droid plugin list # the registered marketplace name follows the directory basename
droid plugin install pstack@<basename> --scope userDroid roles are pstack-<role> (pstack-feature, not pstack:feature). The spawn contract, inverted skill precedence (personal and project skills shadow plugin skills), and capability gaps are in droid-tools.md. Offline checks (droid doctor, plugin lifecycle) prove packaging and the tool surface only. Custom-role serving and model selection are untested.
-
Enable from a host shell if
grok plugin enable pstackhits EROFS onconfig.toml:grok --sandbox off plugin enable pstackOr press Space in the Plugins tab.
inspect"enabled" is trust. Skills andpstack:<role>agents load only whenpstackis in[plugins].enabled. -
Reload: Plugins tab
r, or start a new session. This session will not growpstack:how-explorerafter enable. -
Spawn
pstack:how-explorer, nothow-explorer. Type/poteto-mode …. It does not auto-enter./setup-pstackis optional. -
Do not run
grok plugin marketplace addfrom a sandboxed agent. That also rewritesconfig.tomland hits EROFS. Owner/repo install still works in-session.
Tool mapping is in grok-tools.md.
Two steps.
- Use
/poteto-modefor work that needs rigor. No setup required. - Optionally run
/setup-pstackto change models or effort. It is optional and global. It writes~/.grok/pstack-models.tomlplus~/.grok/roles/pstack:<role>.toml.
New here? The pstack guide walks through a first real task, from setup and prompting through verification and overnight runs.
The other skills are situational. The mode skill uses them when a step needs them.
A fresh install is usable without /setup-pstack.
Model. Every role defaults to grok-4.6. If spawn_subagent rejects that slug, omit model. Do not invent Cursor panel slugs (grok-4.6-fast-xhigh, gpt-5.6-sol-max, claude-fable-5-1-thinking-max, claude-opus-5-thinking-xhigh). Spawn and join names are in grok-tools.md. The wire alias for spawn_subagent is task.
effort. Effort follows the live grok 1.0.13 CLI. use one of: xhigh, high, medium, low. Shipped split is judgment / explainer / verifier / panels xhigh, instruction-following high, mechanical medium. Do not ship max. This CLI rejects max. Skills never send reasoning_effort on spawn_subagent.
A missing override file uses the shipped default. A missing key, inherit-parent, or auto omits model. /setup-pstack re-detects from live use one of: and rewrites the split if it changed. Spawn skills cannot see a later enum. Run setup again if the binary grew a new level.
/setup-pstack in this repo configures model and effort for grok-build. Official Cursor /setup-pstack (inside Cursor, or the copy inside Grok Bot) is a different plugin. That copy writes ~/.cursor/rules and uses Cursor slugs. Do not run it on Grok Build. It will not work here.
Start a task with /poteto-mode. It reads the request, picks a playbook, and runs the other skills as the steps need them.
This is the main shortcut for rigorous engineering work. It ships twenty-two playbooks:
/poteto-mode this pr has a subtle bug where the scroll drifts every 750ms even when idle. repro
first, then fix and verify.
/poteto-mode i'm going to bed. land the stack even if ci flakes. i want everything merged by
morning.
the twenty-two playbooks
| playbook | for |
|---|---|
| investigation | a read-only question. how does x work, why was y built this way, are we sure. |
| bug fix | reproduce a defect, root-cause it, and fix with runtime evidence. |
| perf | trace a measured slowness and improve it against a baseline. |
| hillclimb | sustained, scientific improvement of one metric against a target, looping hypotheses with before/after measurement and one commit per accepted win. |
| runtime forensics | diagnose a live symptom (leak, idle-cpu spin, glitch) from instrumentation. |
| trace forensics | diagnose a captured profiling artifact (cpuprofile, trace, spindump, heap snapshot). |
| feature | new or changed behavior, built from a named data shape. |
| refactoring | a behavior-preserving change to structure or shape. |
| prototype | a throwaway sketch to make a design or behavioral decision cheaply, or to settle an empirical fork by observing it. |
| visual parity | pixel-exact ui equivalence between two implementations. |
| authoring a skill | writing or editing a SKILL.md. |
| eval | test how a skill or prompt change affects agent behavior, blinded. |
| babysit | drive a pr or a stack to merge-ready: conflicts, review threads, ci. |
| shipping | independently verify a green stack, then land the contiguous verified run bottom-up through gh by default or Origin when its cli is available. |
| autonomous run | drive a long task to completion without stopping. |
| orchestrate | a standing project handed to one coordinator chat: multi-day, many stacked prs, fleets of subagents. |
| autopilot-full | run independent prs to merged with one owner per pr and root verification of each merge-ready head. |
| autopilot-stack | build and verify one linear base-branch stack for the operator to review and land. |
| session pickup | resume or take over a prior agent's in-flight work. |
| pause safely | suspend in-flight work cleanly so it can be resumed later. |
| multi-phase plan | work that spans phases or stacked PRs. |
| worktree cleanup | reclaim disk by pruning merged or abandoned worktrees and stale ios simulators, safety-gated. |
When invoked it:
- opens a todo list. the first item is reading the inline principles index in the skill.
- matches your task to a playbook and copies the steps in verbatim.
- routes to the other skills as the steps fire.
- writes unslopped replies framed for the consumer and the maintainer.
The full rules and playbooks live in skills/poteto-mode/SKILL.md.
Type /poteto-mode when a playbook matches or the task needs rigor. It does not auto-enter. Follow-ups in the same chat stay in this style until you opt out.
/poteto-mode works with grok-build /loop, which expands to scheduler_create. You can leave a checkable predicate running for hours without sacrificing rigor.
The vendored GitHub watcher is a compatibility utility, not the stack landing controller. With Bun installed, run skills/poteto-mode/scripts/watch-pr/watch-pr --help directly on Linux for its options.
/poteto-mode runs most of these for you when a step needs them (how, why, architect, arena, swarm, interrogate, unslop, no-comments, technical-writing, tdd, and the principles). The table below is for when you want one directly:
/how do we cancel runs? do we have an n+1 when we look up every run to cancel?
/interrogate review this pr.
all skills
| skill | use it when |
|---|---|
/poteto-mode |
default entry point for any non-trivial task. |
/how |
you want a walkthrough of how a subsystem works. |
/why |
you want to know why something was built this way. discovers available MCPs at run time and queries each evidence category in parallel (source control, issue tracker, long-form docs, real-time chat, infra observability, error tracking, analytics warehouse). |
/recall |
you're starting or resuming work and want your recent context on a topic rebuilt from your own chat history and the shared record, handed back as a tight current-state brief. |
/blast-radius |
you have a small-looking change and want to know what else it could break, with the one fact it's safe because of proven by running code, not asserted. |
/architect |
you're about to write code that crosses a function boundary and want the caller's usage, types, and module shape settled first. |
/arena |
you want N parallel attempts at the same thing, then to grab the best parts of each. |
/swarm |
you want N parallel workers across different slices or races, then one aggregated report. |
/interrogate |
you have a diff and want several different models to try to break it, including a strict code-quality lens. |
/automate-me |
you want your own -mode skill, drafted from how you've actually worked. |
/setup-pstack |
override the shipped grok-4.6 + per-role effort default. detects your models and writes ~/.grok/pstack-models.toml plus ~/.grok/roles/pstack:<role>.toml. |
/reflect |
a long task landed and you want the recipe captured as a skill edit. |
/teach |
you want to actually understand a change or subsystem, not just have it summarized. runs how + why and weaves one plain explanation, built up diagram by diagram. |
/tdd |
you're fixing a bug and there's a cheap local test path. write the failing test first, then the fix. |
/no-comments |
strip comments before review; spawns Comment Sicko, fixes accepted findings, offers encodings for claimed constraints. |
/typescript-best-practices |
you're reading or editing typescript. grounds the type-system-discipline principle in syntax. |
/figure-it-out |
no bundled playbook fits. designs a rigorous, auditable playbook for the task. |
/show-me-your-work |
you want a reviewable decision trail. logs decisions to a tsv you can commit. |
/verify-pstack |
prove this plugin checkout. leftover scanner is required doctor. drives leftover-scanner, upstream-pin, absorbed-intent, upstream-recipe, refresh-hygiene, and release-tag through .grok/skills/verify-pstack/scripts/verify.py. |
/create-verification-skill |
your project has no scripted way to prove app behavior. generates a project-local verify skill with a feature map, for any language or platform. |
/maintain-verification-skill |
your verify skill's feature map has drifted from the app. source wave + one live pass, at most one PR of proven corrections. |
/unslop |
you're cleaning up writing. removes AI tells. |
/bro |
you want the last message restated in plain human language, no jargon. |
/technical-writing |
layered doc standard (Diátaxis + Google developer style + STE + Global English) for docs, RFCs, readmes, PR descriptions, commit messages. |
Most tasks start with /poteto-mode and let it route to a playbook. The other skills fire as the steps need them. A few are worth invoking directly.
all the examples
bug fix: /poteto-mode this pr has a subtle bug where the scroll drifts every 750ms even
when idle. repro first, then fix and verify.
perf: /poteto-mode a big list takes a second or two to load even though we virtualize.
run a cpu trace and tell me why.
feature: /poteto-mode build a small feature behind a feature flag. verify it really works.
prototype: /poteto-mode build two prototypes of the markdown renderer so we can compare.
spawn an agent for each.
multi-phase: /poteto-mode open source these skills as a plugin. nothing internal leaks, work
in a temp dir, show me the dependency graph first.
overnight run: /poteto-mode i'm going to bed. land the stack even if ci flakes. i want
everything merged by morning.
babysit: /poteto-mode check on pr 123. anything outstanding?
visual parity: /poteto-mode the row spacing is too tall when this flag is on. the second image
is correct. repro and fix until it matches.
figure it out: /poteto-mode i'm stepping away. migrate every caller from the synchronous store
to the new async one, keeping behavior identical. i want to trust it was done
right when i'm back.
how: /how do we cancel runs? do we have an n+1 when we look up every run to cancel?
why: /why is this feature flag not on yet?
architect: design this instrumentation to be high signal with no false positives. /architect
this first.
arena: /arena take my prompt to the arena verbatim. i want to compare their proposals
with yours.
swarm: /swarm check every package under packages/ against its check.sh. one worker per
package. one report.
interrogate: /interrogate review this pr.
tdd: /tdd implement
unslop: can we unslop and tighten the new changes?
reflect: /reflect that took too long. capture what we learned so the next run doesn't
repeat it.
show-me-your-work: /show-me-your-work keep a decision trail i can review when i'm back.
automate-me: /automate-me
This plugin also ships a subagent that runs the style end to end. Spawn it from the parent via spawn_subagent with subagent_type: "pstack:poteto-agent" when there is no role key. The wire alias for spawn_subagent is task. Playbook roles spawn pstack:<role-key> (pstack:feature, pstack:how-explainer, …) so shipped frontmatter effort applies, and so /setup-pstack overlays in ~/.grok/roles/pstack:<key>.toml can override it. Substituting general-purpose skips the poteto-mode read and drifts. The child cannot spawn further children (MAX_SUBAGENT_DEPTH is 1). Do not send reasoning_effort on spawn_subagent.
/poteto-mode and subagent_type: "pstack:poteto-agent" route through the same wrapper.
This plugin also ships Comment Sicko, a read-only comment reviewer available as subagent_type: "pstack:comment-sicko". Usually invoke it through /no-comments, not directly.
Twenty-three short skills, one principle each. poteto-mode indexes them inline and reads that index at task start. The standalone files are there so other skills can reference a principle by name, and so the index can point at the full rule for each.
all twenty-three principles
| principle | group | rule |
|---|---|---|
| laziness-protocol | core | Bias toward deletion and the smallest change that solves the problem. |
| foundational-thinking | core | Apply before writing logic: choosing core types and data structures, sequencing scaffold-vs-feature work, asking what concurrent actors share. Get the data structures right so downstream code becomes obvious. |
| redesign-from-first-principles | core | Redesign as if the requirement had been a foundational assumption from day one, instead of bolting it on. |
| attack-the-premise | core | When two or more fixes that share one premise have failed the same gate, census which actors hold the imbalance, then question the premise instead of writing another fix that assumes it. |
| subtract-before-you-add | core | Remove dead weight, redundant validators, and stub references first, then build on the simpler base. |
| minimize-reader-load | core | Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope. |
| outcome-oriented-execution | core | Apply during planned rewrites and migrations with explicit phase boundaries. Converge on the target architecture; don't preserve smooth intermediate states with throwaway compatibility code. |
| experience-first | core | Choose user delight over implementation convenience; ship fewer polished features over more rough ones. |
| exhaust-the-design-space | core | Build 2-3 competing prototypes and compare side by side before committing. |
| build-the-lever | core | Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks. Build the tool that does it or proves it (codemod, script, generator, or a skill your subagents follow) instead of working by hand. The tool is the artifact a reviewer can rerun. |
| model-the-domain | architecture | Encode the domain in a structure instead of scattered conditionals. |
| boundary-discipline | architecture | Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions. |
| type-system-discipline | architecture | Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, refuse to lie to the compiler, exhaust variants, derive from authoritative schemas. |
| make-operations-idempotent | architecture | Converge to the same end state regardless of partial prior runs. |
| migrate-callers-then-delete-legacy-apis | architecture | Migrate callers and delete the old API in the same wave instead of preserving compatibility layers. |
| separate-before-serializing-shared-state | architecture | Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant. |
| prove-it-works | verification | Apply after completing a task, before declaring done. Verify against the real artifact (run the feature, read the actual value, inspect the diff), not a proxy, self-report, or 'it compiles.'. |
| fix-root-causes | verification | Trace each symptom to its root cause and fix it there; reproduce first, ask why until you reach it, resist nil-check guards that silence crashes. |
| sequence-verifiable-units | verification | Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs. Break work into small units that each end in a verifiable state, check each before the next, and order delivery so the sequence proves itself to a reviewer. |
| test-behavior-not-implementation | verification | Call the code the way its users do and assert a literal expected value. Delete a test that would still pass if every imported function returned undefined. |
| guard-the-context-window | delegation | Route bulk to subagents; keep summaries in the main thread, not raw payloads. |
| never-block-on-the-human | delegation | Proceed, present the result, let the human course-correct after the fact; reserve confirmation for irreversible actions. |
| encode-lessons-in-structure | meta | Encode the rule as a lint, metadata flag, runtime check, or script instead of more text. |
A few things poteto-mode referenced in Cursor pstack and does not bundle here:
/deslop,control-cli, andcontrol-uilived incursor-team-kit. Use/unslop,/no-comments, and drive the real app yourself.- Independent verify is
spawn_subagentwithsubagent_typepstack:independent-verifier. Send a differentmodelwhen the toml names a detected slug; otherwise omitmodel. Not a Cursor Cloud Agent. See grok-tools.md. - Resolve the forge once. GitHub
ghis the default; use Origin only when its cli resolves the repository. Stacked children target explicit parent branches. Graphitegtis not required. - Benny Cursor pack under
automations/benny/skills/is the upstream reference. Live grok contract isautomations/benny-grok/(/benny-triage,/benny-reproafter enable). Not pstack plugin hooks.
grok-build has a built-in plan agent type. pstack still does not default to planning. The best spec is code. If you do want a plan, /poteto-mode covers it.
poteto-mode is poteto's style. You may not want exactly that.
Type /automate-me. It mines recent transcripts, drafts a <your-name>-mode skill from how you have actually worked, and routes through pstack underneath. You keep pstack as the base and end up with your own routing skill alongside poteto-mode.
The Grok Build default is grok-4.6 plus per-role effort. Type /setup-pstack only if you want to change that. It detects slugs spawn_subagent accepts, asks for reasoning effort per role, and writes ~/.grok/pstack-models.toml plus pstack-managed ~/.grok/roles/pstack:<role>.toml. It will not write ~/.cursor/rules. This is not the Cursor plugin.
This repo also ships a dormant benny automation pack. Cursor skills/ is the upstream reference. The live grok contract is automations/benny-grok/. Enable pstack and type /benny-triage. Do not add a hooks key to plugin.json.
Fork it. Improve it. PRs are welcome.
MIT.
Upstream is official pstack / poteto (Lauren Tan). This repository is tommy-ca/pstack, adapted from aa2246740/pstack-grokbuild.