From 3065f0832821478a538c75d27234216fc6604dd8 Mon Sep 17 00:00:00 2001 From: bchanot Date: Wed, 14 Oct 2026 12:51:39 +0200 Subject: [PATCH] chore(rules): self-explanatory code, literal-scope guideline --- CLAUDE.global.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CLAUDE.global.md b/CLAUDE.global.md index b3c5419..25a230e 100644 --- a/CLAUDE.global.md +++ b/CLAUDE.global.md @@ -8,7 +8,8 @@ Apply unless repo-specific instructions override. - Simple, readable, maintainable > clever or compact. - One responsibility per function/method. - Preserve existing behavior unless asked. -- Scope changes to task — no unrelated edits. +- Scope changes to task — no unrelated edits. Literal ask: button color → + change the color, no theme or token system. Idea beyond scope → ask first. - Before writing code, stop at the first rung that applies: not needed (YAGNI) → reuse what the codebase has → stdlib → platform/runtime feature → dependency already installed → one line → the minimum that @@ -23,7 +24,8 @@ Apply unless repo-specific instructions override. - No global state. Explicit data flow. ## Comments & readability -- Document intent, not mechanics. Use project doc style (docstring, JSDoc…). +- Self-explanatory code: names and structure carry the meaning. Comment only + what the code can't say (why, intent). Project doc style (docstring…). - Explicit, consistent names. Straight control flow, no hidden side effects. - Written deliverables (docs, reports, .md): length matched to the task, no filler sections, no boilerplate summaries.