# Plate agent rules This codebase is yours: what it's for and how it's built are your call, and you'll keep building on it. Paths in these instructions are relative to the repository root. - `AGENTS.md` and `.agents/rules/*.mdc` own local instructions. After editing either, run `pnpm run prepare` and confirm with `node .agents/rules/plate-next/scripts/sync-resources.mjs --check`; [docs/development/agent-skills.md](docs/development/agent-skills.md) says what each does. Never edit vendor/package skills or any Next dev loop copy. pstack skills come from the pinned plugin as `pstack:`; other shared skills are installed by name. Load a repo rule through the Skill tool, or read its whole source and every reference it marks as required; a sampled first screen does not count as reading it. - **Code.** Before you plan or make a change to any source, test or tooling file, or review or deslop one, read [CODING_STANDARDS.md](CODING_STANDARDS.md) in full. The rules table that `/pstack:correct` keeps is [docs/development/enforcement.md](docs/development/enforcement.md). - **Redesign from First Principles, then KISS.** It governs `next`, the Plate v2 beta redesign; production release is not imminent, and the policy is revisited when v2 ships. `VISION.md`'s Next beta section and `docs/vision/common.md#redesign-from-first-principles` hold the law; read them before any API or architecture plan, review or feedback request. Lead harsh honest feedback with the strongest materially justified cut, even when its blast radius is large. ## How work runs - pstack's `poteto-mode` is the engineering method. The `pstack@pstack-claude` plugin is pinned to GitHub tag `v0.9.143` in `.claude/settings.json`, and each person's Codex marketplace pins the same tag. Its session hook routes multi-file, design and unexplained-bug work into poteto-mode, which picks the playbook. Questions, small edits and one-file changes work directly and are verified on the real artifact. - Project playbooks in `.agents/playbooks/` build on pstack's, as poteto-mode's Project playbooks paragraph describes. `check-playbooks.mjs` ships with pstack, not the project. After a project playbook changes and before one applies, run `node /skills/poteto-mode/scripts/check-playbooks.mjs` from the project root, where `` is the directory above `skills/` in the base directory a pstack skill prints. This project's playbooks are: - `.agents/playbooks/babysit.md`, on top of pstack's `babysit`. Use it to finish, perfect or clean up an existing PR or the current tree, merging the PR once it is green, or for "review PR " on someone else's PR. - `.agents/playbooks/bug-fix.md`, on top of pstack's `bug-fix`. Use it for a Plate or Plite bug report, a regression, a screenshot or recording of wrong behavior, or "diagnose ". - `.agents/playbooks/build.md`, on top of pstack's `feature`. Use it for a plan that goes on to its build, "go" or "Build now" after a plan, "build now" or "complete the build", `execute `, or removing a feature (a hard cut). - `.agents/playbooks/perf-issue.md`, on top of pstack's `perf-issue` and `hillclimb`. Use it to benchmark, profile or compare Plate, Plite or Slate speed, to find, explain or repair a performance regression or a lying benchmark, or for `benchmark [scope]` and `benchmark only `. - `.agents/playbooks/plan.md`, on top of pstack's `multi-phase-plan`. Use it for a Pursue verdict, which continues into it, for "plan", `plan `, "design plan", or an architecture or API adoption plan. - `.agents/playbooks/refactoring.md`, on top of pstack's `refactoring`. Use it to audit or simplify Plate or Plite code ownership, such as "clean up ", "simplify " or a structural audit that deletes, merges, inlines or splits code; retiring docs goes to `research` instead. - `.agents/playbooks/triage.md`, on top of pstack's `investigation`. Use it for `triage`, `triage label: