# Nx target-name vocabulary

Canonical target names for every project (deep-audit C-1/C-2, 2026-07-18).
`nx.json` `targetDefaults` and `cacheableOperations` key on these names —
variant spellings silently lose caching and affected-graph ergonomics.

## Canonical names

| Concept                   | Canonical name     | Never                                  |
| ------------------------- | ------------------ | -------------------------------------- |
| Compile/build             | `build`            | `build:ts`, `compile`                  |
| Unit tests                | `test`             | `test:ts`, `unit`                      |
| Integration tests         | `test:integration` | `test-integration`, `integration`      |
| Type checking             | `typecheck`        | `type-check`, `typecheck:ts`, `tsc`    |
| Linting                   | `lint`             | `lint:ts`, `eslint`                    |
| Format check (CI)         | `format-check`     | `fmt-check`, `format:check`            |
| Format write (local)      | `format`           | `fmt` (grandfathered in Rust projects) |
| Coverage-reporting tests  | `test-cov`         | `coverage`                             |
| End-to-end                | `e2e`              | `e2e:ci`                               |
| Dev server (never cached) | `dev` or `serve`   | —                                      |

Rust crates: wrap cargo in the canonical names (`test` → `cargo test`,
`typecheck` → `cargo check`, `lint` → `cargo fmt --check` and/or clippy). `fmt`
(422 uses) and `cargo-test` (17) are grandfathered legacy spellings — they are
cache-bridged in `targetDefaults` (below) but new projects use the canonical
names; renames land domain-by-domain with the R-14 slices.

## Cache bridge

`nx.json` `targetDefaults` carries `cache: true` entries for the grandfathered
variants (`fmt`, `type-check`, `test-cov`, `cargo-test`, `format-check`) so the
legacy spellings at least cache until renamed. Do not add new names to that
bridge — rename to canonical instead.

## Enforcement

New-lib generators default to canonical names. When touching a project with
variant names, rename opportunistically (update any CI/scripts that call the
variant — grep first: workflow files, `scripts/verify-manifest.json`, package
scripts).

## Library placement depth (deep-audit B-7)

New libraries live at `libs/<domain>/<lib>` (depth 3). Deeper nesting is allowed
only for domains with an approved taxonomy documented in their
`libs/<domain>/README.md` (today: iris's 3-level capability tree, nyx's
catalogs/analysis split, galatea's event-handlers). Do not introduce a new
depth-4 grouping ad hoc — propose it in the domain README first.
