Problem. Build has a one-line YAGNI rule but no diff-traceability check, so drive-by edits (reformatting, added type hints, unrequested validation) slip through.
Proposal. Before the Phase 4 commit, every git diff hunk must trace to a plan task or the original request; revert untraceable churn; delete only self-created orphans; emit "Noticed (not changed):" for pre-existing dead code.
Acceptance criteria.
Problem. Build has a one-line YAGNI rule but no diff-traceability check, so drive-by edits (reformatting, added type hints, unrequested validation) slip through.
Proposal. Before the Phase 4 commit, every
git diffhunk must trace to a plan task or the original request; revert untraceable churn; delete only self-created orphans; emit "Noticed (not changed):" for pre-existing dead code.Acceptance criteria.