# Nomenclature

Naming and casing for code — identifiers, files, folders. The rationale throughout is consistency: one concept, one name, one casing shape, in every repo that loads this rule.

Names state intent in full words — clarity over brevity; no abbreviations unless universally understood (`id`, `url` ✅ · `cfg`, `btn`, `idx` ❌).

## Casing

| Casing | Used for | Example |
| --- | --- | --- |
| `camelCase` | variables, functions, methods, properties; a module file exporting no component | `calculateTotal`, `sessionClient.ts` |
| `PascalCase` | classes, type definitions, components; the file exporting one | `PaymentProcessor`, `AppsListPage.tsx` |
| `UPPER_SNAKE_CASE` | constants, environment variables | `MAX_RETRY_COUNT` |
| `kebab-case` | URLs, CSS class names, HTML IDs, multi-word folders | `user-profile`, `workspace-provisioning/` |
| `snake_case` | database tables, columns, indexes | `created_at` |

**A file exporting one component carries that component's name exactly**, so an import names the file it came from; a single-word folder is plain lowercase (`lib`, `surfaces`). ❌ Never `snake_case` a file or folder — that casing belongs to the database.

## Identifier shape

| Identifier | Shape | Example |
| --- | --- | --- |
| Boolean | `is` / `has` / `can` / `should` prefix — **never** a bare adjective | `hasPermission` |
| Array / collection | plural noun | `errorMessages` |
| Event handler | `handle` or `on` prefix | `handleSubmit`, `onPageLoad` |
| Interface | `I` prefix acceptable; type aliases stay plain | `IConfigOptions`, `AuthResponse` |
