accessibility
IMPORTANT: Every image must have an alt attribute. IMPORTANT: Every form must have associated labels. IMPORTANT: The site must be 100% keyboard naviga
IMPORTANT: Every image must have an alt attribute. IMPORTANT: Every form must have associated labels. IMPORTANT: The site must be 100% keyboard naviga
// Error "success": false, "error": "code": "VALIDATION_ERROR", "message": "Email is required", "details": [...] ```
Astro renders **zero JS by default**. Components are static HTML unless explicitly "hydrated" via `client:*` directives. Use Astro for content-heavy s
Any addition, removal or rename in `.claude/` silently breaks the docs and tests if counters are not kept in sync. The PostToolUse hook `base-integrit
// 2. Private readonly fields private readonly IUserRepository _userRepository; private readonly ILoggerUserService _logger;
Every deployment must be validated before execution. Never deploy dev config to production.
The project's design direction is defined in CLAUDE.md:
// State abstract class AuthState class AuthInitial extends AuthState class AuthLoading extends AuthState class AuthSuccess extends AuthState clas
[optional body - details on the "what" and "why"]
// Custom errors var ErrUserNotFound = errors.New("user not found")
// 2. Static fields private static final Logger logger = LoggerFactory.getLogger(UserService.class);
LSP available via `ENABLE_LSP_TOOL=1` or LSP plugins configured in `.lsp.json`. Language servers must be installed locally (npm, pip, go install, etc.
Major framework or dependency migrations are risky. Always follow a structured process to avoid cascades of CI failures.
Next.js Rules
IMPORTANT: LCP 2.5s - Optimize above-the-fold images. IMPORTANT: INP 200ms - Avoid blocking operations. IMPORTANT: CLS 0.1 - Always specify media d
declare(strict_types=1);
import requests from pydantic import BaseModel
export function MyComponent( title, onAction : Props) const [state, setState] = useStatestring('');
Before implementing a custom solution, check whether the framework or tool in place already provides the functionality natively.
users.each do |user| puts user.name puts user.email end ```
// 2. Constants const MAX_CONNECTIONS: usize = 100;
3 attack vectors identified (Feb. 2026) when cloning untrusted repos:
The SW must NEVER cache `request.mode === "navigate"` responses. Caching HTML pages causes: - Stale JS references after deployments - Broken React/Vue
Svelte 5+ uses **runes**: `$state`, `$derived`, `$effect`, `$props`. Do not use the `$:` reactive syntax or implicit reactive `let` anymore.
IMPORTANT: When the user asks to implement, add, create, fix or correct code, Claude MUST propose the TDD approach BEFORE starting to code.
// Act - Execute the action const result = functionToTest(input);
TypeScript Rules
Any implementation must be verified BEFORE being considered complete. Never assume a fix works without proving it.
const count = ref(0) const double = computed(() = count.value * 2) /script ```
Before starting work on an existing project: