# Naming Policy

> Type: Policy. How to name entities in code and runtime.

## Contents

- [Target](#цель)
- [Name notation](#нотация-имени)
- [External and published names](#внешние-и-опубликованные-имена)
- [Runtime names](#runtime-names)
- [Prohibition of renaming without a task](#запрет-переименований-без-задачи)
- [Check](#проверка)

## Target

A name helps explain an entity’s role before its implementation is read. Consistent names make searching and moving between modules easier, while familiar notation indicates whether something is a type, a function, or an operational scenario name.

The examples below illustrate conventions using particular entities. Domain concepts and actual names follow the project’s context; published external contracts retain their existing identifiers.

## Name notation

Identifiers and files follow the notation of their language and framework. JavaScript, TypeScript, and Svelte conventions are collected in [Languages and platforms](./languages-and-platforms.md#именование-в-javascript-и-typescript).

## External and published names

Published public APIs, compatibility aliases, generated declarations, and framework-prescribed names are preserved verbatim. Changing their notation is not an ordinary rename.

The names of URL and storage keys, serialized fields and Worker messages are compatibility-sensitive and do not change like a regular cleanup. The stable terms of the project are preserved in the code and documentation.

## Runtime names

Names of runtime scenarios, profiles, and commands are distinct from code identifiers.

For these, it is preferable to use `kebab-case`.

Acceptable:

```ts
const profileName = 'mean-return-l5-prenorm';
const commandName = 'print-predictions';
const optionName = '--target-diagnostics';
```

It is prohibited to use `ALL_CAPS` runtime-name without external need:

```ts
const profileName = 'PRODUCTION_CORE_V2';
```

## Prohibition of renaming without a task

The scope of a rename follows the [change policy](./change-policy.md). Naming rules alone do not authorize bulk renames.

Renaming is allowed only if:

* it is directly required by the task;
* it corrects a violation of this policy;
* minimal modification required;
* program behavior does not change.

When a rename is needed, check imports, exports, tests, docs, CSS selectors, storage/URL keys and dynamic references.

## Check

Violations of this policy should be blocked at the review level.
