---
name: slug-registry-i18n
description: "slug_registry, vertaal-slugs per locale, hreflang/canonical-keten, 301’s. Slash /slug via .cursor/commands/slug.md. Geen Voiceglot (/heal). Suzy + Chris-grenzen."
---

# Slug registry i18n (`/slug`)

**Skill-SSOT:** **`name: slug-registry-i18n`** (slash-entry **`/slug`** = **`.cursor/commands/slug.md`**, zelfde patroon als **`/dark`** vs **`theme-dark-scan`**). **Niet** hetzelfde als **`/heal`**: **`/heal`** = Voiceglot **`translations` / `translation_registry`** (Lanny). **`/slug`** = **`slug_registry`**, **gelokaliseerde pad-segmenten**, **SEO-siblings**, **301-behoud** (**210**).

**Persona:** **Suzy (SEO)** + **Chris (registry-integriteit)**. **Post-deploy browser/errors:** **`/error-check`**.

## Kern (wat hier hoort)

- **Registry-first:** publieke URL’s en vertaal-varianten via **`slug_registry`** + dezelfde **`entity_id`** waar van toepassing (**212**).
- **Localized slug variants:** metadata en alternates volgen **`372`** (o.a. `findLocalizedSlugVariant` in Smart Router-context).
- **Rename / 301:** oude slug blijft rij, **`canonical_slug`** naar nieuwe waar van toepassing (**210**).
- **Markt en UI-locale:** geen tweede waarheid naast **`market_configs` / `domain_registry`** en locale-resolutie (**334**, **354**).
- **Backfill / batch:** forensisch (**337**), dry-run + owner-**GO** bij brede mutaties (**002** §41). Geen nieuwe grab-bag JSON als SSOT (**320**).

## Uitzonderingen (product)

- **Acteur-routes:** geen “vertaal-slug”-doel op dezelfde manier als CMS/hub (stabiele profiel-URL’s).
- **`/admin/**`:** buiten publieke slug-i18n-scope.

## Bestaande repo-hooks (root `package.json`)

Gebruik als **read-only / audit** tot er een dedicated `slug:i18n:*` script staat:

1. **`npm run audit:reserved-agency-hub-slugs`**
2. **`npm run audit:blog-article-slug-namespace`** (dry) · strict: **`npm run audit:blog-article-slug-namespace:strict`** (zit in **`gate:fast`**)
3. **`npm run verify:domain-registry-policy`** (markt/domein-alignment)
4. **`npm run report:console-audit:routes-from-registry`** (export registry-routes voor audits)
5. **`npm run test:slug-sql-parity`** (waar van toepassing)

## Code- en doc-pointers

- **Smart Router / metadata:** `apps/web/src/app/[...slug]/page.tsx` (**900**: gedragswijzigingen alleen met owner-**UNLOCK** of split naar helpers).
- **Hreflang / localized slug helper-keten:** **372** · `docs/02-ARCHITECTURE/50-PUBLIC-ROUTE-DELIVERY-CHECKLIST.md`
- **Rename-protocol:** **210** · **212**

## Vereisten

- **`apps/web/.env.local`:** **`DATABASE_URL`** voor DB-audits (**100**).

## North star (afstemming met grill)

- **Meertalige markten met prefix:** vertaal-slug waar canoniek; **volledige mandatory-locale set** voordat switcher/hreflang “belooft” siblings; **mandatory locales** als expliciet contract per **`market_code`** (geen alleen-impliciete UI-lijst).
- **Nieuwe dedicated scripts** (inventory, gap-report, idempotent backfill): in **`scripts/`** + **`package.json`**, zelfde **dry-run → rapport → apply**-ritueel als **`/heal`**, **zonder** Voiceglot te mengen.

## Registry- en world-alignment workflows (ingelijfd)

Content en routing uitlijnen met de **juiste `world_id`** en registry. De oude scripts `assign-world.ts`, `align-studio-world.ts`, `align-agency-articles.ts` en `scripts/academy/verify-*.ts` **bestaan niet** in deze repo.

### Registry en slugs
- `npx tsx scripts/query-slug.ts` / `query-all-slugs.ts` / `query-slug-schema.ts`
- `npx tsx scripts/query-routing-types.ts`
- `npx tsx scripts/check-slugs.ts` (en `check-slugs-2` … `5` indien nodig)

### Content / articles (voorbeelden)
- `npx tsx scripts/query-content-articles.ts`
- `npx tsx scripts/update-content-article-slug.ts` (alleen met owner-akkoord)

### FAQ / studio (indien scope)
- Diverse `migrate-faq-*.ts`, `fix-workshop-faqs.ts`, … — altijd **Glob** / `rg` op `scripts/` voor exacte naam.

### Actors en agency-routing
- `npx tsx scripts/audit-actor-slug-conventions.ts`
- `npx tsx scripts/audit-live-public-actors-readonly.ts`

**Richtlijnen:** World vs Market niet door elkaar (**001**). Tabellen per world: **004**. Geen `pathname.includes('studio')` voor world-detectie (**002**). Managed door **Bob**; uitvoering **Chris/Cody**.

## Status- en actor-slug handshake (ingelijfd)

Consistentie tussen **`slug_registry`**, **actors** (live/public), en gerelateerde routing. Er is **geen** `scripts/status-handshake.ts` als monolithisch script.

```bash
# Slug- en registry-inzicht
npx tsx scripts/query-slug.ts
npx tsx scripts/query-all-slugs.ts
npx tsx scripts/query-slug-schema.ts
npx tsx scripts/get-slugs.ts

# Actor slug-conventies + live/public
npx tsx scripts/audit-actor-slug-conventions.ts
npx tsx scripts/audit-live-public-actors-readonly.ts

# Checklist voor voorgestelde slugs (live+public agency actors)
npx tsx scripts/generate-live-public-slug-migration-checklist.ts
```

**Afkadering:** aparte **DB-drift-check** op acteur-status (`actors.status` / handshake-kolommen) = **`npm run verify:actors-status-handshake:when-db`** (root **`package.json`**), niet te verwarren met bovenstaande registry-scripts.

**Richtlijnen:** ID-First (**001**, **212**). Publieke acteur-scope: **305**. Managed door **Chris**.

## Volgende stap na ontwerp

- **`/prd-from-grill`** met scope “slug i18n + mandatory locales + publish-poort” (zie **`.cursor/skills/grill-me/SKILL.md`** eindbesluitenlijst).
