{
  "uid": "cogitave.learn.apply-naming-standards.the-naming-rules",
  "kind": "moduleUnit",
  "href": "/modules/apply-naming-standards/the-naming-rules/",
  "title": "The naming rules",
  "summary": "",
  "type": null,
  "products": [],
  "roles": [],
  "levels": [],
  "subjects": [],
  "headings": [
    "The principles that decide most names",
    "Naming the things you will touch first"
  ],
  "source": "The [naming standard](../../../../standards/docs/standards/naming.md) opens with\n**cross-cutting principles** that apply in every context, then pins concrete\nconventions per language and per domain. Learn the principles; they explain the\nconventions.\n\n## The principles that decide most names\n\n- **Consistency over preference.** Pick one convention per context and lint it;\n  uniformity beats any single \"best\" casing.\n- **No stutter.** Never repeat the namespace, package, or type in a member name -\n  `bufio.Reader`, not `bufio.BufReader`.\n- **No redundant prefix.** The hierarchy already disambiguates, so drop the\n  `cogitave-` echo inside a `cogitave/` namespace. The exception is a *flat\n  global* namespace where a prefix avoids collision - `COG_` env vars,\n  `com.cogitave.*` event types, `cogitave:` tag keys.\n- **Casing by role, not habit.** `UpperCamelCase`, `snake_case`, and\n  `SCREAMING_SNAKE_CASE` are assigned by an identifier's role in each language.\n- **Immutable IDs; mutable facts in metadata.** Bake only permanent attributes\n  into a name. Environment, owner, and cost go in tags and labels - never the\n  name.\n- **Machine-enforceable.** Every rule maps to a linter or policy gate.\n\n## Naming the things you will touch first\n\n**Repos.** Plain, lowercase **kebab-case** keywords - `bootstrap`, `core`,\n`standards`, `agents`, `infra`. **No redundant `cogitave-` prefix**: the org\nalready provides the namespace. A product family takes its own prefix as it grows\n(`yuva-sdk`, `namzu-runtime`). Tiers such as `self`, `public`, and `internal` are\n`estate.yaml` metadata **values**, never folders or repo names - do not name a\nrepo `internal` or `public`.\n\n**UIDs.** Dotted, immutable, globally unique - `cogitave.<area>.<slug>`. A doc's\nURL may change; the UID never does.\n\n**Code identifiers.** Cased by role in each language: Rust uses `snake_case` for\nfunctions and `UpperCamelCase` for types, with **acronyms as one word** (`Uuid`,\n`Http`, `Mcp`); Go uses `MixedCaps` and keeps initialisms uniform (`ID`, `URL`,\n`ServeHTTP`, never `Url`/`Id`); TypeScript uses `PascalCase` types and\n`camelCase` values with **no `I`-prefix on interfaces**.\n\n**Files.** TypeScript files are **kebab-case** (`mcp-client.ts`) with\n`PascalCase` symbols inside; Rust files are `snake_case.rs` where file equals\nmodule. Repo-root markers are UPPERCASE (`README.md`, `LICENSE`, `CHANGELOG.md`,\n`CODEOWNERS`).\n\n**Branches.** `type/ISSUE-ID-kebab-description`, lowercase, a single `/`, the\n**type drawn from the Conventional Commits vocabulary** - for example\n`feat/COG-417-mcp-stream-cancel`. The commit and version semantics behind that\ntype are owned by\n[commits-versioning](../../../../standards/docs/standards/commits-versioning.md).\n\n> [!TIP]\n> When two guides disagree, the naming standard makes one opinionated, linted\n> choice and cites its source. You do not have to arbitrate - follow the\n> standard's choice and the gate will confirm it.\n",
  "partOf": "cogitave.learn.apply-naming-standards",
  "durationInMinutes": 7,
  "quiz": null
}