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.
This commit is contained in:
Jeffrey Paul 2026-01-08 11:08:33 -08:00
parent 37af10cc2b
commit 064ab10607

View File

@ -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