From 9f4f456dc504bc7220f2be1c3979fcdcfe6a05e5 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Sat, 10 Oct 2026 18:10:32 +0200 Subject: [PATCH] CLAUDE.md: search for an existing helper by behaviour; run the dead-code and duplicate gates Names the helper homes (web lib/, backend Functions/Helpers/) and asks for a search by what a helper does before writing a new one, which no tool can judge. Lists the local commands for the new gates, since CI only reports. Co-Authored-By: Claude Opus 5.5 --- .claude/CLAUDE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index cc65de83..7f888789 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -38,6 +38,8 @@ - Simplicity first: minimal, targeted changes. No temporary fixes — find the root cause. - Where architecture is flawed, state is duplicated, or patterns are inconsistent, propose and implement the structural fix. Ask what a perfectionist reviewer would reject, and fix that too. - On non-trivial changes, ask whether there is a more elegant way before presenting. Skip it for simple fixes — don't over-engineer. +- Reuse before you write: search for an existing helper by what it does (its key call, literal or regex), not by a guessed name. Web helpers live in `lib/` (route-only ones in a `lib/` beside the route), backend helpers in `Functions/Helpers/`. +- Dead and copied code is gated: the .NET build fails on unused private members and parameters (`.editorconfig`), `npm run knip` covers web and MCP, and `npm run dup` in `tools/quality` fails on new clones. CI only reports, so run them before calling a change done. - English for code comments and everything that carries knowledge. Private half of these instructions (process, working files, technical docs, operations): @../internal/CLAUDE.md