# Identity domain

The `identity` domain captures the organization's legal identity, purpose, and operational anchors.
It is distinct from `branding` (display identity: logos, product names) — editing identity fields
here does not touch any visual or branding configuration.

## Schema

Source: `packages/core/src/organization-model/domains/identity.ts`

```typescript
IdentityDomainSchema = z.object({
  mission:          z.string().trim().max(1000).default(''),
  vision:           z.string().trim().max(1000).default(''),
  legalName:        z.string().trim().max(200).default(''),
  entityType:       z.string().trim().max(100).default(''),    // e.g. "LLC", "Corporation"
  jurisdiction:     z.string().trim().max(200).default(''),    // e.g. "United States – Delaware"
  industryCategory: z.string().trim().max(200).default(''),    // e.g. "Marketing Agency"
  geographicFocus:  z.string().trim().max(200).default(''),    // e.g. "North America"
  timeZone:         z.string().trim().max(100).default('UTC'), // IANA identifier
  businessHours:    BusinessHoursSchema                        // per-day { open, close } in HH:MM
})
```

`BusinessHoursSchema` is an object with optional keys `monday` through `sunday`, each holding
`{ open: "HH:MM", close: "HH:MM" }`. An empty object `{}` means not configured.

## Field reference

| Field              | Type   | Max  | Notes                                                    |
| ------------------ | ------ | ---- | -------------------------------------------------------- |
| `mission`          | string | 1000 | Why the organization exists                              |
| `vision`           | string | 1000 | Where the organization is headed long-term               |
| `legalName`        | string | 200  | Registered legal name                                    |
| `entityType`       | string | 100  | e.g. "LLC", "Corporation", "Sole Proprietor"             |
| `jurisdiction`     | string | 200  | e.g. "United States – Delaware", "Canada – Ontario"      |
| `industryCategory` | string | 200  | e.g. "Marketing Agency", "SaaS", "Professional Services" |
| `geographicFocus`  | string | 200  | e.g. "North America", "Global", "Southeast Asia"         |
| `timeZone`         | string | 100  | IANA identifier, e.g. `America/Los_Angeles`              |
| `businessHours`    | object | --   | Per-day `{ open: "HH:MM", close: "HH:MM" }`              |

## Validation rules

- All string fields default to empty string `''`; none are required to be non-empty at schema level
- `timeZone` defaults to `"UTC"` when not set; agents should treat a value of `"UTC"` as
  potentially unconfigured and surface it for review
- `businessHours` defaults to `{}` (not configured); an empty object is valid
- Per-day entries must follow `"HH:MM"` 24-hour format; the schema does not enforce range bounds
  but convention is `00:00`–`23:59`
- `jurisdiction` should use the format `"Country – Region"` (em dash, not hyphen) for
  consistency across agents that parse it

## Examples

```typescript
identity: {
  mission:          "We help SMBs automate complex operations using AI.",
  vision:           "A world where every business operates at the efficiency of a Fortune 500.",
  legalName:        "Acme Operations LLC",
  entityType:       "LLC",
  jurisdiction:     "United States – Delaware",
  industryCategory: "AI Automation / Professional Services",
  geographicFocus:  "North America",
  timeZone:         "America/Chicago",
  businessHours: {
    monday:    { open: "09:00", close: "17:00" },
    tuesday:   { open: "09:00", close: "17:00" },
    wednesday: { open: "09:00", close: "17:00" },
    thursday:  { open: "09:00", close: "17:00" },
    friday:    { open: "09:00", close: "17:00" }
  }
}
```

## Where it lives in the adapter

**Split projects:** `core/config/organization-model/profile.ts` under the `identity` key of
`defineOrganizationModel({...})`.

**Unsplit projects:** `core/config/organization-model.ts` under the same key.

To read the current values: open the appropriate file and inspect the `identity` block directly,
or use `pnpm exec elevasis-sdk om:cat identity` (external project).

## Write path

To edit any field, the `/om` skill runs the codify ceremony
(`operations/codify-level-a.md`): snapshot → propose → confirm → write → typecheck → Zod parse →
rollback on failure. Pass `targetFile` as `core/config/organization-model/profile.ts` for split
projects, or `core/config/organization-model.ts` for unsplit projects. Only the confirmed fields
are written; no other top-level keys in the target file are touched.

---

**Read via `/om`** (legacy `/knowledge` alias also accepted) — natural-language queries like
"what's our identity set to?" or "what timezone are we in?" route to this domain via the skill's
intent classifier.
