From ca507f67962157fae716faee98d69754cacda4e2 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Mon, 6 Apr 2026 15:45:20 +0200 Subject: [PATCH] fix: forbid lowering CodeScene thresholds in CLAUDE.md --- CLAUDE.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d1656b45..6825d5f1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -67,13 +67,11 @@ Red → Green → Refactor → Commit. One cycle per commit. For bugs: write fai Pre-commit and pre-push hooks enforce **Hotspot Code Health** and **Average Code Health** ≥ thresholds in `.codescene-thresholds`. Both gates block commit/push. Thresholds are a **ratchet** — only go up, auto-updated after each successful push. Never add `// eslint-disable`, `#[allow(...)]`, or `as any`. -**Before every commit:** -- `mcp__codescene__code_health_review` — check file before touching -- `mcp__codescene__code_health_score` — verify score is higher after changes +**⛔ NEVER edit `.codescene-thresholds` to lower the values.** If the gate blocks you, improve the code — do not lower the bar. -**Boy Scout Rule:** every file you touch must leave with a higher score. If Average drops below 9.0, fix regressions before pushing. +**Before every commit:** run `mcp__codescene__code_health_review` on files you touched and verify score is higher. **Boy Scout Rule:** every file you touch must leave with a higher score. -**If CodeScene gate blocks your push:** use `mcp__codescene__code_health_score` to find the worst file, refactor it (extract function, reduce complexity), commit the refactor, push again. Do NOT stop or wait for laputa-refactor — that is a background loop, not a substitute for fixing your own regressions. +**If CodeScene gate blocks your push:** use `mcp__codescene__code_health_score` to find the worst file, refactor it, commit, push again. Do NOT stop or wait for laputa-refactor — that is a background loop, not a substitute for fixing your own regressions. ### Check suite (runs on every push) ```bash