diff --git a/CHANGELOG.md b/CHANGELOG.md index 89a0264..80c1fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ summary: Timeline of guardrail helper changes mirrored from Sweetistics and rela # Changelog +## 2026-10-11: PStack workflow and guide refresh +- Ported PStack 0.15.17 through `978ca6e9c0`, preserving all existing models, efforts, panel sizes, aliases, fallback policy, and executable helpers. +- Added explicitly invoked `poteto-help` and `ketchup`, prompting references, and the ten-page PStack guide with upstream images. +- Applied upstream prompt distillation and Architect grounding correction; changed only the Codex invocation, agent, transcript, installation, goal, and scheduler interfaces. +- Removed remaining PStack per-skill license copies and source banners, preserving the root license and existing skill instructions. + ## 2026-10-04: PStack workflow refresh - Ported upstream PStack 0.15.9 workflows through `e43c7ee26e`, preserving every local model, effort, panel, and model-routing override. - Added `correct`, `benchmark-checklist`, and `principle-explain-the-number`; strengthened Architect ownership/API checks and schema-first TypeScript validation examples. diff --git a/README.md b/README.md index 2e982c4..a1d0c7f 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ skills/wacrawl -> ../../oss/wacrawl/.agents/skills/wacrawl Optional crawler/messaging symlinks may be absent on Bram's machine; agents must check before use. +The [PStack guide](docs/pstack/README.md) covers setup, prompting, design, verification, and overnight work. Use `$poteto-help` for a question or `$ketchup` to catch up on the current chat. + ## Agent Instructions Shared hard rules live in `AGENTS.MD`. diff --git a/docs/pstack/01-setup.md b/docs/pstack/01-setup.md new file mode 100644 index 0000000..9c98c8c --- /dev/null +++ b/docs/pstack/01-setup.md @@ -0,0 +1,63 @@ +# Set up pstack + +In this page you install the skills, pick which models pstack uses, and run your first task. Setup is one command plus a short conversation. + +## Install the skills + +From the agent-scripts checkout, run: + +```bash +scripts/sync-skills --dry-run +scripts/sync-skills +``` + +The helper mirrors the skills into Codex's skill discovery directory. + +## Pick your models + +Run: + +```text +$setup-pstack +``` + +[`$setup-pstack`](../../skills/setup-pstack/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 `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md`, a small role file the routed pstack skills read. + +The defaults and reasoning budget are recorded in `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md`. `unlimited` keeps the role defaults. `large`, `medium`, and `small` select `xhigh`, `high`, and `medium` reasoning, within the configured model's supported efforts. + +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-pstack` 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-pstack` 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. + +## Accept the verification offer, or don't + +At the end of setup, `$setup-pstack` 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 `.agents/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 routed skills read the role file when they run. + +## 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-pstack` 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: + +```text +$poteto-mode add a --json flag to this command. text output stays byte-identical. verify both. +``` + +Watch the todo list. Its first items are the matched playbook's steps copied in, the Feature playbook for this prompt. If `$poteto-mode` skips a step, the step stays in the list with `skip: `, so you can see what it chose not to do. + +From here you can type normal follow-ups. Start each new task with `$poteto-mode` so Codex loads the skill and picks its playbook. + +Next: [Route work through `$poteto-mode`](./02-poteto-mode.md). diff --git a/docs/pstack/02-poteto-mode.md b/docs/pstack/02-poteto-mode.md new file mode 100644 index 0000000..51f7d05 --- /dev/null +++ b/docs/pstack/02-poteto-mode.md @@ -0,0 +1,131 @@ +# Route work through `$poteto-mode` + +`$poteto-mode` is the front door. You give it a goal, it matches one of twenty-three playbooks, copies that playbook's steps into the todo list, and calls the other skills as the steps need them. In this page you learn what a good prompt looks like, and how little of one you actually need. + +![A dispatcher pulls a switch lever to route robots on rail handcars toward lit gates, under a $poteto-mode departure board listing BUG FIX, FEATURE, and INVESTIGATION.](./images/router.jpg) + +## What happens to your prompt + +```mermaid +flowchart TD + A[Your prompt] --> B[poteto-mode] + B --> C[Read the Principles section] + C --> D{Match the task} + D -->|Read-only question| E[Investigation] + D -->|Defect| F[Bug fix] + D -->|New behavior| G[Feature] + D -->|Structure only| H[Refactoring] + D -->|Measured slowness| I[Perf issue] + D -->|Large work or no match| J[figure-it-out] + E --> K[Verify and report] + F --> K + G --> K + H --> K + I --> K + J --> K +``` + +The diagram shows the common routes. There are also playbooks for hillclimbing a metric, diagnosing runtime symptoms and captured traces, prototypes, visual parity, authoring and evaluating skills, autonomous runs, babysitting a PR or stack to merge-ready, shipping a verified stack, running a PR queue on autopilot, orchestrating project-scale programs, session pickup, pausing safely, multi-phase plans, and worktree cleanup. The [playbook directory](../../skills/poteto-mode/playbooks/) has the full set. + +## Say the goal, not the ceremony + +You don't write a spec. You say what's wrong or what you want, plus anything you already know that saves the agent time: + +```text +$poteto-mode users get two notifications after a retry. repro first, then fix and verify. +``` + +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 +$poteto-mode do it +``` + +```text +continue +``` + +```text +keep going until done +``` + +Short works because the playbook holds the structure. Start each new task with `$poteto-mode`. [Set up pstack](./01-setup.md#run-your-first-task) shows how to start a task. Your words carry the intent, and the skill carries the rigor. + +## Switch tasks with "new task" + +A long chat accumulates context from the last task. When you change subjects, say so: + +```text +$poteto-mode new task. figure out why the cache entry survives logout. don't change any code yet. +``` + +"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 + +If you run several agents against one repository on one computer, they will fight over the working tree, the ports, and the build output. Give each independent attempt its own branch and worktree. Codex collaboration agents share the parent checkout unless their briefs point to separate worktrees. + +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. 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: + +```text +$poteto-mode what's eating my disk? prune the worktrees that are safe to prune. +``` + +The [Worktree cleanup playbook](../../skills/poteto-mode/playbooks/worktree-cleanup.md) classifies every worktree by merge state, uncommitted work, and which chats still touch it. It deletes only what that evidence clears and pauses for your call on anything holding uncommitted work. + +## Leave it running + +When you step away, say what done means and go: + +```text +$poteto-mode im stepping away. keep going until the migration check reports zero old callers. log your decisions. +``` + +Work you'll review later routes through [`$figure-it-out`](../../skills/figure-it-out/SKILL.md), which designs the run's phases and keeps a [`$show-me-your-work`](../../skills/show-me-your-work/SKILL.md) decision log. [Run work while you sleep](./07-overnight.md) covers the full overnight contract. + +**Pitfall:** don't enumerate skills in your prompt ("use $how, then $architect, then $arena..."). The playbook already sequences them, and a hand-written sequence usually reorders or drops steps the playbook would have kept. Name a skill only when you want to override a specific choice. + +Read [`poteto-mode`](../../skills/poteto-mode/SKILL.md) itself for the full routing rules. + +Next: [Understand the code](./03-understand.md). diff --git a/docs/pstack/03-understand.md b/docs/pstack/03-understand.md new file mode 100644 index 0000000..2528f24 --- /dev/null +++ b/docs/pstack/03-understand.md @@ -0,0 +1,79 @@ +# Understand the code before changing it + +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 +$how do we dedupe notifications? is there an n+1 when we look up subscribers? +``` + +Ask the question you actually have. [`$how`](../../skills/how/SKILL.md) reads the code and answers at the level of a senior engineer onboarding you onto the subsystem, with the runtime flow, the key types, and the non-obvious parts. For a big subsystem it fans out two to four read-only explorers first. For a narrow question it just reads and explains. + +## Dig up history with `$why` + +```text +$why was the retry limit set to five? does the reason still hold? +``` + +[`$why`](../../skills/why/SKILL.md) works like a detective on a cold case. It starts from source control, then queries whatever evidence categories your MCPs expose, such as the issue tracker, long-form docs, team chat, observability, error tracking, and analytics, all in parallel. The report cites everything, separates direct evidence from inference, and says "appears to" when the record is thin. A null result gets reported too, because "nobody wrote down why" is itself an answer. + +The two compose naturally. `do why first then how` is a perfectly good prompt when you suspect the history explains the mess. + +## Actually understand it with `$teach` + +```text +$teach me how this PR changes retries. convince me it fixes the cause and not the symptom. +``` + +[`$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. 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 + +When another agent (or you, last week) left a branch mid-flight: + +```text +$poteto-mode take over this branch. read the decision log, figure out what's done, and continue from there. don't redo finished work. +``` + +The [Session pickup playbook](../../skills/poteto-mode/playbooks/session-pickup.md) treats the prior trail as authoritative. It reconstructs the branch state and decisions, names the resume point, and verifies inherited claims against the original goal instead of re-deriving everything from scratch. + +**Pitfall:** don't skip this page's skills because "the agent will read the code anyway." An agent that starts editing without a traced model tends to fix the symptom at the first plausible spot. `$how` first is cheaper than the second bug. + +Next: [Design the change](./04-design.md). diff --git a/docs/pstack/04-design.md b/docs/pstack/04-design.md new file mode 100644 index 0000000..ca762e1 --- /dev/null +++ b/docs/pstack/04-design.md @@ -0,0 +1,133 @@ +# Design before you write code + +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` + +```text +$architect design the import pipeline before writing any code. i care most about how callers use it. +``` + +[`$architect`](../../skills/architect/SKILL.md) grounds itself first, running `$how` over the code the design touches and `$why` when it moves ownership or layers. Then it runs `$arena` to produce competing design sketches, with the caller's usage written first in each, followed by types, signatures, and a module map. + +By default it proceeds straight from the synthesized design into implementation. If you want to see the design first, say so: + +```text +$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 +$arena take my prompt to the arena verbatim. i want to compare their proposals with yours. +``` + +[`$arena`](../../skills/arena/SKILL.md) is the general tool underneath. N subagents attempt the same design or code brief in parallel, each writing to its own worktree or directory. A read-only judge, on a different model family when your configuration allows one, scores every candidate against a rubric. The coordinator reads each candidate end to end, picks a base, grafts in the best ideas from the losers, and verifies the result. + +```mermaid +flowchart LR + A[One task] --> B[Configured panel] + B --> C[Candidate 1] + B --> D[Candidate 2] + B --> E[Candidate N] + C --> F[Cross-judge] + D --> F + E --> F + F --> G[Pick a base] + G --> H[Graft the best parts] + H --> I[Verify] +``` + +The panel comes from your [`$setup-pstack`](../../skills/setup-pstack/SKILL.md) configuration, and you can adjust it per task. Ask for more candidates when the decision matters, fewer when it doesn't: + +```text +$arena this, 5 candidates. the cache key format is expensive to change later. +``` + +## Cover slices and races with `$swarm` + +```text +$swarm check every package under packages/ against its check.sh. one worker per package. one report. +``` + +[`$swarm`](../../skills/swarm/SKILL.md) fans N workers across independent slices, coverage matrices, gauntlet lanes, exploration partitions, or declared race arms. Each worker gets its own scope and check, then reports `PASS`, `ISSUES`, or `BLOCKED`. The parent waits for the workers and returns one compact report with any gaps or dropouts. + +Reach for it when parallelism buys coverage or lets independent checks race. `$arena` gives every worker the same design or code brief, then picks a base and grafts the best parts. `$swarm` covers slices or runs a race with a selection rule declared up front. It does not use the base-selection and grafting ceremony. + +## Break it with `$interrogate` + +```text +$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 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: + +- A small, finished change you're unsure about needs `$interrogate` alone. +- 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. + +Next: [Build and clean the change](./05-build-and-clean.md). diff --git a/docs/pstack/05-build-and-clean.md b/docs/pstack/05-build-and-clean.md new file mode 100644 index 0000000..1711b3f --- /dev/null +++ b/docs/pstack/05-build-and-clean.md @@ -0,0 +1,83 @@ +# Build the change and clean the diff + +The build playbooks share one discipline. Say what you observed, let the playbook demand the evidence. This page shows what to put in the prompt for each common build task, then the cleanup habit that keeps diffs reviewable. + +## Prompt each build playbook with what you know + +A bug prompt states the symptom and asks for a reproduction first: + +```text +$poteto-mode this command emits two records after a retry. repro first, then fix and verify. +``` + +A feature prompt states the behavior and what must not change: + +```text +$poteto-mode add a --json flag. text output stays byte-identical. verify both forms. +``` + +A refactoring prompt pins behavior before structure moves: + +```text +$poteto-mode move parsing into one module, zero behavior change. record the current output first and prove it's unchanged after. +``` + +A perf prompt states the measurement, not a vibe: + +```text +$poteto-mode startup takes 1.8s on this fixture. trace it, fix the measured cause, show me before and after. +``` + +Each of these routes to its playbook ([Bug fix](../../skills/poteto-mode/playbooks/bug-fix.md), [Feature](../../skills/poteto-mode/playbooks/feature.md), [Refactoring](../../skills/poteto-mode/playbooks/refactoring.md), [Perf issue](../../skills/poteto-mode/playbooks/perf-issue.md)), and the playbook supplies the steps you didn't type: reproduce before fixing, name the data shape before implementing, pin behavior before restructuring, profile before optimizing. + +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: + +```text +$tdd implement +``` + +In context, that's enough. [`$tdd`](../../skills/tdd/SKILL.md) writes the smallest test that fails for the intended reason, then the fix, then reruns the test. If a test would need broad harness setup or brittle mocks, the skill says so and uses the closest executable check instead. Don't force a test where a real command is stronger evidence. + +## Load the TypeScript rules by name + +[`typescript-best-practices`](../../skills/typescript-best-practices/SKILL.md) turns the type-system principles into concrete rules: discriminated unions, `unknown` at boundaries, exhaustive variants, schema-derived types. It doesn't load on its own, so type `$typescript-best-practices` when a task touches `.ts` or `.tsx` files. + +## Clean before you commit + +The [Opening a PR playbook](../../skills/poteto-mode/playbooks/opening-a-pr.md) runs `$deslop` on the diff before each commit and applies [`$unslop`](../../skills/unslop/SKILL.md) to the PR description and commit bodies. `$deslop` is the installed local Codex skill. + +For prose, `$unslop` takes a target and any extra rules you have: + +```text +$unslop the readme changes, no emdashes +``` + +You'll develop your own shorthand. The skill reads intent fine from terse prompts like `unslop that, tighten it`. + +## Strip the comments with `$no-comments` + +Comments need their own pass, and not from the agent that wrote them. An author defends its comments the way you'd defend yours. So before review, hand them to fresh eyes: + +```text +$no-comments the diff +``` + +[`$no-comments`](../../skills/no-comments/SKILL.md) spawns [Comment Sicko](../../skills/no-comments/references/comment-sicko.md), a read-only reviewer with a short keep list: license headers, doc comments on a public API, links that explain what code can't, behavior forced by an external dependency you can't reshape. Everything else goes. A surprise in your own code gets no such pass. The comment comes back as a refactor flag, and `$no-comments` fixes the flags it accepts at the root cause. When a comment claims a constraint, "do not remove", the skill offers to encode the claim as a type, test, or lint. Either way, the comment comes out. + +The division of labor is worth keeping straight. `$deslop` cleans slop out of the code, `$unslop` cleans it out of prose, and `$no-comments` hands the comments to a reviewer who didn't write them. + +**Pitfall:** cleanup is not optional polish. A diff with narrating comments and defensive dead weight reads as unfinished to reviewers, and the extra code is where the next bug hides. If the diff feels padded, say `deslop it` before you commit, not after review calls it out. + +Next: [Verify and ship](./06-verify-and-ship.md). diff --git a/docs/pstack/06-verify-and-ship.md b/docs/pstack/06-verify-and-ship.md new file mode 100644 index 0000000..8e018d8 --- /dev/null +++ b/docs/pstack/06-verify-and-ship.md @@ -0,0 +1,130 @@ +# 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, 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) + +## State the finish condition up front + +Put what done means in the first prompt, in whatever words fit: + +```text +$poteto-mode add json output to this command. text output stays byte-identical, the json parses, both run against the sample project. show me the evidence. +``` + +Now the agent has three checks it can run, not a mood to satisfy. When the reply comes back, it should carry the exact commands and outputs. If a check couldn't run, a good reply says "inconclusive", and you should treat a confident reply without evidence as a red flag. + +Match the check to the change: + +- A CLI change runs the real command. +- 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: + +```text +$create-verification-skill +``` + +[`$create-verification-skill`](../../skills/create-verification-skill/SKILL.md) interviews the repository, not you. It works out what a user touches, how the app launches locally, what can drive it (an existing harness first, otherwise browser and CDP, a PTY, or plain HTTP), what evidence proves behavior, and whether two instances can run side by side. It asks you only what the code can't answer. + +It writes `.agents/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. 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. + +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. Run this at least once a day, ideally from a scheduled automation so nobody has to remember: + +```text +$maintain-verification-skill +``` + +[`$maintain-verification-skill`](../../skills/maintain-verification-skill/SKILL.md) audits the generated skill: one read-only source reader per feature in parallel, then one live pass that drives every mapped feature. It ends in exactly one of three outcomes. `clean` means full coverage and nothing to ship. `changed` means one PR of proven corrections, confined to the verification skill's own directory. `blocked` names the blocker. It never edits product code. If the live pass catches a product regression, it reports the regression instead of papering over it in docs. + +## Open the PR + +```text +$poteto-mode open the pr. small ordered commits, evidence in the description. +``` + +The [Opening a PR playbook](../../skills/poteto-mode/playbooks/opening-a-pr.md) works from a worktree, rebases the work into small ordered commits, cleans the diff, unslops the prose, and returns the PR link. Five narrow PRs beat one fat one, and stacked follow-ups beat a growing branch. + +## Drive the PR to merge-ready with Babysit + +An open PR starts collecting blockers immediately. Checks fail, reviewers comment, trunk moves. Hand that churn to the [Babysit playbook](../../skills/poteto-mode/playbooks/babysit.md): + +```text +$poteto-mode babysit this pr. get it green. +``` + +Babysit watches the PR with a bundled watcher and takes blockers in order: conflicts, then review threads, then CI. Every known fix batches into one push, so the checks restart once instead of after every fix. The comment triage is skeptical, because humans and bots file real catches and noise in the same list. A real finding gets a fix, and noise gets dismissed with the disproof posted on the thread. When all you want is status, ask smaller and Babysit answers without starting the loop: + +```text +$poteto-mode check on pr 123. anything outstanding? +``` + +Babysit stops at merge-ready. It never merges, even with everything green, because merging is a different decision. + +## Land the stack with Shipping + +Green is not the same as safe. When you're ready to land, say so: + +```text +$poteto-mode land the stack. +``` + +The [Shipping playbook](../../skills/poteto-mode/playbooks/shipping.md) verifies each PR independently before it arms anything. One fresh agent per PR proves the behavior live, and the agent that judges a change is never the one that wrote it. Then Shipping lands only the contiguous verified run from the bottom, one PR at a time through GitHub by default or Origin when its CLI is available, and reports the first PR that breaks the chain. A verified PR sitting above an unverified one waits, because merging it would pull the gap in underneath. + +Next: [Run work while you sleep](./07-overnight.md). diff --git a/docs/pstack/07-overnight.md b/docs/pstack/07-overnight.md new file mode 100644 index 0000000..b5046c1 --- /dev/null +++ b/docs/pstack/07-overnight.md @@ -0,0 +1,120 @@ +# 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. + +![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: + +```text +$poteto-mode im going to bed. migrate every caller to the new parser in a fresh worktree off . +done means zero old callers, all parser fixtures pass, old api deleted. +keep a decision log. don't ask me before committing. +/goal until done. if you're truly stuck after a few hours, stop and write up why. +``` + +Walk through what each line buys you: + +- "im going to bed" is a session override. The agent stops asking and keeps going. +- "done means..." turns the goal into checks every iteration can run. +- "fresh worktree off ``" keeps the run from colliding with anything else you have open. +- "don't ask me before committing" pre-answers the permission the agent would otherwise block on. +- `/goal` is Codex's persistent-goal command when the build supports it. The [Autonomous run playbook](../../skills/poteto-mode/playbooks/autonomous-run.md) uses the finish condition to drive work. Scheduled wake-ups use Codex app heartbeat automations when their tools are available. +- The escape hatch lets it stop at a genuine dead end and write up why, which beats eight hours of creative goal reinterpretation. + +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 Codex. 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 +flowchart TD + A[Check the finish condition] --> B[Make the smallest justified change] + B --> C[Verify against the real artifact] + C --> D{Progress?} + D -->|Yes| E[Commit] + D -->|No| F[Discard] + E --> G[Log one decision row] + F --> G + G --> A +``` + +One change, one check, one log row, every iteration. Changes that didn't help get discarded, not left to ride. A plateau means pivot, not stop, and the finish condition never quietly relaxes to declare victory. + +## The morning audit + +[`$show-me-your-work`](../../skills/show-me-your-work/SKILL.md) is what makes the run reviewable. Each row records the time, phase, decision, reason, an evidence pointer, and the result, in a TSV at `decisions.tsv` (or `.audit/.tsv` when several runs share a directory). It stays local by default. Commit it when the work is ambitious enough that a reviewer needs the trail to trust the result. + +When you're back, ask for the run in review form: + +```text +$show-me-your-work catch me up on what you did last night +``` + +Before the skill hands back its summary, it spawns a reviewer on a different model family to read the trail and the transcript, and the reply ends with an Attention section listing what deserves your scrutiny. Read that section first, then the log rows it points at. You're auditing decisions, not re-reading the whole night. + +## When the night holds a queue, not a task + +The contract above drives one task to one finish condition. Some nights hold more, a queue of independent changes or a whole program. Three playbooks scale the same trust up. + +[Autopilot-full](../../skills/poteto-mode/playbooks/autopilot-full.md) runs a queue of independent PRs to merged. Each PR gets one owner agent that carries it from build through merge, and no owner merges on its own verdict. A swarm of fresh verifiers starts a round at the owner's code-ready head and again at every later push that changes the patch. Only a clean verdict on the patch that merges authorizes the merge: + +```text +$poteto-mode full autopilot on this queue. each item is independent. i want them merged by morning. +``` + +[Autopilot-stack](../../skills/poteto-mode/playbooks/autopilot-stack.md) runs the same owner loop but ships nothing. You wake up to one linear base-branch stack with a verifier's verdict on every link, and you review and land it yourself. Pick it over Autopilot-full when the changes are coupled, or when you want your own eyes on the work before anything merges: + +```text +$poteto-mode autopilot these five changes but stack them, don't ship. i'll land the stack in the morning. +``` + +[Orchestrate](../../skills/poteto-mode/playbooks/orchestrate.md) is for a program that outlives any single agent: multi-day, many stacked PRs, fleets of subagents under one standing coordinator chat. The coordinator authors briefs, collects what its subagents finish, keeps the lowest unmerged PR green, and never writes code itself. It's deliberately heavy machinery. If one agent could finish the work in a session, the playbook itself routes you back to the overnight contract above: + +```text +$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 Codex project groups related chats. Give one coordinator chat the program and start its prompts with `$poteto-mode`; its subagents follow the playbooks. The coordinator doesn't write code. It directs subagents, which need separate worktrees when their work can collide. Local work and scheduled wake-ups require the execution host to stay available. + +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. +- Group related chats in the project, finished ones included. Give the coordinator pointers to the relevant chats and artifacts. +- 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. + +Codex app automations can schedule the stages. If an issue-report integration already exists, give it the target repository, the triage and repro predicates, and the evidence each stage must hand over. This port does not install an incoming Slack integration or the Cursor automation pack. + +**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 `/goal` a predicate that can pass or fail. + +Next: [Steer with principle names](./08-principles.md). diff --git a/docs/pstack/08-principles.md b/docs/pstack/08-principles.md new file mode 100644 index 0000000..f22beaa --- /dev/null +++ b/docs/pstack/08-principles.md @@ -0,0 +1,72 @@ +# Steer with principle names + +pstack ships 24 principles as individual skills. `$poteto-mode` reads their index at the start of every multi-step task, applies the ones the task triggers, and names each applied principle in its reply along with the decision it changed. + +You don't invoke principles. You use their names to steer. Each name points at a complete rule the agent has already read, so one phrase redirects the work more precisely than a paragraph of instructions. + +## Steering in practice + +Say the agent is about to bolt a new adapter onto three existing ones: + +```text +use subtract before you add. delete the obsolete adapters first, then design what's left. +``` + +Say it claims success because the build passed: + +```text +apply prove it works. run the real import flow and show me the written records. +``` + +Say two parallel attempts are about to write to the same branch: + +```text +separate before serializing shared state. give each attempt its own worktree, no locks. +``` + +Each phrase lands because the rule behind it is specific. The agent still has to say, in its reply, which decision the rule changed. A principle citation with no decision behind it is the tell that it name-dropped instead of applying. + +## The 24, briefly + +The core principles decide how much to build and when to rethink the design: + +- [Laziness Protocol](../../skills/principle-laziness-protocol/SKILL.md) prefers deletion and the smallest change that solves the problem. +- [Foundational Thinking](../../skills/principle-foundational-thinking/SKILL.md) chooses the core data structures before writing logic. +- [Redesign from First Principles](../../skills/principle-redesign-from-first-principles/SKILL.md) integrates a new requirement as if it had been there from day one. +- [Attack the Premise](../../skills/principle-attack-the-premise/SKILL.md) questions the premise that two or more failed fixes shared, after a census of which actors hold the imbalance. +- [Subtract Before You Add](../../skills/principle-subtract-before-you-add/SKILL.md) removes dead weight before building on top of it. +- [Minimize Reader Load](../../skills/principle-minimize-reader-load/SKILL.md) collapses layers and hidden state a reader must hold in their head. +- [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. 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: + +- [Model the Domain](../../skills/principle-model-the-domain/SKILL.md) encodes repeated rules in one structure, not scattered conditionals. +- [Boundary Discipline](../../skills/principle-boundary-discipline/SKILL.md) validates at the boundary and trusts internal types. +- [Type System Discipline](../../skills/principle-type-system-discipline/SKILL.md) makes illegal states unrepresentable. +- [Make Operations Idempotent](../../skills/principle-make-operations-idempotent/SKILL.md) converges retries on the same end state. +- [Migrate Callers Then Delete Legacy APIs](../../skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md) migrates and deletes in one wave. +- [Separate Before Serializing Shared State](../../skills/principle-separate-before-serializing-shared-state/SKILL.md) removes the sharing before adding coordination. + +The verification principles define what counts as proof: + +- [Prove It Works](../../skills/principle-prove-it-works/SKILL.md) verifies the real artifact, not a proxy. +- [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. [`$benchmark-checklist`](../../skills/benchmark-checklist/SKILL.md) turns it into seven questions you answer from real runs. + +The delegation principles keep parallel work sane: + +- [Guard the Context Window](../../skills/principle-guard-the-context-window/SKILL.md) routes bulk reading to subagents and keeps findings in the main chat. +- [Never Block on the Human](../../skills/principle-never-block-on-the-human/SKILL.md) proceeds on reversible work and presents the result. + +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. [`$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. + +Next: [Make it yours](./09-make-it-yours.md). diff --git a/docs/pstack/09-make-it-yours.md b/docs/pstack/09-make-it-yours.md new file mode 100644 index 0000000..d7a6b77 --- /dev/null +++ b/docs/pstack/09-make-it-yours.md @@ -0,0 +1,100 @@ +# 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, 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` + +```text +$automate-me +``` + +You don't describe your style, because [`$automate-me`](../../skills/automate-me/SKILL.md) reads it out of your history. It mines your recent transcripts in the active workspace for repeated preferences, in how you like replies, delegation, verification, code, prose, and process, then asks you which patterns are really you. It drafts `.agents/skills/-mode/SKILL.md` through Codex's built-in `skill-creator` flow, runs the draft through [`$unslop`](../../skills/unslop/SKILL.md), and opens a PR from a worktree so you review it like any other change. + +Run it again whenever your habits drift: + +```text +$automate-me update my mode skill with everything since its last edit +``` + +Update mode mines only the history since the skill last changed. It keeps rules you haven't contradicted, revises the ones with new evidence, and adds sections only for genuinely new patterns. + +## Capture a session's lessons with `$reflect` + +Right after a task that taught you something, run: + +```text +$reflect that took way too long. capture what we learned so the next run doesn't repeat it. +``` + +[`$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: + +```text +$poteto-mode write a skill for verifying database migrations in this repo +``` + +Writing a skill matches the [Authoring or modifying a skill playbook](../../skills/poteto-mode/playbooks/authoring-a-skill.md), which routes through Codex's built-in `skill-creator`, validates the frontmatter and links, and ships the result through the Opening a PR playbook. Agent-facing prose has a higher bar than human prose, because an unhelpful sentence becomes an instruction some future agent follows. Let the playbook hold that bar rather than writing a `SKILL.md` freehand. + +One special case has its own generator. A skill that must drive your app and prove behavior is a verification skill, so use [`$create-verification-skill`](../../skills/create-verification-skill/SKILL.md) and [`$maintain-verification-skill`](../../skills/maintain-verification-skill/SKILL.md) instead. [Verify and ship](./06-verify-and-ship.md#create-a-project-verification-skill) covers both. + +## Write docs to a standard with `$technical-writing` + +Skills aren't the only prose you ship. For docs, RFCs, readmes, PR descriptions, and commit messages: + +```text +$technical-writing review the readme changes +``` + +[`$technical-writing`](../../skills/technical-writing/SKILL.md) applies a layered standard with one goal, prose a tired engineer understands on the first read. It picks the document's mode first (tutorial, how-to, reference, or explanation), then works sentence by sentence: who does what, one thought per sentence, nothing readable two ways. Use it to review what you or an agent just wrote, or name it up front when you ask for a doc. + +## Test a skill change blind + +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/docs/pstack/10-recipes-and-pitfalls.md b/docs/pstack/10-recipes-and-pitfalls.md new file mode 100644 index 0000000..88e0fe7 --- /dev/null +++ b/docs/pstack/10-recipes-and-pitfalls.md @@ -0,0 +1,156 @@ +# Recipes and pitfalls + +Prompts worth copying, then the mistakes everyone makes once. Swap in your own paths and finish conditions. The recipes are deliberately informal. That's how they get typed in practice, and the skills read intent fine. + +![She tastes a finished dish while robots cook from a recipe box, with pinned cards reading $how, $tdd, and /goal above the counter.](./images/recipes.jpg) + +## Understand an unfamiliar subsystem + +```text +use $how first to understand how this initialization works. then use $why to figure out why it broke recently. +``` + +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 +ask $arena for a second opinion on this thread and our approach +``` + +Your current design becomes one candidate among several, and the synthesis tells you whether the panel found something better or confirmed what you had. Cheap insurance before a costly commitment. + +## Check independent slices in parallel + +```text +$swarm check every package under packages/ against its check.sh. one worker per package. one report. +``` + +Each worker owns one package. The parent waits for every slice and returns one `PASS`, `ISSUES`, or `BLOCKED` report instead of raw worker dumps. + +## Review a branch skeptically + +```text +$interrogate the whole branch, but skeptically. don't change anything yet. no nitpicks unless it's an actual bug or regression in behavior. +``` + +The qualifiers do real work. "don't change anything yet" keeps it read-only, and the nitpick rule pre-filters the noise so `Act on` findings are worth your time. + +## Fix a bug through a failing test + +```text +$poteto-mode repro the duplicate write first. if there's a cheap test path, $tdd it. then fix and rerun. +``` + +"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 +im going to bed, keep going autonomously until every fixture passes. do not stop. keep a decision log i can audit in the morning. +``` + +The full contract is on the [overnight page](./07-overnight.md). The short form works once the task and finish condition are already in the conversation. + +## Redirect a drifting run + +Steering prompts are one line: + +```text +i said the goal is to repro. i did not ask for a fix yet. +``` + +```text +apply prove it works. show me the real output, not the build log. +``` + +```text +$unslop that, no emdashes +``` + +You rarely need more words. You need the right name, and [the principles page](./08-principles.md) is the vocabulary. + +## Get the reply in plain words + +```text +$bro +``` + +That's the whole prompt. [`$bro`](../../skills/bro/SKILL.md) restates the last message like one human talking to another, no jargon, shorter. Use it when a reply is technically thorough and you still don't know what it said. + +## The pitfalls + +- **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 `/goal` nothing to check. Give a command or artifact that can pass or fail. +- **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. Say "own worktree per attempt". Codex collaboration agents share the parent checkout unless their briefs point to separate worktrees. +- **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. +- **Reporting success off a green build.** A build proves it compiles. Ask for the real command, flow, stored value, or profile, and expect the evidence in the reply. +- **Writing a `SKILL.md` freehand.** Route it through the [Authoring or modifying a skill playbook](../../skills/poteto-mode/playbooks/authoring-a-skill.md) so validation and review happen. + +That's the guide. If you skipped ahead, go back to [setup](./01-setup.md) and run one real task. The habits stick from use, not from reading. + +Back to the [guide index](./README.md). diff --git a/docs/pstack/README.md b/docs/pstack/README.md new file mode 100644 index 0000000..f9a4421 --- /dev/null +++ b/docs/pstack/README.md @@ -0,0 +1,38 @@ +# The pstack guide + +pstack works best when you stop micromanaging the agent. You describe what you want and how you'll know it's done. `$poteto-mode` picks the playbook, runs the other skills as the steps need them, and shows you the evidence. This guide teaches that habit with realistic prompts. + +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). 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, 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, `$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, 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: + +```text +$poteto-mode the export writes duplicate rows when a retry lands mid-run. repro first, then fix and verify. +``` + +You don't need to name a playbook or list skills. "repro first" and a checkable outcome are all the routing signal `$poteto-mode` needs. It matches the Bug fix playbook, copies the steps into a todo list, and calls the right skills as each step fires. + +Next: [Set up pstack](./01-setup.md). diff --git a/docs/pstack/images/design.jpg b/docs/pstack/images/design.jpg new file mode 100644 index 0000000..f869094 Binary files /dev/null and b/docs/pstack/images/design.jpg differ diff --git a/docs/pstack/images/overnight.jpg b/docs/pstack/images/overnight.jpg new file mode 100644 index 0000000..d64e1c6 Binary files /dev/null and b/docs/pstack/images/overnight.jpg differ diff --git a/docs/pstack/images/recipes.jpg b/docs/pstack/images/recipes.jpg new file mode 100644 index 0000000..69fe992 Binary files /dev/null and b/docs/pstack/images/recipes.jpg differ diff --git a/docs/pstack/images/router.jpg b/docs/pstack/images/router.jpg new file mode 100644 index 0000000..c8fba6a Binary files /dev/null and b/docs/pstack/images/router.jpg differ diff --git a/docs/pstack/images/understanding.jpg b/docs/pstack/images/understanding.jpg new file mode 100644 index 0000000..bb1b1ac Binary files /dev/null and b/docs/pstack/images/understanding.jpg differ diff --git a/docs/pstack/images/verification.jpg b/docs/pstack/images/verification.jpg new file mode 100644 index 0000000..a252ae0 Binary files /dev/null and b/docs/pstack/images/verification.jpg differ diff --git a/docs/upstream-mined.md b/docs/upstream-mined.md index 5ba103d..30e8114 100644 --- a/docs/upstream-mined.md +++ b/docs/upstream-mined.md @@ -13,6 +13,8 @@ The 2026-10-11 landing retains the local plan checker's fenced-code handling and required checklist boxes after regression proof. Upstream skill wording and model policy remain unchanged. +- 2026-10-11 targeted PStack refresh: ported `cursor/plugins` `pstack` through `978ca6e9c0e012047cd5058b8e829240336e704e` (0.15.17). Added `poteto-help`, `ketchup`, prompting references, and the standalone guide; applied upstream prompt distillation and Architect grounding correction. Preserved existing models, efforts, panels, aliases, fallback policy, and executable helpers; skipped upstream setup defaults and the model-only verifier fixture rename. Required Codex changes are invocation policy, agent fields and local transports, exact-thread rollout parsing, installation and documentation paths, and separate goals versus heartbeat scheduling. Guide images are upstream bytes. Cursor plugin packaging, personal README biography, and dormant Benny automation pack remain upstream-only. No per-skill licenses or source banners added. Global marker unchanged. + ## Flow (repeat per pass) ```bash diff --git a/skills/architect/SKILL.md b/skills/architect/SKILL.md index 06991e8..ed84476 100644 --- a/skills/architect/SKILL.md +++ b/skills/architect/SKILL.md @@ -5,7 +5,7 @@ description: "Sketch types, signatures, and module structure before code, then s # Architect -Design before implementing. Sketch types, function signatures, class shapes, and module boundaries with `not implemented` bodies and pseudocode. Synthesize across multiple model perspectives, then fill in code against the chosen sketch. If implementation proves the sketch wrong, throw it out and redesign. +Sketch types, function signatures, class shapes, and module boundaries with `not implemented` bodies and pseudocode. Synthesize across multiple model perspectives, then fill in code against the chosen sketch. ## Start @@ -19,15 +19,13 @@ Open a todolist with one entry per phase before starting. ## Phase A: Ground the problem -Build a real mental model of every system the new code touches. Run the **how** skill over the relevant subsystems. - -Naming a file isn't grounding. Produce the traced model `how` prescribes. If the design redefines ownership or layering, also run the **why** skill on the existing shape so the rationale becomes a constraint, not a guess. +Build a real mental model of every system the new code touches. Run the **how** skill over the relevant subsystems. Naming a file isn't grounding. Produce the architectural explanation `how` prescribes. If the design redefines ownership or layering, also run the **why** skill on the existing shape so the rationale becomes a constraint, not a guess. Skip Phase A only when the work is genuinely greenfield with no surrounding system to integrate. ## Phase B: Sketch -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`. +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. Use `architect runners` from `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md` when present. Otherwise default to one each on `gpt-6.1-sol` at `xhigh` reasoning, `claude-opus-5-5` at `high` reasoning, `claude-fable-5-1` at `high` reasoning. Pass this panel to Arena as the explicit runner list. @@ -37,7 +35,7 @@ Screen every candidate against [`references/design-red-flags.md`](references/des Compare viable candidates on interface depth. Prefer the design that hides more complexity behind a smaller, simpler public surface. A rich interface can keep call chains short by concentrating capability instead of scattering it across layers. -Arena returns one synthesized design package. The synthesis decision populates the rationale's "Synthesis decision" section. +Arena returns one synthesized design package. Its synthesis decision fills the rationale's "Synthesis decision" section. ## Phase C: Agree (opt-in) @@ -51,9 +49,7 @@ If the human pushes back on the shape (in a checkpoint or after the fact), treat ## Phase D: Implement against the sketch -Replace `not implemented` bodies with code, pseudocode with logic. The synthesized sketch is the contract. - -Deviations from the sketch are signal worth surfacing, not friction to absorb silently. If a function needs a parameter the sketch didn't anticipate, ask whether the sketch was wrong, the requirement was missed, or the implementation is overreaching. +Replace `not implemented` bodies with code, pseudocode with logic. The synthesized sketch is the contract. Deviations from it are signal to surface, not friction to absorb silently. If a function needs a parameter the sketch didn't anticipate, ask whether the sketch was wrong, the requirement was missed, or the implementation is overreaching. ## Phase E: Scrap when the architecture is wrong diff --git a/skills/architect/references/runner-prompt.md b/skills/architect/references/runner-prompt.md index 580ec47..b1ad21a 100644 --- a/skills/architect/references/runner-prompt.md +++ b/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/skills/arena/LICENSE b/skills/arena/LICENSE deleted file mode 100644 index 6b54002..0000000 --- a/skills/arena/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Lauren Tan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/skills/arena/SKILL.md b/skills/arena/SKILL.md index 11b4cd9..3f30e0d 100644 --- a/skills/arena/SKILL.md +++ b/skills/arena/SKILL.md @@ -5,66 +5,43 @@ description: "Spawn N parallel candidates at the same task, pick a base, graft t # Arena -Fan out N parallel attempts at the same task. Read every candidate end to end. Pick the strongest as the base. Graft the best ideas from the others into it. Verify the synthesized result. - -## Start - -Call `update_plan` with one entry per phase before launching anything. - -1. Frame -2. Fan out -3. Cross-judge -4. Pick -5. Graft -6. Verify +Open a todolist with one entry per phase (Frame, Fan out, Cross-judge, Pick, Graft, Verify) before launching anything. ## Phase A: Frame -The N candidates will receive the same prompt, so the prompt is the contract. +Every candidate gets 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. +2. Derive the rubric, 3-6 concrete gradeable criteria for what success looks like on *this* task. It is the picker's tool in Phase D. Candidates only see the task. 3. Pick the runners. Honor an explicit runner list from the caller (including Architect); otherwise use `arena runners` from `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md` when present. Otherwise default to one each on `gpt-6.1-sol` at `high`, `claude-opus-5-5` at `high`, `claude-fable-5-1` at `high`. 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. +4. Give each candidate its own output location (a git worktree where possible, otherwise `/tmp/arena-/candidate-/`), per the **separate-before-serializing-shared-state** principle skill. ## Phase B: Fan out -Launch all N candidates concurrently with the task, the path to the shared grounding, their own output path, and instructions to produce both the artifact and a short rationale. Use Codex collaboration agents with `model` and `reasoning_effort` for Codex entries. Run Claude entries through `claude -p --model --effort ` with the same candidate inputs and output contract. `claude-opus-5-5` requires Claude Code 2.1.280 or newer. Schedule in waves when runner count exceeds available concurrency; keep one candidate per configured entry. +Launch all N candidates concurrently, each with the task, the path to the shared grounding, its own output path, and instructions to produce the artifact and a short rationale naming the alternatives it considered and what it rejected. Use Codex collaboration agents with `model` and `reasoning_effort` for Codex entries. Run Claude entries through `claude -p --model --effort ` with the same candidate inputs and output contract. `claude-opus-5-5` requires Claude Code 2.1.280 or newer. Schedule in waves when runner count exceeds available concurrency; keep one candidate per configured entry. -Each rationale names the alternatives the candidate considered and what it rejected. - -If a candidate fails to produce output, proceed with N-1 and note the dropout in the synthesis record. +If a candidate produces no output, proceed with N-1 and note the dropout. ## Phase C: Cross-judge -After all Phase B candidates complete, choose one model from the `arena cross-judge pool` in `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md` when present. Otherwise use `gpt-6.1-sol` at `high` reasoning, `claude-opus-5-5` at `high` reasoning. Prefer a different model family from the parent's. Launch one judge on that model using the Codex or Claude transport from Phase B; instruct it not to edit files or change repository state. 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` in `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md` when present. Otherwise use `gpt-6.1-sol` at `high` reasoning, `claude-opus-5-5` at `high` reasoning. Prefer a different model family from the parent's. Launch one judge on that model using the Codex or Claude transport from Phase B; instruct it not to edit files or change repository state. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with your reading in Phase D. Don't spawn it while candidates are still writing. ## Phase D: Pick a base -Read every candidate end to end before picking. - -Score each candidate against the rubric criterion by criterion, not on holistic feel. Compare against the cross-judge. Agreement on the base confirms the pick. Disagreement means one of you is biased or the rubric was ambiguous. Read both rationales before deciding. +Read every candidate end to end before picking. Score each against the rubric criterion by criterion, not on holistic feel, and compare with the cross-judge. Agreement on the base confirms the pick. Disagreement means one of you is biased or the rubric was ambiguous. Read both rationales before deciding. -Pick the base on which candidate a future maintainer can extend most easily without breaking invariants. Prefer the cleaner boundary or smaller API when two feel tied, per the Laziness Protocol. - -Record the pick and the reason in a short synthesis note alongside the base artifact, including the cross-judge's verdict. +Pick the base a future maintainer can extend most easily without breaking invariants. When two feel tied, prefer the cleaner boundary or smaller API, per the Laziness Protocol. ## Phase E: Graft -Walk each losing candidate once more and identify what is worth porting into the base. The signal is usually one or two things per candidate, not most of it. - -Fold each graft in by hand, per the **redesign-from-first-principles** principle skill. Don't paste mechanically. The result has to remain coherent under one mental model. +Walk each losing candidate once more for what is worth porting into the base, usually one or two things per candidate, not most of it. Fold each graft in by hand, per the **redesign-from-first-principles** principle skill, so the result stays coherent under one mental model. Don't paste mechanically. -Record what was grafted, from which candidate, and what was rejected and why. - -When N candidates converge on the same shape, that is a strong agreement signal. Note the convergence in the record and ship the consensus shape. No graft is needed. When N candidates wildly diverge, Phase A was under-specified. Reframe and re-run rather than averaging the divergence. +If the candidates converge on one shape, that is strong agreement. Note it and ship the consensus shape. No graft is needed. If they wildly diverge, Phase A was under-specified. Reframe and re-run rather than averaging the divergence. ## Phase F: Verify -The synthesized artifact has to hold up under the same scrutiny as any other output, per the **prove-it-works** principle skill. - -If verification surfaces a problem the arena did not catch, either Phase A was wrong (re-frame and re-run) or one candidate caught it and you missed the graft (go back to Phase E). Don't paper over. +Verify the synthesized artifact like any other output, per the **prove-it-works** principle skill. If verification finds a problem the arena missed, either Phase A was wrong (re-frame and re-run) or a candidate caught it and you missed the graft (go back to Phase E). Don't paper over it. ## Outputs -One synthesized artifact. One short synthesis note alongside, naming the base, the grafts (with source candidate), the rejections, the dropouts if any, and the verification result. +One synthesized artifact, with a short synthesis note alongside naming the base and why, the cross-judge's verdict, each graft with its source candidate, what was rejected and why, any convergence or dropouts, and the verification result. diff --git a/skills/automate-me/LICENSE b/skills/automate-me/LICENSE deleted file mode 100644 index 6b54002..0000000 --- a/skills/automate-me/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Lauren Tan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/skills/automate-me/SKILL.md b/skills/automate-me/SKILL.md index abfa5e4..506cfc5 100644 --- a/skills/automate-me/SKILL.md +++ b/skills/automate-me/SKILL.md @@ -5,8 +5,6 @@ description: "Use for \"automate me\", \"create/update/refresh my -mode skill\", # Automate me -_Source: [PStack](https://github.com/cursor/plugins/tree/main/pstack/skills/automate-me), MIT license._ - A guided flow for turning the user's working conventions into a skill agents will follow. The output is one `-mode` skill tailored to them (e.g. `jay-mode`, `priya-mode`). This skill orchestrates three others: an inline mining pass (see step 1), Codex's built-in `skill-creator` (authoring), and the **unslop** skill (prose discipline). It sequences them. It doesn't replace them. diff --git a/skills/benchmark-checklist/SKILL.md b/skills/benchmark-checklist/SKILL.md index d92d20e..301f348 100644 --- a/skills/benchmark-checklist/SKILL.md +++ b/skills/benchmark-checklist/SKILL.md @@ -5,34 +5,34 @@ description: "Vet a perf measurement (limiter, tuning, limits, errors, repeatabi # Benchmark checklist -Use this when you produce a performance number: a PR's before and after, a regression claim, a hillclimb harness, or a library or config choice. [Explain the Number](../principle-explain-the-number/SKILL.md) says why. Answer each question below with evidence from a run, not from a guess about the code. +Use this when you produce a performance number: a PR's before and after, a regression claim, a hillclimb harness, or a library or config choice. Answer each question with evidence from a run, not a guess about the code. For a quick ballpark the user asked for, one run is enough. Still check questions 4 and 7, and say that it is one run. Skip the rest unless that run looks wrong. A choice between options is never a ballpark. ## Before you run anything - Write down the claim you expect to make, in the words you would ship ("export is 30% faster at p50 on the 60k-row dataset"). The questions test that sentence. -- Read the measurement script. Note what it times, what it counts, and what it ignores. +- Read the measurement script. Note what it times, counts, and ignores. - Check the load average with `uptime` and the core count with `nproc`. If the machine is busy, find out what is running. If you cannot stop it, interleave the sides so both see the same noise, and say so in the report. ## The questions -1. **Why not double?** Name the limiter. Profile in a run you do not report, because profilers and tracers slow the work down. Use CPU per process (`top`, `pidstat`), a profiler for the runtime (`node --cpu-prof`, `py-spy`, `perf`), I/O wait, and syscall counts (`strace -c` on Linux). Then map the hot spot to source. Watch the load generator too. If it saturates first, you measured the load generator. If a change did not move the number, the limiter explains why, so find it before you call the change useless. -2. **Was it tuned?** Run every side the way production runs it: release builds, production flags and env, batching and transaction settings, connection pools, caches as warm or cold as production sees them, and the same versions and data. If one side runs on defaults, you compared configurations, not implementations. A limiter that is a setting, such as a commit per row, a debug build, or a missing index, means that side is untuned. Tune it and measure again before you pick a winner. If you cannot tune it, do not pick a winner from that run. Narrowing the claim to the code as it ships today does not fix this when the user is choosing what to adopt, because they adopt the option, not today's settings. -3. **Did it break limits?** Do the arithmetic. Compare bytes per second with disk and network bandwidth, and operations per second times the cost per operation with the cores you have. Compare the time saved with the time the changed piece took. Removing a piece that takes 10% of the run can make the run at most about 11% faster. A result past a limit means the run measured something other than the work, such as a cache, a no-op, or a bug. -4. **Did it error?** Count failures and non-success responses, and check that the outputs are correct, not just present. Errors behave differently from successes. Rejections are often fast, and timeouts and retries are slow. If the script does not count errors, add the count. -5. **Does it reproduce?** Run each side at least 5 times, and alternate the sides (A, B, A, B, and so on) so that warmup, lazy initialization, caches, and drift do not favor one side. Report the median and the range. Treat a gap smaller than the run-to-run variation as no measurable difference. When the call is close, use a rank-sum test or the harness's own statistics. -6. **Does it matter?** Next to any micro result, measure the end-to-end path a user waits on, with realistic data sizes and concurrency. Report the micro result as a share of the whole. A helper that takes 1% of a request can make the request at most 1% faster, however fast the helper gets. -7. **Did it even happen?** Confirm the work ran inside the timed region. The request reached the server, the rows were written, the bytes were read, and the code used the result. Lazy code (generators nobody iterates, promises nobody awaits, results the JIT can discard) and timeouts all produce numbers for work that never happened. +1. **Why not double?** Name the limiter. Profile in a run you do not report, because profilers and tracers slow the work down. Use CPU per process (`top`, `pidstat`), a runtime profiler (`node --cpu-prof`, `py-spy`, `perf`), I/O wait, and syscall counts (`strace -c` on Linux), then map the hot spot to source. Watch the load generator too: if it saturates first, you measured the load generator. If a change did not move the number, the limiter explains why, so find it before you call the change useless. +2. **Was it tuned?** Run every side the way production runs it: release builds, production flags and env, batching and transaction settings, connection pools, caches as warm or cold as production sees them, and the same versions and data. If one side runs on defaults, you compared configurations, not implementations. A limiter that is a setting (a commit per row, a debug build, a missing index) means that side is untuned. Tune it and measure again before you pick a winner. If you cannot tune it, do not pick a winner from that run. When the user is choosing what to adopt, narrowing the claim to the code as it ships today does not fix this, because they adopt the option, not today's settings. +3. **Did it break limits?** Do the arithmetic. Compare bytes per second with disk and network bandwidth, operations per second times cost per operation with your cores, and the time saved with the time the changed piece took. Removing a piece that takes 10% of the run can make the run at most about 11% faster. A result past a limit measured something other than the work, such as a cache, a no-op, or a bug. +4. **Did it error?** Count failures and non-success responses, and check that outputs are correct, not just present. Rejections are often fast, and timeouts and retries are slow. If the script does not count errors, add the count. +5. **Does it reproduce?** Run each side at least 5 times, alternating (A, B, A, B, and so on) so warmup, lazy initialization, caches, and drift favor neither. Report the median and range. A gap smaller than the run-to-run variation is no measurable difference. When the call is close, use a rank-sum test or the harness's own statistics. +6. **Does it matter?** Next to any micro result, measure the end-to-end path a user waits on, with realistic data sizes and concurrency, and report the micro result as a share of the whole. A helper that takes 1% of a request can make the request at most 1% faster, however fast the helper gets. +7. **Did it even happen?** Confirm the work ran inside the timed region: the request reached the server, the rows were written, the bytes were read, and the code used the result. Lazy code (generators nobody iterates, promises nobody awaits, results the JIT can discard) and timeouts produce numbers for work that never happened. ## Report - Lead with the verdict: faster, slower, no measurable difference, or inconclusive. - Give the number with its unit, the run count, the range, and the limiter. For example, "p50 41 ms → 33 ms, median of 7 runs per side, range 32 to 35 ms after, bound by JSON parsing on one core." - Call the verdict inconclusive when you claim a difference but cannot name the limiter, when a side ran untuned, or when you could not check questions 4 and 7. Name the gap. -- Keep a PR body to one primary number, per the **Opening a PR** playbook. Put the runs, the range, and the limiter evidence in a linked artifact or a notes file. +- Keep a PR body to one primary number, per the **Opening a PR** playbook. Put the runs, range, and limiter evidence in a linked artifact or notes file. -## How this fits the other perf material +## Other perf material -- The **Perf issue** playbook finds and fixes slowness, and the performance mantras in its step 2 generate the fixes. This skill vets its baseline before the playbook plans from it, and every number after that. -- The **Hillclimb** playbook loops on one metric. This skill vets its harness before the harness is frozen. The frozen harness then prints error and work counts, so each keep-or-revert checks questions 4 and 7 for free. +- Vet the **Perf issue** playbook's baseline before the playbook plans from it, and every number after that. +- Vet the **Hillclimb** playbook's harness before it is frozen. The frozen harness then prints error and work counts, so each keep-or-revert checks questions 4 and 7 for free. diff --git a/skills/blast-radius/SKILL.md b/skills/blast-radius/SKILL.md index b896a6f..0b09604 100644 --- a/skills/blast-radius/SKILL.md +++ b/skills/blast-radius/SKILL.md @@ -34,7 +34,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/skills/bro/LICENSE b/skills/bro/LICENSE deleted file mode 100644 index 6b54002..0000000 --- a/skills/bro/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Lauren Tan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/skills/create-verification-skill/LICENSE b/skills/create-verification-skill/LICENSE deleted file mode 100644 index 6b54002..0000000 --- a/skills/create-verification-skill/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Lauren Tan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/skills/figure-it-out/SKILL.md b/skills/figure-it-out/SKILL.md index 2822efd..9e3e04d 100644 --- a/skills/figure-it-out/SKILL.md +++ b/skills/figure-it-out/SKILL.md @@ -1,6 +1,6 @@ --- name: figure-it-out -description: "Design an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a human reviews after stepping away. Scales rigor to the task, runs a hypothesis loop, and logs decisions via show-me-your-work. Use for $figure-it-out, 'figure it out', a large migration, or when no narrower playbook applies." +description: "Design an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a human reviews after stepping away. Scales rigor to the task, runs a hypothesis loop, and logs decisions. Use for $figure-it-out or 'figure it out'." --- # Figure it out @@ -30,12 +30,11 @@ Decompose into atomic, independently-landable units. Sequence riskiest-unknown-f - Decide what fans out. Parallelize only across seams, and give each worker its own worktree or branch (the **separate-before-serializing-shared-state** principle skill). Don't over-fan. - Write the designed phase list down. That list is what the human reviews. -Then execute the design. Add its steps to the todolist as concrete items, after the Phase C entry and before Phase D. Run each under the Phase C loop discipline, and weave the Phase D log through them, a row as each step lands, rather than saving the whole trail for the end. +Then execute the design. Add its steps to the todolist as concrete items between the Phase C and Phase D entries. Run each under the Phase C loop discipline, and weave the Phase D log through them, a row as each step lands, rather than saving the whole trail for the end. ## Phase C: Run the loop -Each unit is an experiment. State the hypothesis, make the smallest change, measure against the predicate on the real artifact, keep it if it advanced, revert it if it didn't. -Apply the **sequence-verifiable-units** principle skill, verifying each unit before starting the next instead of batching checks at the end. +Each unit is an experiment. State the hypothesis, make the smallest change, measure against the predicate on the real artifact, keep it if it advanced, revert it if it didn't. Apply the **sequence-verifiable-units** principle skill, verifying each unit before starting the next instead of batching checks at the end. - Verify by inspecting the artifact, never a self-report. When something passes too easily, suspect the observation method before the system. - Pair delegated work with a judge. If a worker games the gate, reset and harden the contract. If the gate itself is wrong, fix the gate in its own change rather than routing around it. diff --git a/skills/how/SKILL.md b/skills/how/SKILL.md index c20b8f7..4e33848 100644 --- a/skills/how/SKILL.md +++ b/skills/how/SKILL.md @@ -7,43 +7,29 @@ description: "Use for \"how does X work\", code walkthroughs before changing som Explore the codebase to answer "how does X work?" questions. Produce architectural explanations at the level of a senior engineer onboarding onto a subsystem, enough to build a working mental model, not so much that it reads like annotated source code. -## Step 1. Assess Complexity +Every spawn is a Codex collaboration agent instructed not to edit files, change repository state, or perform external writes. Explorers use the `how explorer` line in `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md` (default `gpt-6.1-sol` at `low` reasoning), and every explainer uses the `how explainer` line (default `gpt-6.1-sol` at `high` reasoning). Pass the slug as `model` and the effort as `reasoning_effort`. Leave `model` unset when the value is `auto` or `inherit-parent`. + +## 1. Assess complexity If the scope is ambiguous, state your interpretation and explore. The user can redirect. -- **Simple** (a single module, a small utility, a narrow question such as "how does function X work"): no explorers. One explainer explores and explains in a single pass. Go to Step 2b. -- **Complex** (a subsystem spanning multiple files or services, a cross-cutting feature, a full architectural overview): spawn parallel explorers first, then hand off to the explainer. Go to Step 2a. +- **Simple** (a single module, a small utility, a narrow question such as "how does function X work"): no explorers. Spawn one explainer that explores and explains in one pass, built from `references/explainer-prompt.md` without the explorer-findings section. Go to step 4. +- **Complex** (a subsystem spanning multiple files or services, a cross-cutting feature, a full architectural overview): go to step 2. When in doubt, take the simple path. -## Step 2a. Explore (complex questions only) - -Decompose the question into 2 to 4 exploration angles, each a distinct slice of the subsystem. Spawn all explorers concurrently: - -- `model`: your configured `how explorer` model from `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md` (default `gpt-6.1-sol` at `low` reasoning) - -Each explorer gets the prompt in `references/explorer-prompt.md` with its angle filled in. Then go to Step 3. - -## Step 2b. Direct Explain (simple questions) - -Spawn one agent that explores and explains in one pass: - -- `model`: your configured `how explainer` model from `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md` (default `gpt-6.1-sol` at `high` reasoning) - -Build its prompt from `references/explainer-prompt.md` without the explorer-findings section. Go to Step 4. - -## Step 3. Synthesize (complex questions only) +## 2. Explore (complex only) -Once all explorers have returned, spawn one agent to synthesize their findings into one explanation: +Decompose the question into 2 to 4 angles, each a distinct slice of the subsystem. Spawn all explorers in a single message, each with `references/explorer-prompt.md` and its angle filled in. -- `model`: your configured `how explainer` model from `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/models.md` (default `gpt-6.1-sol` at `high` reasoning) +## 3. Synthesize (complex only) -Build its prompt from `references/explainer-prompt.md` with every explorer's findings filled in. +Once all explorers have returned, spawn one explainer with `references/explainer-prompt.md` and every explorer's findings filled in. -## Step 4. Present +## 4. Present -Present the explainer's output to the user. Light edits for clarity or context from the conversation are fine. Do not substantially rewrite it. +Present the explainer's output. Light edits for clarity or context from the conversation are fine. Do not substantially rewrite it. -## Output Format +## Output format The explanation uses the sections defined in `references/explainer-prompt.md`, dropping any that do not apply: Overview, Key Concepts, How It Works, Where Things Live, Gotchas. diff --git a/skills/interrogate/SKILL.md b/skills/interrogate/SKILL.md index b96c369..8698388 100644 --- a/skills/interrogate/SKILL.md +++ b/skills/interrogate/SKILL.md @@ -5,30 +5,21 @@ description: "Use for \"interrogate\", \"adversarial review\", \"multi-model rev # Interrogate -Spawn one reviewer per configured model to adversarially review code changes. Each model gets the same prompt and rubric. The adversarial signal comes from model diversity, not assigned personas. +Spawn one reviewer per configured model to adversarially review code changes. The adversarial signal comes from model diversity, not assigned personas. The deliverable is a synthesized verdict. Do NOT auto-apply changes. -The deliverable is a synthesized verdict. Do NOT auto-apply changes. - -## Step 1, Determine Scope +## Step 1, Scope Identify what to review from context: -- If the user points at specific files or a diff, use that -- If on a feature branch, run `git diff main...HEAD` (or the appropriate base branch) for the full changeset -- If the user's message references recent work, gather the relevant files - -Package the diff (or file contents) plus any surrounding context files the reviewers need to understand the code. - -## Step 2, State the Intent +- If the user points at specific files or a diff, use that. +- If on a feature branch, run `git diff main...HEAD` (or the appropriate base branch) for the full changeset. +- If the user's message references recent work, gather the relevant files. -Before spawning reviewers, state the intent explicitly. Derive this from: +Package the diff or file contents with any surrounding context files the reviewers need to understand the code. -- The user's message -- Commit messages -- PR description if one exists -- The code itself +## Step 2, Intent -Write one clear paragraph. If you're unsure about the intent, ask the user before proceeding. +Before spawning reviewers, state the intent in one clear paragraph from the user's message, commit messages, the PR description if one exists, and the code. If you're unsure about the intent, ask the user before proceeding. ## Step 3, Spawn Reviewers @@ -39,51 +30,27 @@ Launch Codex reviewers as collaboration agents with their model and reasoning ef | Reviewer A | `gpt-6.1-sol` at `xhigh` reasoning | | Reviewer B | `claude -p --model claude-opus-5-5 --effort xhigh` | -For each reviewer: -- `model`: the configured `interrogate reviewers` entry, or the table default with no configured line +Each reviewer gets `model` and `reasoning_effort` from its configured entry, or its table default when there is no configured line. Instruct reviewers not to edit files, change repository state, or perform external writes. Omit `model` for an `auto` or `inherit-parent` entry, so that reviewer runs on the parent model. If a model slug is rejected as unresolvable when you try to spawn the subagent, check the valid slugs in the spawn error message, pick the closest equivalent (prefer the highest-reasoning tier of the same family), spawn with the valid slug, and open a separate PR to update the configured value or default table. Do not block the review on the slug issue. -Read `references/reviewer-prompt.md` and fill in the template with: -1. The stated intent -2. The diff or file contents -3. The review rubric from `references/rubric.md` -4. The code-quality lens from `references/code-quality-review.md` - -The same filled template goes to all reviewers, so every model applies the code-quality lens. +Read `references/reviewer-prompt.md` and fill in the same template for every reviewer with the stated intent, the diff or file contents, the rubric from `references/rubric.md`, and the code-quality lens from `references/code-quality-review.md`. ## Step 4, Synthesize -As results come back, build a unified picture: - -1. **Parse all findings** from the reviewers -2. **Identify consensus**. Findings raised by 2+ models independently are highest signal. -3. **Identify lone-model findings**. Still worth reading, but weight accordingly. -4. **Deduplicate**. Different models may describe the same issue differently. Merge these and note which models raised it. -5. **Note disagreements**. If one model flags something and another explicitly says the opposite, that's useful context for the verdict. +As results come back, build a unified picture. Parse every reviewer's findings. Merge findings that describe the same issue differently, and note which models raised each one. Findings two or more models raised independently are the highest signal. Read a lone model's finding, but weight it accordingly. Note disagreements. If one model flags something and another explicitly says the opposite, that is context for the verdict. ## Step 5, Lead Judgment -You are the lead reviewer, a pragmatic senior engineer, not a neutral aggregator. +You are the lead reviewer, a pragmatic senior engineer, not a neutral aggregator. Read `references/lead-judgment.md` for the full framework. Put every finding in one of four buckets, with the model(s) that raised it and a one-line rationale. -Read `references/lead-judgment.md` for the full framework. - -Categorize every finding using these buckets: - -- **Act on**. Real issues affecting correctness, security, or maintainability given the actual goals. These would block a real PR. -- **Consider**. Legitimate points, but you're not sure they outweigh the cost of addressing them right now. Worth the user's attention. -- **Noted**. Technically valid but not actionable. Context-dependent, premature optimization, or low-impact given the current stage. -- **Dismissed**. Wrong, nitpicky, or missing context. Brief explanation why. - -For each finding, include: -- Which model(s) raised it -- The category (act on / consider / noted / dismissed) -- A one-line rationale for the categorization +- **Act on**. Real issues affecting correctness, security, or maintainability given the actual goals. They would block a real PR. +- **Consider**. Legitimate, but you're not sure they outweigh the cost of addressing them now. Worth the user's attention. +- **Noted**. Technically valid but not actionable. Context-dependent, premature optimization, or low-impact at this stage. +- **Dismissed**. Wrong, nitpicky, or missing context, with a brief reason. ## Output Format -Present the verdict in this structure: - ### Intent > [The stated intent paragraph from Step 2] @@ -91,16 +58,16 @@ Present the verdict in this structure: - Reviewer [label]: [model name], [N findings] (one bullet per reviewer) ### Act On -[Findings that should be addressed. For each: description, which models raised it, why it matters.] +[Each: description, which models raised it, why it matters.] ### Consider -[Findings worth thinking about. For each: description, which models raised it, tradeoff involved.] +[Each: description, which models raised it, the tradeoff.] ### Noted -[Valid but low-priority. Brief list.] +[Brief list.] ### Dismissed -[Rejected findings with brief rationale.] +[Each with a brief rationale.] ### Agreement Map -[Where did models agree, where did they diverge, and what does the pattern of agreement/disagreement tell us?] +[Where models agreed and diverged, and what that pattern tells us.] diff --git a/skills/interrogate/references/reviewer-prompt.md b/skills/interrogate/references/reviewer-prompt.md index 13a252b..ef7bff3 100644 --- a/skills/interrogate/references/reviewer-prompt.md +++ b/skills/interrogate/references/reviewer-prompt.md @@ -12,7 +12,7 @@ The author's stated intent for this change: > {INTENT} -You are reviewing whether the code achieves this intent well. Do NOT question the intent itself. Assume the goal is correct and challenge the execution. +Review whether the code achieves this intent well. Do NOT question the intent itself. Assume the goal is correct and challenge the execution. ## Code Under Review @@ -38,23 +38,15 @@ For each finding, provide: - `nit`: Style, naming, minor improvement. 2. **Finding**: What the problem is, in concrete terms. Reference specific lines/functions. 3. **Evidence**: Why you believe this is a problem. Show your reasoning. Don't just assert. -4. **Suggestion** (optional): What you'd do instead, if you have a concrete alternative. Skip this if you don't have a clear fix. +4. **Suggestion** (optional): What you'd do instead, only if you have a concrete alternative. -## What Makes a Good Finding +A good finding references specific code, not vague concerns ("this could be better"). It distinguishes between "this is broken" and "I would have done this differently". It considers the stated intent. A finding that ignores the context of what's being built is a bad finding. -- It references specific code, not vague concerns ("this could be better") -- It explains WHY something is a problem, not just THAT it is -- It distinguishes between "this is broken" and "I would have done this differently" -- It considers the stated intent. A finding that ignores the context of what's being built is a bad finding - -## What to Avoid - -- Restating what the code does without identifying a problem -- Praising the code. You're an adversary, not a cheerleader. If you find nothing wrong, say "no findings" and stop. +Do not restate what the code does without identifying a problem. Do not praise the code. If you find nothing wrong, say "no findings" and stop. An empty review is a valid outcome. ## Output -Return your findings as a structured list. If you have zero findings, say so. An empty review is a valid outcome. +Return your findings as a structured list: ``` ## Findings diff --git a/skills/interrogate/references/rubric.md b/skills/interrogate/references/rubric.md index 2d92f1b..8dab195 100644 --- a/skills/interrogate/references/rubric.md +++ b/skills/interrogate/references/rubric.md @@ -1,6 +1,6 @@ # Review Rubric -Review through whichever lenses are relevant. Not every lens applies to every change. Use judgment. +Review through whichever lenses are relevant. Not every lens applies to every change. ## Correctness @@ -10,8 +10,8 @@ Does the code actually do what the intent says it should? - Error handling: are errors caught, propagated, or silently swallowed? - Off-by-one, type coercion, integer overflow, string encoding - State management: race conditions, stale closures, dangling references -- Does the happy path work? Does the sad path work? -- Idempotency: what happens if this operation runs twice, or if a previous run crashed halfway? If the answer is "it depends on what state was left behind," there's a missing reconciliation step. +- Do both the happy path and the sad path work? +- Idempotency: what happens if this operation runs twice, or if a previous run crashed halfway? If the answer is "it depends on what state was left behind," a reconciliation step is missing. - Concurrency: if multiple actors can touch the same mutable state (files, branches, shared data), is access serialized structurally (locks, sequential phases, exclusive ownership), or by conventions that won't hold? When you find a potential bug, trace the execution path. Don't just flag "this could be nil". Show the call chain that makes it nil. @@ -20,12 +20,12 @@ When you find a potential bug, trace the execution path. Don't just flag "this c Is the code fixing the actual problem or papering over a symptom? -Answering this often requires looking beyond the changed files. Read the surrounding code (callers, callees, type definitions, sibling modules) and understand the architecture the change lives in. Use the tools available to you (Read, Grep, Glob) to explore. Follow the call chain. Read the types. Understand why the code exists before judging whether the change addresses the right layer. +Answering this often requires looking beyond the changed files. Read the surrounding code (callers, callees, type definitions, sibling modules) and understand the architecture the change lives in. Use the tools available to you (Read, Grep, Glob) to follow the call chain, read the types, and understand why the code exists before judging whether the change addresses the right layer. - Guard clauses that mask a deeper invariant violation - Retry logic that hides a broken contract - Type casts that silence a modeling error -- If you see a workaround, ask: why is the workaround needed? What would a proper fix look like? +- A workaround: why is it needed? What would a proper fix look like? - A fix in module A that should really be a fix in module B's contract - Instructions where structure would be better: if the fix is a comment saying "don't do X" or a convention someone has to remember, ask whether it could instead be a type constraint, a lint rule, or a runtime check that makes the wrong thing impossible @@ -36,8 +36,8 @@ Does the code fit well into the system it's part of? - Boundary discipline: is validation at system boundaries, or scattered through business logic? Validate data once where it enters the system, then trust it internally. - Abstraction level: is the code mixing high-level orchestration with low-level detail? - Coupling: does this change introduce dependencies that will make future changes harder? -- Data model fit: do the data structures match the actual access patterns? The right structure makes downstream code obvious. The wrong one fights you at every turn. -- Bolted-on vs. integrated: was the change patched onto the existing design, or does it read as if the design always accounted for it? If the new requirement had been known from the start, would the code look like this? +- Data model fit: do the data structures match the actual access patterns? +- Bolted-on vs. integrated: if the new requirement had been known from the start, would the code look like this, or does the change feel patched onto the existing design? - Legacy dual-paths: does the change introduce a new API while keeping the old one alive? If there are no external consumers, migrate callers and delete the old path in the same wave. Don't leave compatibility layers that will become permanent. Don't penalize simple code for lacking abstraction. Premature abstraction is worse than duplication. @@ -65,7 +65,7 @@ Is the complexity justified by what the code accomplishes? - Obsolete compatibility paths kept alive for transitional stability that's no longer needed. If the migration is done, delete the scaffolding - Does the user experience justify the complexity? Every feature, control, and option should earn its place. Half-finished features are worse than missing ones. -Simpler is better unless simpler is wrong. Three lines of duplication beat a premature abstraction. +Simpler is better unless simpler is wrong. ## Security diff --git a/skills/ketchup/SKILL.md b/skills/ketchup/SKILL.md new file mode 100644 index 0000000..2936f65 --- /dev/null +++ b/skills/ketchup/SKILL.md @@ -0,0 +1,22 @@ +--- +name: ketchup +description: "Catch the user up on everything in this chat since their last message, in plain words. Give each action item an executive summary with enough context to make the call. Use for $ketchup." +--- + +# Ketchup + +Catch the user up on everything in this chat since the last message they wrote before `$ketchup`. Notifications and subagent results are not their messages. Write in the plain voice of [`$bro`](../bro/SKILL.md), and skip its restating step. Assume the user remembers their last message and nothing after it. Call each PR, branch, or agent by a name they would know, not by a label you invented during the work. + +## Gather what changed + +Keep this turn read-only. Collect your own work since that message, reports from subagents, and messages from anyone else in this chat. Check the current state of each PR, CI run, or agent this chat touched. Say which are still running and which you could not check. + +An action item is a decision or step only the user can take, such as a product choice, an approval, an irreversible action, or access you lack. Include any still waiting on the user, even one raised before their last message. Work you can still do yourself is not an action item. + +## Write the reply + +Open with one sentence that says how many action items there are, or that there are none. If nothing happened and nothing waits on the user, say so and stop. + +Then say what happened, most important first. Give each result and what it means for the user. Skip steps that changed nothing. Name in one line any work left that you can do yourself. + +Then give each action item a short executive summary. Cover the decision to make, why it matters now, the options and what each costs, your recommendation, and what happens if the user does not answer. If you do not know a part, say so instead of guessing. Link to the detail when there is one, and write the summary so the user can decide without opening it. diff --git a/skills/ketchup/agents/openai.yaml b/skills/ketchup/agents/openai.yaml new file mode 100644 index 0000000..5b1f887 --- /dev/null +++ b/skills/ketchup/agents/openai.yaml @@ -0,0 +1,2 @@ +policy: + allow_implicit_invocation: false diff --git a/skills/maintain-verification-skill/LICENSE b/skills/maintain-verification-skill/LICENSE deleted file mode 100644 index 6b54002..0000000 --- a/skills/maintain-verification-skill/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Lauren Tan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/skills/no-comments/LICENSE b/skills/no-comments/LICENSE deleted file mode 100644 index 6b54002..0000000 --- a/skills/no-comments/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Lauren Tan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/skills/poteto-help/SKILL.md b/skills/poteto-help/SKILL.md new file mode 100644 index 0000000..5061bc3 --- /dev/null +++ b/skills/poteto-help/SKILL.md @@ -0,0 +1,147 @@ +--- +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." +--- + +# 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 `$poteto-mode` can be invoked for each new 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 skills, which the user may not be able to open, so give the user the file's public copy: `https://github.com/BramVR/mac-agent-scripts/blob/main/` followed by its repository path. If the file has no public copy yet, link the local file you read. + +## 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 `${CODEX_HOME:-$HOME/.codex}/skills/poteto-mode/references/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. + +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. From the agent-scripts checkout, run `scripts/sync-skills --dry-run`, then `scripts/sync-skills`. +2. Run [`$setup-pstack`](../setup-pstack/SKILL.md). It asks for a reasoning budget, maps a model to each role, and writes the role file the routed skills read. +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. The explicit-only skills load when the user names them. The [README](../../README.md) and [guide page 1](../../docs/pstack/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 a cheaper model. A shorter panel list runs fewer subagents, one for each entry. Save `$poteto-mode` for work that needs rigor. + +This port uses Codex collaboration agents with per-role models and separate reasoning efforts. Use `$poteto-mode` for each new task, `/goal` for persistent work when the build supports it, and Codex app heartbeat automations for scheduled follow-ups when their tools are available. + +## 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. Read [`references/prompting.md`](references/prompting.md) before you help word one. [Guide page 2](../../docs/pstack/02-poteto-mode.md) has examples. + +Start each new task with `$poteto-mode`. Mid-chat, "new task" makes the mode match a fresh playbook. `$poteto-mode` already uses the `poteto-agent` instructions for the subagents its playbook steps spawn. To get the same style from a subagent of your own, resolve the installed `poteto-mode` skill's `references/poteto-agent.md` to an absolute path and pass it in the brief; Codex has no `subagent_type` field. Link [Codex's skills docs](https://developers.openai.com/codex/skills) when invocation comes up. + +## 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) | +| 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 everything in this chat since their last message, with enough context to decide each action item | [`$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, as collaboration agents | [`$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) | +| 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 installed local skills in this Codex setup. +- `/goal` is the persistent-goal command when the Codex build supports it. `skill-creator` is the Codex skill-authoring skill. Scheduled follow-ups use app automations when their tools are available. +- pstack has no `$orchestrate` skill. Orchestrate is a `$poteto-mode` playbook. + +## 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. + +Without `$poteto-mode`, a phrase such as "babysit this pr" can start another installed skill for the same job instead. The Playbooks section of [`poteto-mode`](../poteto-mode/SKILL.md) lists every playbook and when it applies. [Guide page 6](../../docs/pstack/06-verify-and-ship.md) covers opening, babysitting, and landing a PR. + +pstack has no planning skill. Codex's 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-` still loads one on demand. [Guide page 8](../../docs/pstack/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`. | +| 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 | Check the role file from `$setup-pstack`; the routed skills read it when they run. | +| Runs cost more than expected | See the cost paragraph under Get set up. | +| A skill didn't load on its own | Explicit-only skills load when the user types them or when `$poteto-mode` reads them, and it doesn't run every skill. | +| Parallel agents overwrote each other | Give each independent attempt its own worktree. Codex collaboration agents share the parent checkout unless their briefs point to separate worktrees. | +| An overnight run moved but finished nothing | `/goal` needs a check that can pass or fail, not a duration. See [guide page 7](../../docs/pstack/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/pstack/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 ` 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/pstack/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. diff --git a/skills/poteto-help/agents/openai.yaml b/skills/poteto-help/agents/openai.yaml new file mode 100644 index 0000000..5b1f887 --- /dev/null +++ b/skills/poteto-help/agents/openai.yaml @@ -0,0 +1,2 @@ +policy: + allow_implicit_invocation: false diff --git a/skills/poteto-help/references/prompting.md b/skills/poteto-help/references/prompting.md new file mode 100644 index 0000000..a449cf1 --- /dev/null +++ b/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 `/goal` 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/skills/poteto-help/references/recipes.md b/skills/poteto-help/references/recipes.md new file mode 100644 index 0000000..92e7a22 --- /dev/null +++ b/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