From 064ab10607e6b2421f6e18b2442bb2492d282e84 Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 8 Jan 2026 11:08:33 -0800 Subject: [PATCH] Add no-silent-fallback rule to CLAUDE.md Never silently fall back to a different setting when a user's parameter explicitly specifies a value. Return an error for invalid explicit values; only apply defaults for omitted parameters. --- CLAUDE.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 9c9ebe5..c9041c8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -58,6 +58,14 @@ These rules MUST be followed at all times, it is very important. * As this is production code, no stubbing of implementations unless specifically instructed. We need working implementations. +* NEVER silently fall back to a different setting when a user's parameter + explicitly specifies a value. If a user requests format=webp and WebP + encoding is not supported, return an error - do NOT silently output PNG + instead. If a user specifies fit=invalid and that fit mode doesn't exist, + return an error - do NOT silently default to "cover". Silent fallbacks + violate the principle of least surprise and mask bugs. The only acceptable + defaults are for OMITTED parameters, never for INVALID explicit values. + * Avoid vendoring deps unless specifically instructed to. NEVER commit the vendor directory, NEVER commit compiled binaries. If these directories or files exist, add them to .gitignore (and commit the