Copy this first
/pstack:poteto-mode add a --json flag. text output stays byte-identical. verify both forms.This is the example from pstack’s own docs. It has three parts:
- What you want: a
--jsonflag. - What must not change: the text output. It compares the output before and after. One byte different means it failed.
- Verify both: so it doesn’t test only the new JSON and forget the old text.
The hard part is not breaking the old stuff. The new feature works, but the old output quietly changed. Put what must not change in the prompt, and it becomes something it checks.
A Chrome extension example
You want a new setting on the options page: which group the side panel shows when it opens. There was no such setting before. The side panel always showed “All.”
/pstack:poteto-mode Add a setting to the options page: which group to show by default when the side panel opens.
Before writing code, tell me how this setting will be stored in chrome.storage.sync.
What must not change: users who never set it still see "All" in the side panel, just like now. All other existing settings read back unchanged.
Verify both cases: a brand-new profile that never set it, and a profile set to the "Work" group.
Show me what's actually in chrome.storage.sync in both cases, plus a screenshot of the side panel when it opens.- Say how it’s stored first: you catch problems before any code. Maybe it wants a new key, and you want it inside the existing settings.
- Users who never set it see no change: they upgrade and touch nothing. That case breaks most easily.
- Two profiles: one pass-or-fail check for the old case, one for the new.
- Storage plus a screenshot: a UI that looks right isn’t enough. Check the value that was really saved.
Where to look after you send it
At the start: its restatement and the storage shape. It reads the code first, then says how it plans to store the setting. If that’s wrong, stop it right away.
At the end: evidence for both cases. Two sets of storage contents and screenshots. Anything it can’t verify is marked “inconclusive,” not passed.
See the design before it starts
When a change spans several files, it runs /pstack:architect on its own. By default it starts coding right after the design. To look first, send this:
/pstack:architect with checkpoint. Stop after the design and show it to me. Don't start until I agree.Stuck?
It changed the old output format along the way.
Reply: “The original text output must not change. Show me the diff of the output before and after. It must be empty.” Next time, say what must not change in your first prompt.
It only verified the new feature, not the old behavior.
Add: “apply prove it works. Run the real command for both cases and paste the output.” prove it works means: show real results that it works. It’s the name of a pstack principle. Type it as is, and it knows what you mean. You get real output, not just “it compiles.”
Does a tiny feature need the whole design process?
Not always. When only one file changes, steps it doesn’t need are marked n/a or skip in the todo list, with a reason. If you disagree with a reason, say so.
It added features I didn't ask for.
Reply: “Only build the one setting I asked for. List your other ideas, but don’t build them.” Extra ideas belong in the reply, not in the code.