diff --git a/.claude/skills/sync-upstream/SKILL.md b/.claude/skills/sync-upstream/SKILL.md index 45d3549..eee069f 100644 --- a/.claude/skills/sync-upstream/SKILL.md +++ b/.claude/skills/sync-upstream/SKILL.md @@ -13,7 +13,8 @@ This repo is two branches. `upstream` is a verbatim mirror of `cursor/plugins/ps 2. **Mirror.** Run `scripts/sync-upstream.sh`. It fast-forwards `upstream` from `origin`, commits the new snapshot, and pushes it, or reports that nothing changed. If nothing changed, stop and say so. 3. **Read why.** `gh api --paginate 'repos/cursor/plugins/commits?path=pstack&per_page=100'` lists upstream's commits. Read down to the previously synced SHA, which the script printed. Read the messages of the new ones so the merge preserves poteto's intent, not just the text. 4. **Merge.** `git merge upstream`. Resolve each conflict per `references/translation.md`: take upstream's new substance and keep the port's translation of it. Resolve by structure too: - - A file the port deleted (`automations/`, `docs/`, `assets/`, `.cursor-plugin/`, `skills/make-bot-ui/`, `skills/setup-pstack/`, `skills/poteto-help/`) stays deleted. Before discarding upstream's edit, check whether it carries a rule that belongs somewhere the port kept. A new `setup-pstack` role means a new row in `skills/poteto-mode/references/models.md`. + - A file the port deleted (`automations/`, `docs/`, `assets/`, `.cursor-plugin/`, `skills/make-bot-ui/`, `skills/setup-pstack/`) stays deleted. Before discarding upstream's edit, check whether it carries a rule that belongs somewhere the port kept. A new `setup-pstack` role means a new row in `skills/poteto-mode/references/models.md`. + - `skills/poteto-help/` is rewritten for Claude Code, not mirrored. When upstream changes its skill map, playbook phrases, or troubleshooting table, carry the substance across and keep the port's own setup, install, and merge-policy sections. - `README.md` is the port's own. Keep ours, and add any new skill to its table. - A new `skills/principle-*/SKILL.md` moves to `skills/poteto-mode/principles/principle-*.md`, rewriting its relative links: `../principle-x/SKILL.md` becomes `./principle-x.md`, and `..//` becomes `../..//`. - A new skill or playbook gets ported, unless it only makes sense in Cursor. Then delete it and add it to the list above. diff --git a/.claude/skills/sync-upstream/references/translation.md b/.claude/skills/sync-upstream/references/translation.md index f6afa8e..5f62249 100644 --- a/.claude/skills/sync-upstream/references/translation.md +++ b/.claude/skills/sync-upstream/references/translation.md @@ -74,4 +74,4 @@ A sync must keep these even when upstream's line differs. - `skills/poteto-mode/scripts/merge-gate/` is port-only. It reuses watch-pr's readiness verdict without editing watch-pr, and adds the policy: allowed repos, human-only paths needing a human approval on the head, and head pinning with `--match-head-commit`. Every playbook merges only through it, and a refusal is final: human-only changes are the user's to merge. The policy lives outside git, and editing it is on poteto-mode's always-pause list. - `principle-never-block-on-the-human` narrows its force-push example to "force-push to a shared branch", matching poteto-mode's Autonomy. Autopilot owners force-push their own branches with a lease on every rebase. - models.md uses only `opus` and `sonnet`. `fable` is dropped for cost: every role that upstream maps to it, and every panel slot, goes to `opus` or `sonnet`. interrogate runs two reviewers (`opus`, `sonnet`), accepting that both share one family and give less independent review than a cross-family pair. -- `skills/poteto-help/` is deleted. It answers questions about Cursor setup (`/setup-pstack`, Custom Modes, the deleted `docs/guide/`), so the port's README does that job. +- `skills/poteto-help/` is rewritten, not ported line for line. Setup, Custom Modes, and the guide pages are replaced by `claude plugin` install and update, `models.md`, and the README's merge-policy section. Its skill map uses relative links, and the skill tells the model to give users the public GitHub URL. diff --git a/README.md b/README.md index 85f81d2..e07123c 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ You can also call the other skills directly: | `bro` | you want the last message restated in plain language | | `correct` | agents keep repeating the same mistake in a repo and each one should become impossible | | `benchmark-checklist` | you ran a benchmark and want the measurement vetted before you report it | +| `poteto-help` | you're new to pstack or unsure which skill fits. Type `/pstack:poteto-help` with a question | | `blast-radius` | a small-looking change might break something else | | `architect` | code crosses a function boundary and the caller's shape should be settled first | | `arena` | you want several parallel attempts at the same thing, then the best parts of each | @@ -72,7 +73,7 @@ Edit it for your repos. Both `defaults.humanOnly` and `repos` are required, and - **Claude models only.** Roles map to `sonnet` and `opus` in [`skills/poteto-mode/references/models.md`](skills/poteto-mode/references/models.md). Edit that file to change a role, and fork the repo to keep the edit, because `claude plugin update` overwrites the installed copy. It replaces `/setup-pstack`. - **Harness.** `Task` becomes the Agent tool, `readonly` becomes the `pstack:read-only` agent, `/deslop` becomes `/simplify`, `control-ui` and `control-cli` become `claude-in-chrome` and the `run` skill, and the Origin forge is gone in favor of `gh` and `gh stack`. - **My house rules.** A few defaults follow my own workflow instead of poteto's: `interrogate` gates every PR, agents ready their own PRs, and they merge only through `merge-gate` under a policy file you keep outside git (`~/.claude/pstack/merge-policy.json`). Comment cleanup never touches pre-existing comments. -- **Not shipped.** benny, make-bot-ui, setup-pstack, poteto-help, and the guide. They depend on Cursor. +- **Not shipped.** benny, make-bot-ui, setup-pstack, and the guide. They depend on Cursor. The full mapping is in [`.claude/skills/sync-upstream/references/translation.md`](.claude/skills/sync-upstream/references/translation.md). diff --git a/scripts/check-port.test.ts b/scripts/check-port.test.ts index 16b6580..288755f 100644 --- a/scripts/check-port.test.ts +++ b/scripts/check-port.test.ts @@ -2,6 +2,11 @@ import { describe, expect, test } from "bun:test"; import { findingsFor } from "./check-port"; describe("findingsFor", () => { + test("ignores a link inside a fenced block", () => { + const text = "```md\n[x](../nope/SKILL.md)\n```\n[y](../nope/SKILL.md)"; + expect(findingsFor("skills/how/SKILL.md", text).map((f) => f.line)).toEqual([4]); + }); + test.each([ ["skills/x/SKILL.md", "Write `~/.cursor/rules/pstack-models.mdc`.", "cursor-path"], ["skills/x/SKILL.md", "Cursor's built-in plan mode.", "cursor-brand"], @@ -27,6 +32,10 @@ describe("findingsFor", () => { ["skills/how/SKILL.md", "Read `${CLAUDE_SKILL_DIR}/references/missing.md`.", "unresolved-skill-path"], ["skills/how/SKILL.md", "Read `${CLAUDE_SKILL_DIR}/../nope/SKILL.md`.", "unresolved-skill-path"], ["skills/x/SKILL.md", 'Spawn `subagent_type: "pstack:no-such-agent"`.', "unresolved-pstack-name"], + ["skills/how/SKILL.md", "See [the missing one](../nope/SKILL.md).", "unresolved-link"], + ["skills/poteto-mode/principles/principle-laziness-protocol.md", "Distinct from [x](../principle-build-the-lever/SKILL.md).", "unresolved-link"], + ["skills/how/SKILL.md", 'See [x](../nope/SKILL.md "title").', "unresolved-link"], + ["README.md", "See [x](skills/nope/SKILL.md).", "unresolved-link"], ["skills/poteto-mode/references/models.md", "| interrogate reviewers | `opus`, `fable` |", "fable-model"], ["skills/x/SKILL.md", 'Spawn with `model: "fable"`.', "fable-model"], [".claude-plugin/plugin.json", ' "version": "0.15.4",', "plugin-version"], @@ -50,6 +59,12 @@ describe("findingsFor", () => { ["a pstack agent", "skills/x/SKILL.md", 'Use `subagent_type: "pstack:read-only"`.'], ["a pstack skill", "README.md", "Run /pstack:poteto-mode."], ["a pstack skill in prose", "skills/x/SKILL.md", "Route through `pstack:poteto-mode`."], + ["a link to a sibling skill", "skills/how/SKILL.md", "See [teach](../teach/SKILL.md)."], + ["a link in inline code", "skills/how/SKILL.md", "Write `[x](../nope/SKILL.md)` like so."], + ["a link with an anchor", "skills/how/SKILL.md", "See [teach](../teach/SKILL.md#usage)."], + ["a web link", "skills/how/SKILL.md", "See [docs](https://example.com/a/b.md)."], + ["an in-page anchor", "skills/how/SKILL.md", "See [below](#step-1)."], + ["a principle link", "skills/poteto-mode/principles/principle-laziness-protocol.md", "See [x](./principle-build-the-lever.md)."], ["a version field elsewhere", "skills/poteto-mode/scripts/package.json", ' "version": "1.0.0",'], ])("allows %s", (_, path, line) => { expect(findingsFor(path, line)).toEqual([]); diff --git a/scripts/check-port.ts b/scripts/check-port.ts index ad4fe3a..6e50088 100644 --- a/scripts/check-port.ts +++ b/scripts/check-port.ts @@ -2,7 +2,7 @@ // Flags Cursor-isms the Claude Code port must translate, plus the port's own // invariants (see translation.md). Run before every commit and after every upstream merge. import { existsSync, readFileSync, readdirSync } from "node:fs"; -import { join } from "node:path"; +import { dirname, join } from "node:path"; const repoRoot = join(import.meta.dir, ".."); const principlesDirectory = join(repoRoot, "skills/poteto-mode/principles"); @@ -57,6 +57,23 @@ function unresolvedSkillPaths(path: string, text: string): string[] { .filter((relative) => !existsSync(join(repoRoot, skillDirectory, relative))); } +function unresolvedLinks(path: string, lineText: string): string[] { + if (!path.endsWith(".md")) return []; + return [...lineText.replace(/`[^`]*`/g, "").matchAll(/\]\(\s*]+)>?(?:\s+"[^"]*")?\s*\)/g)] + .map(([, target]) => target.replace(/#.*/, "")) + .filter((target) => target !== "" && !/^[a-z][a-z0-9+.-]*:/i.test(target) && !/[<*]/.test(target) && /\/|\.md$/.test(target)) + .filter((target) => !existsSync(join(repoRoot, dirname(path), target))); +} + +function insideFence(text: string): boolean[] { + let open = false; + return text.split("\n").map((lineText) => { + const fence = /^\s*```/.test(lineText); + if (fence) open = !open; + return open || fence; + }); +} + function unresolvedPstackNames(text: string): string[] { return [...text.matchAll(/\bpstack:([a-z][a-z-]*[a-z])/g)] .map(([, name]) => name) @@ -70,17 +87,21 @@ function unresolvedPrinciples(text: string): string[] { } export function findingsFor(path: string, text: string): Finding[] { - if (exemptFiles.test(path)) return []; + const exempt = exemptFiles.test(path); + const fenced = insideFence(text); return text.split("\n").flatMap((lineText, index) => { - const ruleHits = rules - .filter((rule) => (rule.paths?.test(path) ?? true) && !rule.exemptPaths?.test(path) && rule.pattern.test(lineText)) - .map((rule) => rule.name); - const referenceHits = [ - ...unresolvedPrinciples(lineText).map(() => "unresolved-principle"), - ...unresolvedSkillPaths(path, lineText).map(() => "unresolved-skill-path"), - ...unresolvedPstackNames(lineText).map(() => "unresolved-pstack-name"), - ]; - return [...ruleHits, ...referenceHits].map((rule) => ({ + const linkHits = fenced[index] ? [] : unresolvedLinks(path, lineText).map(() => "unresolved-link"); + const portHits = exempt + ? [] + : [ + ...rules + .filter((rule) => (rule.paths?.test(path) ?? true) && !rule.exemptPaths?.test(path) && rule.pattern.test(lineText)) + .map((rule) => rule.name), + ...unresolvedPrinciples(lineText).map(() => "unresolved-principle"), + ...unresolvedSkillPaths(path, lineText).map(() => "unresolved-skill-path"), + ...unresolvedPstackNames(lineText).map(() => "unresolved-pstack-name"), + ]; + return [...portHits, ...linkHits].map((rule) => ({ path, line: index + 1, rule, diff --git a/skills/poteto-help/SKILL.md b/skills/poteto-help/SKILL.md new file mode 100644 index 0000000..f39e6dc --- /dev/null +++ b/skills/poteto-help/SKILL.md @@ -0,0 +1,130 @@ +--- +name: poteto-help +description: Guides users through /pstack:poteto-mode and picking the skill, playbook, or principle for a task. Type /pstack:poteto-help with a question. +disable-model-invocation: true +--- + +# Poteto help + +Answer the user's question about pstack, hand them a prompt they can send, and link the file the answer came from. For a help question, don't start the work. The user asked how, and a pstack run spends real tokens, so let them send the prompt. + +A message that asks for work, such as "use pstack to fix this bug", is not a help question. Read [`poteto-mode`](../poteto-mode/SKILL.md) and do the work under it. + +This file maps questions to the skills that hold the answers. Those files own the details. Read the file you route to before you quote it, and trust it when it disagrees with this map. The links here point into the installed plugin, which the user may not be able to open, so give the user the file's public copy: `https://github.com/lucasheriques/pstack/blob/main/` followed by its path from the repo root, such as `skills/how/SKILL.md` or `skills/poteto-help/references/prompting.md`. + +## 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 `/pstack:poteto-mode` +- Pick a skill for a situation +- Fix a run that went wrong +- Make pstack my own + +If the project has no `verify-*` skill or other app harness, agents have no scripted way to drive the app. Mention `/pstack:create-verification-skill` when the question is about proving a change works. + +## Get set up + +1. Install with `claude plugin marketplace add lucasheriques/pstack`, then `claude plugin install pstack@pstack`. Update with `claude plugin marketplace update pstack`, then `claude plugin update pstack@pstack`, and restart Claude Code. +2. Check the requirements in the [README](../../README.md): `gh` for PR work, the `gh stack` extension for stacks, and `bun` for the helper scripts. +3. Start a real task with `/pstack:poteto-mode`, a goal, and a check that can pass or fail. + +Installing changes nothing until a skill runs. `poteto-mode` also switches on by itself for engineering work that matches a playbook. Offer to word their first prompt with them, per [`references/prompting.md`](references/prompting.md). + +To change which model a role uses, edit [`poteto-mode/references/models.md`](../poteto-mode/references/models.md). `claude plugin update` overwrites the installed copy, so fork the repo and install from the fork to keep an edit. Roles map to `opus`, `sonnet`, or `inherit`. If cost is the worry, say where the tokens go. pstack spends extra tokens on subagents and review panels. A role set to `sonnet` costs less than `opus`, and a shorter panel list runs fewer subagents, one for each entry. Save `/pstack:poteto-mode` for work that needs rigor. + +To let agents merge their own PRs, the user writes a policy at `~/.claude/pstack/merge-policy.json`. The README's "Letting agents merge" section has the format. Without it agents open ready PRs and never merge. + +## Start a task with `/pstack:poteto-mode` + +`/pstack: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. + +`poteto-mode` applies itself when a playbook matches or the task needs rigor, and stays out of casual turns. Invoke it again when the subject changes, so it matches a fresh playbook. Its subagents run as `pstack:poteto-agent`. To get the same style from a subagent of your own, spawn it with `subagent_type: "pstack:poteto-agent"`. + +## Pick a skill + +The default answer is `/pstack: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. + +| The user wants to | Skill | +|---|---| +| Do any non-trivial task with rigor | [`/pstack:poteto-mode`](../poteto-mode/SKILL.md) | +| Know how code works now, or where new code should live | [`/pstack:how`](../how/SKILL.md) | +| Know why code is shaped this way, or where a number came from | [`/pstack:why`](../why/SKILL.md) | +| Understand a change or subsystem, explained plainly | [`/pstack:teach`](../teach/SKILL.md) | +| Catch up on their own recent work on a topic | [`/pstack:recall`](../recall/SKILL.md) | +| Know what a small diff could break outside itself | [`/pstack:blast-radius`](../blast-radius/SKILL.md) | +| Settle types and module shape before code that crosses a function boundary | [`/pstack:architect`](../architect/SKILL.md) | +| Get several attempts at one brief, merged into the best one | [`/pstack:arena`](../arena/SKILL.md) | +| Run parallel checks over slices, or race workers | [`/pstack:swarm`](../swarm/SKILL.md) | +| Have different models review a diff and try to break it | [`/pstack:interrogate`](../interrogate/SKILL.md) | +| Fix a bug test-first when a cheap local test exists | [`/pstack:tdd`](../tdd/SKILL.md) | +| Apply TypeScript rules to `.ts` or `.tsx` work | [`/pstack:typescript-best-practices`](../typescript-best-practices/SKILL.md) | +| Strip comments before review, using a reviewer that didn't write them | [`/pstack:no-comments`](../no-comments/SKILL.md) | +| Clean AI tells out of prose | [`/pstack:unslop`](../unslop/SKILL.md) | +| Write docs, an RFC, a README, a PR description, or a commit message to a standard | [`/pstack:technical-writing`](../technical-writing/SKILL.md) | +| Hear the last reply again in plain words | [`/pstack:bro`](../bro/SKILL.md) | +| Give agents a scripted way to drive the app and prove behavior | [`/pstack:create-verification-skill`](../create-verification-skill/SKILL.md) | +| Bring a verification skill and its feature map back in line with the app | [`/pstack:maintain-verification-skill`](../maintain-verification-skill/SKILL.md) | +| Vet a performance number before reporting or acting on it | [`/pstack:benchmark-checklist`](../benchmark-checklist/SKILL.md) | +| Run a large or cross-cutting change, or one to review after stepping away | [`/pstack:figure-it-out`](../figure-it-out/SKILL.md) | +| Keep a decision log during a run, and review it afterward | [`/pstack:show-me-your-work`](../show-me-your-work/SKILL.md) | +| Turn their own working habits into a personal mode skill | [`/pstack:automate-me`](../automate-me/SKILL.md) | +| Turn what a finished task taught into skill edits | [`/pstack:reflect`](../reflect/SKILL.md) | +| Stop agents from repeating the same mistakes in this repo | [`/pstack:correct`](../correct/SKILL.md) | +| Find their way around pstack | `/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-*` files live under [`poteto-mode/principles/`](../poteto-mode/principles/) and are covered below. + +Close calls: + +- `/pstack:how` explains what the code does. `/pstack:why` explains the reasons. `/pstack:teach` runs one or both and explains the result plainly. +- `/pstack:arena` gives every worker the same brief and merges the best parts. `/pstack:swarm` splits work into slices or a race and returns one report. +- `/pstack:architect` implements right after it settles the design. Add "with checkpoint" to review the design before it writes code. +- `/pstack:interrogate` reviews the diff. `/pstack:blast-radius` looks for breakage outside the diff and proves the one fact that makes the change safe. +- `/pstack:recall` rebuilds context across recent chats. Resuming one specific chat or branch is the Session pickup playbook. +- `/pstack: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: `/loop`, `/simplify`, and `/run` are Claude Code built-ins. 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. Describing the task picks one. Phrases like these 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. +- An explicit instruction to land or merge, such as "land the stack", runs Shipping. +- Taking over a prior agent's work, such as "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. +- Testing how a skill or prompt change affects agent behavior runs Eval. + +The Playbooks section of [`poteto-mode`](../poteto-mode/SKILL.md) lists every playbook and when it applies. For work that spans phases or stacked PRs, asking 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 `/pstack:architect` settles it in code first. + +Principles are one-rule files 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." + +## Fix a run that went wrong + +| Symptom | Fix | +|---|---| +| The mode stopped applying after a few turns | It applies itself only when a playbook matches. Invoke `/pstack:poteto-mode` again at the start of the next task. | +| A question got treated as the next step of the last task | Invoke `/pstack:poteto-mode` again for the new subject, or say the turn doesn't need the mode. | +| A `models.md` edit disappeared | `claude plugin update` overwrites the installed copy. Fork the repo and install from the fork to keep an edit. | +| Runs cost more than expected | See the cost paragraph under Get set up. | +| A skill didn't run | Most skills run when the user types them or when `poteto-mode` runs them, and it doesn't run every skill. | +| Parallel agents overwrote each other | Give each agent its own worktree, with `isolation: "worktree"`. | +| An overnight run moved but finished nothing | Give `/loop` a stop condition that can pass or fail, not just an interval. | +| 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. | +| An agent can't merge | `merge-gate` refuses without a policy file, a passing CI run, and a repo entry. Its verdict names the reason. | + +For a run that drifts, [`references/prompting.md`](references/prompting.md) has one-line steers. + +## Make pstack my own + +- [`/pstack:automate-me`](../automate-me/SKILL.md) drafts a personal mode skill from the user's own history, to use alongside `poteto-mode`. +- [`/pstack:reflect`](../reflect/SKILL.md) after a session turns its lessons into skill edits the user approves. +- `/pstack: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. + +## 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/references/prompting.md b/skills/poteto-help/references/prompting.md new file mode 100644 index 0000000..fc1192a --- /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, `/pstack:recall` earlier work on the topic. Old chats hold context that the new agent lacks. +- Before a change to unfamiliar code, ask `/pstack:how` for the mechanics and `/pstack:why` for the reasons. An agent with no traced model fixes the symptom at the first plausible spot. +- Ask `/pstack: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. +- Invoke `/pstack:poteto-mode` again when the subject changes. Otherwise the mode treats the message as the next step. + +## Before stepping away + +- Say "im going to bed" or "im stepping away" so the agent stops asking. +- Write done as checks every iteration can run, and give `/loop` that predicate. +- Ask for a fresh worktree off a named base. +- Pre-answer what the agent would stop for, such as "don't ask me before committing". +- Ask for a decision log to audit later. +- Give an exit: "if you're truly stuck after a few hours, stop and write up why". + +## Steer in one line + +- Restate the goal: "i said the goal is to repro. i did not ask for a fix yet." +- Name the principle: "apply prove it works. show me the real output, not the build log." +- A principle name works because the agent already read the rule. Its reply names the decision the rule changed. diff --git a/skills/poteto-help/references/recipes.md b/skills/poteto-help/references/recipes.md new file mode 100644 index 0000000..595f918 --- /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 + +- `/pstack:poteto-mode read . restate the underlying issue in your own words, in plain english.` +- `/pstack:poteto-mode investigate why . give me what we know, what data you used, and your best hypotheses. don't change any code yet.` +- `/pstack:poteto-mode understand with how, then find out with why why it broke recently.` +- `/pstack:recall my work on from last week, then read .` +- `/pstack:teach me why you implemented it this way and not . what did you trade off?` +- `/pstack:poteto-mode take over this branch. read the decision log, find what's done, and continue. don't redo finished work.` + +## Build + +- Bug: `/pstack:poteto-mode . repro first, then fix and verify.` +- Bug in an app: `/pstack: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: `/pstack:poteto-mode repro first. if there's a cheap test path, /pstack:tdd it. then fix and rerun.` +- Feature: `/pstack:poteto-mode add . stays byte-identical. verify both.` +- Refactor: `/pstack:poteto-mode move into one module, zero behavior change. record the current output first and prove it's unchanged after.` +- Perf: `/pstack:poteto-mode takes