Repository navigation
port pstack 0.15.29 (#729) - #8
Conversation
Copy upstream pstack from d4575673 through 88d47514. /sharpen returns only the rewritten prompt. cursor-team-kit stays 1.2.0. Co-authored-by: Kaitian Xie <caelaxie@users.noreply.github.com>
caelaxie
left a comment
There was a problem hiding this comment.
verdict: request changes (comment review, same-account author).
- minimum changes: ok. every changed line matches upstream 88d47514 (#729) verbatim; existing grok adaptations in touched files left alone. skipping the upstream README skill-table line is right, this README has no table.
- parity: ok. no other pstack/ or cursor-team-kit/ change in 88d47514..190d2873; plugin.json and README both say 0.15.29, team kit stays 1.2.0.
- ci: validate plugin green.
- issue linkage: none needed, no open issue.
- harness proof: missing. add a comment with
grok plugin install --trustandgrok plugin listrun against head 0d915fe showing pstack 0.15.29, plus/sharpenexercised (or, if a live model turn is blocked by cli auth, the installed copy / inspect output showing the new skills/sharpen/SKILL.md). push nothing else.
|
|
||
| Then rewrite my prompt to ask for exactly that. | ||
|
|
||
| Leave choices that are mine to make open instead of deciding them. |
There was a problem hiding this comment.
this is the behavior change in the pr (sharpen now returns only the rewrite). needs harness proof: install at 0d915fe, then run /sharpen <prompt> and show it hands back a rewritten prompt without doing the task, or show the installed copy of this file if the model turn is auth-blocked.
|
Harness proof for head
Installed path: sharpen ( ---
name: sharpen
description: "Make a task deeper, not bigger, then rewrite the prompt. Use for /sharpen."
disable-model-invocation: true
---
I want a deeper version of this task, not a bigger one. Before rewriting it, do four things:
1. Say what a top professional in this field would do here that I'm not asking for.
2. Name the rawest material they would start from instead of what has already been digested for me.
3. Name the specific methods and tools they would use.
4. Say what, other than you or me, would show the result is right.
Then rewrite my prompt to ask for exactly that.
Leave choices that are mine to make open instead of deciding them.poteto-help ( ---
name: poteto-help
description: Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.
disable-model-invocation: true
---
# Poteto help
Answer the user's question about pstack, hand them a prompt they can send, and link the file the answer came from. For a help question, don't start the work. The user asked how, and a pstack run spends real tokens, so let them send the prompt.
A message that asks for work, such as "use pstack to fix this bug", is not a help question. Read [`poteto-mode`](../poteto-mode/SKILL.md), do the work under it, and mention once that the user types `/poteto-mode` per task.
This file maps questions to the skills and guide pages that hold the answers. Those files own the details. Read the file you route to before you quote it, and trust it when it disagrees with this map. The links here point into the installed plugin. Give the user the path inside the installed plugin. The upstream copy is `https://github.com/cursor/plugins/blob/main/pstack/` followed by its path. This checkout is the Grok Build port, so prefer the installed file when the two differ.
## Find out what they need
Infer the need from the message and the conversation. A named situation, such as "which skill reviews a PR?", goes straight to its section. If the need is still unclear, ask one multiple-choice question with these options, then answer only the section they pick:
- Get set up
- Start a task with `/poteto-mode`
- Pick a skill for a situation
- Fix a run that went wrong
- Make pstack my own
Check the state that changes the answer, and mention it only when it does:
- No `~/.grok/rules/pstack-models.md` means `/setup-pstack` hasn't run for this user, so every role uses its default model.
- No `verify-*` skill or other app harness in the project means agents have no scripted way to drive the app. Mention `/create-verification-skill` when the question is about proving a change works.
- No formal verification skill in the project means no property is checked past what tests reach. Mention `/create-formal-verification-skill` when the question is about a race, an invariant, or another case tests rarely hit. When one exists and the code it covers changed after the commit it records as last in sync, mention `/maintain-formal-verification-skill` if the question touches that code.
When the model rule is missing and it matters, ask whether the user wants to pick a model for each role and a reasoning budget now. It matters when the user is new, the question is about setup or cost, or the answer depends on which models run. Ask at most once per chat. If the need is also unclear, ask both questions together. Offer two choices:
- Now: give them `/setup-pstack` to type, and answer their question too.
- Later: answer their question, and add one line saying every role keeps its default model until they run `/setup-pstack`.
## Get set up
1. Install with `grok plugin install <path> --trust` and `grok plugin enable pstack`, or enable it in the repo's `.grok/config.toml`.
2. Run [`/setup-pstack`](../setup-pstack/SKILL.md). It asks for a reasoning budget, maps a model to each role, and writes a rule. The rule applies to new chats. Then it offers once each to generate a verification skill and a formal verification skill for the project, unless the project already has one.
3. Start a real task with `/poteto-mode`, a goal, and a check that can pass or fail.
Installing changes nothing until the user invokes a skill. Only `/setup-pstack` loads from the user's words. The [README](../../README.md) and [guide page 1](../../docs/guide/01-setup.md) have the details. Offer to word their first prompt with them, per [`references/prompting.md`](references/prompting.md).
If cost is the worry, say where the tokens go and how to spend fewer. pstack spends extra tokens on subagents and review panels. Rerun `/setup-pstack` and pick a smaller budget or cheaper models. A role set to `auto` or `inherit-parent` runs on the chat's model, which saves tokens when the chat runs on Auto or a cheaper model. A shorter panel list runs fewer subagents, one for each entry. Save `/poteto-mode` for work that needs rigor.
This checkout is the Grok Build port. Workflow skills spawn with `spawn_subagent`. Only the parent chat can spawn. `/loop` is a Grok Build built-in. There is no custom mode to pin. Type `/poteto-mode` per task.
pstack is built for Cursor, and it also installs in Claude Code with `/plugin marketplace add cursor/plugins`, then `/plugin install pstack@cursor-plugins`. There, each command takes a `pstack:` prefix, such as `/pstack:poteto-mode`. The [Claude Code adapter](../../docs/harness/claude-code.md) maps the Cursor names, and a step that needs a Cursor-only feature, such as Bugbot or Automations, is skipped with a one-line note.
## Start a task with `/poteto-mode`
`/poteto-mode` matches the task to a playbook, copies the playbook's steps into the todo list, and runs the other skills as the steps need them. A step it skips stays in the list as `skip: <reason>`. A good prompt states the goal and how to tell it's done. It doesn't list skills, because a hand-written sequence tends to drop or reorder steps the playbook would keep. Read [`references/prompting.md`](references/prompting.md) before you help word one. [Guide page 2](../../docs/guide/02-poteto-mode.md) has examples.
`/poteto-mode` applies to the task you invoke it on. The skill has `disable-model-invocation: true`, so it stays off until the user types it. Start each new task with `/poteto-mode`. There is no custom mode to pin.
Mid-chat, "new task" makes the mode match a fresh playbook. `/poteto-mode` already uses `poteto-agent` for the subagents its playbook steps spawn. To get the same style from a subagent of your own, spawn it with `subagent_type: "pstack:poteto-agent"`. Only the parent chat may call `spawn_subagent`.
## Pick a skill
The default answer is `/poteto-mode`, which runs most of the others when its steps need them. Name a skill directly when the user wants more or less of something than the playbook gives. Read the skill before you recommend it, and give one example prompt.
| The user wants to | Skill |
|---|---|
| Do any non-trivial task with rigor | [`/poteto-mode`](../poteto-mode/SKILL.md) |
| Check that the agent understood their goal and the problem before it starts | [`/in-your-own-words`](../in-your-own-words/SKILL.md) |
| Get a prompt rewritten deeper, not bigger, before sending it: what a top professional would add, their raw material and methods, and an outside check. It returns the prompt and doesn't do the task | [`/sharpen`](../sharpen/SKILL.md) |
| Know how code works now, or where new code should live | [`/how`](../how/SKILL.md) |
| Know why code is shaped this way, or where a number came from | [`/why`](../why/SKILL.md) |
| Understand a change or subsystem, explained plainly | [`/teach`](../teach/SKILL.md) |
| Catch up on their own recent work on a topic | [`/recall`](../recall/SKILL.md) |
| Catch up on what changed in this chat since their last message, in plain words and small visuals, with every item waiting on them listed and decidable from the reply alone | [`/ketchup`](../ketchup/SKILL.md) |
| Know what a small diff could break outside itself | [`/blast-radius`](../blast-radius/SKILL.md) |
| Settle types and module shape before code that crosses a function boundary | [`/architect`](../architect/SKILL.md) |
| Get several attempts at one brief, merged into the best one | [`/arena`](../arena/SKILL.md) |
| Run parallel checks over slices, or race workers, each in its own worktree | [`/swarm`](../swarm/SKILL.md) |
| Have different models review a diff and try to break it | [`/interrogate`](../interrogate/SKILL.md) |
| Fix a bug test-first when a cheap local test exists | [`/tdd`](../tdd/SKILL.md) |
| Apply TypeScript rules to `.ts` or `.tsx` work | [`/typescript-best-practices`](../typescript-best-practices/SKILL.md) |
| Strip comments before review, using a reviewer that didn't write them | [`/no-comments`](../no-comments/SKILL.md) |
| Clean AI tells out of prose | [`/unslop`](../unslop/SKILL.md) |
| Write docs, an RFC, a README, a PR description, or a commit message to a standard | [`/technical-writing`](../technical-writing/SKILL.md) |
| Hear the last reply again in plain words | [`/bro`](../bro/SKILL.md) |
| Give agents a scripted way to drive the app and prove behavior | [`/create-verification-skill`](../create-verification-skill/SKILL.md) |
| Bring a verification skill and its feature map back in line with the app | [`/maintain-verification-skill`](../maintain-verification-skill/SKILL.md) |
| Formally verify a race, invariant, or other property that tests rarely reach | [`/create-formal-verification-skill`](../create-formal-verification-skill/SKILL.md) |
| Bring a formal verification back in line after the code it covers changed, and learn whether a failure is drift or a bug | [`/maintain-formal-verification-skill`](../maintain-formal-verification-skill/SKILL.md) |
| Vet a performance number before reporting or acting on it | [`/benchmark-checklist`](../benchmark-checklist/SKILL.md) |
| Run a large or cross-cutting change, or one to review after stepping away | [`/figure-it-out`](../figure-it-out/SKILL.md) |
| Keep a decision log during a run, and review it afterward | [`/show-me-your-work`](../show-me-your-work/SKILL.md) |
| Pick a model for each role and a reasoning budget | [`/setup-pstack`](../setup-pstack/SKILL.md) |
| Turn their own working habits into a personal mode skill | [`/automate-me`](../automate-me/SKILL.md) |
| Turn what a finished task taught into skill edits | [`/reflect`](../reflect/SKILL.md) |
| Stop agents from repeating the same mistakes in this repo | [`/correct`](../correct/SKILL.md) |
| Build a page whose buttons wake a Grok Bot over a webhook | [`/make-bot-ui`](../make-bot-ui/SKILL.md) |
| Find their way around pstack | `/poteto-help` |
If a skill directory next to this one is missing from the table, read its frontmatter and route by its description. The `principle-*` directories are covered under principles below.
Close calls:
- `/how` explains what the code does. `/why` explains the reasons. `/teach` runs one or both and explains the result plainly.
- `/arena` gives every worker the same brief and merges the best parts. `/swarm` splits work into slices or a race and returns one report.
- `/architect` implements right after it settles the design. Add "with checkpoint" to review the design before it writes code.
- `/interrogate` reviews the diff. `/blast-radius` looks for breakage outside the diff and proves the one fact that makes the change safe.
- `/recall` rebuilds context across recent chats. `/ketchup` covers only this chat since the user's last message. Resuming one specific chat or branch is the Session pickup playbook.
- `/figure-it-out` designs one rigorous run. The Orchestrate playbook runs a program that spans days and many PRs. The Autonomous run playbook drives one task to a finish condition.
Not in pstack:
- `/deslop`, `control-cli`, and `control-ui` are bundled in this plugin.
- `/loop` is a Grok Build built-in. `/create-skill` is a Grok Build skill. Each `/loop` fire cannot see the chat, so the stored prompt must stand alone.
- pstack has no `/orchestrate` skill. Orchestrate is a `/poteto-mode` playbook. If the slash menu shows `/orchestrate`, another plugin provides it.
## Playbooks and principles
Playbooks are step lists inside `/poteto-mode`, not skills, so they have no slash command. Inside `/poteto-mode`, describing the task picks one, and these phrases name one directly:
- "babysit this pr" or "check on pr 123" runs Babysit. It drives the PR to merge-ready and stops there. It doesn't merge unless the user asks to merge, land, or ship.
- "land the stack" runs Shipping.
- "take over this branch" runs Session pickup.
- "pause safely" runs Pause safely.
- "full autopilot on this queue" runs Autopilot-full. "stack them, don't ship" runs Autopilot-stack.
- "run the eval playbook" runs Eval.
The Playbooks section of [`poteto-mode`](../poteto-mode/SKILL.md) lists every playbook and when it applies. [Guide page 6](../../docs/guide/06-verify-and-ship.md) covers opening, babysitting, and landing a PR.
pstack has no planning skill. Grok Build plan mode works alongside it. For work that spans phases or stacked PRs, asking `/poteto-mode` for a plan runs the [Multi-phase plan playbook](../poteto-mode/playbooks/multi-phase-plan.md), which writes the plan and doesn't implement it. For a design question, the Prototype playbook or `/architect` settles it in code first.
Principles are one-rule skills that `/poteto-mode` reads and cites in its replies. The user rarely invokes one. They steer with the names instead, as in "apply prove it works. show me the real output." Typing `/principle-<name>` still loads one on demand. [Guide page 8](../../docs/guide/08-principles.md) lists them.
## Fix a run that went wrong
| Symptom | Fix |
|---|---|
| The mode stopped applying after a few turns | Start each task with `/poteto-mode`. There is no pinned mode. |
| A question got treated as the next step of the last task | Say "new task", or say the turn doesn't need the mode. |
| A new model choice had no effect | The rule from `/setup-pstack` applies to new chats. Start one. |
| Runs cost more than expected | See the cost paragraph under Get set up. |
| A skill didn't load on its own | Only `/setup-pstack` loads from the user's words. The others load when the user types them or when `/poteto-mode` runs them, and it doesn't run every skill. |
| Parallel agents overwrote each other | Give each agent `isolation: "worktree"`. |
| An overnight run moved but finished nothing | `/loop` needs a check that can pass or fail, not a duration. See [guide page 7](../../docs/guide/07-overnight.md). |
| The reply claims success from a green build | Ask for the real command, flow, stored value, or profile. That's the prove-it-works principle. |
For a run that drifts, [`references/prompting.md`](references/prompting.md) has one-line steers. [Guide page 10](../../docs/guide/10-recipes-and-pitfalls.md) has more pitfalls and the recipes worth copying.
## Make pstack my own
- [`/automate-me`](../automate-me/SKILL.md) drafts a personal mode skill from the user's own history, to use alongside `/poteto-mode`.
- [`/reflect`](../reflect/SKILL.md) after a session turns its lessons into skill edits the user approves.
- `/poteto-mode write a skill for <workflow>` runs the authoring playbook. The eval playbook tests a skill change blind.
- Fix a misbehaving skill in its own PR, not inside the feature work where it went wrong.
[Guide page 9](../../docs/guide/09-make-it-yours.md) covers each of these.
## Reply
Lead with the answer. Give at most one example prompt in a code block, adapted from [`references/recipes.md`](references/recipes.md) when one fits, then the link to that file. Keep it short unless the user asked for the whole map.Installed A model turn did not run. |
caelaxie
left a comment
There was a problem hiding this comment.
verdict: approved (comment review, same-account author).
- head: still 0d915fe, one commit, nothing pushed since the last review. diff unchanged, still matches upstream 88d47514 (#729).
- harness proof (#8 (comment)): ok. grok 1.0.62
grok plugin install ...@cursor/port-pstack-0.15.29-3e9c --trustinstalled pstack.grok plugin list/--json/detailsshow pstack 0.15.29. the installed checkoutrev-parse HEADis 0d915fe, equal to the head.grok inspectloads sharpen and poteto-help from the installed path. the installed skills/sharpen/SKILL.md text matches this PR's file and upstream 88d47514 byte for byte (four steps, then "rewrite my prompt", return only the rewrite). the livegrok -p '/sharpen ...'turn was blocked only by cli auth (verbatim "Not signed in" error shown, exit 1). that is accepted for a text-only skill change, per grok #5/#6/#7. - ci: validate plugin green on 0d915fe.
- issue linkage: none needed.
squash-merging pinned to 0d915fe.
caelaxie
left a comment
There was a problem hiding this comment.
verdict: approve (comment review, same-account author). merging.
- harness proof: ok. grok 1.0.62
plugin install --trust+plugin list --jsonat 0d915fe show pstack 0.15.29; installed checkout HEAD is 0d915fe;grok inspectloads sharpen and poteto-help from the plugin and the installed sharpen text is the #729 four-step prompt. live turn blocked only by cli auth, text-only skill change, so install+list+inspect is accepted. - minimum changes, parity, ci, linkage: unchanged from prior review, all ok.
Port upstream
pstack/fromd4575673(#724) through88d47514(#729). Version goes from 0.15.28 to 0.15.29. cursor-team-kit stays 1.2.0. The short port README only changes the version.Upstream commits
Verified with
git log d4575673..main -- pstack cursor-team-kitandcompare/d4575673...mainon https://github.com/cursor/plugins. Main is190d2873. The only commit that touchespstack/afterd4575673is:88d47514/ #729 — pstack: restore /sharpen to the original prompt, return only the rewritecursor-team-kit/has no file changes betweend4575673and190d2873. Its.cursor-plugin/plugin.jsonis still 1.2.0.Upstream files in the #729 diff:
pstack/.cursor-plugin/plugin.json— version0.15.29. Not copied. This port has no Cursor plugin manifest.pstack/plugin.json— version0.15.29. Applied to this port's rootplugin.json, which is that same manifest.pstack/README.md—/sharpenskill-table line. Not applied. This port's README has no skill table.pstack/docs/guide/02-poteto-mode.md—/sharpenrewrites the prompt and does not do the task.pstack/docs/guide/10-recipes-and-pitfalls.md— same, under "Sharpen a prompt before you send it".pstack/skills/poteto-help/SKILL.md—/sharpenrow.pstack/skills/poteto-help/references/recipes.md—/sharpen <the prompt you're about to send>.pstack/skills/sharpen/SKILL.md— original four-step prompt; return only the rewrite.Grok adaptations
New upstream text is copied verbatim. No line in this diff needed a Grok rewrite.
plugin.jsonis bumped to0.15.29. Upstream's.cursor-plugin/plugin.jsonbump is not copied.0.15.29.Touched files already carried Grok Build adaptations, and this port leaves them in place. The new
/sharpensentences match upstream:docs/guide/02-poteto-mode.mdstill says type/poteto-modeper task andisolation: "worktree"where upstream says Custom Mode and cloud subagents.docs/guide/10-recipes-and-pitfalls.mdstill saysisolation: "worktree"where upstream says cloud agents.skills/poteto-help/SKILL.mdkeeps the existing Grok Build paragraph in place of upstream's "Other tools can read the skills… spawn Cursor subagents…" paragraph. The Claude Code install paragraph stays, becausedocs/harness/claude-code.mdis already in this port. Existing wording stays:~/.grok/rules/pstack-models.md,spawn_subagent,subagent_type: "pstack:poteto-agent",isolation: "worktree", bundleddeslop/control-cli/control-ui, and no custom mode.skills/sharpen/SKILL.mdandskills/poteto-help/references/recipes.mdmatch upstream. The sharpen skill has no.cursorpaths and no spawn wording to adapt.CI
Validate plugin succeeded on
0d915fe. It reportedValidated 59 skills, 2 agents, and 23 playbooksandRan 68 tests across 5 files.Harness proof
grok 1.0.62, on
cursor/port-pstack-0.15.29-3e9cat0d915fe4bab2574f1f90206109db14e17f3774fb. Full output, including the installed text ofsharpenandpoteto-help: #8 (comment)grok inspectloadssharpenandpoteto-helpfrom that plugin (userInvocable: true). The installedsharpenskill is the original four-step prompt and returns only the rewrite. The installed poteto-help row says/sharpenreturns the prompt and doesn't do the task.A model turn did not run.
grok -p '/sharpen write a migration guide for the v2 config format.' --max-turns 1 --cwd /tmp --verbatimexited 1: not signed in, andXAI_API_KEYis unset.