Why this matters
Cuts allocations and GC pressure.
Hoist constant Regex/Formatters/Collections into top-level vals or companion objects; avoid recreating in hot paths.
Cuts allocations and GC pressure.
Side-by-side examples engineers can pattern-match during review.
fun ok(s: String) = Regex("^[a-z]+$").matches(s)private val LOWER = Regex("^[a-z]+$")
fun ok(s: String) = LOWER.matches(s)SimpleDateFormat(pattern) each callval fmt = DateTimeFormatter.ISO_INSTANTFrom the same buckets as this rule.
All static JS/CSS/font/image files MUST use content-hashed filenames (e.g., app.9c1a7b.js) and be served with "Cache-Control: public, max-age=31536000, immutable". HTML and other non-fingerprinted documents MUST be served with "Cache-Control: no-cache" (or equivalent) to enable conditional revalidation.