Skip to content

0xrsydn/pstack-pi / skills/poteto-mode

poteto-mode

Verified

poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.

FileKindSize
SKILL.mdskill md19.5 KB
playbooks/authoring-a-skill.mdmarkdown991 B
playbooks/autonomous-run.mdmarkdown2.0 KB
playbooks/autopilot-full.mdmarkdown5.0 KB
playbooks/autopilot-stack.mdmarkdown4.5 KB
playbooks/babysit.mdmarkdown8.0 KB
playbooks/bug-fix.mdmarkdown2.6 KB
playbooks/eval.mdmarkdown3.0 KB
playbooks/feature.mdmarkdown2.9 KB
playbooks/hillclimb.mdmarkdown4.4 KB
playbooks/investigation.mdmarkdown1.1 KB
playbooks/multi-phase-plan.mdmarkdown11.0 KB
playbooks/opening-a-pr.mdmarkdown3.3 KB
playbooks/orchestrate.mdmarkdown17.0 KB
playbooks/pause-safely.mdmarkdown1.5 KB
playbooks/perf-issue.mdmarkdown3.4 KB
playbooks/prototype.mdmarkdown2.5 KB
playbooks/refactoring.mdmarkdown3.9 KB
playbooks/runtime-forensics.mdmarkdown1.4 KB
playbooks/session-pickup.mdmarkdown2.1 KB
playbooks/shipping.mdmarkdown4.0 KB
playbooks/trace-forensics.mdmarkdown2.0 KB
playbooks/visual-parity.mdmarkdown1.3 KB
playbooks/worktree-cleanup.mdmarkdown2.7 KB
references/bugbot-triage.mdmarkdown9.5 KB
scripts/bootstrap.tsscript1.7 KB
scripts/bun.lockother6.5 KB
scripts/check-plan.mjsexecutablescript8.0 KB
scripts/check-plan.test.tsscript3.8 KB
scripts/orch/orch.test.tsscript18.0 KB
scripts/orch/orch.tsexecutablescript15.1 KB
scripts/orch/store.tsscript41.9 KB
scripts/package.jsonmanifest371 B
scripts/watch-pr/cli.test.tsscript6.0 KB
scripts/watch-pr/cli.tsscript6.8 KB
scripts/watch-pr/fakes.test-helper.tsscript3.3 KB
scripts/watch-pr/github.test.tsscript15.8 KB
scripts/watch-pr/github.tsscript25.0 KB
scripts/watch-pr/policy.test.tsscript14.4 KB
scripts/watch-pr/policy.tsscript24.8 KB
scripts/watch-pr/render.tsscript6.9 KB
scripts/watch-pr/tsconfig.jsonconfig270 B
scripts/watch-pr/types.compile.tsscript2.2 KB
scripts/watch-pr/types.tsscript12.4 KB
scripts/watch-pr/watch-prexecutablescript211 B
scripts/worktree-audit.shexecutablescript6.2 KB

playbooks/refactoring.md

View on GitHub
### Refactoring

**You own the contract. The structure changes; the behavior does not.** For "refactor", "rename", "extract", "inline", "dedupe", "restructure", "move this module", "tidy up this area". Distinct from Feature, which adds behavior, and Bug fix, which corrects it.

A refactor that smuggles in a behavior change loses its safety net. If the cleanup reveals a missing feature or a real bug, split it out and ship the structural change first against the pinned contract. A redesign is allowed, but name it and route to Feature. Large or cross-cutting structural work (a migration across many call sites, a coordinated reshape of many subsystems) belongs to the **figure-it-out** skill; this playbook is the focused-to-medium change.

1. Pin the behavior contract first. Run the **how** skill over the affected subsystem to learn the contract, then write a characterization test, snapshot, or equivalence harness that captures current behavior before any structure moves. The harness makes "refactor" a checkable claim (**principle-prove-it-works**). If the area has no coverage, write the pin before touching structure. Type check and lint are not a pin.
2. Name the structure the code is missing per **principle-model-the-domain**: a state machine over scattered booleans, a table or registry over spread-out branching, a typed model over repeated shape assumptions, a reducer over ad hoc mutations. Boring code stays when the shape is already clear and local; the reshape must delete branches or invalid states, not add indirection.
3. Name the target shape. State what the module layout, types, and call graph should be if built today (**principle-foundational-thinking**, **principle-redesign-from-first-principles**). If the target crosses a function boundary, run the **architect** skill for parallel design exploration of the shape before the move.
4. Subtract before you add. Delete dead weight, collapse one-caller wrappers, drop redundant validators, and remove orphan references before introducing the new shape (**principle-subtract-before-you-add**). The smallest change that reaches the target shape ships (**principle-laziness-protocol**). A speculative cleanup that "might help" gets reverted, not left to ride.
5. Move in small behavior-preserving steps, each keeping the pin green. For API reshapes, migrate every caller and delete the old API in the same wave (**principle-migrate-callers-then-delete-legacy-apis**). No compatibility shims, no parallel old-and-new paths. Spot-check every rename against the actual files; renames silently miss usages in strings, prose, and back-references. Delegate the mechanical edits through `pstack_task` with `role: "feature-refactoring"` and a specific scope (file paths, the names being moved, the behavior to hold); review the diff yourself.
6. Prove behavior is unchanged on the real artifact, not "it compiles" (**principle-prove-it-works**). For larger reshapes, run an equivalence check: a script that diffs old-vs-new outputs, a recorded baseline replayed against the new code, or a smoke run on the matching surface via the relevant control skill. Own the verification yourself; do not trust a delegate's "looks good" summary.
7. Confirm the change earns its place. The success measure is reduced reader load (**principle-minimize-reader-load**): fewer layers between question and answer, less hidden state, fewer indirections without a second consumer. If the diff does not lower reader load somewhere, revert it.
8. Rebase into small ordered commits that tell the story. A subtraction commit, then the reshape, then any follow-on cleanup, so a single revert undoes one slice. Shape them with the **sequence-verifiable-units** principle skill, so each behavior-preserving slice stays green before the next. Run **Opening a PR**.

**Reply:** the structure that changed, the pin you held it against, the equivalence proof, the reader-load delta, what shipped and what got reverted. No new behavior.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall