Deslop
Run this only after the change is functionally correct and before commit.
PR text should describe already-deslopped code.
Goals
- Keep the smallest clear diff that still solves the task.
- Run focused reviews in parallel instead of one subjective final pass.
- Preserve behavior while improving clarity, type safety, and rule alignment.
Required review vectors (exactly 3 agents, in parallel)
All 3 agents get the same context bundle, but each gets one vector:
- Rules and docs conformance
- Check
AGENTS.md, nestedAGENTS.md, design docs, and core beliefs. - Flag drift from documented patterns or ownership boundaries.
- Check
- Type safety and source of truth
- Preserve canonical types and inference flow.
- Flag casts, duplicated/redefined types, or unnecessary widening.
- Prefer compile-time guarantees inside typed internal code.
- Validate only at untrusted boundaries; do not re-validate trusted internal values.
- Overengineering and simplification
- Remove unnecessary code, wrappers, abstractions, factories, or indirection.
- Prefer direct, local solutions when equivalent.
Required context bundle
Read and pass these paths:
- repo root
AGENTS.md - nested
AGENTS.mdfor changed areas docs/index.mddocs/PLANS.mddocs/design-docs/index.mddocs/design-docs/core-beliefs.md- directly relevant design docs
- active exec plan for this work (if any)
- changed files plus nearby context
If working on an ExecPlan:
- inspect
docs/exec-plans/active/ - if one clearly matches, tell reviewers to study it carefully before reviewing
Delegation protocol
- Read the full context bundle yourself first.
- Launch all 3 required review agents immediately (in parallel).
- Do not wait for local lint/slop checks.
- Give each agent:
- same context bundle
- one assigned review vector
- instruction to return findings first, ordered by severity, with file refs
- While agents run, start with:
pnpm -w lint:slop:delta
- After all responses arrive, synthesize under these exact headings:
How did we do?Feedback to keepFeedback to ignorePlan of attack
- Use balanced synthesis over any single reviewer’s extreme take.
Auto-apply feedback (unattended flows)
Apply clear, in-scope fixes before commit, prioritizing:
- type drift, casts, duplicate type definitions
- documented boundary/design-belief violations
- dead helpers/code/debug leftovers/placeholders
- removable local indirection
Skip speculative, conflicting, or scope-expanding suggestions; note briefly in synthesis/workpad.
Execution steps
- Gather context bundle.
- Launch 3 required review agents in parallel.
- Run
pnpm -w lint:slop:deltaand narrow local checks while they run. - Wait for responses and synthesize.
- Apply worthwhile in-scope feedback.
- Re-run the narrowest affected validation.
- Update workpad/commit/PR text to describe final post-deslop state.
Stop rules
- No refactors unrelated to the ticket.
- No churn outside changed area for style only.
- Leave subjective/unclear “improvements” alone.
- Do not blindly apply every suggestion.