# Canonical Registry (Phase D Updated)

<div id="bkmrk-note%3A-this-is-a-live" style="padding: 12px; background: #fef3c7; border-left: 4px solid #f59e0b; margin-bottom: 20px;">**Note:** This is a live snapshot of the canonical paths registry. Manual sync from `~/system/specs/canonical-registry.md`. Last updated: 2026-05-07 (ANVIL Phase D)</div><div id="bkmrk-purpose%3A-industry-st" style="padding: 12px; background: #dbeafe; border-left: 4px solid #3b82f6; margin-bottom: 20px;">**Purpose:** Industry-standard ITIL CMDB / Spotify Backstage pattern. Catalog of canonical paths, their owners, scope, and anti-drift rules. This is the authoritative source for "where does X belong" questions.</div>## Tree Ownership Table

One row per major tree. These are the **canonical locations** — creating parallel structures elsewhere violates the registry.

<table id="bkmrk-treepurposeowner%7E%2Fsy"><thead><tr><th>Tree</th><th>Purpose</th><th>Owner</th></tr></thead><tbody><tr><td>`~/system/`</td><td>Orchestration runtime, daemons, tools, agents, specs, rules, hooks (git), schemas</td><td>John (orchestrator)</td></tr><tr><td>`~/business/ALAI-Holding-AS/`</td><td>Company state — clients, brand, products, sales, legal, org, processes, pipelines, web-worktrees</td><td>ALAI (CEO)</td></tr><tr><td>`~/business/ALAI-Tech-DOO/`</td><td>RS d.o.o. legal subsidiary (Bilko/Tok/Drop distribution)</td><td>ALAI Tech DOO</td></tr><tr><td>`~/personal/`</td><td>CEO Alem Basic personal scope (NOT business)</td><td>CEO (personal capacity)</td></tr><tr><td>`~/clients-external/`</td><td>Client-owned content + state, one tenant per subdir</td><td>Per client</td></tr><tr><td>`~/projects/`</td><td>Code repositories (libraries, internal tools, experiments) — ALAI internal engineering only</td><td>Per repo</td></tr><tr><td>`~/.claude/`</td><td>Claude Code harness (settings.json, hooks, agents, projects, memory, skills)</td><td>Anthropic Claude Code</td></tr><tr><td>`~/Library/`</td><td>macOS system and vendor-managed application state</td><td>OS / app vendors</td></tr><tr><td>`~/aisystem/`</td><td>Canonical infra deploy workspace (Cloudflare Pages/DNS, BookStack, Vault, fleet configs)</td><td>John, Mehanik gate reads this path</td></tr><tr><td>`~/backups/`</td><td>Tar archives + offsite backup source (7-day + 30-day retention)</td><td>John</td></tr></tbody></table>

## Phase D Additions (2026-05-07) — Final Tenant-Isolated Structure

```
~/business/
  ├── ALAI-Holding-AS/   (was ~/ALAI; symlink kept for 158 daemons grace)
  └── ALAI-Tech-DOO/     (RS d.o.o. subsidiary, real legal entity)

~/personal/              (NEW — CEO scope, 9 typed dirs)
~/clients-external/      (NEW — 13 named clients + 1 variants umbrella)
~/companies              SYMLINK → ~/system/agents/personas/  (10+ daemon backward compat)
~/system/agents/personas/  (12 personas)
~/projects/              (8 ALAI eng repos only)

```

## Renamed for Disambiguation (Phase D)

- `~/business/ALAI-Holding-AS/architecture/` → `product-architecture/` (was conflicting with `~/system/architecture/`)
- `~/business/ALAI-Holding-AS/services/` → `service-catalog/` (was conflicting with `~/system/services/`)
- `~/business/ALAI-Holding-AS/templates/` → `doc-templates/` (was conflicting with `~/system/templates/`)
- `~/business/ALAI-Holding-AS/ufs/` → `products/unified-form-service/` (deployed at forms.alai.no)

## 4-Way CLAUDE.md Scope Rules

CLAUDE.md files exist at **4 different scope levels**. Each loads based on current working directory (CWD).

<table id="bkmrk-filescopeloads-whenp"><thead><tr><th>File</th><th>Scope</th><th>Loads When</th><th>Purpose</th></tr></thead><tbody><tr><td>`~/.claude/CLAUDE.md`</td><td>User-global</td><td>**Always loaded** (all Claude Code sessions)</td><td>John's identity, ZAKONs, specialist routing, hard constraints</td></tr><tr><td>`~/CLAUDE.md`</td><td>Home directory project</td><td>CWD = `/Users/makinja`</td><td>Orchestration mode guardrails, session boot protocol, routing one-liners</td></tr><tr><td>`~/system/CLAUDE.md`</td><td>System tree project</td><td>CWD inside `~/system/`</td><td>System-specific build/deploy rules, tool usage</td></tr><tr><td>`~/business/ALAI-Holding-AS/CLAUDE.md`</td><td>ALAI tree project</td><td>CWD inside `~/business/ALAI-Holding-AS/`</td><td>ALAI brand guidelines, client-facing constraints</td></tr></tbody></table>

## What MUST NOT Recreate

These paths were **archived during ANVIL FS Sweep**. Recreating them silently reintroduces filesystem chaos and split-brain drift.

**From ~/system/ (archived):**

- `~/system/archive/`, `~/system/deprecated/`, `~/system/deployments/`, `~/system/plans/`
- `~/system/clients/` (migrated to ~/business/ALAI-Holding-AS/clients/)
- `~/system/infrastructure/`, `~/system/internal/`, `~/system/legal/`, `~/system/org/`
- `~/system/pipeline/`, `~/system/processes/`, `~/system/products/`, `~/system/sales/`, `~/system/web/`

**Post-D additions (MUST NOT recreate):**

- `~/companies/` as a real directory tree (it's a symlink only, for backward compat)
- `~/ALAI/` as a real directory (it's a symlink only)
- `~/projects/personal/` (use `~/personal/`)
- `~/projects/client/` (use `~/clients-external/`)
- `~/projects/Basicconsulting/` (now at `~/business/ALAI-Holding-AS/brand-surfaces/basicconsulting.no/`)
- `~/companies/BasicConsulting/AlemPersonal/` (CEO content moved to `~/personal/`)

## Live Deployments (post-D)

- `https://ucenje.alai.no` ← `~/personal/scholarly/` extracted to `johnatbasicas/ucenje` repo + Cloudflare Pages
- `https://alai.no/ucenje/*` → 301 → `https://ucenje.alai.no/` (verified live)

## References

- **Decision Records:** `~/system/architecture/decisions/ADR-022-anvil-fs-sweep-2026-05-07.md`, `ADR-023-anvil-tenant-restructure-2026-05-07.md`
- **MC chain:** #99710 (org audit parent), #99637 (mechanical sweep parent)
- **Memory:** `project_anvil_phase_d_done_2026-05-07.md`, `project_alai_entity_identity_clarified_2026-05-07.md`