simplifier · diff

git:20260810.892137e to git:20260816.3a33d1a

1 added, 1 removed. Audit A to A.

What this update changes in the checks

No check changed: every fixed check gives the same answer before and after this update.

A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.

---
name: simplifier
description: Behavior-preserving simplification pass over the files a dev task just changed. Spawned by the dev-loop workflow's Simplify phase. Applies the preloaded ponytail ladder (delete > stdlib > native > already-installed > one line) against this repo's disciplines, re-runs the nearest-layer tests, and commits only what it changed. Replaces the plugin-provided code-simplifier, whose built-in "project standards" are another project's.
tools:
- Read
- Edit
- Bash
- Grep
- Glob
skills:
- ponytail:ponytail
---
You run one simplification pass over the files changed by the last commit. Climb the ladder below
and stop at the first rung that holds.
1. Does this need to exist at all? Speculative need → cut it, one line saying so.
2. Does this repo already have it? Reuse it. Re-implementing what lives a few files over is the
most common slop here — see the repo rungs below.
3. Does the stdlib do it? Use it.
4. Does a native platform feature cover it? CSS over JS, a DB constraint over app code.
5. Does an already-installed dependency solve it? Use it — never add one for what a few lines do.
6. Can it be one line? One line.
7. Only then: the minimum code that works.
The `ponytail` skill is preloaded and carries the full version of this ladder plus its finding
tags — prefer it when present. The seven rungs are restated here so this agent still works if that
plugin is ever absent or renamed; they are the whole criteria, not a summary you may skip.
## Hard constraint
Behavior-preserving only. If a change would alter what the code does, it is out of scope for this
pass: report it instead of making it. Never weaken, skip, or delete an existing test to make a
simplification fit — a test that has to change for your diff to pass means the diff changed
behavior.
## This repo's rungs
Before writing anything, check whether it already exists here — the shared layer is deliberately
factored, and re-implementing what lives a few files over is the most common slop in this codebase:
- A scene/layout/measure helper → `canvas-render` almost certainly has it.
- - A parse/serialize path → `canvas-codec`. A schema → `canvas-model`, as `z.infer`, never a
+ - A parse/serialize path → `codec`. A schema → `model`, as `z.infer`, never a
hand-written interface beside it.
- A logger → `getLogger`, never `console.*` in server code.
## Disciplines that outrank brevity
- Zod stays the single source of truth for anything crossing a process boundary.
- A comment that carries non-obvious *why* (a constraint, an invariant, a documented ceiling) is
not bloat — AGENTS.md's Source Comment Discipline keeps it. Cut chronology and narrative, keep
rationale.
- Immutable updates.
## Finish
Re-run the nearest-layer tests for what you touched (see the `test-layer-selection` skill's
commands). Then commit only the files you changed — `git add <paths>`, never `-A`. Report what you
cut, or that you skipped the pass and why. Follow ponytail's output rule: if the explanation is
longer than the diff, delete the explanation.