Grok's 'Potato Sister' Open-Sources pstack: Agent Harness for 1150 PRs in 4 Days

Lauren Tan (poteto) shares her open-source pstack agent harness for Cursor and Claude Code, featuring 58 skills, 23 playbooks, a four-layer defense strategy, and commands like /poteto-mode and /correct that enforce structural fixes over documentation, enabling 1150 PRs in 4 days.

Old Zhang's AI Learning
Old Zhang's AI Learning
Old Zhang's AI Learning
Grok's 'Potato Sister' Open-Sources pstack: Agent Harness for 1150 PRs in 4 Days

Background: The Grok Bot Engineer's Open-Source Agent Harness

Grok Bot engineering lead Lauren Tan (known as poteto or "Potato Sister") recently open-sourced pstack, an agent harness designed for Cursor and Claude Code. The release follows a high-profile 4-day sprint where she merged roughly 1,150 pull requests to ship a playable survivor game, using pstack as the underlying infrastructure.

What Is pstack?

pstack

(hosted at cursor/plugins/tree/main/pstack) is a battle-tested framework that prioritizes depth before breadth: "if you want to go fast, go deep first." It includes:

58 Skills (34 functional + 24 principle-based)

23 Playbooks covering research, bug fixes, new features, performance analysis, metric optimization, and PR merging

2 Sub-agents : poteto-agent and comment-sicko A harness/pstack/ adapter layer for zero-config use in both Cursor and Claude Code

The core philosophy: embed specifications directly into file suffixes (e.g., .hot.ts), enforce hard lint rules, model state machines with TLA+ to catch concurrency edge cases, and keep audio/video fully code-driven so agents can verify themselves in a closed loop.

Core Workflow: Single Entry Point /poteto-mode

Instead of writing step-by-step prompt instructions ("read file A, call B, run C"), users invoke a single entry point:

/poteto-mode 导出接口重试时会写入重复行,先复现再修,拿出前后行对比证据

Given a goal, acceptance criteria, and required evidence, /poteto-mode automatically:

Restates the problem and minimal change scope in plain language for immediate correction.

Selects one of the 23 playbooks, copies it verbatim into a todo list, and marks skipped steps with skip: reason.

Can be locked as a persistent Custom Mode in Cursor via Option+Enter (macOS) or Alt+Enter (Windows).

Four High-Leverage Tool Groups

1. Understand Before You Touch: /how + /why + /teach + /recall

/how

: Read-only decomposition of module call chains and core types. /why: Parallel search of git history, issues, team chats, and Sentry errors to explain original design intent. /teach: Step-by-step mechanism explanation, including self-proof of why alternatives were rejected. /recall: Retrieves context from prior conversations.

2. No First-Draft Designs: /architect + /arena + /interrogate

/architect

+ /arena: Define caller-side contracts first; for tough decisions, spin up multiple models in independent worktrees to produce competing designs, then have a judge model pick the best base and graft highlights. /interrogate: Adversarial review — different models act as critics, each required to attach a real failing command and output; pure speculation is discarded.

3. Overnight Runs with Audit Trails: autonomous-run + /show-me-your-work

Paired with /loop for overnight iteration: each round makes the smallest possible change, validates with actual run results, commits on progress, discards on no gain, and logs every decision to a local decisions.tsv.

Morning review via /show-me-your-work dispatches a heterogeneous model to replay the night's trajectory and flag high-risk decisions; /ketchup or /ketchup-video can generate a quick slideshow or subtitled video summary.

4. One-Liner Corrections & TLA+ Safety Net

24 engineering principles carry fixed English phrase names for instant correction:

Stacking compatibility layers → use subtract before you add Relying only on compilation → apply prove it works For concurrency retries or state-machine corner cases, pstack uses mise to provision Java and TLC, then /create-formal-verification-skill and /statechart to exhaustively enumerate interleavings and visualize violating paths.

Scaling to Hundreds of PRs/Day: Heterogeneous Roles + Narrow PR Stacks + Comment Sicko

The system solves "how to run multiple agents in parallel without them colliding" through three hard mechanisms:

Heterogeneous model assignment — Pain point: single model is expensive, slow, or has overlapping blind spots. pstack 's hard rule: /setup-pstack defaults assign Grok to write features/bugs/run swarm; high-stakes architecture and cross-review go to Opus 5.5 (or inherit-parent to follow the primary model).

Ultra-narrow PR stacks + independent judges — Pain point: concurrent agents modifying the same repo likely collide. pstack 's hard rule: opening-a-pr enforces "5 narrow PRs beat 1 fat PR"; shipping forbids the writing agent from self-review — every PR gets a fresh agent that actually runs verification, merged bottom-up.

Comment Sicko — Pain point: writing agents love to defend their own verbose comments. pstack 's hard rule: /no-comments assigns a read-only reviewer that first checks /how and /why for external constraints; only comments that can be encoded as types or lint rules are removed.

Core Philosophy: Encode Lessons in Structure

The system's most valuable sentence lives in Encode Lessons in Structure:

What can be fixed structurally must only be fixed structurally — the written instruction is merely a symptom.

Typical agent-taming loops add warnings to CLAUDE.md after each mistake, bloating the file to hundreds of lines that still get ignored. /correct documentation states bluntly: "Nothing fails when an agent skips them."

Tan organizes a four-layer defense, investing effort top-down:

Code structure & architecture — single source of truth, encapsulation; wrong patterns become inexpressible. Highest priority, zero overhead.

Types & static checks — .hot.ts bans assignment, size budgets, errors include fix hints. Hard interception, self-healing on misreads.

Tests & state modeling — assert external behavior; TLA+ exhausts 17 concurrency rules to catch races.

Docs & human review — CLAUDE.md only for subjective judgment; skipping produces no error. Lowest priority.

Only the top two layers can hard-block; lint catches violations instantly, while agents skipping docs face zero consequences.

/correct : Five-Step Closed Loop

The /correct skill automates the loop:

Mine history for recurring error patterns.

Classify and deduplicate.

Propose structural fixes (architecture, types, tests).

Verify the check would have caught the original failure.

Commit the fix as a lint rule or type constraint.

Two disciplines govern it:

Same error twice before a rule — one-off flukes don't add complexity.

New check must fail on real historical error first — a check that never turned red proves nothing; formal verification artifacts must also error on a deliberately broken variant before acceptance.

5-Minute Onboarding

1. Install & Run /setup-pstack

In Cursor: /add-plugin pstack In Claude Code (official adapter at harness/pstack/, commands prefixed with /pstack:, model rules written to ~/.claude/rules/pstack-models.md):

/plugin marketplace add cursor/plugins
/plugin install pstack@cursor-plugins
/pstack:setup-pstack

The wizard offers four budget tiers ( unlimited, large, medium, small); single-model accounts set the role to inherit-parent to reuse the current session model.

When prompted to generate /create-verification-skill, accept — it auto-discovers project start commands, test accounts, and entry points, writing a .cursor/skills/verify-<app>/ skill into the repo. The official guide ranks this as the #1 value driver: agents that can drive the software and record video proof truly free human hands.

2. Run /correct First to Codify Frequent Pitfalls

Before large tasks, run on existing codebases: /pstack:correct It scans commits, reverts, and review comments, converting twice-hit traps into architectural boundaries or static checks. You can also adopt Tan's .hot.ts suffix convention.

3. Dislike the Default Style? /automate-me Clones Your Workflow

Run /pstack:automate-me to concurrently scan recent workspace conversations, extract communication, verification, and PR-splitting habits that appear at least twice, strip AI-flavored phrasing, and open a PR with a personalized <your-name>-mode entry skill.

pstack 全景架构与窄 PR 独立验收流水线
pstack 全景架构与窄 PR 独立验收流水线
/poteto-mode 根据目标自动路由到对应剧本
/poteto-mode 根据目标自动路由到对应剧本
动手前用 /how 和 /why 查清运行链路与历史动机
动手前用 /how 和 /why 查清运行链路与历史动机
/architect、/arena 与 /interrogate 并行出图、交叉裁判与真跑验毒
/architect、/arena 与 /interrogate 并行出图、交叉裁判与真跑验毒
配合 /loop 过夜执行并全程记录 decisions.tsv 审计账
配合 /loop 过夜执行并全程记录 decisions.tsv 审计账
/correct 五步闭环:从翻历史归类到证明检查会失败
/correct 五步闭环:从翻历史归类到证明检查会失败
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

AI-assisted developmentsoftware engineeringopen sourceCursorpstackClaude Codeagent harnessLauren Tan
Old Zhang's AI Learning
Written by

Old Zhang's AI Learning

AI practitioner specializing in large-model evaluation and on-premise deployment, agents, AI programming, Vibe Coding, general AI, and broader tech trends, with daily original technical articles.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.