# Organization Model Multi-File Split

## Why this note exists

`core/config/organization-model.ts` has grown large enough that authoring, review, and `/om`
codify writes are easier against focused files. This change splits the single file into an
entry file plus a sibling directory, WITHOUT changing the entry filename, the public export
contract, or any consumer import. The SDK loader, the Tier-2 merge rule, and every downstream
consumer continue to resolve `core/config/organization-model.ts` exactly as before.

This note is the Tier-1 → Tier-2 handoff interface: the source split lands now (Tier 1); the
`/external sync` propagation to derived tenants is deferred to a `/sdk ship` cycle (Tier 2).

## What changed

The model is now authored across four files:

- `core/config/organization-model.ts` -- ENTRY: assembles `canonicalOrganizationModel` /
  `organizationModel` and re-exports every public symbol. No consumer import changes.
- `core/config/organization-model/profile.ts` -- the `defineOrganizationModel(...)` body
  (identity, customers, offerings, roles, goals). Primary `/om` codify write target.
- `core/config/organization-model/systems.ts` -- systems, resources, topology, entities,
  actions, resource governance, feature/system-ID constants.
- `core/config/organization-model/navigation.ts` -- sidebar navigation tree and surface
  projection; imports `systems.ts` directly (never via the entry) to keep the graph acyclic.

## Applies to

- `external/_template/core/config/organization-model.ts` and the new `organization-model/`
  sibling directory
- Any downstream tenant project derived from `_template` that opts in to the split (the
  Tier-2 merge does NOT force adoption — single-file projects remain valid)

## Sync tiers for the new siblings

- `organization-model.ts` (entry) -- `merge` / `merge-regions` / `@elevasis/core` (unchanged)
- `organization-model/systems.ts` -- `merge` / `merge-regions` / `@elevasis/core`
- `organization-model/navigation.ts` -- `merge` / `merge-regions` / `@elevasis/core`
- `organization-model/profile.ts` -- `never-touch` / `verify-only` / project-owned (the
  `/om` codify write target; sync never overwrites it)

## Required actions

- For an unsplit project that wants the split: mirror the four-file layout from `_template`,
  preserving the `defineOrganizationModel(...)` body verbatim into `profile.ts`. Keep the
  entry filename and the full public export barrel.
- No action is required to stay on the single-file layout — it remains supported.

## Verification

- `pnpm -C core test` (snapshot equality — the resolved model must be byte-identical to the
  pre-split fixture)
- `pnpm -C operations check-types`
- `pnpm sync:verify` from the monorepo root after `/external sync` propagates (the
  export-presence checks now tolerate the re-export form across the sibling files)

## Not handled by /git-sync

`/git-sync` does not split your `core/config/organization-model.ts` for you. The split is an
intentional one-time structural migration — author it directly (or via `/om`), preserving the
`defineOrganizationModel(...)` body verbatim, and review it in a normal PR.
