# Labels domain

`label` is an inline display field carried by status entries, stage entries, System entries,
knowledge nodes, registry entries, and sidebar surfaces in the OrganizationModel. Labels control what users see in the UI and what
agents say when narrating state. Editing a label does not change the entry's `id` or
`semanticClass` -- only the human-readable display string. This is Level A only (config-only
edits to a single file under `core/config/`).

## What carries labels

The following model elements have editable inline `label` fields:

**Status / stage entries.** Each domain that carries an enum-like array exposes per-entry labels:

- `sales.statuses` -- deal pipeline stages.
- `prospecting.statuses` -- lead lifecycle stages.
- `projects.statuses` -- project and task stages.

Source of platform defaults: `packages/core/src/organization-model/domains/{sales,prospecting,projects}.ts`.

Each status entry shape:

```typescript
{ id: 'new', label: 'New Lead', semanticClass: 'active', color: 'blue' }
```

**Systems.** The `label` field on a System entry. Editing it changes agent narration and any
System-derived shell text, but it does not change the System `id`, route path, or graph node id.

**Sidebar surfaces.** Routeable leaves under `navigation.sidebar.primary` and
`navigation.sidebar.bottom` carry labels. Editing changes nav item and breadcrumb display without
changing the route path or target System refs.

**Knowledge/domain entries.** Knowledge nodes, customers, offerings, goals, roles, resources,
actions, entities, and policies may carry labels or titles depending on the domain. Edit only the
display field that already exists on the entry.

## What is NOT in scope

`id` and `semanticClass` of any entry must never change in a label edit -- they are structural
anchors used by code, hooks, and workflow adapters. Only `label` (and optionally `color` or
`icon`) are in scope. To rename an `id`, escalate to a separate Level B refactor with explicit
confirmation, because every consumer that references the old `id` must be updated in the same
change.

## Validation rules

- `label` is non-empty, max 120 characters.
- `id` and `semanticClass` are unchanged from the previous state.
- Entries not being edited remain byte-identical in the output -- partial array rewrites are
  preferred over wholesale array replacement to minimize diff surface.

## Realistic examples

Rename two sales statuses:

```
Domain: sales (deal pipeline)
  new:           "New Lead"        -> "Inbound Lead"
  proposal:      "Proposal Sent"   -> "Proposal Out"
  negotiation:   (unchanged)
```

Rename a System label without changing its ID:

```
systems:
  sales.crm:     label "CRM"            -> "Sales Pipeline"
  (id stays 'sales.crm'; graph node remains 'system:sales.crm')
```

Rename a sidebar surface:

```
navigation.sidebar.primary:
  sales.crm:     label "Pipeline"       -> "Deal Pipeline"
```

## Where it lives

**Split projects:** the target file depends on what carries the label being edited:

- Status/stage entries and System entries -- `core/config/organization-model/systems.ts`
- Sidebar navigation surfaces -- `core/config/organization-model/navigation.ts`
- Business-profile domain entries (customers, offerings, roles, goals) -- `core/config/organization-model/profile.ts`

**Unsplit projects:** `core/config/organization-model.ts` for all label edits.

Pass the appropriate path as `targetFile` when invoking `operations/codify-level-a.md`.

**Note:** `labels` is not currently authored as a standalone top-level domain key in either the
template or reference tenant model. Label fields are inline properties on the entries listed
above. Do not invent a top-level `labels` key in `profile.ts`.

## Validation gate

Every label change must pass before codify completes:

1. `pnpm -C operations check-types`.
2. `resolveOrganizationModel()` and `OrganizationModelSchema.parse()` succeed on the merged result.

On failure, the codify ceremony rolls back. See `operations/codify-level-a.md` for the rollback
procedure.

---

> **Read via `/om`** (legacy `/knowledge` alias also accepted) -- natural-language queries like
> "what's the label for the proposal stage?" or "what do we call the SEO System?" route to this
> domain via the skill's intent classifier. To rename one or more labels, the `/om` skill triggers
> the codify ceremony when intent classifies as Codify.
