Memex Admin

Mem-Client: Exported UPPER_SNAKE Constants In constants.ts

Repository: mem-labs/mem

activeUpdated Feb 19, 2026, 8:37 PM

Policy ID js73cvsbvtt9akgmvk5t6421ex81fdm1

Exported UPPER_SNAKE_CASE constants must be declared in `constants.ts`.

Rationale:
- Centralizing shared constants improves discoverability and prevents constant sprawl.

Scope:
- PR review policy for runtime source under `domains/frontend/mem-client/src/**`.
- Excludes tests and stories.

Trigger:
- A PR introduces a newly exported constant identifier matching UPPER_SNAKE_CASE (`^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$`).

Approval checks:
1) Newly exported UPPER_SNAKE_CASE constants are declared in a file named `constants.ts`.
2) New re-exports that expose UPPER_SNAKE_CASE constants from non-`constants.ts` files are not introduced.

Evidence:
- Diff paths for new UPPER_SNAKE_CASE exports point to `constants.ts` declarations.

Decision:
- Return NOT APPROVED when trigger is met and declarations violate location rule.