From 50ad7e0e8c8a24588c19bd227eb997a47efde05d Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 24 Mar 2026 15:58:23 +0100 Subject: [PATCH] =?UTF-8?q?docs:=20add=20Boy=20Scout=20Rule=20to=20CLAUDE.?= =?UTF-8?q?md=20=E2=80=94=20leave=20every=20touched=20file=20better=20than?= =?UTF-8?q?=20found?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 80b306c6..eb9b82dd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,6 +20,14 @@ cargo llvm-cov --manifest-path src-tauri/Cargo.toml --no-clean --fail-under-line If Average Code Health is below 9.0, you must fix regressions before pushing — even in files you didn't directly modify, if your changes indirectly affected complexity. +**Boy Scout Rule (Robert C. Martin):** Leave every file you touch better than you found it. When working on any task: +1. Before modifying a file, check its CodeScene health: `mcp__codescene__code_health_review` +2. If the file has issues (complexity, duplication, large functions), fix them as part of your work +3. After your changes, verify the file's score is higher than before: `mcp__codescene__code_health_score` +4. The goal: every commit either maintains or raises the overall average. No commit should lower it. + +This is not optional — it's how we incrementally raise the codebase quality with every task. + ## ⛔ BEFORE FIRING laputa-task-done — Two-phase QA ### Phase 1: Playwright (you do this)