# Inkhaven 1.3.22 — The ConLang Suite: Sociolinguistics & Contact

_A whole new pillar for the ConLang Suite (RFC LANG-2): a constructed language
stops being uniform and starts living among its speakers and its neighbours —
dialects and registers, borrowed words, linguistic areas, and the speech of the
particular people and places of your world. The key insight throughout: a
**dialect is a sound-change chain applied synchronically**, and a **loanword is a
phonotactic repair** — so the new features are mostly orchestration over the
LANG-1 engines. Deterministic core, advisory AI, no new dependencies. Reference:
[CONLANG.md](../CONLANG.md)._

## Variation — dialects, registers, sociolects (P1)

A **variety** is a *delta* on the base language, declared in a `varieties` block
in the Grammar chapter: an `id`, a `kind` (`dialect` / `register` / `sociolect` /
`idiolect`), an `axis`, a `prestige`, an ordered list of `sound_changes` (SPE
notation — the same `AllophonyRule` engine as diachronics), and optional
suppletive `lexicon` overrides.

- **`language varieties <lang>`** lists each variety with its axis, prestige, and
  delta sizes.
- **`language lect <lang> <variety> --word | --text`** renders a form or a line
  *in* a variety (`kata` → `kada` under `t > d / V _ V`), and reports the
  base-to-variety difference.
- **`language dialects <lang> [--count N]`** prints the classic dialectology
  comparison table — each headword across the base and every variety (a trailing
  `*` marks a word override).

The headline realised: `conlang::variety::render_form` reuses
`diachronic::apply::derive_form` directly — a living variety is the historical
engine run *now* instead of across generations.

## Contact — borrowing (P2)

A loanword is a **phonotactic repair**. How a language nativises borrowings is
declared in a `loan_phonology` block in its Phonology chapter (`repair:
epenthesis | deletion`, an `epenthetic_vowel`, and `substitutions` for donor
sounds the recipient lacks).

- **`language borrow <recipient> --form W --from L [--gloss G] [--yes]`** adapts a
  donor word in two steps — **perceive** (apply substitutions, keep native
  sounds, map the rest to the nearest phoneme by sonority) and **repair**
  (consonant runs longer than the recipient's templates allow get the epenthetic
  vowel, or a consonant is deleted): `tras` → `tulasu`. With `--yes` and a
  `--gloss`, the adapted word joins the dictionary with the donor recorded in its
  etymology.

## Areal features — Sprachbund (P3)

Languages in contact converge on shared structures. A `contact` block in the
Grammar chapter declares membership in a linguistic area (`region`, `with`
neighbours, `areal_features`).

- **`language areal [lang]`** gives a per-language convergence overlay — each
  shared feature marked **converged** (`✓`), **shift** (`→`), or **adopt** (`+`)
  — or, with no language, the whole-region Sprachbund view. It is strictly
  advisory; it never rewrites the grammar.
- **`language family-tree`** now draws **horizontal contact edges**
  (`Eldar ⇄ Sindar`) alongside the vertical lines of descent.

## Speech communities & ecology (P4)

The worldbuilding-links sidecar now carries varieties: a Place speaks a particular
variety of its language (`link-place … --variety`), and a Character has a
**native variety** — the base of their idiolect (`link-character …
--native-variety`).

- **`language ecology [--svg atlas.svg]`** reports the whole speech-community
  picture — places with language + variety, characters with their languages +
  native variety, and the contact areas — or writes a node-link atlas.
- **`language idiolect <character> --word | --text`** renders a form or line in a
  character's native variety automatically — a marsh-dweller's speech simply
  arrives in the marsh dialect.

## Grammar-book output (P5)

When a language declares varieties or contact, its reference grammar
(`grammar-book`, both `md` and `typ`) grows two sections automatically: a
**Variation** section (the dialects/registers + the dialect-comparison table) and
a **Contact** section (the linguistic area, shared areal features, and loanword
adaptation). The renderer stays engine-free; `cli::language::build_variation`
assembles the data for both the CLI and the Bund `grammar_book` word.

## Advisory AI (P6)

The AI proposes *choices*; the deterministic engine *applies and validates* them
— so forms stay legal and nothing is written without `--yes`. All key off the
project working language.

- **`language propose-dialect <lang> --describe "…" [--yes]`** — the model
  suggests a coherent set of sound changes + lexical swaps; each rule is validated
  against the inventory and previewed through the P1 engine; `--yes` writes the
  variety into the Grammar chapter.
- **`language propose-loans <recipient> --from <donor> --topic … --count N`** —
  proposes concepts a language would borrow in a domain, then the deterministic
  adapter nativises each (`stɔrm` → `sitarimi`).
- **`language areal-check <lang>`** — judges whether a declared Sprachbund is
  typologically plausible (the contact analogue of `realism-check`).

## The developer's guide

*Developing a Constructed Language with Inkhaven* grows by two parts:

- **Part VI — "A Language in a World"**: new chapters on *Dialects and registers*,
  *Languages in contact*, and *Speech communities and ecology*, each with worked
  examples and a term box for every new linguistic term.
- **Part XI — "Scripting Your Language"**: a gentle introduction, *Building your
  conlang with Bund*, for the many conlangers who are not programmers — why a
  script (repetition, decision, a reproducible recipe) is sometimes more powerful
  than declarative HJSON, with the two shown to be equivalent — plus a new
  **Appendix C, "Bund API reference"** listing every `ink.lang.*` / `lang.*` word
  with its exact stack effect and safety category.

The book's appendices, configuration-block reference, and glossary all gain the
new blocks and ~16 new terms; it compiles warning-free on Typst-bundled fonts
(~135 → ~168 B5 pages).

## Design notes

- **Zero new dependencies.** Every feature reuses the LANG-1 engines — the
  rewrite/diachronic engine for dialects, the phonotactic validator and sonority
  table for loanwords, the typology answers for areal convergence, and the
  existing `conlang::links` sidecar for speech communities.
- **Deterministic core, advisory AI.** Variation, borrowing, and areal overlays
  are pure functions; the three AI words propose and the engines dispose,
  `--yes`-gated and multilingual (validated live against DeepSeek).
- **Backward compatible.** Every new block is optional; a language without
  varieties or contact behaves exactly as before.
- **Bund coverage.** The sociolinguistics inspectors are scriptable too —
  `lang.varieties`, `lang.lect`, `lang.idiolect`, `lang.borrow`, `lang.areal`,
  `lang.ecology` (all `store_read`).

Tests 1533 → 1548. Full reference: [CONLANG.md](../CONLANG.md).

## Looking ahead

Code-switching (cross-language bilingual utterance) is held for the translation
track, now filed as [`LANG-3_PLAN.md`](../PROPOSALS/LANG-3_PLAN.md) — local,
per-language translation models (a three-tier RBMT + fine-tuned NMT + tiny-LLM
resolver) targeting a later major release.
