Aller au contenu principal

30 documents tagués avec "rule"

Voir tous les tags

accessibility

IMPORTANT: Every image must have an alt attribute. IMPORTANT: Every form must have associated labels. IMPORTANT: The site must be 100% keyboard naviga

api

// Error "success": false, "error": "code": "VALIDATION_ERROR", "message": "Email is required", "details": [...] ```

astro

Astro renders **zero JS by default**. Components are static HTML unless explicitly "hydrated" via `client:*` directives. Use Astro for content-heavy s

base-maintenance

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

csharp

// 2. Private readonly fields private readonly IUserRepository _userRepository; private readonly ILoggerUserService _logger;

deploy-safety

Every deployment must be validated before execution. Never deploy dev config to production.

design-style

The project's design direction is defined in CLAUDE.md:

flutter

// State abstract class AuthState class AuthInitial extends AuthState class AuthLoading extends AuthState class AuthSuccess extends AuthState clas

git

[optional body - details on the "what" and "why"]

go

// Custom errors var ErrUserNotFound = errors.New("user not found")

java

// 2. Static fields private static final Logger logger = LoggerFactory.getLogger(UserService.class);

lsp

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.

migration-safety

Major framework or dependency migrations are risky. Always follow a structured process to avoid cascades of CI failures.

performance

IMPORTANT: LCP 2.5s - Optimize above-the-fold images. IMPORTANT: INP 200ms - Avoid blocking operations. IMPORTANT: CLS 0.1 - Always specify media d

php

declare(strict_types=1);

python

import requests from pydantic import BaseModel

react

export function MyComponent( title, onAction : Props) const [state, setState] = useStatestring('');

research

Before implementing a custom solution, check whether the framework or tool in place already provides the functionality natively.

ruby

users.each do |user| puts user.name puts user.email end ```

rust

// 2. Constants const MAX_CONNECTIONS: usize = 100;

security

3 attack vectors identified (Feb. 2026) when cloning untrusted repos:

service-worker

The SW must NEVER cache `request.mode === "navigate"` responses. Caching HTML pages causes: - Stale JS references after deployments - Broken React/Vue

svelte

Svelte 5+ uses **runes**: `$state`, `$derived`, `$effect`, `$props`. Do not use the `$:` reactive syntax or implicit reactive `let` anymore.

tdd-enforcement

IMPORTANT: When the user asks to implement, add, create, fix or correct code, Claude MUST propose the TDD approach BEFORE starting to code.

testing

// Act - Execute the action const result = functionToTest(input);

verification

Any implementation must be verified BEFORE being considered complete. Never assume a fix works without proving it.

vue

const count = ref(0) const double = computed(() = count.value * 2) /script ```

workflow

Before starting work on an existing project: