From 57cdaabf59d2bab829b4715e645a1222ab2c85a8 Mon Sep 17 00:00:00 2001 From: NDilanka Date: Tue, 6 Oct 2026 13:08:20 +0530 Subject: [PATCH 1/5] chore(upstream): sync pstack 0.15.15 (df58112) Adds the poteto-help skill and upstream's guide updates: Custom Modes replace the sticky-mode wording, and typescript-best-practices loads by name. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- UPSTREAM.md | 4 +- plugins/pvstack/.upstream-files.json | 2 + .../pvstack/docs/upstream/guide/01-setup.md | 17 ++++- .../docs/upstream/guide/02-poteto-mode.md | 39 ++++++++++- .../docs/upstream/guide/03-understand.md | 30 ++++++++- .../pvstack/docs/upstream/guide/04-design.md | 54 +++++++++++++++- .../docs/upstream/guide/05-build-and-clean.md | 8 +++ .../docs/upstream/guide/06-verify-and-ship.md | 53 +++++++++++++-- .../docs/upstream/guide/07-overnight.md | 41 +++++++++++- .../docs/upstream/guide/08-principles.md | 6 +- .../docs/upstream/guide/09-make-it-yours.md | 37 ++++++++++- .../upstream/guide/10-recipes-and-pitfalls.md | 64 ++++++++++++++++++- plugins/pvstack/docs/upstream/guide/README.md | 18 ++++-- plugins/pvstack/skills/architect/SKILL.md | 2 +- .../architect/references/runner-prompt.md | 2 +- plugins/pvstack/skills/arena/SKILL.md | 4 +- plugins/pvstack/skills/blast-radius/SKILL.md | 2 +- plugins/pvstack/skills/how/SKILL.md | 4 +- plugins/pvstack/skills/interrogate/SKILL.md | 9 ++- plugins/pvstack/skills/poteto-help/SKILL.md | 20 ++++-- .../poteto-help/references/prompting.md | 51 +++++++++++++++ .../skills/poteto-help/references/recipes.md | 47 ++++++++++++++ plugins/pvstack/skills/poteto-mode/SKILL.md | 2 +- .../poteto-mode/scripts/orch/orch.test.ts | 2 +- plugins/pvstack/skills/reflect/SKILL.md | 8 +-- plugins/pvstack/skills/why/SKILL.md | 2 +- 26 files changed, 475 insertions(+), 53 deletions(-) create mode 100644 plugins/pvstack/skills/poteto-help/references/prompting.md create mode 100644 plugins/pvstack/skills/poteto-help/references/recipes.md diff --git a/UPSTREAM.md b/UPSTREAM.md index c13854a..ba0beb7 100644 --- a/UPSTREAM.md +++ b/UPSTREAM.md @@ -4,8 +4,8 @@ PV Stack tracks Lauren Tan's pstack directly from Cursor's plugin repository. - Repository: https://github.com/cursor/plugins - Path: `pstack/` -- Commit: `4e5b1cf2ccb0ea3716f08c8ee0a5856b5ab93536` -- Upstream version: 0.15.10 +- Commit: `df581122cde17e6e27686b5a448bde23e4ad4318` +- Upstream version: 0.15.15 Update with `node tools/sync-upstream.mjs --ref main`, review the diff, then commit. `node tools/sync-upstream.mjs --check` fails when the tree has drifted from this pin. diff --git a/plugins/pvstack/.upstream-files.json b/plugins/pvstack/.upstream-files.json index b3a2cd6..4d147d0 100644 --- a/plugins/pvstack/.upstream-files.json +++ b/plugins/pvstack/.upstream-files.json @@ -26,6 +26,8 @@ "skills/make-bot-ui/SKILL.md", "skills/no-comments/SKILL.md", "skills/poteto-help/SKILL.md", + "skills/poteto-help/references/prompting.md", + "skills/poteto-help/references/recipes.md", "skills/poteto-mode/SKILL.md", "skills/poteto-mode/playbooks/authoring-a-skill.md", "skills/poteto-mode/playbooks/autonomous-run.md", diff --git a/plugins/pvstack/docs/upstream/guide/01-setup.md b/plugins/pvstack/docs/upstream/guide/01-setup.md index 24fd1ca..9366eee 100644 --- a/plugins/pvstack/docs/upstream/guide/01-setup.md +++ b/plugins/pvstack/docs/upstream/guide/01-setup.md @@ -22,7 +22,9 @@ Run: [`/setup-pvstack`](../../skills/setup-pvstack/SKILL.md) detects the models you have access to, asks for a reasoning budget, shows you each role (code delegates, judgment, the review panels), and asks what you want. Answer the questions. It writes `~/.factory/pvstack-models.md`, a small rule every pstack skill reads. -You only override what you care about. A role with no line in the rule keeps the skill's default. To restore a default, delete that role's line. A rerun of `/setup-pvstack` keeps any role whose model differs from the default. A rule written before 0.15.3 pins the old default models, so delete those role lines, or delete the file, then run `/setup-pvstack` again. +The defaults run at `xhigh` reasoning, the same as the `large` budget. `unlimited` lifts each model to its highest tier, up to `max`. Opus goes to `max`. Grok tops out at `xhigh`, so it stays there. `medium` and `small` lower the reasoning and spend fewer tokens. + +You only override what you care about. A role with no line in the rule keeps the skill's default. To restore a default, delete that role's line. A rerun of `/setup-pvstack` keeps any role whose model differs from the default. When a default changes, a rule written before the change still pins the old default, so delete those role lines, or delete the file, then run `/setup-pvstack` again. You might be wondering what happens if you use Auto. Set a role to `inherit-parent` or `auto` and pstack omits the subagent `model` field, so the subagent inherits your parent chat model. Both values mean the same thing, and neither is a model slug. For a panel role the value is a list, and one subagent runs per entry, so the list length sets the panel size. Setup also configures `swarm workers`, the default model for every `/swarm` worker unless a race names a model for each arm. @@ -30,10 +32,21 @@ You might be wondering what happens if you use Auto. Set a role to `inherit-pare At the end of setup, `/setup-pvstack` looks for a way to prove app behavior in your project, either a `verify-*` skill or an existing harness. If it finds neither, it offers once to generate one with [`/create-verification-skill`](../../skills/create-verification-skill/SKILL.md). -Say yes and it writes `.factory/skills/verify-/`, a project-local skill that teaches agents to drive your app the way a user does. It proves the skill works once before handing it over. Say no and setup moves on. You can run `/create-verification-skill` yourself any time. [Verify and ship](./06-verify-and-ship.md#create-a-project-verification-skill) covers when it earns its place. +Say yes and it writes `.factory/skills/verify-/`, a project-local skill that teaches agents to drive your app the way a user does. It proves the skill works once before handing it over. Say no and setup moves on. You can run `/create-verification-skill` yourself any time. [Verify and ship](./06-verify-and-ship.md#create-a-project-verification-skill) covers it in depth. + +If you're new to pstack, say yes. An agent that can check its own work keeps going until the check passes. An agent that can't hands every result back to you to check by hand. Of everything in this guide, the verification skill pays off the most. After setup, start a new chat. The model rule applies to new sessions. +## Keep the cost in check + +pstack spends extra tokens on subagents and review panels. That's the price of the rigor. To spend fewer: + +- Rerun `/setup-pvstack` and pick a smaller reasoning budget or cheaper models. A strong model in the main chat with cheaper, faster models in the code roles is a good split. +- Set a role to `auto` or `inherit-parent` so it runs on the chat's own model. +- Shorten a panel list. Each entry runs one subagent. +- Save `/poteto-mode` for work that needs rigor. A small, obvious edit doesn't. + ## Run your first task Pick something real but small, and describe it the way you'd describe it to a colleague: diff --git a/plugins/pvstack/docs/upstream/guide/02-poteto-mode.md b/plugins/pvstack/docs/upstream/guide/02-poteto-mode.md index 71e7ab1..8341604 100644 --- a/plugins/pvstack/docs/upstream/guide/02-poteto-mode.md +++ b/plugins/pvstack/docs/upstream/guide/02-poteto-mode.md @@ -37,6 +37,37 @@ You don't write a spec. You say what's wrong or what you want, plus anything you That's a Bug fix prompt. "repro first" is a real constraint, not politeness, and the playbook honors it. Watch the todo list fill with the Bug fix steps. A skipped step stays visible with `skip: `. +## What goes in a prompt + +A useful prompt carries up to five things, and each one fits in a sentence: + +- **The goal.** Say what's wrong, or what you want. +- **The done check.** It must be able to pass or fail. "Make it better" and "work on it for an hour" aren't checks. +- **The proof you want to see.** Ask for the real command output, a video of the flow, the stored value, or a before-and-after number. +- **What you already know.** A symptom, a repro step, a log line, or a link saves the agent a search. +- **The real constraints.** "repro first", "don't change any code yet", "zero behavior change", and "let me review before proceeding" each change what the agent does. + +Here's one prompt with all five: + +```text +/poteto-mode the csv export drops its last row since yesterday's deploy. failing job id is 4812. repro first, then fix. done means the 60k-row fixture exports every row. show me the row counts before and after. +``` + +Two things are worth leaving out: + +- **The how.** Say what to achieve, and leave the agent room to find a better path than the one you'd pick. The same goes for a list of skills, covered in the pitfall below. +- **Your theory of the cause, at first.** A stated guess narrows the search to wherever you pointed. Let the agent restate the problem before you share your hunch. + +For a noisy report, such as a long thread or a vague bug, make the restatement the first step: + +```text +/poteto-mode read this thread. restate the underlying issue in your own words, in plain english. don't change any code yet. +``` + +A misreading shows up in the restatement, before any code exists. Correct it there, and it costs you one message instead of one wrong fix. + +## Follow up short + When the conversation already carries the context, the prompt shrinks to almost nothing. All of these are enough: ```text @@ -63,15 +94,17 @@ A long chat accumulates context from the last task. When you change subjects, sa "new task" tells `/poteto-mode` to re-match rather than continue the prior playbook. "don't change any code yet" pins this one to Investigation. Without those two phrases, a mode mid-Feature tends to treat your question as the next feature step. -## Give parallel work its own worktree +## Give parallel work its own machine + +If you run several agents against one repository on one computer, they will fight over the working tree, the ports, and the build output. The cleanest isolation is a [cloud subagent](https://cursor.com/docs/subagents#cloud-subagents). Each one gets its own VM and branch, so it can install dependencies, run your app, and record video of the result without touching your machine. Type `/in-cloud` before the task, or ask the parent chat to hand work to cloud subagents. -If you run several agents against one repository, they will fight over the working tree. Ask for isolation up front: +When the work has to stay local, ask for a worktree up front: ```text /poteto-mode new task. branch off in a fresh worktree, then port the parser change there. ``` -Each task in its own branch and worktree means no agent stomps another's files. The [Opening a PR playbook](../../skills/poteto-mode/playbooks/opening-a-pr.md) already works from a worktree for code changes, so mostly you only say this when a specific base or location matters. +Each task in its own branch and worktree means no agent stomps another's files. Worktrees cost disk and machine resources, so a laptop runs only a handful at once. The [Opening a PR playbook](../../skills/poteto-mode/playbooks/opening-a-pr.md) already works from a worktree for code changes, so mostly you only say this when a specific base or location matters. Worktrees accumulate. When disk gets tight, ask: diff --git a/plugins/pvstack/docs/upstream/guide/03-understand.md b/plugins/pvstack/docs/upstream/guide/03-understand.md index af98598..e15bea0 100644 --- a/plugins/pvstack/docs/upstream/guide/03-understand.md +++ b/plugins/pvstack/docs/upstream/guide/03-understand.md @@ -1,9 +1,21 @@ # Understand the code before changing it -Editing code you don't understand is how subtle regressions ship. pstack gives you four ways in. `/how` explains what the code does now. `/why` digs up the reasons it's shaped that way. `/teach` blends both into one explanation. `/recall` rebuilds your own recent context on a topic. +Editing code you don't understand is how subtle regressions ship, and that's as true for the agent as for you. Agents usually fail in one of two ways. They misread what you want, or they don't have the context to do the work right. [What goes in a prompt](./02-poteto-mode.md#what-goes-in-a-prompt) handles the first. This page handles the second. + +pstack gives you four ways in. `/how` explains what the code does now. `/why` digs up the reasons it's shaped that way. `/teach` blends both into one explanation. `/recall` rebuilds your own recent context on a topic. Each one also makes the agent explain itself in words you can check. That's how you supervise an agent that may know the code better than you do. ![A detective studies a machine blueprint with a magnifying glass while robots fetch case files; the evidence board behind her links clues under /how and /why.](./images/understanding.jpg) +## Start with a read-only investigation + +When the cause is unclear, ask for findings, not a fix: + +```text +/poteto-mode investigate why background jobs time out every few hours. give me what we know, what data you used, and your best hypotheses. don't change any code yet. +``` + +"don't change any code yet" routes this to the [Investigation playbook](../../skills/poteto-mode/playbooks/investigation.md). It runs `/how`, adds `/why` for questions about motivation, and returns a cited explanation. For a choice between options, it returns a recommendation with a trade-offs table. Asking "what data you used" makes the agent separate its evidence from its guesses. When the findings point at a fix, start the fix as a new task. + ## Trace behavior with `/how` ```text @@ -30,13 +42,27 @@ The two compose naturally. `do why first then how` is a perfectly good prompt wh [`/teach`](../../skills/teach/SKILL.md) is for when a summary isn't enough. It runs `/how` and `/why`, for a small change maybe just one of them, and weaves the findings into a plain explanation that builds up diagram by diagram. The "convince me" framing is worth stealing. It turns the explanation into an argument you can poke at instead of a tour. +It works on the agent's own choices too: + +```text +/teach me why you implemented it this way and not with a queue. what did you trade off, and why? +``` + +Teaching helps the agent as much as you. An agent that has to explain its work must read the code and back each claim with evidence, instead of stating it confidently and moving on. + ## Rebuild your own context with `/recall` ```text /recall catch me up on the export work from last week ``` -[`/recall`](../../skills/recall/SKILL.md) mines your own recent chats plus the shared record (issues, prior fixes, errors still firing) and hands back a brief on where things stand and what's next. Use it when you're returning to a topic cold. If you want to resume one specific chat, that's the Session pickup playbook below, not `/recall`. +[`/recall`](../../skills/recall/SKILL.md) mines your own recent chats plus the shared record (issues, prior fixes, errors still firing) and hands back a brief on where things stand and what's next. Your old chats hold context that a fresh agent lacks, so start new work on an old topic by loading it first, then hand over the new input: + +```text +/recall my work on the virtualized list from yesterday, then read this bug report. +``` + +If you want to resume one specific chat, that's the Session pickup playbook below, not `/recall`. ## Take over prior work with Session pickup diff --git a/plugins/pvstack/docs/upstream/guide/04-design.md b/plugins/pvstack/docs/upstream/guide/04-design.md index 10f0fc3..d4db476 100644 --- a/plugins/pvstack/docs/upstream/guide/04-design.md +++ b/plugins/pvstack/docs/upstream/guide/04-design.md @@ -2,6 +2,8 @@ One attempt at a hard design locks in the first shape the model thought of. `/architect` settles types and boundaries before implementation. `/arena` runs several attempts at the same brief and merges the best parts. `/interrogate` has other models try to break the result. When the job is coverage rather than design synthesis, `/swarm` fans out slices or races and aggregates their results. +The two most common design mistakes are taking the agent's first design and polishing a plan that no code has tested. This page fixes both. You plan through code: prototypes answer the open questions, a README or tutorial sets the target, and the written plan comes last. + ![Three robots draft competing bridge models at their own tables under /architect, /arena, and /interrogate panels, while a judge robot with a clipboard inspects skeptically.](./images/design.jpg) ## Settle the shape with `/architect` @@ -18,6 +20,8 @@ By default it proceeds straight from the synthesized design into implementation. /architect with checkpoint. stop and show me before implementing. ``` +The design isn't sacred once code starts. If implementation shows the same workaround in unrelated places, or types that only compile with `any` or forced casts, `/architect` treats that as proof the design is wrong. It scraps the sketch and starts over instead of patching around it. + ## Fan out attempts with `/arena` ```text @@ -62,10 +66,56 @@ Reach for it when parallelism buys coverage or lets independent checks race. `/a /interrogate the whole branch, but skeptically. no nitpicks unless it's an actual bug or regression. ``` -[`/interrogate`](../../skills/interrogate/SKILL.md) sends the same diff, intent, and rubric to several reviewers on different model families. Model diversity is the point. Different models have different blind spots, so a finding two models raise independently is high-confidence signal. The lead sorts everything into `Act on`, `Consider`, `Noted`, and `Dismissed`, with a reason for each dismissal, and applies nothing automatically. +[`/interrogate`](../../skills/interrogate/SKILL.md) sends the same diff, intent, and rubric to reviewers on different model families. Model diversity is the point. Different models have different blind spots, so a finding two models raise independently is high-confidence signal. The lead sorts everything into `Act on`, `Consider`, `Noted`, and `Dismissed`, with a reason for each dismissal, and applies nothing automatically. Read the dismissals too. The lead is a pragmatic senior engineer, not an oracle, and you can override it. +## Prototype instead of debating + +Never take the first design. Ask for a few, and pick from evidence you can see: + +```text +/poteto-mode prototype a few options for the new dropdown menu. take screenshots or videos for me to compare. +``` + +The [Prototype playbook](../../skills/poteto-mode/playbooks/prototype.md) builds throwaway sketches in a scratch directory, puts the variants behind one switcher, drives each one, and captures screenshots or timings. It also works for behavior and algorithms, not just UI. Prototypes are planning with code. They let the agent answer its own open questions by running something instead of asking you, and they leave room for an option you wouldn't have thought of. + +The same idea scales up to a real design. Pair `/architect` with prototypes and keep a review gate: + +```text +/poteto-mode we need rate limiting for external webhooks. /architect it first, and answer open questions with prototypes. let me review before proceeding. +``` + +Don't spend reviewers on an abstract plan. `/interrogate` belongs on a diff. Point adversarial review at a plan with no code behind it and the reviewers invent theoretical risks and edge cases that will never happen. Let prototypes settle the questions, then review what got built. + +## Write the README first for shared code + +For a package or API that other code will use, start with the doc a user would read: + +```text +/poteto-mode write a tutorial for how i would use the new config package first. then /teach me why it beats the current one. +``` + +Writing the tutorial first forces the caller's view. You describe the API to a hypothetical user and work back to the implementation. The doc also becomes a concrete target the agent checks its own work against. Name [`/technical-writing`](../../skills/technical-writing/SKILL.md) when the doc itself matters, so a tutorial stays a tutorial instead of drifting into reference and explanation at once. + +## Plan after the design settles + +pstack has no planning skill, on purpose. When you do want a written plan, ask for it once the design is settled: + +```text +/poteto-mode turn this design into a plan. small verifiable PRs, each with its own verification steps. +``` + +The [Multi-phase plan playbook](../../skills/poteto-mode/playbooks/multi-phase-plan.md) settles any remaining open questions by prototype, then writes one section per PR, each ending in proof that the change works. A passing test suite alone doesn't count as that proof. The plan is the deliverable. The playbook doesn't implement it, and it names which execution playbook should run it next. + +For a migration, state the bar in the prompt: + +```text +/poteto-mode plan the migration of our ui library to the new styling system. small verifiable PRs, each with visual regression checks. the result must match the original exactly, bugs included. +``` + +"bugs included" keeps the migration from quietly fixing things on the way, which would make the old and new output impossible to compare. For a project that spans many days, you can commit the plan to the repo for a while so other agents see the work in progress. Delete it when the work lands. + ## How much design work does a task deserve? You might be wondering whether every change needs this. No. Most changes need none of it. A rough ladder: @@ -74,7 +124,9 @@ You might be wondering whether every change needs this. No. Most changes need no - A change that crosses function boundaries or moves ownership earns `/architect`, which brings `/arena` with it. - A standalone decision where independent attempts would help, like naming, formats, or an algorithm, is `/arena` directly. - A coverage matrix, set of parallel checks, or race with declared arms is `/swarm`. +- An open question you could answer by running something, like a layout, a timing, or an approach, gets a prototype, not a debate. - A contested design that's expensive to reverse gets `/architect`, then `/interrogate` before shipping. +- Work that spans several PRs gets a plan, written after the design settles. `/poteto-mode` already applies this ladder. Boundary-crossing work triggers `/architect` on its own, so you reach for these directly mainly when you want more or less scrutiny than the default. diff --git a/plugins/pvstack/docs/upstream/guide/05-build-and-clean.md b/plugins/pvstack/docs/upstream/guide/05-build-and-clean.md index 57d2257..fc48a46 100644 --- a/plugins/pvstack/docs/upstream/guide/05-build-and-clean.md +++ b/plugins/pvstack/docs/upstream/guide/05-build-and-clean.md @@ -32,6 +32,14 @@ Each of these routes to its playbook ([Bug fix](../../skills/poteto-mode/playboo For sustained improvement of one number, there's the [Hillclimb playbook](../../skills/poteto-mode/playbooks/hillclimb.md). Give it the metric, a target, and a floor on attempts, and it loops one hypothesis at a time with a frozen measurement harness. It keeps wins and reverts everything else. +Both perf playbooks run [`/benchmark-checklist`](../../skills/benchmark-checklist/SKILL.md) on their numbers. Perf issue vets its baseline and every number after it, and Hillclimb vets its harness before freezing it. [Verify and ship](./06-verify-and-ship.md#vet-a-measured-number-with-benchmark-checklist) shows when to type it yourself. + +Sometimes you want the cause before any fix. For a live symptom, such as a leak, an idle CPU spin, or a visual glitch, the [Runtime forensics playbook](../../skills/poteto-mode/playbooks/runtime-forensics.md) instruments the running process. For a profile you already captured, the [Trace forensics playbook](../../skills/poteto-mode/playbooks/trace-forensics.md) reads the artifact and maps the hot frame to source. Both return a diagnosis, not a fix: + +```text +/poteto-mode here's a cpuprofile from the slow startup. tell me where the time goes and which source lines own it. no fix yet. +``` + ## Write the failing test first with `/tdd` When a bug has a cheap local test path, the whole prompt can be two words: diff --git a/plugins/pvstack/docs/upstream/guide/06-verify-and-ship.md b/plugins/pvstack/docs/upstream/guide/06-verify-and-ship.md index 2b8ac1b..0aa4e36 100644 --- a/plugins/pvstack/docs/upstream/guide/06-verify-and-ship.md +++ b/plugins/pvstack/docs/upstream/guide/06-verify-and-ship.md @@ -1,6 +1,8 @@ # Verify the result and open a PR -"It compiles" is not evidence. The [Prove It Works principle](../../skills/principle-prove-it-works/SKILL.md) makes the agent check the real artifact before it reports success, and your job is to make "the real artifact" checkable. This page covers stating a finish condition, generating a verification skill for your app, opening the PR, and driving it to merged. +"It compiles" is not evidence. The [Prove It Works principle](../../skills/principle-prove-it-works/SKILL.md) makes the agent check the real artifact before it reports success, and your job is to make "the real artifact" checkable. This page covers stating a finish condition, vetting a measured number, generating a verification skill for your app, opening the PR, and driving it to merged. + +Verification is the slowest step in most agent work, because it's the step that usually waits on a human. Make the agent able to do it, and you stop being the bottleneck. Skip it, and running more agents only gets you more unchecked work to review. ![A prototype plane flies a real test course while she times it with a stopwatch and robots film and checklist the run; the terminal reads verify: pass, evidence: captured.](./images/verification.jpg) @@ -17,13 +19,35 @@ Now the agent has three checks it can run, not a mood to satisfy. When the reply Match the check to the change: - A CLI change runs the real command. -- A UI change walks the changed flow in the running app. +- A UI change walks the changed flow in the running app. When it must match a reference pixel for pixel, the [Visual parity playbook](../../skills/poteto-mode/playbooks/visual-parity.md) diffs screenshots against a frozen baseline instead of judging by eye. - A parser or migration replays a saved input. - A perf change compares before and after profiles. - A storage change reads back the written value. +Ask for the proof as an artifact you can inspect yourself: the failing test and then the passing one, a before-and-after video, the trace, the screenshot. If the fix already merged, ask for the same check again on main. An artifact beats a plausible explanation, because you can challenge it without replaying the whole run. + For a small diff you don't fully trust, [`/blast-radius`](../../skills/blast-radius/SKILL.md) finds what it could break elsewhere. It picks the one fact the change is safe because of and proves it by running code instead of writing an essay about it. +## Vet a measured number with `/benchmark-checklist` + +A before-and-after number is the easiest evidence to get wrong by accident. A warm cache, a debug build on one side, or work that never ran inside the timed region can each produce a convincing speedup. Before you report or act on a number, type: + +```text +/benchmark-checklist vet the export speedup before it goes in the pr +``` + +[`/benchmark-checklist`](../../skills/benchmark-checklist/SKILL.md) asks seven questions and wants evidence from a run for each: + +1. What limits the number, and why isn't it double? +2. Did every side run tuned the way production runs? +3. Does the result break a physical limit, like disk bandwidth or core count? +4. Did anything error or return wrong output? +5. Does it reproduce over alternating runs, with a median and a range? +6. Does it matter end to end, on the path a user waits on? +7. Did the work actually happen inside the timed region? + +The verdict comes back as faster, slower, no measurable difference, or inconclusive, with the run count, range, and limiter. It says inconclusive when it can't name the limiter or a side ran untuned. `/poteto-mode` already runs the checklist inside the Perf issue and Hillclimb playbooks, so you type it yourself when you measured something outside them, or when someone else's number looks too good. It's the working form of the [Explain the Number principle](../../skills/principle-explain-the-number/SKILL.md). + ## Create a project verification skill The UI bullet above hides a real requirement. The agent needs a scripted way to drive your app. If your project has one, great. If not, run: @@ -36,13 +60,32 @@ The UI bullet above hides a real requirement. The agent needs a scripted way to It writes `.factory/skills/verify-/`, agent-facing instructions with exact Launch, Doctor, Drive, Evidence, and Cleanup sections, plus a feature map under `features/` that indexes what the app does and what result proves each feature works. The skill ships a [worked feature-map example](../../skills/create-verification-skill/references/feature-map-example/) with a README index and one file per feature using the four required H2s. Before handing it over, the generator proves the skill once end to end: launch, doctor check, drive one feature, capture evidence, clean up. If that proof fails, don't use the output. -From then on, "verify it in the app" is a step any agent can execute, in this repo, with no setup conversation. +From then on, "verify it in the app" is a step any agent can execute, in this repo, with no setup conversation. Name it in the prompt when you want the proof in a specific form: + +```text +/poteto-mode build the bulk-archive action. use /verify- to verify your changes and show me a video and screenshots as proof. +``` + +```text +/poteto-mode repro this with /verify-. if it repros on main, fix it and show me a video as proof. +``` + +Once the verify skill works, a [`/swarm`](../../skills/swarm/SKILL.md) can split a full pass by feature-map entry and aggregate the results. A swarm of verifiers also confirms a perf win over a big enough sample, or fuzzes the app for regressions before a PR ships. + +Treat the verification skill as infrastructure, not a one-off. Commit it, so every person and every agent on the team drives the app the same way. Then [build the lever](../../skills/principle-build-the-lever/SKILL.md). When agents keep writing throwaway scripts to click through the app, ask for a small control CLI that the skill calls instead. Agents spend fewer tokens, and every run becomes repeatable. A CLI that agents use well has these traits: + +- A few composable commands, each doing real work, rather than many thin ones. +- A `--dry-run` option on anything destructive. +- Subcommands that reveal features gradually instead of all at once. +- Error messages that say what to do instead. +- Rich `--help` text. +- Machine-readable output, such as JSON. -Once the verify skill works, a [`/swarm`](../../skills/swarm/SKILL.md) can split a full pass by feature-map entry and aggregate the results. +While you're there, make the dev setup repeatable too: seeded data, test users, and one command that brings the environment up the same way every time. ## Keep the verification skill honest -Apps change and feature maps rot. When yours drifts, run: +Apps change and feature maps rot. Run this at least once a day, ideally from a scheduled automation so nobody has to remember: ```text /maintain-verification-skill diff --git a/plugins/pvstack/docs/upstream/guide/07-overnight.md b/plugins/pvstack/docs/upstream/guide/07-overnight.md index 9ff66b7..cbad067 100644 --- a/plugins/pvstack/docs/upstream/guide/07-overnight.md +++ b/plugins/pvstack/docs/upstream/guide/07-overnight.md @@ -1,9 +1,20 @@ # Run work while you sleep -This is the payoff for everything before it. An agent you can trust to verify its own work is an agent you can leave alone with a hard task. What makes that safe isn't hope. It's a checkable finish condition, an isolated worktree, and a decision log you audit in the morning. +This is the payoff for everything before it. An agent you can trust to verify its own work is an agent you can leave alone with a hard task. What makes that safe isn't hope. It's a checkable finish condition, an isolated worktree or cloud agent, and a decision log you audit in the morning. ![She waves goodnight from the door while robots keep the factory running, one updating a DECISION LOG wall board under a BUILD LOOP ACTIVE sign.](./images/overnight.jpg) +## Earn the trust before the loop + +A loop you don't trust just produces unchecked work faster, and the mess compounds with every iteration. Before you leave one running, check that it has earned it: + +- You've done the task once by hand, or watched an agent do it, so you know what good looks like. +- The agent has the tools and signals you'd use yourself: the verification skill, the profiler, the logs. +- Every stage proves its work and can stop the line when the work misses the bar. +- You've read a few transcripts and turned the repeated failures into tools, skills, or checks. + +Make the loop autonomous only after all four hold. Until then, run it while you watch. + ## The overnight contract A good handoff has the goal, the finish condition, permissions, and an escape hatch. It doesn't need to be long: @@ -26,6 +37,8 @@ Walk through what each line buys you: Because you'll review this work after stepping away, `/poteto-mode` routes it through [`/figure-it-out`](../../skills/figure-it-out/SKILL.md), which designs the run's phases before any code and wires in the decision log. +To stop a run on purpose, tell the agent to pause, or that you're about to go offline or restart Cursor. The [Pause safely playbook](../../skills/poteto-mode/playbooks/pause-safely.md) finishes or backs out of the current step, commits a work-in-progress checkpoint, and writes a resume note. A fresh chat picks the work up from that note through the Session pickup playbook. Saying "keep going" never triggers a pause. + ## What the loop does all night ```mermaid @@ -76,6 +89,32 @@ The contract above drives one task to one finish condition. Some nights hold mor /poteto-mode orchestrate the store migration. own it until every package is converted and merged. i'll check in twice a day. ``` +## Run many projects in parallel + +A [Cursor Project](https://cursor.com/blog/projects) gives one coordinator agent a persistent thread. The coordinator doesn't write code. It directs subagents, which run in the cloud by default, so the work continues when your laptop is closed. That's the shape the Orchestrate playbook expects. Start your prompts to the coordinator with `/poteto-mode`, and the subagents it spawns follow the playbooks. + +A few habits help: + +- Give each body of work its own Project, such as a feature, a migration, a perf push, or a tech-debt cleanup. Several can run side by side. +- Drag related chats into the Project, finished ones included. They become context for every agent in it. +- Give each PR a verification swarm before it merges, and let Autopilot-stack or Autopilot-full carry the queue. +- Ask the coordinator for a plan backed by data, and have it answer open questions with prototypes before it asks you. + +One prompt can carry a whole Project, from research through execution: + +```text +/poteto-mode refactor this repo so its architecture is more agent friendly. use /correct and /architect on past commits and review comments to find the mistakes agents make most here. use /recall for context from past chats. answer open questions with prototypes instead of asking me. come back with a plan backed by real data. once i approve it, run it with autopilot-stack or autopilot-full, and ask me which. +``` + +## Let loops start themselves + +Every loop above still waits for you to start it. A scheduled or event-driven automation removes that step. Software maintenance splits into stages that suit this well: triage a report, reproduce it, fix it, verify the fix. Two rules keep such a line trustworthy: + +- Every stage can stop the line. Triage can decide the report is expected behavior, repro can fail to reproduce it, and the fixer can judge the change too risky. Each of those outcomes is useful, because it keeps bad work from reaching the next stage, where it costs more to undo. +- Every stage hands over evidence. Repro attaches screenshots and video of the broken state, and the fix attaches before-and-after proof. A human can then check that the agent fixed the right thing before reading a line of code. + +pstack ships this as a dormant [automation pack](../../automations/benny/README.md) for Slack issue reports. One automation triages each report. The other reproduces confirmed bugs and may prepare a small draft fix. Point an agent at its [`FOR_AGENTS.md`](../../automations/benny/FOR_AGENTS.md) and name the target repository to set it up. + **Pitfall:** a duration is not a finish condition. "work on this for 4 hours" gives the agent nothing to check, and you'll wake up to four hours of motion instead of a result. Give `/loop` a predicate that can pass or fail. Next: [Steer with principle names](./08-principles.md). diff --git a/plugins/pvstack/docs/upstream/guide/08-principles.md b/plugins/pvstack/docs/upstream/guide/08-principles.md index 283a5e6..0aaec93 100644 --- a/plugins/pvstack/docs/upstream/guide/08-principles.md +++ b/plugins/pvstack/docs/upstream/guide/08-principles.md @@ -39,7 +39,7 @@ The core principles decide how much to build and when to rethink the design: - [Outcome-Oriented Execution](../../skills/principle-outcome-oriented-execution/SKILL.md) converges rewrites on the target design instead of preserving throwaway compatibility states. - [Experience First](../../skills/principle-experience-first/SKILL.md) chooses the user's result over implementation convenience. - [Exhaust the Design Space](../../skills/principle-exhaust-the-design-space/SKILL.md) builds two or three competing prototypes when there's no precedent. -- [Build the Lever](../../skills/principle-build-the-lever/SKILL.md) builds the script that does or proves the work, so a reviewer can rerun it. +- [Build the Lever](../../skills/principle-build-the-lever/SKILL.md) builds the script that does or proves the work, so a reviewer can rerun it. When an agent keeps doing the same thing by hand, have it write the tool or skill it wishes it had. If a script can do a step the same way every time, use the script, and save agents for the judgment calls. The architecture principles decide where state, validation, and compatibility live: @@ -56,7 +56,7 @@ The verification principles define what counts as proof: - [Fix Root Causes](../../skills/principle-fix-root-causes/SKILL.md) reproduces and traces to the cause before changing code. - [Sequence Work into Verifiable Units](../../skills/principle-sequence-verifiable-units/SKILL.md) ends each small unit in a check before starting the next. - [Test Behavior, Not Implementation](../../skills/principle-test-behavior-not-implementation/SKILL.md) calls the code the way its users do and asserts a literal expected value, and deletes a test that would still pass if every imported function returned `undefined`. -- [Explain the Number](../../skills/principle-explain-the-number/SKILL.md) names what limits a measured number and rules out that it measured something else, before anyone trusts or reports it. +- [Explain the Number](../../skills/principle-explain-the-number/SKILL.md) names what limits a measured number and rules out that it measured something else, before anyone trusts or reports it. [`/benchmark-checklist`](../../skills/benchmark-checklist/SKILL.md) turns it into seven questions you answer from real runs. The delegation principles keep parallel work sane: @@ -65,7 +65,7 @@ The delegation principles keep parallel work sane: And one meta principle: -- [Encode Lessons in Structure](../../skills/principle-encode-lessons-in-structure/SKILL.md) turns advice you've repeated twice into a lint, check, or script. +- [Encode Lessons in Structure](../../skills/principle-encode-lessons-in-structure/SKILL.md) turns advice you've repeated twice into a lint, check, or script. [`/correct`](../../skills/correct/SKILL.md) applies it to a whole repo, as shown in [Make it yours](./09-make-it-yours.md#fix-the-environment-with-correct). Don't memorize the list. Skim it now, then come back when you catch the agent doing something a name here would have prevented. That's how the vocabulary sticks. diff --git a/plugins/pvstack/docs/upstream/guide/09-make-it-yours.md b/plugins/pvstack/docs/upstream/guide/09-make-it-yours.md index f419109..e3a03f5 100644 --- a/plugins/pvstack/docs/upstream/guide/09-make-it-yours.md +++ b/plugins/pvstack/docs/upstream/guide/09-make-it-yours.md @@ -1,6 +1,8 @@ # Make it yours -poteto-mode is one person's style. The machinery underneath, playbooks, routing, model roles, works just as well wearing yours. This page covers generating a personal mode, capturing lessons from a session, authoring a focused skill, and testing a skill change before you trust it. +poteto-mode is one person's style. The machinery underneath, playbooks, routing, model roles, works just as well wearing yours. This page covers generating a personal mode, capturing lessons from a session, fixing the repo so agents stop repeating mistakes, authoring a focused skill, and testing a skill change before you trust it. + +Start smaller than you think. You don't need many skills on day one, or even this whole plugin. Prompt plainly, watch where agents fail, and add a skill or a check when the same failure shows up twice. ## Generate your own mode with `/automate-me` @@ -28,6 +30,25 @@ Right after a task that taught you something, run: [`/reflect`](../../skills/reflect/SKILL.md) sends the transcript to three parallel reviewers, then a synthesizer sorts the proposals into `Accepted`, `Rejected`, and `Backlog` and waits for your approval before any skill changes. Approve a proposal only if it would change a future decision. One weird session is an anecdote, not a rule. +## Fix the environment with `/correct` + +When you correct agents for the same mistake again and again, the fix belongs in the repo, not in your next prompt. Rank the options by how well they hold: + +1. Make the mistake impossible with architecture or a better data structure. +2. Block it with types, or with a lint or CI check whose error names the fix. +3. Catch it with a test. +4. Write it down as a doc or agent rule. Nothing fails when an agent skips a rule, so this comes last. + +Human review isn't on the list. A reviewer who must catch the same mistake on every PR is the problem this fixes. [`/correct`](../../skills/correct/SKILL.md) does the work: + +```text +/correct agents keep calling the database client directly instead of going through the repository layer +``` + +It reads recent commits, reverts, review comments, and comments that explain workarounds, then groups the mistakes into classes. A class counts once it has happened twice. It fixes the most frequent classes one commit each, at the highest level that works, and proves each new check fails on a real past mistake. It also keeps a table in the agent instruction file that pairs each rule with what enforces it, so a rule that nothing enforces shows up as a repeat. The reply lists each class with its evidence, the level chosen, and why a higher level didn't work. + +Run it with no argument and it finds the classes from history on its own. `/reflect` and `/correct` split the work. `/reflect` improves skills from one session. `/correct` changes the repo so a mistake class can't come back. Pair it with `/architect` when the fix is a new boundary. [Run many projects in parallel](./07-overnight.md#run-many-projects-in-parallel) has a prompt that does both across a whole repo. + ## Author a focused skill When you already know the workflow you want to capture: @@ -52,16 +73,28 @@ Skills aren't the only prose you ship. For docs, RFCs, readmes, PR descriptions, ## Test a skill change blind -A skill edit affects every future session, so test it like the experiment it is: +A skill edit affects every future session, so test it like the experiment it is. The same goes for adopting someone else's skill. Check that it makes the agent better on your work before you keep it. ```text /poteto-mode run the eval playbook on this skill change. same task for both variants, candidates stay blind. ``` +When a skill keeps missing and you know what it should do, change and test it in one task: + +```text +/poteto-mode update the review skill so it flags missing migrations, and eval the change. +``` + +Asking for the eval up front keeps the edit honest. A fix written from one bad session tends to overfit that session, and over many edits the skill drifts. The eval catches the drift before it ships. + The [Eval playbook](../../skills/poteto-mode/playbooks/eval.md) is built around one failure mode, the observer effect. An agent that knows it's being evaluated behaves differently. So candidate agents get an organic-looking task in sanitized directories, never the words "eval" or "candidate", and never each other's existence. One judge scores all outputs under neutral labels, and chain-following gets graded from which files each candidate actually read, not from what it claims. Read every output yourself before accepting the verdict. If you disagree with the judge, suspect the rubric before you suspect your judgment. +## Build a bot UI with `/make-bot-ui` + +One situational skill is for Grok Bot users. [`/make-bot-ui`](../../skills/make-bot-ui/SKILL.md) builds a small page whose buttons wake a bot over a webhook routine. For example, you could swipe through a review queue and have each swipe ask the bot to act on that item. A server on your machine holds the webhook's sender key, so the key never reaches the browser or the chat. The skill also covers exposing the page on Tailscale. + **Pitfall:** don't edit a skill mid-task because it's misbehaving. Fix it in its own PR and keep the task moving. A skill edit that ships tangled into feature work is invisible to review and impossible to evaluate. Next: [Recipes and pitfalls](./10-recipes-and-pitfalls.md). diff --git a/plugins/pvstack/docs/upstream/guide/10-recipes-and-pitfalls.md b/plugins/pvstack/docs/upstream/guide/10-recipes-and-pitfalls.md index da0af5e..68751e7 100644 --- a/plugins/pvstack/docs/upstream/guide/10-recipes-and-pitfalls.md +++ b/plugins/pvstack/docs/upstream/guide/10-recipes-and-pitfalls.md @@ -12,6 +12,30 @@ use /how first to understand how this initialization works. then use /why to fig Mechanics first, history second. Each skill's report tells you which sources it searched, so you know what the answer is grounded in. +## Restate a noisy report before touching code + +```text +/poteto-mode read this thread. restate the underlying issue in your own words, in plain english. don't change any code yet. +``` + +A misreading shows up in the restatement, where it costs one message to correct. Keep your own theory to yourself until the agent has stated its own. + +## Prototype before you pick + +```text +/poteto-mode prototype a few options for the settings layout. put them behind a switcher and send me screenshots of each. +``` + +You pick from things that run, not from descriptions. The agent answers its own layout and timing questions along the way. + +## Turn a settled design into a plan + +```text +/poteto-mode turn this design into a plan. small verifiable PRs, each with its own proof. +``` + +Ask only after the design settles. The plan is the deliverable, and it names the playbook that will execute it. + ## Get a second opinion on a design ```text @@ -44,6 +68,38 @@ The qualifiers do real work. "don't change anything yet" keeps it read-only, and "if there's a cheap test path" matters. Forcing a test through brittle mocks proves less than running the real command, and the playbook is allowed to say so. +## Repro and fix a report with proof + +```text +/poteto-mode repro this with /verify-. if it repros on main, fix it and show me a video as proof. +``` + +"if it repros on main" lets the run stop early when the bug is already gone. The video lets you check the fix before you read the diff. + +## Vet a number before you post it + +```text +/benchmark-checklist vet this 40% speedup before it goes in the pr description +``` + +You get faster, slower, no measurable difference, or inconclusive, with the run count, the range, and what limits the number. + +## Stop correcting the same mistake + +```text +/correct agents keep adding new config flags without registering them in the schema +``` + +The fix lands in the repo as architecture, a type, a lint, or a test, so the next agent can't make the mistake. + +## Ask how without starting the work + +```text +/poteto-help how do i get poteto-mode to stay on every turn? +``` + +You get an answer, a prompt to send, and a link to the source. Nothing runs until you send that prompt. + ## Keep a run honest while you're away ```text @@ -82,7 +138,13 @@ That's the whole prompt. [`/bro`](../../skills/bro/SKILL.md) restates the last m - **Enumerating skills in the prompt.** "use /how then /architect then /arena" reorders steps the playbook already sequences. State the goal and constraints. Name a skill only to override a default. - **A vague finish condition.** "make it better" gives `/loop` nothing to check. Give a command or artifact that can pass or fail. -- **Parallel agents in one worktree.** They overwrite each other and the diff becomes archaeology. Say "own worktree per attempt" and the isolation is free. +- **Leading with your theory of the cause.** The agent searches wherever you pointed. Ask it to restate the problem first, then share your hunch. +- **Taking the first design.** One attempt locks in the first shape the model thought of. Ask for prototypes or `/architect` and pick from evidence. +- **Polishing an abstract plan.** Adversarial review of a plan with no code behind it invents risks that will never happen. Settle the open questions with prototypes, then review what got built. +- **Parallel agents in one worktree.** They overwrite each other and the diff becomes archaeology. Run them as cloud agents, or say "own worktree per attempt". +- **Looping before you trust the loop.** A loop that can't verify its own work only makes unchecked work faster. Get the verification skill working first. +- **Trusting an unvetted number.** A warm cache or a skipped code path can fake a speedup. Run `/benchmark-checklist` before the number goes anywhere. +- **Correcting the same mistake by hand.** A correction in chat helps one run. `/correct` fixes the repo so no later run repeats it. - **Using `/arena` for coverage.** `/arena` repeats one design or code brief, then picks a base and grafts the best parts. `/swarm` partitions slices or declared race arms and aggregates one report. - **Accepting every review comment.** Bots and humans both file real catches and noise in one list. `/interrogate` sorts findings into act-on and dismissed buckets with reasons, and you can override either way. - **Treating `auto` as a model slug.** `auto` and `inherit-parent` mean "omit the model field so the subagent inherits the parent chat model." [Setup](./01-setup.md) covers the roles. diff --git a/plugins/pvstack/docs/upstream/guide/README.md b/plugins/pvstack/docs/upstream/guide/README.md index 144af4a..48d0157 100644 --- a/plugins/pvstack/docs/upstream/guide/README.md +++ b/plugins/pvstack/docs/upstream/guide/README.md @@ -6,17 +6,25 @@ Here's what you'll learn: 1. [Set up pstack](./01-setup.md). Install the plugin and pick your models. 2. [Route work through `/poteto-mode`](./02-poteto-mode.md). Give it a goal and watch it pick a playbook. -3. [Understand the code](./03-understand.md). `/how`, `/why`, `/teach`, and `/recall` before you edit anything. -4. [Design the change](./04-design.md). `/architect`, `/arena`, `/swarm`, and `/interrogate` before code locks in a shape. +3. [Understand the code](./03-understand.md). A read-only investigation, then `/how`, `/why`, `/teach`, and `/recall` before you edit anything. +4. [Design the change](./04-design.md). `/architect`, `/arena`, `/swarm`, `/interrogate`, prototypes, and plans before code locks in a shape. 5. [Build and clean the change](./05-build-and-clean.md). The build playbooks, `/tdd`, `/unslop`, and `/no-comments`. -6. [Verify and ship](./06-verify-and-ship.md). Prove behavior on the real app, then open a focused PR and drive it to merged. -7. [Run work while you sleep](./07-overnight.md). An overnight contract, a decision log you can audit, and the playbooks that scale past one agent. +6. [Verify and ship](./06-verify-and-ship.md). Prove behavior on the real app, vet numbers with `/benchmark-checklist`, then open a focused PR and drive it to merged. +7. [Run work while you sleep](./07-overnight.md). Trust before loops, an overnight contract, a decision log you can audit, and Projects and automations that scale past one agent. 8. [Steer with principle names](./08-principles.md). The 24 names that redirect an agent mid-task. -9. [Make it yours](./09-make-it-yours.md). Your own mode, plus how to test a skill change. +9. [Make it yours](./09-make-it-yours.md). Your own mode, `/correct` for repeated mistakes, and how to test a skill change. 10. [Recipes and pitfalls](./10-recipes-and-pitfalls.md). Prompts to copy and mistakes to skip. Read the pages in order the first time. After that, each page stands alone. When you're stuck, or can't tell which skill fits, ask [`/poteto-help`](../../skills/poteto-help/SKILL.md). It finds out what you're trying to do and points you at the right page or skill. +When you're stuck, or can't tell which skill fits, type [`/poteto-help`](../../skills/poteto-help/SKILL.md) with your question: + +```text +/poteto-help which skill should i use to review this branch? +``` + +It answers, hands you a prompt to send, and links the skill or guide page the answer came from. It doesn't start the work, because a pstack run spends real tokens, so you send the prompt when you're ready. It runs only when you type it. + ## If you only remember one thing Give the agent a goal and a way to check it, in your own words: diff --git a/plugins/pvstack/skills/architect/SKILL.md b/plugins/pvstack/skills/architect/SKILL.md index 0e69571..ea03ce0 100644 --- a/plugins/pvstack/skills/architect/SKILL.md +++ b/plugins/pvstack/skills/architect/SKILL.md @@ -33,7 +33,7 @@ Skip Phase A only when the work is genuinely greenfield with no surrounding syst Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt. Each candidate produces a design package shaped per `references/rationale-template.md`. -Take the runners from the `architect runners` line in the `pvstack-models.md` rule, in place of the `arena runners` line. If the rule or that line is missing, use `claude-opus-5-5-max`, `gpt-5.6-sol-max`, `grok-4.7-xhigh-fast`. Alias and rejected entries follow the runner rules in the **arena** skill's Phase A. +Take the runners from the `architect runners` line in the `pvstack-models.md` rule, in place of the `arena runners` line. If the rule or that line is missing, use `claude-opus-5-5-xhigh` and `grok-4.7-xhigh-fast`. Alias and rejected entries follow the runner rules in the **arena** skill's Phase A. Design it twice. Require at least two structurally distinct candidates before synthesis, even when the first looks sufficient. This is the **exhaust-the-design-space** principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape. diff --git a/plugins/pvstack/skills/architect/references/runner-prompt.md b/plugins/pvstack/skills/architect/references/runner-prompt.md index 580ec47..b1ad21a 100644 --- a/plugins/pvstack/skills/architect/references/runner-prompt.md +++ b/plugins/pvstack/skills/architect/references/runner-prompt.md @@ -17,4 +17,4 @@ Apply the following discipline. The orchestrator compares candidates on these ax - Idempotent state transitions where applicable, per the **make-operations-idempotent** principle skill. Ask what happens if the operation runs twice or crashes halfway. - Short call chains. If tracing the flow needs more than three files, flatten the hierarchy, per the **laziness-protocol** and **minimize-reader-load** principle skills. -You are one of several runners, each on a different model. Produce the best design your model can make. Don't hedge against the others. Differences between candidates are the signal used to pick a base and graft. Converging on a safe-looking middle defeats the exploration. +You are one of the parallel runners, each on a different model. Produce the best design your model can make. Don't hedge against the others. Differences between candidates are the signal used to pick a base and graft. Converging on a safe-looking middle defeats the exploration. diff --git a/plugins/pvstack/skills/arena/SKILL.md b/plugins/pvstack/skills/arena/SKILL.md index d244da3..c4a0f59 100644 --- a/plugins/pvstack/skills/arena/SKILL.md +++ b/plugins/pvstack/skills/arena/SKILL.md @@ -28,7 +28,7 @@ The N candidates will receive the same prompt, so the prompt is the contract. 1. State the artifact each candidate is producing. 2. Derive the rubric. State what success looks like for *this* task, then turn it into 3-6 concrete gradeable criteria. The rubric is the picker's tool in Phase D. Candidates only see the task. -3. Pick the runners. Use the `arena runners` line in `~/.factory/pvstack-models.md`. If the rule or that line is missing, default to one each on `claude-opus-5-5-max`, `gpt-5.6-sol-max`, `grok-4.7-xhigh-fast`. An `auto` or `inherit-parent` entry in this line or the cross-judge line means the parent model, so omit `model` for it. If the Task tool rejects a configured entry, run that seat on its family's default and say so. Families go by prefix: `claude-*`, `gpt-*`, and `grok-*`. With no family match, use `claude-opus-5-5-max`. If it rejects a default, use the closest valid slug of the same family from its error message. Spawn more when the arena covers multiple design directions. Same model N times when the work is generation-bound rather than judgment-sensitive. +3. Pick the runners. Use the `arena runners` line in `~/.factory/pvstack-models.md`. If the rule or that line is missing, default to one each on `claude-opus-5-5-xhigh` and `grok-4.7-xhigh-fast`. An `auto` or `inherit-parent` entry in this line or the cross-judge line means the parent model, so omit `model` for it. If the Task tool rejects a configured entry, run that seat on its family's default and say so. Families go by prefix: `claude-*` and `grok-*`. With no family match, use `claude-opus-5-5-xhigh`. If it rejects a default, use the closest valid slug of the same family from its error message. Spawn more when the arena covers multiple design directions. Same model N times when the work is generation-bound rather than judgment-sensitive. 4. Assign output paths. Each candidate writes to its own location (a git worktree where possible, otherwise `/tmp/arena-/candidate-/`), per the **separate-before-serializing-shared-state** principle skill. ## Phase B: Fan out @@ -41,7 +41,7 @@ If a candidate fails to produce output, proceed with N-1 and note the dropout in ## Phase C: Cross-judge -After all Phase B candidates complete, choose one model from the `arena cross-judge pool` line in `~/.factory/pvstack-models.md`. If the rule or that line is missing, choose from `claude-opus-5-5-max`, `gpt-5.6-sol-max`, `grok-4.7-xhigh-fast`. Prefer a different model family from the parent's. Spawn one readonly judge subagent on that model. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with the parent's reading in Phase D, not with the candidates themselves. Don't spawn the judge while candidates are still writing. +After all Phase B candidates complete, choose one model from the `arena cross-judge pool` line in `~/.factory/pvstack-models.md`. If the rule or that line is missing, choose from `claude-opus-5-5-xhigh` and `grok-4.7-xhigh-fast`. Prefer a different model family from the parent's. Spawn one readonly judge subagent on that model. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with the parent's reading in Phase D, not with the candidates themselves. Don't spawn the judge while candidates are still writing. ## Phase D: Pick a base diff --git a/plugins/pvstack/skills/blast-radius/SKILL.md b/plugins/pvstack/skills/blast-radius/SKILL.md index 1713b28..b296cce 100644 --- a/plugins/pvstack/skills/blast-radius/SKILL.md +++ b/plugins/pvstack/skills/blast-radius/SKILL.md @@ -35,7 +35,7 @@ Step 4 is usually one small script that imports the same library the app ships a 3. Look where grep stops. Read the source of the library you call, and check its pinned version and any local patch. Work out when things run: microtasks, unmount and teardown, Solid versus React. Follow what a symbol search misses: the JSON an API returns, a DB column, a wire format, another language reading the same bytes, a feature flag, code three hops downstream. 4. Be honest about each risk. Give it a real chance of happening and a real cost if it does. Keep the risks you confirmed. List the ones you checked and cleared separately. Same rules as `why`. Cite a real `file:line`, a search that finds nothing is still an answer, and never make up a caller or an API. 5. Prove the one fact. Write a script or test that runs the real code, run it, and paste what happened. -6. For a big or wide change, run it as an `arena`. Ask several models the same question and merge the answers. Different models catch different real bugs. +6. For a big or wide change, run it as an `arena`. Ask more than one model the same question and merge the answers. Different models catch different real bugs. ## What to hand back diff --git a/plugins/pvstack/skills/how/SKILL.md b/plugins/pvstack/skills/how/SKILL.md index d1f5335..006bf0e 100644 --- a/plugins/pvstack/skills/how/SKILL.md +++ b/plugins/pvstack/skills/how/SKILL.md @@ -37,7 +37,7 @@ Each explorer gets the prompt in `references/explorer-prompt.md` with its angle Spawn one Task subagent that explores and explains in one pass: - `subagent_type`: `generalPurpose` -- `model`: the `how explainer` line, default `claude-opus-5-5-max` +- `model`: the `how explainer` line, default `claude-opus-5-5-xhigh` - `readonly`: `true` Build its prompt from `references/explainer-prompt.md` without the explorer-findings section. Go to Step 4. @@ -47,7 +47,7 @@ Build its prompt from `references/explainer-prompt.md` without the explorer-find Once all explorers have returned, spawn one Task subagent to synthesize their findings into one explanation: - `subagent_type`: `generalPurpose` -- `model`: the `how explainer` line, default `claude-opus-5-5-max` +- `model`: the `how explainer` line, default `claude-opus-5-5-xhigh` - `readonly`: `true` Build its prompt from `references/explainer-prompt.md` with every explorer's findings filled in. diff --git a/plugins/pvstack/skills/interrogate/SKILL.md b/plugins/pvstack/skills/interrogate/SKILL.md index 1ec8169..995c1ac 100644 --- a/plugins/pvstack/skills/interrogate/SKILL.md +++ b/plugins/pvstack/skills/interrogate/SKILL.md @@ -36,20 +36,19 @@ Write one clear paragraph. If you're unsure about the intent, ask the user befor ## Step 3, Spawn Reviewers -Launch all reviewers in a single message using the Task tool. Use the `interrogate reviewers` line in `~/.factory/pvstack-models.md`, one reviewer per entry, extending or shrinking the Reviewer A/B/C labels below to the configured entry count. If the rule or that line is missing, use the table defaults. +Launch all reviewers in a single message using the Task tool. Use the `interrogate reviewers` line in `~/.factory/pvstack-models.md`, one reviewer per entry, extending or shrinking the Reviewer A/B labels below to the configured entry count. If the rule or that line is missing, use the table defaults. | Subagent | Default model | |----------|---------------| -| Reviewer A | `claude-opus-5-5-max` | -| Reviewer B | `gpt-5.6-sol-max` | -| Reviewer C | `grok-4.7-xhigh-fast` | +| Reviewer A | `claude-opus-5-5-xhigh` | +| Reviewer B | `grok-4.7-xhigh-fast` | For each reviewer: - `subagent_type`: `generalPurpose` - `model`: the configured `interrogate reviewers` entry, or the table default with no configured line. For an `auto` or `inherit-parent` entry, omit `model` so that reviewer runs on the parent model. - `readonly`: `true` -If the Task tool rejects a configured entry, run that reviewer on the table default of its family and say so. Families go by prefix: `claude-*`, `gpt-*`, and `grok-*`. With no family match, use Reviewer A's default. If it rejects a table default, check the valid slugs in the Task tool's error message, pick the closest equivalent (prefer the highest-reasoning tier of the same family), spawn with it, and open a separate PR to update the default table. Do not block the review on the slug issue. Never treat an alias entry as a rejected slug or apply either fallback to it. +If the Task tool rejects a configured entry, run that reviewer on the table default of its family and say so. Families go by prefix: `claude-*` and `grok-*`. With no family match, use Reviewer A's default. If it rejects a table default, check the valid slugs in the Task tool's error message, pick the closest equivalent (prefer the same family and reasoning tier), spawn with it, and open a separate PR to update the default table. Do not block the review on the slug issue. Never treat an alias entry as a rejected slug or apply either fallback to it. Read `references/reviewer-prompt.md` and fill in the template with: 1. The stated intent diff --git a/plugins/pvstack/skills/poteto-help/SKILL.md b/plugins/pvstack/skills/poteto-help/SKILL.md index 38eec0a..1db951b 100644 --- a/plugins/pvstack/skills/poteto-help/SKILL.md +++ b/plugins/pvstack/skills/poteto-help/SKILL.md @@ -1,6 +1,7 @@ --- name: poteto-help -description: Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Use for /poteto-help, or when the user asks how to install, set up, or use pstack, or which pstack skill fits. Not for requests to do work, even ones that name pstack. +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 --- @@ -29,13 +30,18 @@ Check the state that changes the answer, and mention it only when it does: - No `~/.factory/pvstack-models.md` means `/setup-pvstack` 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. +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-pvstack` 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-pvstack`. + ## Get set up 1. Install with `/add-plugin pstack` in chat, or from Customize in the sidebar. 2. Run [`/setup-pvstack`](../setup-pvstack/SKILL.md). It asks for a reasoning budget, maps a model to each role, and writes a rule. The rule applies to new chats. 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-pvstack` and `/poteto-help` load 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. +Installing changes nothing until the user invokes a skill. Only `/setup-pvstack` 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-pvstack` 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. @@ -43,7 +49,7 @@ pstack is built for Cursor. Its skills use the Agent Skills format, so other too ## 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: `. 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. [Guide page 2](../../docs/guide/02-poteto-mode.md) has examples. +`/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: `. 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. Whether `/poteto-mode` stays on depends on how the user starts it: @@ -68,7 +74,7 @@ The default answer is `/poteto-mode`, which runs most of the others when its ste | 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, as cloud agents | [`/swarm`](../swarm/SKILL.md) | -| Have several models review a diff and try to break it | [`/interrogate`](../interrogate/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) | @@ -129,12 +135,12 @@ Principles are one-rule skills that `/poteto-mode` reads and cites in its replie | 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-pvstack` 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-pvstack` and `/poteto-help` load 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. | +| A skill didn't load on its own | Only `/setup-pvstack` 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 its own worktree, or run them as cloud agents, which each get their own machine. | | 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. | -[Guide page 10](../../docs/guide/10-recipes-and-pitfalls.md) has more pitfalls and the recipes worth copying. +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 @@ -147,4 +153,4 @@ Principles are one-rule skills that `/poteto-mode` reads and cites in its replie ## Reply -Lead with the answer. Give at most one example prompt in a code block, then the link to that file. Keep it short unless the user asked for the whole map. +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. diff --git a/plugins/pvstack/skills/poteto-help/references/prompting.md b/plugins/pvstack/skills/poteto-help/references/prompting.md new file mode 100644 index 0000000..6b72b2e --- /dev/null +++ b/plugins/pvstack/skills/poteto-help/references/prompting.md @@ -0,0 +1,51 @@ +# Word the prompt + +A prompt states the intent and the check for done. The playbook supplies the steps, so a few plain sentences beat a spec. + +## Put in + +- The goal. Say what is wrong or what the user wants. +- The done check. It can pass or fail. "Make it better" and a duration are not checks. +- The proof to show. Ask for the real command output, a video of the flow, the stored value, or a before and after number. +- What the user already knows. A symptom, a repro step, a log, or a link saves the agent a search. +- The real constraints. "repro first", "don't change any code yet", "zero behavior change", and "let me review before proceeding" each change what the agent does. + +## Leave out + +- The how. Say what to achieve, and leave the agent room to find a better way. +- A list of skills or steps. A hand-written order drops or reorders steps the playbook keeps. Name a skill only to override one choice. +- The user's theory of the cause, until the agent restates the problem. A stated guess narrows the search. + +## Load the context first + +- For a noisy report, ask the agent to restate the underlying issue in its own words and in plain English before it does anything else. A misreading shows up before any code exists. +- In a fresh chat, `/recall` earlier work on the topic. Old chats hold context that the new agent lacks. +- Before a change to unfamiliar code, ask `/how` for the mechanics and `/why` for the reasons. An agent with no traced model fixes the symptom at the first plausible spot. +- Ask `/teach` to make the case for a choice, as in "convince me it fixes the cause and not the symptom". A case is easier to check than a summary. + +## Design before the plan + +- Never take the first design. Ask for prototypes of a few options, with screenshots or videos for UI, and pick from the evidence. +- Let prototypes answer the open questions. Don't review an abstract plan adversarially, because reviewers invent risks that never happen. +- For a shared package or API, ask for the README or a tutorial first, then work back to the code. The doc becomes the target the agent checks itself against. +- Ask for the plan only after the design is settled. Each step of the plan ends in a check. + +## Follow up short + +- "do it", "continue", and "keep going until done" are whole prompts once the chat holds the task. +- Start with "new task" when the subject changes. Otherwise the mode treats the message as the next step. + +## Before stepping away + +- Say "im going to bed" or "im stepping away" so the agent stops asking. +- Write done as checks every iteration can run, and give `/loop` that predicate. +- Ask for a fresh worktree off a named base. +- Pre-answer what the agent would stop for, such as "don't ask me before committing". +- Ask for a decision log to audit later. +- Give an exit: "if you're truly stuck after a few hours, stop and write up why". + +## Steer in one line + +- Restate the goal: "i said the goal is to repro. i did not ask for a fix yet." +- Name the principle: "apply prove it works. show me the real output, not the build log." +- A principle name works because the agent already read the rule. Its reply names the decision the rule changed. diff --git a/plugins/pvstack/skills/poteto-help/references/recipes.md b/plugins/pvstack/skills/poteto-help/references/recipes.md new file mode 100644 index 0000000..73118e2 --- /dev/null +++ b/plugins/pvstack/skills/poteto-help/references/recipes.md @@ -0,0 +1,47 @@ +# Prompts worth copying + +Swap in the real paths, skills, and done checks. Informal wording works. + +## Understand + +- `/poteto-mode read . restate the underlying issue in your own words, in plain english.` +- `/poteto-mode investigate why . give me what we know, what data you used, and your best hypotheses. don't change any code yet.` +- `use /how to understand . then use /why to find out why it broke recently.` +- `/recall my work on from last week, then read .` +- `/teach me why you implemented it this way and not . what did you trade off?` +- `/poteto-mode take over this branch. read the decision log, find what's done, and continue. don't redo finished work.` + +## Build + +- Bug: `/poteto-mode . repro first, then fix and verify.` +- Bug in an app: `/poteto-mode repro this with /verify-. if it repros on main, fix it and show me a video as proof.` +- Bug with a cheap test: `/poteto-mode repro first. if there's a cheap test path, /tdd it. then fix and rerun.` +- Feature: `/poteto-mode add . stays byte-identical. verify both.` +- Refactor: `/poteto-mode move into one module, zero behavior change. record the current output first and prove it's unchanged after.` +- Perf: `/poteto-mode takes