Gunnar

nordisk/dwarves

.nornir/design.md

<!-- nornir:class: design -->
# dwarves — design

**dwarves is the CI/CD forge of the nordisk constellation.** Named for **Brokkr** and
**Sindri**, the dwarf-smiths of Norse myth who forged the gods' treasures (Mjölnir,
Gullinbursti, Draupnir) at the bellows.

## Charter

- **Pure Rust, zero shell.** Every pipeline is an `xtask` command — no YAML, no bash, no
  hidden CI DSL. The forge is ordinary Rust you can build, test and step through.
  - The `xtask demo-wasm` / `deploy-pages` verbs (build the `dwarves-gui` release wasm
    into `dist/`, then force-push it to the `pages` branch → <https://nordisk.codeberg.page/dwarves>)
    are now a **thin dwarves-specific `PagesConfig` over the shared `nornir-pages` edda
    leaf** (LAW #5 / DRY). The ~457-LOC inline `demo.rs` copy — the gh-pages flow that four
    repos (nornir/holger/dwarves/facett) had each grown near-byte-identically — is deleted;
    only the dwarves knobs (demo crate, canvas id, `__dwarves_state` hook, title/description,
    remote env, commit label) stay here. The served page is unchanged (same cache-busted
    `index.html`, same `.domains`/`.nojekyll`), now emitted from the leaf's canonical template.
- **Two bindings, tightly held:**
  - **Nornir** — handling code's **time-space dimensional warehouse** of the constellation (Iceberg +
    code/warehouse introspection across versions and time). Dwarves orchestrates it and consumes
    Nornir's warehouse introspection + release cascade.
  - **[Holger](https://codeberg.org/nordisk/holger)** — the artifact registry, *the sleeping Dane
    guarding your artifacts at rest.* Dwarves *forges into* Holger (publishes artifacts) and *pulls
    from* it (dependencies, offline/airgap-capable).

## Contents

The smith crates move here as the forge grows:

- **Brokkr** — the smith at the bellows: assembles, signs and packs release artifacts.
- **Sindri** — the smith at the anvil: the pipeline definitions that shape a build into a
  shippable thing.

## Why a separate repo

Keeping the CI/CD logic as its own versioned, testable Rust workspace decouples it from any
single member's release cascade — the forge evolves on its own cadence, and every pipeline
is a unit-testable function rather than an opaque CI script.

## Docs

This `.nornir/` is the **source** of the repo's README and docs (crisp holger-pattern):
`design.md` (this file) · `guide.md` (usage) · `for-idiots.md` (the beginner walk-through).