Skip to content

port pstack 0.15.30 (#741, #776, #779) - #25

Merged
caelaxie merged 1 commit into
mainfrom
cursor/port-pstack-0.15.30-1a52
Oct 23, 2026
Merged

caelaxie merged 1 commit into
mainfrom
cursor/port-pstack-0.15.30-1a52

Conversation

@caelaxie

@caelaxie caelaxie commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

port upstream pstack from 88d47514 (#729) through 4ec7ffa1 (#779). version goes from 0.15.29 to 0.15.30. cursor-team-kit stays 1.2.0.

upstream commits on pstack/:

  • eb4db2b5 feat(pstack): add the statechart skill to draw tla+ models as charts (#741)
  • 7698375f fix(pstack): bring the statechart skill up to date with six fixes (#776)
  • 4ec7ffa1 refactor(pstack): delete statechart comments that repeat the code, and rename helpers (#779)

skills/statechart/ is the upstream tree, helper scripts and tests included. the /statechart row in the readme skill table, the poteto-help row, and the new section in docs/guide/06-verify-and-ship.md match upstream. plugin.json is 0.15.30.

grok-only:

  • the version lives in root plugin.json. this port has no .cursor-plugin/plugin.json.
  • the readme port note pins 4ec7ffa173eaa70d3d9467a627baf0954645a353 for pstack and for cursor-team-kit. kit at that commit is still 1.2.0, and cursor-team-kit/ has no diff in this range.
  • the new skill, guide section, and table rows have no .cursor/skills path and no cursor-only instruction, so they are verbatim. the guide's existing .grok/skills/verify-<app>/ line is unchanged.

harness, grok 1.0.67, head cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd. installed from https://github.com/pstack-ports/grok-pstack@cursor/port-pstack-0.15.30-1a52. grok plugin list shows pstack 0.15.30. installed HEAD is that commit. grok inspect loads statechart and poteto-help (userInvocable: true). statechart tests from the installed copy: 67 pass, 0 fail, tla2tools 1.7.4. local ci: validated 60 skills, 2 agents, 23 playbooks, and 68 script tests. github ci: https://github.com/pstack-ports/grok-pstack/actions/runs/39884084996

full command output and the installed text of statechart and poteto-help: #25 (comment)

Open in Web Open in Cursor 

Copy upstream pstack from 88d47514 through 4ec7ffa1. Adds /statechart.
cursor-team-kit stays 1.2.0.

Co-authored-by: Kaitian Xie <caelaxie@users.noreply.github.com>

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verdict: changes requested (comment review, same account as author).

checked against upstream 4ec7ffa1:

  • minimum changes: pass. all 12 files under skills/statechart/ are byte-identical to pstack/skills/statechart/. the readme, poteto-help, and docs/guide/06-verify-and-ship.md hunks match upstream's hunks verbatim. the only port-only edit is the readme pin line.
  • layout and target: pass. no .cursor/ paths, no cursor manifest added.
  • parity: pass. plugin.json is 0.15.30, same as upstream; nothing in cursor-team-kit/ changed in 88d47514...4ec7ffa1, so kit stays 1.2.0.
  • harness proof: missing. this adds plugin content (a new skill with scripts), so ci's validate step isn't enough on its own. post grok plugin install --trust + grok plugin list on head cdd0c1c, with the installed copy (or inspect) showing statechart present, in the pr body or a comment.
  • issue linkage: n/a, no issue for this.
  • not a draft: pass.

add the proof and i'll merge.

@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown

Harness proof for PR head cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd (gh pr view 25 --json headRefOid). No repo files were changed.

Grok CLI was installed the same way as .github/workflows/ci.yml: curl -fsSL https://x.ai/cli/stable returned 1.0.67, then curl -fsSL https://x.ai/cli/install.sh | bash -s "1.0.67".

Installing Grok 1.0.67 (linux-x86_64)...
  Downloading grok 1.0.67...
  Binary linked to /home/ubuntu/.grok/bin/grok and /home/ubuntu/.grok/bin/agent.
Grok 1.0.67 installed to /home/ubuntu/.grok/bin/grok
  Updated /home/ubuntu/.grok/bin in PATH in /home/ubuntu/.bashrc.

Restart your terminal, then run 'grok' or 'agent' to get started!
grok 1.0.67 (2fe064390d07)

Plugin commands used a clean HOME=/tmp/grok-pstack-proof/home.Gk8Nqh (no other plugins). grok inspect ran in an empty directory, /tmp/grok-pstack-proof/neutral, so statechart is from the installed plugin rather than a working tree.

Checkout of the head

$ git clone --no-checkout https://github.com/pstack-ports/grok-pstack.git /tmp/grok-pstack-proof/repo
$ git -C /tmp/grok-pstack-proof/repo fetch origin cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd
$ git -C /tmp/grok-pstack-proof/repo checkout --detach cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd
HEAD is now at cdd0c1c port pstack 0.15.30 (#741, #776, #779)

$ git -C /tmp/grok-pstack-proof/repo rev-parse HEAD
cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd

$ git -C /tmp/grok-pstack-proof/repo status -sb
## HEAD (no branch)

$ jq -r '.name,.version' /tmp/grok-pstack-proof/repo/plugin.json
pstack
0.15.30

grok plugin validate

cwd: /tmp/grok-pstack-proof/repo

$ grok --version
grok 1.0.67 (2fe064390d07)

$ grok plugin validate .
Plugin manifest is valid.
  name: pstack
  version: 0.15.30
  description: if you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence.
  components: 1 skill dir(s), 0 command dir(s), 1 agent dir(s)

exit 0

grok plugin install --trust at the head sha

cwd: /tmp

$ grok plugin install https://github.com/pstack-ports/grok-pstack@cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd --trust
Installed 1 plugin(s) from https://github.com/pstack-ports/grok-pstack@cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd: pstack

exit 0

Installed copy:

$ git -C /tmp/grok-pstack-proof/home.Gk8Nqh/.grok/installed-plugins/grok-pstack-619a4a2c rev-parse HEAD
cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd

$ git -C /tmp/grok-pstack-proof/home.Gk8Nqh/.grok/installed-plugins/grok-pstack-619a4a2c status -sb
## HEAD (no branch)

$ jq -r '.name,.version' /tmp/grok-pstack-proof/home.Gk8Nqh/.grok/installed-plugins/grok-pstack-619a4a2c/plugin.json
pstack
0.15.30

$ sed -n '1,6p' /tmp/grok-pstack-proof/home.Gk8Nqh/.grok/installed-plugins/grok-pstack-619a4a2c/skills/statechart/SKILL.md
---
name: statechart
description: "Draw what an app's user sees as a Mermaid statechart from a TLA+ model. States are gray if they work, red if still wrong, and green if fixed. Each bug TLC finds is a numbered path. Use for /statechart, \"show the PM the bug\", or to turn an agreed chart into a TLA+ skeleton."
disable-model-invocation: true
---

grok plugin list --json

cwd: /tmp

[
  {
    "status": "installed",
    "name": "pstack",
    "repo_key": "grok-pstack-619a4a2c",
    "version": "0.15.30",
    "path": "/tmp/grok-pstack-proof/home.Gk8Nqh/.grok/installed-plugins/grok-pstack-619a4a2c",
    "source": "https://github.com/pstack-ports/grok-pstack",
    "marketplace": null
  }
]

grok plugin details pstack

grok-pstack-619a4a2c
  path: /tmp/grok-pstack-proof/home.Gk8Nqh/.grok/installed-plugins/grok-pstack-619a4a2c
  kind: git: https://github.com/pstack-ports/grok-pstack
  installed: 2026-10-23T01:30:28.251377329+00:00
  updated: 2026-10-23T01:30:28.251377329+00:00
  plugins (1):
    pstack v0.15.30
  description: if you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence.
  components: 1 skill dir(s), 0 command dir(s), 1 agent dir(s)

components: 1 skill dir(s) is that command's directory count. The skill itself is in inspect below.

grok inspect --json

cwd: /tmp/grok-pstack-proof/neutral. exit 0. 782 lines.

statechart from that JSON (jq '{grokVersion, cwd, plugins, statechart: [.skills[] | select(.name=="statechart")]}'):

{
  "grokVersion": "1.0.67",
  "cwd": "/tmp/grok-pstack-proof/neutral",
  "plugins": [
    {
      "name": "pstack",
      "scope": "user",
      "path": "/tmp/grok-pstack-proof/home.Gk8Nqh/.grok/installed-plugins/grok-pstack-619a4a2c",
      "enabled": true,
      "provides": {
        "skills": 60,
        "agents": 1,
        "hooks": false,
        "mcpServers": 0
      }
    }
  ],
  "statechart": [
    {
      "name": "statechart",
      "description": "Draw what an app's user sees as a Mermaid statechart from a TLA+ model. States are gray if they work, red if still wrong, and green if fixed. Each bug TLC finds is a numbered path. Use for /statechart, \"show the PM the bug\", or to turn an agreed chart into a TLA+ skeleton.",
      "source": {
        "type": "plugin",
        "plugin_name": "pstack",
        "path": "/tmp/grok-pstack-proof/home.Gk8Nqh/.grok/installed-plugins/grok-pstack-619a4a2c/skills/statechart/SKILL.md"
      },
      "userInvocable": true
    }
  ]
}

statechart is loaded. source.type is plugin, source.plugin_name is pstack, and the path is the installed copy at cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd. The plugin is enabled and reports 60 skills.

Full grok inspect --json (cwd /tmp/grok-pstack-proof/neutral, exit 0) was 782 lines, 36672 bytes. The jq object above is that output filtered to grokVersion, cwd, plugins, and the skill named statechart. The statechart object in it is the skill entry from that JSON.

Live model turn

Same HOME and cwd as inspect. Not signed in, so the turn stopped before a model response. exit 1 (auth), not a timeout.

$ grok -p 'List loaded skill names from the pstack plugin that contain statechart. Do not use tools.' --max-turns 1 --output-format plain --no-alt-screen
Not signed in. To authenticate without a browser, run:
  grok login --device-code

Alternatively, set the XAI_API_KEY environment variable or run `grok login` on a machine with a browser.
Error: Not signed in. To authenticate without a browser, run:
  grok login --device-code

Alternatively, set the XAI_API_KEY environment variable or run `grok login` on a machine with a browser.

@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown

grok 1.0.67 (2fe064390d07). installed copy of cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd on cursor/port-pstack-0.15.30-1a52. HOME is a clean directory so this install is the only plugin.

$ grok --version
grok 1.0.67 (2fe064390d07)

$ HOME=/tmp/grok-proof-dpmf grok plugin install https://github.com/pstack-ports/grok-pstack@cursor/port-pstack-0.15.30-1a52 --trust
Installed 1 plugin(s) from https://github.com/pstack-ports/grok-pstack@cursor/port-pstack-0.15.30-1a52: pstack

$ HOME=/tmp/grok-proof-dpmf grok plugin list
  grok-pstack-619a4a2c: pstack [git: https://github.com/pstack-ports/grok-pstack]

$ HOME=/tmp/grok-proof-dpmf grok plugin list --json
[
  {
    "status": "installed",
    "name": "pstack",
    "repo_key": "grok-pstack-619a4a2c",
    "version": "0.15.30",
    "path": "/tmp/grok-proof-dpmf/.grok/installed-plugins/grok-pstack-619a4a2c",
    "source": "https://github.com/pstack-ports/grok-pstack",
    "marketplace": null
  }
]

$ git -C /tmp/grok-proof-dpmf/.grok/installed-plugins/grok-pstack-619a4a2c rev-parse HEAD
cdd0c1cc45d26a7ee4f1d9fbb4779a55fa37ebbd

$ git -C /tmp/grok-proof-dpmf/.grok/installed-plugins/grok-pstack-619a4a2c status -sb
## cursor/port-pstack-0.15.30-1a52...origin/cursor/port-pstack-0.15.30-1a52

HOME=/tmp/grok-proof-dpmf grok inspect --json loads both skills from that plugin (userInvocable: true). plugin entry:

{
  "name": "pstack",
  "scope": "user",
  "path": "/tmp/grok-proof-dpmf/.grok/installed-plugins/grok-pstack-619a4a2c",
  "enabled": true,
  "provides": {
    "skills": 60,
    "agents": 1,
    "hooks": false,
    "mcpServers": 0
  }
}
{
  "name": "statechart",
  "description": "Draw what an app's user sees as a Mermaid statechart from a TLA+ model. States are gray if they work, red if still wrong, and green if fixed. Each bug TLC finds is a numbered path. Use for /statechart, \"show the PM the bug\", or to turn an agreed chart into a TLA+ skeleton.",
  "source": {
    "type": "plugin",
    "plugin_name": "pstack",
    "path": "/tmp/grok-proof-dpmf/.grok/installed-plugins/grok-pstack-619a4a2c/skills/statechart/SKILL.md"
  },
  "userInvocable": true
}
{
  "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.",
  "source": {
    "type": "plugin",
    "plugin_name": "pstack",
    "path": "/tmp/grok-proof-dpmf/.grok/installed-plugins/grok-pstack-619a4a2c/skills/poteto-help/SKILL.md"
  },
  "userInvocable": true
}

helper scripts, run from the installed plugin directory. java 21. tla2tools.jar is tlaplus v1.7.4 (tlc 2.19). node --test printed tap for 67 tests, all ok. footer:

$ cd /tmp/grok-proof-dpmf/.grok/installed-plugins/grok-pstack-619a4a2c
$ TLA2TOOLS=/tmp/tla/tla2tools.jar JAVA=java node --test skills/statechart/scripts/test/statechart.test.mjs
# tests 67
# suites 0
# pass 67
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 216231.325871

node skills/statechart/scripts/statechart.mjs --help exited 0. first lines:

Usage: node statechart.mjs from-spec SPEC.tla [--config FILE] [--fixed FIXED.tla [--fixed-config FILE] | --against AGREED.tla [--against-config FILE]] [--label TEXT] [--map FILE] [--expect-broken RULE]... [--title TEXT] [--out DIR] [--png]
       node statechart.mjs from-chart CHART.mmd [--module NAME] [--expect-broken RULE]... [--title TEXT] [--out DIR] [--png]
       node statechart.mjs [from-spec|from-chart] --help

local ci, same steps as .github/workflows/ci.yml: Validated 60 skills, 2 agents, and 23 playbooks. and Ran 68 tests across 5 files. github run: https://github.com/pstack-ports/grok-pstack/actions/runs/39884084996

installed skills/statechart/SKILL.md:

---
name: statechart
description: "Draw what an app's user sees as a Mermaid statechart from a TLA+ model. States are gray if they work, red if still wrong, and green if fixed. Each bug TLC finds is a numbered path. Use for /statechart, \"show the PM the bug\", or to turn an agreed chart into a TLA+ skeleton."
disable-model-invocation: true
---

# Statechart

The chart shows what an app's user sees. A PM reads it to decide whether that behavior is right. Label each state with what is on the screen, such as "Paying". Label each step with what the user does or sees happen, such as "tap Pay" or "the charge goes through". Keep variable and action names out of labels. The scripts call this user the reader, as in `readerActions` and reader steps.

Run `node <skill dir>/scripts/statechart.mjs --help` for the commands and for how to read a chart. Work in a scratch folder outside the repo. The command writes its files next to its input.

## Pick the direction

Use `from-spec` when a TLA+ model exists or the code is concrete enough to model. Use `from-chart` when there is no model and the PM should agree on the behavior before anyone writes or changes the code.

If the code already has a TLA+ spec, start from a copy of that spec. Add the variables the user sees, and keep the spec's existing invariants. To audit the code against that spec, make the copy model what the code does, and pass the spec unchanged as `--against`. Check it with the config that its authors say it passes, and pass that config as `--against-config` unless it has the spec's file name. One mapping labels both models, so label states and steps only from variables that both have. In a code model or a new spec, tie every variable and action to code that a reviewer can open, and take its name from that code. Make each action one indivisible step in the code. Put the file and line of the code that checks each condition of an action in a comment on that condition, as in `\* pay.ts:120`.

## Spec to chart

1. Choose the chart's states. When the PM cares about something the screen does not show, such as a second charge while the screen still says "Paying", name the state "Paying, charged twice". Start with few states, and split a state only when the split separates two bugs.
2. Write each rule the PM agrees to as one invariant, with the PM's sentence as its comment. Each rule names what the user sees on a screen or gets from a request, and the code that can change it. Refuse a rule that lacks one of them. For a rule that applies once everything settles, define `Settled == ~ENABLED System`, where `System` is the disjunction of the actions the user does not take. Report each broken rule as a bug. Never weaken a rule to make the chart pass.
3. Run `from-spec`, then fill in the mapping file it writes. Put the labels in `state` and `step`, and list the user's actions in `readerActions` by action name. When two bugs end on the same screen through different code paths, add `cause` and make it name the code path. To color the states by what the PM cares about, such as "Toast shown", return that group from `group`. The legend names the groups, and states that break a rule still get a red border.
4. If there is an open fix, model it from the code and pass that model as `--fixed`.
5. Render each chart with `--png` and look at every PNG. Check that each numbered path reads in order. If a label reads like code, fix `state` or `step` and run the command again.
6. Replay each bug's story against the real code, as a test or a live repro, one step per model action. Drive only entry points that a user or client reaches, and assert only what they see. A test that asserts a flag that it sets, or that searches the source text, proves nothing. When a run proves part of the story and reading the code proves the rest, say which part each proves. When the test copies code that it cannot import, give the commit and line range of the copy, and list what the copy leaves out. If a bug does not reproduce, assume the model is wrong until you show otherwise. Fix the model, not the rule.

## Chart to spec

1. Draw the chart the PM agrees to. Use one region for each thing that changes independently, such as the connection and the sync badge. Add one `%% never` line per rule, with the PM's sentence. Draw "the app closes" as an edge to the state the user sees next.
2. Run `from-chart`. If a rule breaks, the agreed chart has a design bug. Take the bug to the PM.
3. Add the real code's guards and variables to the spec that `from-chart` wrote, and run `from-chart` again. For each difference it prints, ask the PM whether the code is wrong or the chart needs a correction.

## Hand off

Give the PM the PNG and the Mermaid source of each chart. Add one line per bug with the rule it breaks, its steps as the chart numbers them, whether it reproduced, and whether the open fix fixes it. With `--against`, also say whether the spec already lists it: in the configs that `stories.md` names, in the spec's notes on what the model leaves out, or not at all. Do not report that a rule holds while the command lists conditions with no file and line. Take every count you quote from `summary.json`. Attach `stories.md` and the command that regenerates everything. Say what the model leaves out.

installed skills/poteto-help/SKILL.md. the new row is the /statechart line:

---
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.

## 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) |
| Show a PM or designer what the user sees as a chart checked by a model, with each bug drawn as a numbered path, turn an agreed chart into a TLA+ skeleton, or audit the code against its TLA+ spec | [`/statechart`](../statechart/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.

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass. statechart skill/scripts match upstream 4ec7ffa1 byte-for-byte, version 0.15.30, kit unchanged at 1.2.0, ci green on cdd0c1c, and harness proof (install --trust + list + inspect loading statechart from plugin; live turn blocked only by auth) is on the pr. squash-merging.

@caelaxie
caelaxie merged commit ebd0185 into main Oct 23, 2026
1 check passed
@caelaxie
caelaxie deleted the cursor/port-pstack-0.15.30-1a52 branch October 23, 2026 01:36
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