Uppercase Snake For True Constants
Reserve `UPPER_SNAKE_CASE` for top-level program-wide constants whose value is fixed for the lifetime of the program and is also a primitive or deeply frozen value.…
$ prime install @web-style/rule-uppercase-snake-for-true-constants Projection
Always in _index.xml · the agent never has to ask for this.
UppercaseSnakeForTrueConstants [rule] v0.1.0
Reserve UPPER_SNAKE_CASE for top-level program-wide constants whose value is fixed for the lifetime of the program and is also a primitive or deeply frozen value. Not every const deserves UPPER_SNAKE_CASE — only the ones that act as named magic values.
Loaded when retrieval picks the atom as adjacent / supporting.
UppercaseSnakeForTrueConstants [rule] v0.1.0
Reserve UPPER_SNAKE_CASE for top-level program-wide constants whose value is fixed for the lifetime of the program and is also a primitive or deeply frozen value. Not every const deserves UPPER_SNAKE_CASE — only the ones that act as named magic values.
Checks
- The binding is at module scope (not a local
constinside a function). - The value is a primitive, a frozen object, or otherwise not meaningfully mutable.
- The name reads as a constant the consumer must not change:
MAX_RETRIES,DEFAULT_TIMEOUT_MS,API_BASE_URL. - Ordinary local
constbindings stay in camelCase —const user = await fetchUser()is camelCase, not UPPER_SNAKE.
Label
Use UPPER_SNAKE_CASE only for module-level deeply-immutable constants
Loaded when retrieval picks the atom as a focal / direct hit.
UppercaseSnakeForTrueConstants [rule] v0.1.0
Reserve UPPER_SNAKE_CASE for top-level program-wide constants whose value is fixed for the lifetime of the program and is also a primitive or deeply frozen value. Not every const deserves UPPER_SNAKE_CASE — only the ones that act as named magic values.
Checks
- The binding is at module scope (not a local
constinside a function). - The value is a primitive, a frozen object, or otherwise not meaningfully mutable.
- The name reads as a constant the consumer must not change:
MAX_RETRIES,DEFAULT_TIMEOUT_MS,API_BASE_URL. - Ordinary local
constbindings stay in camelCase —const user = await fetchUser()is camelCase, not UPPER_SNAKE.
Label
Use UPPER_SNAKE_CASE only for module-level deeply-immutable constants
Label
Use UPPER_SNAKE_CASE only for module-level deeply-immutable constants
Source
prime-system/examples/web-style/primes/compiled/@web-style/rule-uppercase-snake-for-true-constants/atom.yaml