.pi/prompts/deslop.md
Review the completed workpackage and simplify its implementation without changing its intended behavior.
any, unnecessary assertions, broad types, and optional fields for impossible states.Before making any significant or potentially intentional removal, stop and ask the user for approval. First explain:
Wait for explicit approval before applying that change. Do not bundle approval for multiple independent decisions; present them separately when the tradeoffs differ.
Treat a decision as significant when it removes or materially changes any of the following:
Routine, behavior-preserving cleanup does not require approval, such as inlining a single-use trivial helper, removing an unreachable branch proven impossible by the type model, or deleting newly added duplication. If uncertain whether a removal is significant, ask.
After editing, review the final diff for avoidable complexity, duplication, indirection, defensive branches, and accidental behavior changes. Report:
Passing tests and type checks is necessary but not sufficient. Leave the affected code easier to understand and change.