pstack-skill
Rigorous engineering orchestrator ported from Lauren Tan's pstack (poteto-mode): reads your task, picks one of 23 playbooks (bug fix, feature, refactoring, perf, investigation, prototype, babysit, shipping, autonomous run, orchestrate, and more), routes to bundled procedures (how
Install
npx skills add https://github.com/fabricioctelles/skills/tree/main/skills/pstack-skill
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install fabricioctelles-skills@llmmart
git clone https://github.com/fabricioctelles/skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole fabricioctelles/skills collection as a plugin from our marketplace. Git is the plain clone.
README
👑 pstack-skill
Lauren Tan's rigorous engineering workflow —
poteto-modeand the whole pstack stack — as one self-contained skill. No plugin marketplace, no Cursor required, no vendor lock-in. Drop the folder in any agent that reads skills.sh-format skills.
Catálogo 1.6. 23 playbooks, 31 procedures e 24 princípios de engenharia.
Ported from pstack by Lauren Tan (@poteto), informed by open-pstack. MIT-licensed; all credit for the method is hers.
The idea
There is a growing sense that AI writes too much slop code. Throughput without quality is not a goal. If you want to go fast, go deep first.
This skill turns a coding agent into a disciplined engineering team. It is not a model or a hosted service — it gives your agent engineering rules, step-by-step workflows, focused procedures, and small local tools. Give it a task in plain language and it will:
- read the task and pick the workflow that fits (one of 23 playbooks);
- learn how the current system works before changing it (
how/why); - compare competing designs before committing when the choice matters (
architect/arena); - favor the smallest change that solves the problem;
- have several models try to break important decisions before shipping (
interrogate/peer); - run the code and check real behavior instead of stopping at "the tests pass";
- carry work through review, CI, and a ready-to-merge PR when asked (
babysit/shipping).
The skill is sticky: once invoked it stays on across turns, applying itself when rigor is needed and staying out of the way otherwise. Opt out any time by saying so.
Plugin vs this skill
| pstack plugin | pstack-skill | |
|---|---|---|
| Install | /add-plugin pstack, marketplaces |
one folder, any agent |
| Platform | Cursor and a generated Claude Code adapter | Claude Code, Codex, Cursor, opencode, Kiro, anything reading SKILL.md |
| Models | harness-specific model IDs | roles bound to whatever you have: worker, builder, judge, peer |
| Stacks & merges | one owner per PR, forge CLI | plain git + available forge CLI, isolated worktrees |
| Multi-model panels | native cloud fan-out | same gates, sequential fresh-context passes when only one model exists |
Ferramentas específicas do Cursor são adaptadas para os recursos disponíveis no agente. As dependências e os limites do porte estão descritos nos procedimentos e na seção Versão 1.6.
Install
Via skills.sh:
npx skills add https://github.com/fabricioctelles/skills -s pstack-skill
Or manually, copy the folder into your agent's skills directory:
cp -r skills/pstack-skill .claude/skills/ # or .cursor/skills/, .kiro/skills/, ~/.agents/skills/...
Get started
Two steps, like upstream:
1. Configure models and reasoning budget (optional, once). Ask your agent:
Use pstack-skill's setup procedure to configure model roles and pick a reasoning budget.
It detects what you can actually run, asks for a budget (unlimited / large / medium / small), remaps effort tokens when your bindings carry them, proposes bindings for the four roles, asks before writing .agents/pstack-models.md, and validates every slug against what is runnable. Skip it and everything falls back to your single best model, gracefully.
2. Start tasks that need rigor with the skill invoked.
Claude Code / opencode: /pstack-skill fix the scroll drift on this PR, repro first
Codex / Cursor / Kiro: Use pstack-skill. Add saved filters to search. Keep it
simple, verify in the real app, open a PR.
That is the main workflow. The other procedures fire as the playbook needs them, or can be called directly ("run interrogate on this diff").
Use cases
Every playbook is a file under playbooks/; the agent copies its steps verbatim onto a todolist. Where to point it:
Understand before touching
/pstack-skill how does the rate limiter work? do we have an n+1?
Investigation, how, why, recall (rebuild recent context), teach, blast-radius (what could this small change break).
Build features the right way
Use pstack-skill: build saved filters behind a flag. Name the data shape first, verify in the real app.
Feature, Prototype (settle design forks by building throwaways, not asking), Refactoring (behavior pinned by characterization tests), Visual parity (pixel-diff driven), Multi-phase plan.
Fix things scientifically
/pstack-skill this list takes seconds to load even virtualized. trace it, don't guess.
Bug fix (repro → binary-search root cause → failing-test-first fix), Perf issue (baseline trace, eight strategy families, measured delta), Hillclimb (sustained metric improvement, one hypothesis per iteration, keep-or-revert), Runtime/Trace forensics (leaks, spins, cpuprofiles — diagnosis as deliverable).
Ship and maintain PRs
pstack-skill, check on PR 123 — anything outstanding? then land the stack if green.
Babysit (drive PRs to merge-ready: conflicts, threads, flaky CI), Shipping (verify each PR independently, land only the contiguous verified run), Autopilot-full / Autopilot-stack (queues of PRs with one owner each; only dependent PRs stack; the operator lands Autopilot-stack PRs), Opening a PR (conventional commits, evidence-bearing descriptions).
Run long, unattended, auditable
/pstack-skill i'm going to bed. drive the migration until done, leave a trail i can audit at breakfast.
Autonomous run (exit predicate, wake mechanisms, checkpoints), Orchestrate (multi-day programs: native agents, one owner per PR, durable TSV/Markdown records), Session pickup / Pause safely (resume or suspend cleanly), show-me-your-work (append-only TSV decision trail with cross-review).
Quality gates
run interrogate on this diff before we ship it.
Interrogate (adversarial review with findings proved by a run), Arena (N candidates, pick base, graft best), Swarm (parallel coverage/races), unslop + technical-writing + no-comments (prose and diff hygiene), TDD (failing test first when cheap).
Agent tooling
Authoring-a-skill, Eval (blind candidate testing), figure-it-out (designs a bespoke rigorous playbook when none fits), create/maintain verification skill (a scripted way to prove real app behavior, any platform), Worktree cleanup (disk reclaim, safety-gated).
Model roles
Delegations never name vendors. Four role slugs, each with a capability contract, bound once via config:
| Role | Contract | Typical work |
|---|---|---|
worker |
fast, cheap instruction-following | mechanical edits, explorers, swarm workers |
builder |
strongest instruction-follower, long context | specified implementation (feature, refactoring, bug fix, perf, hillclimb) |
judge |
deepest reasoning, calibrated prose | synthesis, reviews, cross-judging |
peer |
strong reasoner from a different family than judge | panel diversity, second opinions |
Bindings live in .agents/pstack-models.md (project) or ~/.agents/pstack-models.md (user). Setup may also write a # budget: line. Example:
# budget: unlimited (max)
worker: grok-4-fast
builder: codex:gpt-5.6-high # prefix = alternative CLI/harness
judge: claude:opus-5-thinking
peer: gemini:3.1-pro # family must differ from judge
Os slugs acima são exemplos de formato. Configure apenas modelos confirmados como disponíveis na sessão. Os playbooks usam papéis portáteis, sem exigir um modelo ou fornecedor específico.
One model available? All four collapse to it and panels become sequential independent passes on fresh context. Gates are downgraded in execution, never skipped.
The principles
Twenty-four short rules the orchestrator indexes and cites by name. Full text in references/principles.md.
Core: laziness protocol · foundational thinking · redesign from first principles · attack the premise · subtract before you add · minimize reader load · outcome-oriented execution · experience first · exhaust the design space · build the lever. Architecture: model the domain · boundary discipline · type system discipline · make operations idempotent · migrate callers then delete legacy APIs · separate before serializing shared state. Verification: prove it works · fix root causes · sequence work into verifiable units · test behavior, not implementation · explain the number. Delegation: guard the context window · never block on the human. Meta: encode lessons in structure.
Layout
pstack-skill/
├── README.md ← instalação, uso, versão e manutenção
├── SKILL.md ← the orchestrator (agent entry point)
├── UPSTREAM_COMMIT ← last reviewed commit from cursor/plugins
├── playbooks/ ← 23 workflows, steps copied verbatim onto todolists
├── references/
│ ├── principles.md ← full text of the 24 principles
│ ├── bugbot-triage.md ← skeptical triage of bot-review comments
│ ├── harness/ ← per-harness name mappings (claude-code.md)
│ ├── upstream-review-*.md ← decisões, segurança e validação do porte
│ └── skills/ ← 31 bundled procedures (how, arena, unslop, sharpen, statechart, create-formal-verification-skill...)
└── scripts/
├── check-upstream.sh ← manual upstream update check
├── check-plan.mjs ← multi-phase plan checklist validator
├── check-plan.test.mjs ← regressões do validador de planos
├── log.sh ← decision-log helper (TSV, formula-safe)
├── statechart/ ← compilador TLA+ → Mermaid (TypeScript, Node/Bun/Deno, TLC via Java)
└── worktree-audit.sh ← disk reclaim audit
Versão 1.6
Porte revisado contra cursor/plugins/pstack em c742dd61706fbacc1b95f1a20b7b988cf096ce6c (27/10/2026). O registro completo está em Revisão upstream. UPSTREAM_COMMIT continua em eb4db2b até o reconhecimento humano pelo comando accept.
- Statechart. O compilador TypeScript substitui os scripts
.mjs. Um comando checa TLA+ com TLC, gera Mermaid e relata caminhos mínimos. Usescripts/statechart/statechart SPEC.tla --out NOVA-PASTA. O launcher escolhe Node 22.18 a 22.x, Node 23.6+, Bun 1.1.5+ ou Deno 2+. DefinaTLA2TOOLSe, se necessário,JAVA. Não instala dependências automaticamente. Consulte statechart para saídas e migração dos comandos antigos. - Ketchup video. ketchup-video gera uma atualização em slides legendados com um renderizador disponível, como FFmpeg. Não exige serviço de geração de vídeo ou outra skill. Sem renderizador, entrega as decisões pendentes em texto.
- Orchestrate. Usa agentes nativos ou execução sequencial, com registros em TSV e Markdown. Não depende de Task ou Project tracker do Cursor nem de scripts
orch. - Objetivo e revisão. O objetivo reaparece na primeira mensagem, briefs, PRs e relatórios finais. Interrogate mantém somente achados comprovados por execução. Autopilot-stack entrega PRs verificados ao operador e só empilha os dependentes.
- Correções. Swarm, mtime GNU/BSD, delimitadores de código inline e destino das edições de reflect foram alinhados. A nota do Claude Code distingue o auto-update do plugin upstream da manutenção desta pasta.
Manutenção do porte
Execute a verificação manual quando quiser saber se cursor/plugins alterou a pasta pstack/:
./scripts/check-upstream.sh
O comando compara o upstream com o SHA salvo em UPSTREAM_COMMIT. Quando há mudanças, ele lista os commits e arquivos pendentes e termina com status 10. Mudanças fora de pstack/ não geram alerta.
A presença de um commit pendente não significa que ele deva ser copiado. Gere um prompt contextualizado para uma LLM avaliar a intenção da mudança e decidir entre adotar, adaptar ou rejeitar:
./scripts/check-upstream.sh review-prompt
O prompt preserva o contrato da versão portátil e inclui os commits, arquivos pendentes, comandos de evidência e uma tabela de decisão. A LLM pode adaptar os itens aprovados, mas não deve avançar a referência.
Depois de revisar e validar o porte, reconheça o SHA exibido pelo verificador:
./scripts/check-upstream.sh accept <commit>
O comando accept só aceita o commit mais recente que alterou pstack/. Ele não copia nem modifica os arquivos portados; apenas registra que aquela versão foi avaliada.
License
MIT, like upstream. pstack was created by Lauren Tan; this adaptation translates Cursor-specific mechanics (plugins, cloud agents, Graphite, /loop) to platform-agnostic equivalents and repackages everything as one portable skill.
Skill manifest
Pstack
An orchestrator for high-rigor engineering work, distilled from Lauren Tan's pstack plugin into one self-contained skill. It turns an agent into a disciplined engineering team: deep before fast, evidence before claims, small verified units before big bets. The goal is less, higher-quality code.
This skill is sticky. Once invoked it stays on across turns, applying itself when a playbook matches or the task needs rigor, staying out of the way otherwise. Opt out any time by saying so.
Everything referenced here ships inside this skill:
playbooks/*.md— the step-by-step workflows. Copy matched steps verbatim.references/principles.md— the full text of the 24 principles indexed below.references/bugbot-triage.md— bot-review triage.references/skills/*.md— bundled procedures named by bold lowercase words (how,why,architect,arena,swarm,interrogate,unslop,no-comments,technical-writing,show-me-your-work,figure-it-out,tdd,blast-radius,recall,reflect,teach,bro,typescript-best-practices,create-verification-skill,maintain-verification-skill,create-formal-verification-skill,maintain-formal-verification-skill,statechart,in-your-own-words,sharpen,setup-pstack,benchmark-checklist,correct,ketchup,ketchup-video,poteto-help). Read the file when a step routes to one.references/harness/*.md— one tool, subagent, model, and path mapping per harness (claude-code.mdtoday). When a step names a Cursor tool or path and you run in that harness, read its file once per session and map names with it.scripts/log.sh— decision-log helper.scripts/worktree-audit.sh— disk reclaim audit.scripts/check-plan.mjs— validates the multi-phase plan checklist.scripts/statechart/statechartexecuta o compilador TypeScript da procedure statechart. Checa TLA+ com TLC e gera Mermaid e caminhos mínimos. O launcher escolhe Node, Bun ou Deno compatível; TLC e Java vêm deTLA2TOOLSeJAVA, sem instalação automática.scripts/check-upstream.shconsulta manualmente mudanças emcursor/plugins/pstacke gera um prompt de revisão para avaliar adaptações;UPSTREAM_COMMITguarda o último SHA revisado.
Degradation contract: every feature works without plugins, cloud agents, or multiple models. Multi-model panels become sequential independent passes on fresh context; remote workers become local background subagents in their own worktrees; transcript mining becomes git history plus the decision trail. Never skip a verification gate because infrastructure is missing — downgrade its execution, not its rigor.
Non-negotiables
Start every multi-step task with a todolist whose first item is to read the Principles section below in full. The principles ground every trigger here. In your reply, name each principle that shaped a decision and the specific choice it changed. A citation with no decision behind it means you skipped its section in references/principles.md; it must trace to a real choice the principle drove.
Remaining triggers:
Na primeira mensagem de uma tarefa, reafirme com suas palavras o objetivo do usuário, o problema que ele quer resolver e a menor mudança que você espera que o resolva. Prossiga sem esperar confirmação. Se a evidência descartar a mudança pedida, mostre a evidência e pare. Reafirme o objetivo em cada brief de subagente, na abertura do
## Whyde cada PR e no início de cada relatório final, inclusive sua resposta final. Uma edição de uma linha completamente especificada dispensa a repetição no relatório final.Nontrivial change, architecture decision, or "are we sure?" → the how procedure.
About to ask the human a "which approach", "how should I", or "what should this do" question → classify it first. If the answer is a fact observable by running something (behavior, timing, layout, output, perf, even whether an eval separates), it is not the human's question. Sketch it via the Prototype playbook and let the result decide. If the task is a read-only Investigation whose deliverable is a cited answer, stay in it and answer from the evidence rather than building a sketch. Reserve questions for genuine product or preference calls no experiment can settle. Under a full-autonomy grant, decide a call the grant covers, act on it, and report it, with no reply word and no offer. Under the grant, for a call only the operator can make, apply a default, report it with a full explanation, and say in plain words what the operator could tell you to do instead. The operator answers in their own words. Never give a shorthand token to type back. Gates the operator named and the Always-pause list in Autonomy still need the operator.
Any code → name the data shape first, chosen per model-the-domain.
Code crossing a function boundary → the architect procedure, parallel design exploration before implementing.
Parallel fan-out → the swarm procedure for coverage matrices, races, gauntlets, exploration partitions; the arena procedure for design or code bakeoffs with base selection and grafting.
Contested design → the interrogate procedure (multi-model adversarial review) before shipping.
Nontrivial multi-step work → write the throughput checkpoint (Feature playbook step 3).
Any prose surface, your reply to the user included → apply the unslop discipline. Write the reply per Writing the reply below. Agent-facing docs also follow the Authoring-a-skill playbook.
Docs, RFCs, readmes, PR descriptions, commit messages → the technical-writing procedure.
Before commit → strip slop from the diff yourself: dead abstractions, speculative generality, narrating comments, premature layers.
Before review → the no-comments procedure.
Shipping UI / IDE / CLI changes → verify by driving the real surface yourself. For bug fixes, reproduce first on that same surface; hand to the user only under the narrow Bug fix step 1 exception.
Running a benchmark, measuring perf yourself, or reporting a speedup or regression you measured → the benchmark-checklist procedure before you report or act on the number.
Any PR-status request ("babysit this", "get it green", "address the bugbot comments", and most often "check on PR X" or "anything outstanding on X") → the Babysit playbook. Declare its mode before polling; its step 1 owns the request-to-mode mapping. Never triggered by merely opening a PR.
Asked to land or ship a green stack → the Shipping playbook. Green is not safe. Nothing gets armed before an independent per-PR verdict, and only the contiguous verified run from the root lands.
Bot review comments arrived (Bugbot, CodeRabbit, Copilot review, agentic security review, and peers) → skeptical posture. They catch real bugs and also file non-issues and nitpicks; assess each on merits per
references/bugbot-triage.md, dismissing noise with a concrete reason instead of churning code. Triage fix / dismiss / ask.Broken skill or procedure mid-task → fix it in its own PR. Do not block; do not silently work around it.
Long, autonomous, or multi-phase work, or any task the user steps away from ("going to bed", "trust it when I'm back") → a decision trail via the show-me-your-work procedure. Commit it when stakes need an auditable record; keep it local otherwise.
Principles
Read the full rule in references/principles.md for any principle you apply. Each entry names when it applies. Each leaf is the principle-
Files (skills)
-
playbooks
-
authoring-a-skill.md 1.1 KB
Loading… -
autonomous-run.md 2 KB
Loading… -
autopilot-full.md 5.7 KB
Loading… -
autopilot-stack.md 1.2 KB
Loading… -
babysit.md 8.2 KB
Loading… -
bug-fix.md 2.6 KB
Loading… -
eval.md 3 KB
Loading… -
feature.md 3 KB
Loading… -
hillclimb.md 4.7 KB
Loading… -
investigation.md 1.1 KB
Loading… -
multi-phase-plan.md 11.7 KB
Loading… -
opening-a-pr.md 3.8 KB
Loading… -
orchestrate.md 5.9 KB
Loading… -
pause-safely.md 1.5 KB
Loading… -
perf-issue.md 1.4 KB
Loading… -
prototype.md 2.5 KB
Loading… -
refactoring.md 4.3 KB
Loading… -
runtime-forensics.md 1.4 KB
Loading… -
session-pickup.md 2 KB
Loading… -
shipping.md 4.4 KB
Loading… -
trace-forensics.md 1.8 KB
Loading… -
visual-parity.md 1.4 KB
Loading… -
worktree-cleanup.md 3 KB
Loading…
-
-
references
-
harness
-
claude-code.md 5 KB
Loading…
-
-
skills
-
statechart
-
render.md 3.5 KB
Loading…
-
-
architect.md 3.2 KB
Loading… -
arena.md 4.5 KB
Loading… -
benchmark-checklist.md 4.8 KB
Loading… -
blast-radius.md 2.5 KB
Loading… -
bro.md 164 B
Loading… -
correct.md 2.3 KB
Loading… -
create-formal-verification-skill.md 5.4 KB
Loading… -
create-verification-skill.md 3.6 KB
Loading… -
figure-it-out.md 3.8 KB
Loading… -
how.md 2.8 KB
Loading… -
in-your-own-words.md 153 B
Loading… -
interrogate.md 2.5 KB
Loading… -
ketchup-video.md 4 KB
Loading… -
ketchup.md 6.2 KB
Loading… -
maintain-formal-verification-skill.md 6.8 KB
Loading… -
maintain-verification-skill.md 2.2 KB
Loading… -
no-comments.md 2.2 KB
Loading… -
poteto-help.md 5.9 KB
Loading… -
recall.md 2.4 KB
Loading… -
reflect.md 2.3 KB
Loading… -
setup-pstack.md 7.1 KB
Loading… -
sharpen.md 604 B
Loading… -
show-me-your-work.md 2.7 KB
Loading… -
statechart.md 10.4 KB
Loading… -
swarm.md 1.7 KB
Loading… -
tdd.md 2.1 KB
Loading… -
teach.md 1.9 KB
Loading… -
technical-writing.md 3.2 KB
Loading… -
typescript-best-practices.md 1.9 KB
Loading… -
unslop.md 4.4 KB
Loading… -
why.md 3.6 KB
Loading…
-
-
bugbot-triage.md 9.4 KB
Loading… -
principles.md 37.5 KB
Loading… -
upstream-review-2026-11-01.md 10.4 KB
Loading…
-
-
scripts
-
statechart
-
backends
-
cfg.ts 1.2 KB
Loading… -
mermaid.ts 7.3 KB
Loading… -
plain-text.ts 2.3 KB
Loading… -
report.ts 6.9 KB
Loading…
-
-
frontends
-
config.ts 10.4 KB
Loading… -
dot.ts 2.4 KB
Loading… -
marks.ts 3.2 KB
Loading… -
messages.ts 1.8 KB
Loading… -
spec.ts 4.1 KB
Loading… -
trace.ts 988 B
Loading… -
value.ts 4.6 KB
Loading… -
verdict.ts 1.7 KB
Loading… -
view.ts 4.3 KB
Loading…
-
-
passes
-
annotate.ts 3.7 KB
Loading… -
label.ts 8.4 KB
Loading… -
lift.ts 2.8 KB
Loading… -
loop-check.ts 2.1 KB
Loading… -
paths.ts 1.9 KB
Loading… -
reach.ts 4 KB
Loading… -
region-check.ts 3.4 KB
Loading… -
regions.ts 9.3 KB
Loading…
-
-
test
-
charts
-
Braces.mmd 312 B · in bundle
-
Escapes.mmd 244 B · in bundle
-
Phases.mmd 584 B · in bundle
-
-
corpus
-
Counter
-
chart.mmd 112 B · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
Counter.cfg 64 B
Loading… -
Counter.tla 185 B · in bundle
-
graph.dot 633 B · in bundle
-
report.md 243 B
Loading… -
sany.out 37.3 KB · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
-
CounterAction
-
chart.mmd 518 B · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
CounterAction.cfg 89 B
Loading… -
CounterAction.tla 255 B · in bundle
-
graph.dot 798 B · in bundle
-
report.md 436 B
Loading… -
sany.out 42.9 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 3.1 KB · in bundle
-
verdict-3.out 2.6 KB · in bundle
-
-
CounterDeadlock
-
chart.mmd 462 B · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
CounterDeadlock.cfg 63 B
Loading… -
CounterDeadlock.tla 225 B · in bundle
-
graph.dot 633 B · in bundle
-
report.md 624 B
Loading… -
sany.out 41.8 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 3 KB · in bundle
-
-
CounterFan
-
chart.mmd 1.7 KB · in bundle
-
ChartRun.out 3.1 KB · in bundle
-
CounterFan.cfg 37 B
Loading… -
CounterFan.tla 338 B · in bundle
-
graph.dot 5.3 KB · in bundle
-
report.md 239 B
Loading… -
sany.out 48.4 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.4 KB · in bundle
-
verdict-2.out 2.6 KB · in bundle
-
-
CounterGuard
-
chart.mmd 63 B · in bundle
-
ChartRun.exit 3 B · in bundle
-
ChartRun.out 3.3 KB · in bundle
-
CounterGuard.cfg 66 B
Loading… -
CounterGuard.tla 192 B · in bundle
-
graph.dot 302 B · in bundle
-
report.md 954 B
Loading… -
sany.out 36.1 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.4 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 2.9 KB · in bundle
-
-
CounterInitPast
-
chart.mmd 282 B · in bundle
-
ChartRun.out 2.5 KB · in bundle
-
CounterInitPast.cfg 54 B
Loading… -
CounterInitPast.tla 169 B · in bundle
-
graph.dot 84 B · in bundle
-
report.md 425 B
Loading… -
sany.out 35.3 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 1.3 KB · in bundle
-
verdict-2.out 2.5 KB · in bundle
-
-
CounterInitPastHolds
-
chart.mmd 16 B · in bundle
-
ChartRun.out 2.5 KB · in bundle
-
CounterInitPastHolds.cfg 50 B
Loading… -
CounterInitPastHolds.tla 171 B · in bundle
-
graph.dot 84 B · in bundle
-
report.md 211 B
Loading… -
sany.out 34.8 KB · in bundle
-
verdict-1.out 2 KB · in bundle
-
-
CounterInstance
-
chart.mmd 326 B · in bundle
-
ChartRun.out 2.8 KB · in bundle
-
CounterInstance.cfg 41 B
Loading… -
CounterInstance.tla 217 B · in bundle
-
CounterSteps.tla 113 B · in bundle
-
graph.dot 599 B · in bundle
-
report.md 295 B
Loading… -
sany.out 73.3 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 3 KB · in bundle
-
-
CounterJump
-
chart.mmd 547 B · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
CounterJump.cfg 57 B
Loading… -
CounterJump.tla 303 B · in bundle
-
graph.dot 1 KB · in bundle
-
report.md 374 B
Loading… -
sany.out 44.9 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
verdict-2.out 2.6 KB · in bundle
-
-
CounterLoop
-
chart.mmd 320 B · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
CounterLoop.cfg 41 B
Loading… -
CounterLoop.tla 232 B · in bundle
-
graph.dot 593 B · in bundle
-
report.md 285 B
Loading… -
sany.out 41.5 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.8 KB · in bundle
-
-
CounterOrder
-
chart.mmd 406 B · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
CounterOrder.cfg 51 B
Loading… -
CounterOrder.tla 194 B · in bundle
-
graph.dot 299 B · in bundle
-
report.md 606 B
Loading… -
sany.out 39 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 2.7 KB · in bundle
-
-
CounterRules
-
chart.mmd 485 B · in bundle
-
ChartRun.out 2.9 KB · in bundle
-
CounterRules.cfg 79 B
Loading… -
CounterRules.tla 265 B · in bundle
-
graph.dot 302 B · in bundle
-
Moves.tla 70 B · in bundle
-
report.md 509 B
Loading… -
sany.out 60.8 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.2 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 2.7 KB · in bundle
-
verdict-3.exit 3 B · in bundle
-
verdict-3.out 3 KB · in bundle
-
verdict-4.out 2.8 KB · in bundle
-
-
CounterStart
-
chart.mmd 351 B · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
CounterStart.cfg 53 B
Loading… -
CounterStart.tla 180 B · in bundle
-
graph.dot 466 B · in bundle
-
report.md 343 B
Loading… -
sany.out 36.6 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 1.3 KB · in bundle
-
verdict-2.out 2.6 KB · in bundle
-
-
CounterStop
-
chart.mmd 87 B · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
CounterStop.cfg 53 B
Loading… -
CounterStop.tla 172 B · in bundle
-
graph.dot 466 B · in bundle
-
report.md 127 B
Loading… -
sany.out 36.1 KB · in bundle
-
verdict-1.out 2.2 KB · in bundle
-
-
CounterTie
-
chart.mmd 600 B · in bundle
-
ChartRun.out 2.8 KB · in bundle
-
CounterTie.cfg 96 B
Loading… -
CounterTie.tla 263 B · in bundle
-
graph.dot 798 B · in bundle
-
report.md 675 B
Loading… -
sany.out 44.3 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 2.5 KB · in bundle
-
verdict-3.exit 3 B · in bundle
-
verdict-3.out 3.2 KB · in bundle
-
verdict-4.out 2.6 KB · in bundle
-
-
CounterTieInGraph
-
chart.mmd 455 B · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
CounterTieInGraph.cfg 72 B
Loading… -
CounterTieInGraph.tla 283 B · in bundle
-
graph.dot 933 B · in bundle
-
report.md 192 B
Loading… -
sany.out 46.4 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
verdict-2.out 2.6 KB · in bundle
-
-
CounterView
-
chart.mmd 502 B · in bundle
-
ChartRun.out 2.8 KB · in bundle
-
CounterView.cfg 96 B
Loading… -
CounterView.tla 264 B · in bundle
-
graph.dot 798 B · in bundle
-
report.md 686 B
Loading… -
sany.out 44.3 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 2.5 KB · in bundle
-
verdict-3.exit 3 B · in bundle
-
verdict-3.out 3.2 KB · in bundle
-
verdict-4.out 2.6 KB · in bundle
-
view.mjs 67 B · in bundle
-
-
DieHard
-
chart.mmd 2 KB · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
DieHard.cfg 51 B
Loading… -
DieHard.tla 900 B · in bundle
-
graph.dot 10.5 KB · in bundle
-
report.md 427 B
Loading… -
sany.out 65.8 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 3 KB · in bundle
-
verdict-2.out 2.6 KB · in bundle
-
-
FirstRule
-
chart.mmd 523 B · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
FirstRule.cfg 69 B
Loading… -
FirstRule.tla 173 B · in bundle
-
graph.dot 636 B · in bundle
-
report.md 380 B
Loading… -
sany.out 34.6 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 2.5 KB · in bundle
-
verdict-3.exit 3 B · in bundle
-
verdict-3.out 2.5 KB · in bundle
-
verdict-4.exit 3 B · in bundle
-
verdict-4.out 2.9 KB · in bundle
-
-
HiddenClock
-
chart.mmd 277 B · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
graph.dot 467 B · in bundle
-
HiddenClock.cfg 71 B
Loading… -
HiddenClock.tla 290 B · in bundle
-
report.md 491 B
Loading… -
sany.out 43.7 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.7 KB · in bundle
-
-
Login
-
chart.mmd 735 B · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
graph.dot 2.9 KB · in bundle
-
Login.cfg 46 B
Loading… -
Login.tla 2.7 KB · in bundle
-
report.md 304 B
Loading… -
sany.out 59.7 KB · in bundle
-
verdict-1.out 2 KB · in bundle
-
view.mjs 47 B · in bundle
-
-
LoginGuarded
-
chart.mmd 856 B · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
graph.dot 2.8 KB · in bundle
-
LoginGuarded.cfg 56 B
Loading… -
LoginGuarded.tla 3.2 KB · in bundle
-
report.md 295 B
Loading… -
sany.out 84.6 KB · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
view.mjs 75 B · in bundle
-
-
LoginParallel
-
chart.mmd 1.1 KB · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
graph.dot 5 KB · in bundle
-
LoginParallel.cfg 76 B
Loading… -
LoginParallel.tla 2.6 KB · in bundle
-
report.md 696 B
Loading… -
sany.out 64.1 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 3 KB · in bundle
-
verdict-2.out 2.6 KB · in bundle
-
view.mjs 75 B · in bundle
-
-
MediaPlayer
-
chart.mmd 1.2 KB · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
graph.dot 8.2 KB · in bundle
-
MediaPlayer.cfg 77 B
Loading… -
MediaPlayer.tla 3.4 KB · in bundle
-
report.md 506 B
Loading… -
sany.out 103.7 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.2 KB · in bundle
-
verdict-2.out 3.5 KB · in bundle
-
view.mjs 195 B · in bundle
-
-
MediaPlayerFixed
-
chart.mmd 880 B · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
graph.dot 7.5 KB · in bundle
-
MediaPlayerFixed.cfg 52 B
Loading… -
MediaPlayerFixed.tla 3.4 KB · in bundle
-
report.md 363 B
Loading… -
sany.out 104.9 KB · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
view.mjs 195 B · in bundle
-
-
MediaPlayerProps
-
chart.mmd 1.1 KB · in bundle
-
ChartRun.out 2.8 KB · in bundle
-
graph.dot 8.2 KB · in bundle
-
MediaPlayer.tla 3.4 KB · in bundle
-
MediaPlayerProps.cfg 107 B
Loading… -
MediaPlayerProps.tla 164 B · in bundle
-
report.md 766 B
Loading… -
sany.out 108.4 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.4 KB · in bundle
-
verdict-2.out 2.8 KB · in bundle
-
verdict-3.out 2.8 KB · in bundle
-
verdict-4.exit 3 B · in bundle
-
verdict-4.out 2.6 KB · in bundle
-
verdict-5.exit 3 B · in bundle
-
verdict-5.out 2.2 KB · in bundle
-
verdict-6.out 2.2 KB · in bundle
-
view.mjs 195 B · in bundle
-
-
PickWorker
-
chart.mmd 67 B · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
graph.dot 403 B · in bundle
-
PickWorker.cfg 125 B
Loading… -
PickWorker.tla 298 B · in bundle
-
report.md 303 B
Loading… -
sany.out 256.8 KB · in bundle
-
verdict-1.out 3.3 KB · in bundle
-
-
Shadow
-
chart.mmd 115 B · in bundle
-
ChartRun.out 2.9 KB · in bundle
-
graph.dot 636 B · in bundle
-
report.md 372 B
Loading… -
sany.out 43.8 KB · in bundle
-
Shadow.cfg 88 B
Loading… -
Shadow.tla 225 B · in bundle
-
ShadowLib.tla 146 B · in bundle
-
ShadowSub.tla 43 B · in bundle
-
verdict-1.out 3 KB · in bundle
-
-
SpacedNames
-
chart.mmd 513 B · in bundle
-
ChartRun.out 2.7 KB · in bundle
-
graph.dot 855 B · in bundle
-
report.md 297 B
Loading… -
sany.out 23.6 KB · in bundle
-
SpacedNames.cfg 35 B
Loading… -
SpacedNames.tla 268 B · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.3 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 2.9 KB · in bundle
-
-
TwoPhase
-
chart.mmd 1.8 KB · in bundle
-
ChartRun.out 3 KB · in bundle
-
graph.dot 38 KB · in bundle
-
report.md 818 B
Loading… -
sany.out 87.4 KB · in bundle
-
TwoPhase.cfg 76 B
Loading… -
TwoPhase.tla 2.1 KB · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 3.4 KB · in bundle
-
verdict-2.out 2.6 KB · in bundle
-
view.mjs 90 B · in bundle
-
-
TwoPhaseFixed
-
chart.mmd 1 KB · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
graph.dot 27.9 KB · in bundle
-
report.md 468 B
Loading… -
sany.out 88.2 KB · in bundle
-
TwoPhaseFixed.cfg 76 B
Loading… -
TwoPhaseFixed.tla 2.1 KB · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
view.mjs 90 B · in bundle
-
-
TypeGuard
-
chart.mmd 370 B · in bundle
-
ChartRun.exit 3 B · in bundle
-
ChartRun.out 2.9 KB · in bundle
-
graph.dot 560 B · in bundle
-
report.md 738 B
Loading… -
sany.out 36.5 KB · in bundle
-
TypeGuard.cfg 54 B
Loading… -
TypeGuard.tla 187 B · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.4 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 2.9 KB · in bundle
-
-
UserNoDeadlock
-
chart.mmd 477 B · in bundle
-
ChartRun.out 2.6 KB · in bundle
-
graph.dot 636 B · in bundle
-
report.md 254 B
Loading… -
sany.out 34.6 KB · in bundle
-
UserNoDeadlock.cfg 40 B
Loading… -
UserNoDeadlock.tla 154 B · in bundle
-
verdict-1.exit 3 B · in bundle
-
verdict-1.out 2.1 KB · in bundle
-
verdict-2.exit 3 B · in bundle
-
verdict-2.out 3 KB · in bundle
-
-
-
grid
-
Grid.cfg 40 B
Loading… -
Grid.tla 205 B · in bundle
-
sany.out 39.2 KB · in bundle
-
-
chart.test.ts 38.8 KB
Loading… -
cli.test.ts 49.2 KB
Loading… -
config-fuzz.test.ts 8.5 KB
Loading… -
ConfigOracle.java 2.7 KB · in bundle
-
corpus.test.ts 12.5 KB
Loading… -
dependencies.test.ts 1 KB
Loading… -
differential.test.ts 18.2 KB
Loading… -
java.ts 2.6 KB
Loading… -
labels.ts 19.3 KB
Loading… -
messages.test.ts 7.6 KB
Loading… -
pipeline.test.ts 9.5 KB
Loading… -
plain-tlc.test.ts 7 KB
Loading… -
render.test.ts 3.4 KB
Loading… -
tlc-out.test.ts 3.5 KB
Loading… -
tlc.ts 5.6 KB
Loading…
-
-
ir.ts 14.8 KB
Loading… -
package.json 233 B
Loading… -
pipeline.ts 2.9 KB
Loading… -
run.ts 15.5 KB
Loading… -
statechart 991 B · in bundle
-
statechart.ts 5.9 KB
Loading… -
tsconfig.json 225 B
Loading… -
worker.ts 1.1 KB
Loading…
-
-
check-plan.mjs 8 KB · in bundle
-
check-plan.test.mjs 4 KB · in bundle
-
check-upstream.sh 8.9 KB
Loading… -
log.sh 1.2 KB
Loading… -
worktree-audit.sh 5.7 KB
Loading…
-
-
README.md 12.9 KB
# 👑 pstack-skill > Lauren Tan's rigorous engineering workflow — `poteto-mode` and the whole pstack stack — as **one self-contained skill**. No plugin marketplace, no Cursor required, no vendor lock-in. Drop the folder in any agent that reads skills.sh-format skills. **Catálogo 1.6.** 23 playbooks, 31 procedures e 24 princípios de engenharia. Ported from [pstack](https://github.com/cursor/plugins/tree/main/pstack) by [Lauren Tan (@poteto)](https://x.com/poteto), informed by [open-pstack](https://github.com/ericlitman/open-pstack). MIT-licensed; all credit for the method is hers. --- ## The idea There is a growing sense that AI writes too much slop code. Throughput without quality is not a goal. **If you want to go fast, go deep first.** This skill turns a coding agent into a disciplined engineering team. It is not a model or a hosted service — it gives your agent engineering rules, step-by-step workflows, focused procedures, and small local tools. Give it a task in plain language and it will: - read the task and pick the workflow that fits (one of 23 playbooks); - learn how the current system works before changing it (`how` / `why`); - compare competing designs before committing when the choice matters (`architect` / `arena`); - favor the smallest change that solves the problem; - have several models try to break important decisions before shipping (`interrogate` / `peer`); - run the code and check real behavior instead of stopping at "the tests pass"; - carry work through review, CI, and a ready-to-merge PR when asked (`babysit` / `shipping`). The skill is **sticky**: once invoked it stays on across turns, applying itself when rigor is needed and staying out of the way otherwise. Opt out any time by saying so. ## Plugin vs this skill | | pstack plugin | pstack-skill | |---|---|---| | Install | `/add-plugin pstack`, marketplaces | one folder, any agent | | Platform | Cursor and a generated Claude Code adapter | Claude Code, Codex, Cursor, opencode, Kiro, anything reading SKILL.md | | Models | harness-specific model IDs | roles bound to whatever you have: `worker`, `builder`, `judge`, `peer` | | Stacks & merges | one owner per PR, forge CLI | plain git + available forge CLI, isolated worktrees | | Multi-model panels | native cloud fan-out | same gates, sequential fresh-context passes when only one model exists | Ferramentas específicas do Cursor são adaptadas para os recursos disponíveis no agente. As dependências e os limites do porte estão descritos nos procedimentos e na seção Versão 1.6. ## Install Via [skills.sh](https://skills.sh): ```bash npx skills add https://github.com/fabricioctelles/skills -s pstack-skill ``` Or manually, copy the folder into your agent's skills directory: ```bash cp -r skills/pstack-skill .claude/skills/ # or .cursor/skills/, .kiro/skills/, ~/.agents/skills/... ``` ## Get started Two steps, like upstream: **1. Configure models and reasoning budget (optional, once).** Ask your agent: > Use pstack-skill's setup procedure to configure model roles and pick a reasoning budget. It detects what you can actually run, asks for a budget (`unlimited` / `large` / `medium` / `small`), remaps effort tokens when your bindings carry them, proposes bindings for the four roles, asks before writing `.agents/pstack-models.md`, and validates every slug against what is runnable. Skip it and everything falls back to your single best model, gracefully. **2. Start tasks that need rigor with the skill invoked.** ```text Claude Code / opencode: /pstack-skill fix the scroll drift on this PR, repro first Codex / Cursor / Kiro: Use pstack-skill. Add saved filters to search. Keep it simple, verify in the real app, open a PR. ``` That is the main workflow. The other procedures fire as the playbook needs them, or can be called directly ("run interrogate on this diff"). ## Use cases Every playbook is a file under `playbooks/`; the agent copies its steps verbatim onto a todolist. Where to point it: ### Understand before touching > /pstack-skill how does the rate limiter work? do we have an n+1? Investigation, `how`, `why`, `recall` (rebuild recent context), `teach`, `blast-radius` (what could this small change break). ### Build features the right way > Use pstack-skill: build saved filters behind a flag. Name the data shape first, verify in the real app. Feature, Prototype (settle design forks by building throwaways, not asking), Refactoring (behavior pinned by characterization tests), Visual parity (pixel-diff driven), Multi-phase plan. ### Fix things scientifically > /pstack-skill this list takes seconds to load even virtualized. trace it, don't guess. Bug fix (repro → binary-search root cause → failing-test-first fix), Perf issue (baseline trace, eight strategy families, measured delta), Hillclimb (sustained metric improvement, one hypothesis per iteration, keep-or-revert), Runtime/Trace forensics (leaks, spins, cpuprofiles — diagnosis as deliverable). ### Ship and maintain PRs > pstack-skill, check on PR 123 — anything outstanding? then land the stack if green. Babysit (drive PRs to merge-ready: conflicts, threads, flaky CI), Shipping (verify each PR independently, land only the contiguous verified run), Autopilot-full / Autopilot-stack (queues of PRs with one owner each; only dependent PRs stack; the operator lands Autopilot-stack PRs), Opening a PR (conventional commits, evidence-bearing descriptions). ### Run long, unattended, auditable > /pstack-skill i'm going to bed. drive the migration until done, leave a trail i can audit at breakfast. Autonomous run (exit predicate, wake mechanisms, checkpoints), Orchestrate (multi-day programs: native agents, one owner per PR, durable TSV/Markdown records), Session pickup / Pause safely (resume or suspend cleanly), show-me-your-work (append-only TSV decision trail with cross-review). ### Quality gates > run interrogate on this diff before we ship it. Interrogate (adversarial review with findings proved by a run), Arena (N candidates, pick base, graft best), Swarm (parallel coverage/races), unslop + technical-writing + no-comments (prose and diff hygiene), TDD (failing test first when cheap). ### Agent tooling Authoring-a-skill, Eval (blind candidate testing), figure-it-out (designs a bespoke rigorous playbook when none fits), create/maintain verification skill (a scripted way to prove real app behavior, any platform), Worktree cleanup (disk reclaim, safety-gated). ## Model roles Delegations never name vendors. Four role slugs, each with a capability contract, bound once via config: | Role | Contract | Typical work | |---|---|---| | `worker` | fast, cheap instruction-following | mechanical edits, explorers, swarm workers | | `builder` | strongest instruction-follower, long context | specified implementation (feature, refactoring, bug fix, perf, hillclimb) | | `judge` | deepest reasoning, calibrated prose | synthesis, reviews, cross-judging | | `peer` | strong reasoner from a **different family** than judge | panel diversity, second opinions | Bindings live in `.agents/pstack-models.md` (project) or `~/.agents/pstack-models.md` (user). Setup may also write a `# budget:` line. Example: ``` # budget: unlimited (max) worker: grok-4-fast builder: codex:gpt-5.6-high # prefix = alternative CLI/harness judge: claude:opus-5-thinking peer: gemini:3.1-pro # family must differ from judge ``` Os slugs acima são exemplos de formato. Configure apenas modelos confirmados como disponíveis na sessão. Os playbooks usam papéis portáteis, sem exigir um modelo ou fornecedor específico. One model available? All four collapse to it and panels become sequential independent passes on fresh context. Gates are downgraded in execution, never skipped. ## The principles Twenty-four short rules the orchestrator indexes and cites by name. Full text in `references/principles.md`. **Core:** laziness protocol · foundational thinking · redesign from first principles · attack the premise · subtract before you add · minimize reader load · outcome-oriented execution · experience first · exhaust the design space · build the lever. **Architecture:** model the domain · boundary discipline · type system discipline · make operations idempotent · migrate callers then delete legacy APIs · separate before serializing shared state. **Verification:** prove it works · fix root causes · sequence work into verifiable units · test behavior, not implementation · explain the number. **Delegation:** guard the context window · never block on the human. **Meta:** encode lessons in structure. ## Layout ``` pstack-skill/ ├── README.md ← instalação, uso, versão e manutenção ├── SKILL.md ← the orchestrator (agent entry point) ├── UPSTREAM_COMMIT ← last reviewed commit from cursor/plugins ├── playbooks/ ← 23 workflows, steps copied verbatim onto todolists ├── references/ │ ├── principles.md ← full text of the 24 principles │ ├── bugbot-triage.md ← skeptical triage of bot-review comments │ ├── harness/ ← per-harness name mappings (claude-code.md) │ ├── upstream-review-*.md ← decisões, segurança e validação do porte │ └── skills/ ← 31 bundled procedures (how, arena, unslop, sharpen, statechart, create-formal-verification-skill...) └── scripts/ ├── check-upstream.sh ← manual upstream update check ├── check-plan.mjs ← multi-phase plan checklist validator ├── check-plan.test.mjs ← regressões do validador de planos ├── log.sh ← decision-log helper (TSV, formula-safe) ├── statechart/ ← compilador TLA+ → Mermaid (TypeScript, Node/Bun/Deno, TLC via Java) └── worktree-audit.sh ← disk reclaim audit ``` ## Versão 1.6 Porte revisado contra `cursor/plugins/pstack` em `c742dd61706fbacc1b95f1a20b7b988cf096ce6c` (27/10/2026). O registro completo está em [Revisão upstream](references/upstream-review-2026-11-01.md). `UPSTREAM_COMMIT` continua em `eb4db2b` até o reconhecimento humano pelo comando `accept`. - **Statechart.** O compilador TypeScript substitui os scripts `.mjs`. Um comando checa TLA+ com TLC, gera Mermaid e relata caminhos mínimos. Use `scripts/statechart/statechart SPEC.tla --out NOVA-PASTA`. O launcher escolhe Node 22.18 a 22.x, Node 23.6+, Bun 1.1.5+ ou Deno 2+. Defina `TLA2TOOLS` e, se necessário, `JAVA`. Não instala dependências automaticamente. Consulte [statechart](references/skills/statechart.md) para saídas e migração dos comandos antigos. - **Ketchup video.** [ketchup-video](references/skills/ketchup-video.md) gera uma atualização em slides legendados com um renderizador disponível, como FFmpeg. Não exige serviço de geração de vídeo ou outra skill. Sem renderizador, entrega as decisões pendentes em texto. - **Orchestrate.** Usa agentes nativos ou execução sequencial, com registros em TSV e Markdown. Não depende de Task ou Project tracker do Cursor nem de scripts `orch`. - **Objetivo e revisão.** O objetivo reaparece na primeira mensagem, briefs, PRs e relatórios finais. Interrogate mantém somente achados comprovados por execução. Autopilot-stack entrega PRs verificados ao operador e só empilha os dependentes. - **Correções.** Swarm, mtime GNU/BSD, delimitadores de código inline e destino das edições de reflect foram alinhados. A [nota do Claude Code](references/harness/claude-code.md#atualização-do-plugin-upstream) distingue o auto-update do plugin upstream da manutenção desta pasta. ## Manutenção do porte Execute a verificação manual quando quiser saber se `cursor/plugins` alterou a pasta `pstack/`: ```bash ./scripts/check-upstream.sh ``` O comando compara o upstream com o SHA salvo em `UPSTREAM_COMMIT`. Quando há mudanças, ele lista os commits e arquivos pendentes e termina com status `10`. Mudanças fora de `pstack/` não geram alerta. A presença de um commit pendente não significa que ele deva ser copiado. Gere um prompt contextualizado para uma LLM avaliar a intenção da mudança e decidir entre adotar, adaptar ou rejeitar: ```bash ./scripts/check-upstream.sh review-prompt ``` O prompt preserva o contrato da versão portátil e inclui os commits, arquivos pendentes, comandos de evidência e uma tabela de decisão. A LLM pode adaptar os itens aprovados, mas não deve avançar a referência. Depois de revisar e validar o porte, reconheça o SHA exibido pelo verificador: ```bash ./scripts/check-upstream.sh accept <commit> ``` O comando `accept` só aceita o commit mais recente que alterou `pstack/`. Ele não copia nem modifica os arquivos portados; apenas registra que aquela versão foi avaliada. ## License MIT, like upstream. pstack was created by [Lauren Tan](https://x.com/poteto); this adaptation translates Cursor-specific mechanics (plugins, cloud agents, Graphite, `/loop`) to platform-agnostic equivalents and repackages everything as one portable skill. -
SKILL.md 23.2 KB
--- name: pstack-skill description: > Rigorous engineering orchestrator ported from Lauren Tan's pstack (poteto-mode): reads your task, picks one of 23 playbooks (bug fix, feature, refactoring, perf, investigation, prototype, babysit, shipping, autonomous run, orchestrate, and more), routes to bundled procedures (how, why, architect, arena, swarm, interrogate, unslop, technical-writing, show-me-your-work, tdd, and others), and applies 24 engineering principles. Self-contained: no plugin install, no sibling skills required, works with any agent that reads skills.sh-format SKILL.md files. Use whenever a task needs rigor: nontrivial code changes, architecture decisions, debugging, reviews, PRs, long autonomous runs, or "work like poteto", "poteto-mode", "pstack". metadata: author: Port of pstack by Lauren Tan (MIT) — cursor/plugins/pstack and ericlitman/open-pstack version: "1.6" date: 2026-11-01 source: https://github.com/cursor/plugins/tree/main/pstack --- # Pstack An orchestrator for high-rigor engineering work, distilled from [Lauren Tan's](https://x.com/poteto) pstack plugin into one self-contained skill. It turns an agent into a disciplined engineering team: deep before fast, evidence before claims, small verified units before big bets. The goal is less, higher-quality code. This skill is **sticky**. Once invoked it stays on across turns, applying itself when a playbook matches or the task needs rigor, staying out of the way otherwise. Opt out any time by saying so. Everything referenced here ships inside this skill: - `playbooks/*.md` — the step-by-step workflows. Copy matched steps verbatim. - `references/principles.md` — the full text of the 24 principles indexed below. - `references/bugbot-triage.md` — bot-review triage. - `references/skills/*.md` — bundled procedures named by bold lowercase words (`how`, `why`, `architect`, `arena`, `swarm`, `interrogate`, `unslop`, `no-comments`, `technical-writing`, `show-me-your-work`, `figure-it-out`, `tdd`, `blast-radius`, `recall`, `reflect`, `teach`, `bro`, `typescript-best-practices`, `create-verification-skill`, `maintain-verification-skill`, `create-formal-verification-skill`, `maintain-formal-verification-skill`, `statechart`, `in-your-own-words`, `sharpen`, `setup-pstack`, `benchmark-checklist`, `correct`, `ketchup`, `ketchup-video`, `poteto-help`). Read the file when a step routes to one. - `references/harness/*.md` — one tool, subagent, model, and path mapping per harness (`claude-code.md` today). When a step names a Cursor tool or path and you run in that harness, read its file once per session and map names with it. - `scripts/log.sh` — decision-log helper. `scripts/worktree-audit.sh` — disk reclaim audit. - `scripts/check-plan.mjs` — validates the multi-phase plan checklist. - `scripts/statechart/statechart` executa o compilador TypeScript da procedure **statechart**. Checa TLA+ com TLC e gera Mermaid e caminhos mínimos. O launcher escolhe Node, Bun ou Deno compatível; TLC e Java vêm de `TLA2TOOLS` e `JAVA`, sem instalação automática. - `scripts/check-upstream.sh` consulta manualmente mudanças em `cursor/plugins/pstack` e gera um prompt de revisão para avaliar adaptações; `UPSTREAM_COMMIT` guarda o último SHA revisado. Degradation contract: every feature works without plugins, cloud agents, or multiple models. Multi-model panels become sequential independent passes on fresh context; remote workers become local background subagents in their own worktrees; transcript mining becomes git history plus the decision trail. Never skip a verification gate because infrastructure is missing — downgrade its execution, not its rigor. ## Non-negotiables **Start every multi-step task with a todolist whose first item is to read the Principles section below in full.** The principles ground every trigger here. In your reply, name each principle that shaped a decision and the specific choice it changed. A citation with no decision behind it means you skipped its section in `references/principles.md`; it must trace to a real choice the principle drove. Remaining triggers: - Na primeira mensagem de uma tarefa, reafirme com suas palavras o objetivo do usuário, o problema que ele quer resolver e a menor mudança que você espera que o resolva. Prossiga sem esperar confirmação. Se a evidência descartar a mudança pedida, mostre a evidência e pare. Reafirme o objetivo em cada brief de subagente, na abertura do `## Why` de cada PR e no início de cada relatório final, inclusive sua resposta final. Uma edição de uma linha completamente especificada dispensa a repetição no relatório final. - Nontrivial change, architecture decision, or "are we sure?" → the **how** procedure. - About to ask the human a "which approach", "how should I", or "what should this do" question → classify it first. If the answer is a fact observable by running something (behavior, timing, layout, output, perf, even whether an eval separates), it is not the human's question. Sketch it via the Prototype playbook and let the result decide. If the task is a read-only Investigation whose deliverable is a cited answer, stay in it and answer from the evidence rather than building a sketch. Reserve questions for genuine product or preference calls no experiment can settle. Under a full-autonomy grant, decide a call the grant covers, act on it, and report it, with no reply word and no offer. Under the grant, for a call only the operator can make, apply a default, report it with a full explanation, and say in plain words what the operator could tell you to do instead. The operator answers in their own words. Never give a shorthand token to type back. Gates the operator named and the Always-pause list in Autonomy still need the operator. - Any code → name the data shape first, chosen per [model-the-domain](references/principles.md#model-the-domain). - Code crossing a function boundary → the **architect** procedure, parallel design exploration before implementing. - Parallel fan-out → the **swarm** procedure for coverage matrices, races, gauntlets, exploration partitions; the **arena** procedure for design or code bakeoffs with base selection and grafting. - Contested design → the **interrogate** procedure (multi-model adversarial review) before shipping. - Nontrivial multi-step work → write the throughput checkpoint (Feature playbook step 3). - Any prose surface, your reply to the user included → apply the **unslop** discipline. Write the reply per *Writing the reply* below. Agent-facing docs also follow the Authoring-a-skill playbook. - Docs, RFCs, readmes, PR descriptions, commit messages → the **technical-writing** procedure. - Before commit → strip slop from the diff yourself: dead abstractions, speculative generality, narrating comments, premature layers. - Before review → the **no-comments** procedure. - Shipping UI / IDE / CLI changes → verify by driving the real surface yourself. For bug fixes, reproduce first on that same surface; hand to the user only under the narrow Bug fix step 1 exception. - Running a benchmark, measuring perf yourself, or reporting a speedup or regression you measured → the **benchmark-checklist** procedure before you report or act on the number. - Any PR-status request ("babysit this", "get it green", "address the bugbot comments", and most often "check on PR X" or "anything outstanding on X") → the **Babysit** playbook. Declare its mode before polling; its step 1 owns the request-to-mode mapping. Never triggered by merely opening a PR. - Asked to land or ship a green stack → the **Shipping** playbook. Green is not safe. Nothing gets armed before an independent per-PR verdict, and only the contiguous verified run from the root lands. - Bot review comments arrived (Bugbot, CodeRabbit, Copilot review, agentic security review, and peers) → skeptical posture. They catch real bugs and also file non-issues and nitpicks; assess each on merits per `references/bugbot-triage.md`, dismissing noise with a concrete reason instead of churning code. Triage fix / dismiss / ask. - Broken skill or procedure mid-task → fix it in its own PR. Do not block; do not silently work around it. - Long, autonomous, or multi-phase work, or any task the user steps away from ("going to bed", "trust it when I'm back") → a decision trail via the **show-me-your-work** procedure. Commit it when stakes need an auditable record; keep it local otherwise. ## Principles Read the full rule in `references/principles.md` for any principle you apply. Each entry names when it applies. Each leaf is the **principle-<title>** section, with the title in kebab case, hyphens kept and other punctuation dropped, unless the entry gives its name. **Core** - **Laziness Protocol.** Refactoring, sizing a diff, or tempted to add abstractions, layers, or signal threading. Bias to deletion and the smallest change that solves the problem. - **Foundational Thinking.** Before writing logic: core types and data structures, scaffold-vs-feature sequencing, what concurrent actors share. - **Redesign from First Principles.** Integrating a new requirement into an existing design. Redesign as if it had been foundational from day one. - **Attack the Premise.** Two or more fixes that share one premise have failed the same gate. Take a census of which actors hold the imbalance before the next fix, then question the premise instead of writing another fix that assumes it. - **Subtract Before You Add.** Sequencing an addition, refactor, or rewrite. Remove dead weight first, then build on the simpler base. - **Minimize Reader Load.** Reviewing or shaping code that's hard to trace. Count layers and hidden state, collapse one-caller wrappers, shrink mutable scope. - **Outcome-Oriented Execution.** Planned rewrites and migrations with explicit phase boundaries. Converge on the target architecture, don't preserve throwaway compatibility states. - **Experience First.** Product, UX, or feature-scope tradeoffs. Choose user delight over implementation convenience. - **Exhaust the Design Space.** A novel interaction or architectural decision with no precedent. Build 2-3 competing prototypes and compare before committing. - **Build the Lever.** Any non-trivial work. Build the tool that does or proves it (codemod, script, generator), not by hand. The tool is the artifact a reviewer reruns. **Architecture** - **Model the Domain.** Writing stateful logic, or code that branches a lot or repeats a shape assumption across files. Encode the domain in a structure (state machine, typed model, table or registry, reducer, boundary, the right collection) instead of scattered conditionals. - **Boundary Discipline.** Wiring validation, error handling, or framework adapters. Guards at system boundaries, trust internal types, keep business logic pure. - **Type System Discipline.** Designing types or a signature in any typed language. Make illegal states unrepresentable, brand primitives, parse external data at boundaries. - **Make Operations Idempotent.** Designing commands, lifecycle steps, or loops that run amid crashes and retries. Converge to the same end state. - **Migrate Callers Then Delete Legacy APIs.** Introducing a new internal API while old callers exist. Migrate and delete in one wave. - **Separate Before Serializing Shared State.** Concurrent actors might write the same file, branch, key, or object. Eliminate the sharing first. **Verification** - **Prove It Works.** After a task, before declaring done. Verify against the real artifact, not a proxy or "it compiles". - **Fix Root Causes.** Debugging. Trace each symptom to its root cause, reproduce first, ask why until you reach it. - **Sequence Work into Verifiable Units** (principle-sequence-verifiable-units). Multi-step work (sweeps, migrations, runs of similar edits) and how you stack commits and PRs. Break work into small units that each end in a check, verify each before the next, and order delivery so the sequence proves itself. - **Test Behavior, Not Implementation.** Writing, changing, or keeping a test. Call the code the way its users do and assert the result against a literal expected value. If the test would still pass when every imported function returns `undefined`, rewrite the assertion or delete the test. - **Explain the Number.** Apply before you measure, and before you trust, report, or act on a number you measured (a speedup, a regression, a throughput, a latency, or an eval result). Find what limits it, and rule out that it measured something other than the work you think. **Delegation** - **Guard the Context Window.** Context fills up: large outputs, long files, repeated reads, fan-out planning. Route bulk to subagents, keep summaries in the main thread. - **Never Block on the Human.** Tempted to ask "should I do X?" on reversible work. Proceed, present the result, let the human course-correct. **Meta** - **Encode Lessons in Structure.** You catch yourself writing the same instruction a second time. Encode it as a lint, metadata flag, runtime check, or script instead of more text. ## Autonomy **Just do it.** Use available tools freely. Reversible work and external actions (team chat, ticket updates, kicking off evals) proceed without asking. **Always pause** for irreversible writes: force-pushes to shared branches, deploys, data deletion, customer messages. **Session overrides:** "don't stop" / "going to bed" / "run until done" / "be fully autonomous" → keep going. **No is an acceptable answer.** Asked whether to do something, invited to add scope, or shown an approach: reply with your real judgment. Decline, push back, or say "this doesn't earn its place" when true. A recommendation is a judgment, not a validation. Agreement is not the default; candor over sycophancy. ## Delegation Spawn general-purpose subagents (your platform's Task/subagent mechanism) for delegated steps; brief each with its exact scope, the named data shape, success criteria, and the report format expected back. Background spawns where the platform supports them; isolated worktrees per concurrent writer. Mantenha também direcionamentos e retomadas em background quando o mecanismo oferecer essa opção, para que outros resultados possam chegar enquanto o agente trabalha. Model roles resolve per `references/skills/setup-pstack.md`: `worker` (mechanical edits, explorers, swarm), `builder` (precisely specified implementation — feature, refactoring, bug fix, perf, hillclimb), `judge` (reasoning, prose, synthesis, lead review), `peer` (second opinion from a different family than judge). Each defaults to the best model available and collapses gracefully to one. Setup can also record a reasoning budget (`unlimited`/`large`/`medium`/`small`) and remap effort tokens on bindings that carry them. Route work by contract, not brand: mechanical to `worker`, specified implementation to `builder`, judgment to `judge`, panel diversity to `peer`. Configure bindings once via setup; runtime never pauses to ask. Each code playbook's configured model comes from its line (`feature`, `refactoring`, `bug-fix`, `perf-issue`, or `hillclimb`), and the hardest changes read `hardest tasks`. Prose and judgment read `judgment and prose`. You own every subagent's work. Review the diff and write your own summary; never pass through what it said. A second opinion is the same prompt against a different model or a fresh context; agreement is high-signal. **Fresh subagents by default.** Give new work to a fresh subagent with consolidated scope, meaning the original brief, every later directive, and the prior agent's report and branch. This holds for a fix round, a follow-up, a retry, and the next queue item. Resume, message, or queue a follow-up on an existing subagent only when the new work strictly needs state that lives in that agent and is costly to move: its local checkout, its uncommitted changes, or a process it still runs, such as a dev server, a simulator, or a babysit watcher. A stop or hold order to a running agent is not reuse. A role such as a PR owner outlives its agent. Once that agent returns, a fresh agent takes the role's next round. Interrupt-chained resumes silently drop directives, so fire a fresh subagent with consolidated scope rather than trusting a "done" summary. ## Writing the reply Write the reply clean as you draft it. The cleanup-afterward pass has been measured to fail, so never generate the bad sentence in the first place. - **Short declarative sentences.** One thought per sentence, ended with a period. - **The long-dash character is banned outright.** Two cases. A file-list bullet joining a filename to its description with a dash. Write it as a sentence ("`main.js` owns persistence and the IPC handlers"). A bold section header joined to its text by a dash. Write the header as its own sentence ("**Verification.** End to end via CDP"). - **A colon as a mid-sentence connector is out** ([unslop](references/skills/unslop.md) rule 14). A colon before a list is fine. - **Terse is not an excuse to drop content.** Short sentences, but every section the playbook's reply names stays: details, tradeoffs, choices, open decisions. - **Frame impact for the consumer and the maintainer.** Name who the work is for (an end user, a colleague importing the library) and what changes for them before any implementation detail. Then what the next engineer who owns this code inherits. If you cannot say what either would notice, the work or the explanation is off. - **Never fabricate a link, citation, or transcript reference.** Link only artifacts you produced or read this session. Every playbook ends with a reply written this way, PR link included when one exists. Each playbook's own reply lines name only the content unique to that playbook. ## Comments Comments follow the same rule as the reply. Write them clean as you go; a flat "no narrating comments" ban does not catch them, because you have to not write them in the first place. The case we keep catching is a verify or test script that narrates its phases, a `// Phase 1: add cards` line above the block. Delete it; the assertion or log string is the only doc you need. Write `assert(ok, 'persisted across restart')`, not a comment plus the code. This applies to every file you produce, including delegates' diffs and verify scripts. Keep a comment only for a non-obvious *why* the code cannot show. ## Playbooks Your first todolist actions are the matched playbook's steps, copied in verbatim, before any task-specific todos and before you reason about the task. The failure mode is reading a playbook then writing a bespoke plan that drops its named steps (`architect`, the throughput checkpoint). A step you choose not to do stays in the list with a one-line `skip: <reason>`; skipping silently is not allowed. Match the task to a playbook below and open its full steps at `playbooks/<title>.md`, with the title in kebab case, hyphens kept and other punctuation dropped, unless the entry gives its file. Copy its steps in verbatim. A large or cross-cutting effort (a migration across many call sites, an ambitious multi-part change), or work the user steps away from to trust later, routes to the **figure-it-out** procedure even when a narrower playbook like Feature fits. Use **figure-it-out** whenever no bundled playbook fits. It designs a bespoke, rigorous playbook for the task. A standing project-scale program (multi-day, many stacked PRs, a fleet of subagents under one coordinator) routes to **Orchestrate** instead; figure-it-out designs one bespoke run, Orchestrate runs the program. - **Investigation.** Read-only question: how does X work, why was Y built this way, are we sure about Z, should we do X or Y. - **Bug fix.** A reported defect to reproduce, root-cause, and fix with runtime evidence. - **Perf issue.** A measured slowness to trace and improve against a baseline. - **Hillclimb.** Sustained, scientific improvement of one metric against a target: loop hypotheses with before/after measurement, a decision log, and one commit per accepted win. Distinct from Perf issue, which is a one-off fix. - **Runtime forensics.** Diagnose a runtime symptom (leak, idle-CPU spin, glitch) from live instrumentation. The deliverable is a diagnosis, not a fix. - **Trace forensics.** Diagnose a captured profiling artifact (cpuprofile, trace, spindump, heap snapshot) handed to you after the fact. The deliverable is a diagnosis, not a fix. - **Feature.** New or changed behavior, built from a named data shape. - **Refactoring.** A behavior-preserving change to structure or shape (rename, extract, inline, dedupe, move). - **Prototype.** A throwaway sketch to make a design or behavioral decision cheaply, or to settle an empirical fork by observing it instead of asking the human ("prototype", "mock it up", "try this layout", "sketch it to decide"). - **Visual parity.** Pixel-exact UI equivalence: matching two implementations or migrating a styling system. - **Authoring or modifying a skill.** Writing or editing a SKILL.md. File: `playbooks/authoring-a-skill.md`. - **Eval.** Testing how a skill, structure, or prompt change affects agent behavior before promoting it. - **Babysit.** Driving a PR or a stack to merge-ready: conflicts, review threads, CI. - **Shipping.** The half after Babysit. Independently verifying a green stack, then landing the contiguous verified run bottom-up through `gh` by default or Origin when its CLI is available. - **Autonomous run.** A long task to drive to completion without stopping ("run until done"). - **Orchestrate.** A standing project handed to one coordinator chat: multi-day, many stacked PRs, dozens to hundreds of subagents, minimal human turns ("run this whole project", "own this migration until it lands"). Distinct from Autonomous run, which drives one task to a predicate. Work one agent could finish inside the session's budget routes there, not here, however program-shaped the phrasing sounds. - **Autopilot-full.** A queue of independent PRs run to merged with full autonomy. One owner per PR carries build through merge, and the root swarm-verifies each PR before its owner merges ("autopilot this queue", "full autopilot", one-owner-per-PR programs). - **Autopilot-stack.** Autopilot-full sem merge. Uma fila de PRs construída e verificada com autonomia e entregue ao operador para integrar. Um PR só entra em uma stack quando depende de outro PR ("autopilot-stack", "autopilot, don't merge", "stack them, don't ship", "build the stack, I'll land it"). - **Session pickup.** Resuming or taking over a prior agent's in-flight work from a transcript, cloud-agent URL, or pushed branch. - **Pause safely.** Suspending in-flight work cleanly so it can be resumed, on an explicit pause, going offline, a restart, or imminent context compaction. The complement to Session pickup. - **Multi-phase or multi-PR plan.** Work that spans phases or stacked PRs. File: `playbooks/multi-phase-plan.md`. - **Worktree and simulator cleanup.** Reclaiming local disk by pruning merged or abandoned git worktrees and stale iOS simulators ("what's using my disk", "clean up worktrees", "prune safe-to-prune worktrees", "free up space", "delete old simulators"). File: `playbooks/worktree-cleanup.md`. - **Opening a PR.** Invoked at the end of every other playbook. ## License and attribution Ported from [pstack](https://github.com/cursor/plugins/tree/main/pstack) by Lauren Tan and informed by [open-pstack](https://github.com/ericlitman/open-pstack), both MIT. This bundle adapts Cursor-specific mechanics (plugins, cloud agents, Graphite, `/loop`, bundled scripts) to platform-agnostic equivalents while preserving the operating method. -
UPSTREAM_COMMIT 41 B · in bundle
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.