Long-form story-writer with canon-keeping, sequel-continuity, and self-hosted narration. Database-is-source-of-truth — writer is the tooling.
Find a file
Kayos 1c3fc11484 narrate: pronunciation overrides for proper nouns
skald narrate pre-processes body_md_tts with word-boundary regex
substitutions from pronunciation_overrides where phoneme_format =
'respelling'. Story-scoped overrides win over global; longer words
substitute first (so 'Bryukhanov' wins over a hypothetical 'Bry'
override). Case is preserved on the first letter so 'Pripyat' at
sentence start stays capitalised after respelling to 'Prip-yat'.

Seeded Coast-Down with 52 entries: Russian/Ukrainian surnames
(Dyatlov, Akimov, Bryukhanov, Stolyarchuk, Yuvchenko, Khmel, etc.),
first names (Pyotr, Lyudmilla, Anatoly, Vasily, Sasha, Aleksandr,
Leonid), patronymics (Stepanovich, Fyodorovich, Mykolaivna,
Hryhorivna), and places (Pripyat, Chernobyl, Kyiv, Kopachi,
Lubyanka). Plus the operational acronyms NIKIET, RBMK, AZ-5, SIUR,
SIUB, ChNPP, MSCh.

Other phoneme_format values (ipa, arpabet) are no-ops for now —
Kokoro's misaki tokenizer doesn't expose a stable lexicon-injection
API across the HTTP boundary in v0.1. Future: pass IPA forms in a
new server-side request field and inject into the pipeline's g2p
lexicon for more accurate phonetics.
2026-05-14 08:56:17 -07:00
docs docs/authors.md: v0.3 design brainstorm — authors as personas with souls 2026-05-13 11:20:43 -07:00
migrations multi-voice: per-character dialogue rendering 2026-05-14 08:35:33 -07:00
seeds/authors v0.3 step 2: Orson Black soul + author-aware forge + skald continue CLI 2026-05-13 12:06:28 -07:00
skald narrate: pronunciation overrides for proper nouns 2026-05-14 08:56:17 -07:00
skald-core multi-voice: per-character dialogue rendering 2026-05-14 08:35:33 -07:00
vendor/clawdforge forge: always --effort max + multi-chapter batch (cap 20) 2026-05-13 14:26:53 -07:00
.gitignore scaffold v0.1: postgres+pgvector inside-container, schema, markdown ingest, CLI 2026-05-13 09:04:28 -07:00
Cargo.lock multi-voice: per-character dialogue rendering 2026-05-14 08:35:33 -07:00
Cargo.toml web: chapter audio player + render button 2026-05-13 17:08:43 -07:00
compose.yml scaffold v0.1: postgres+pgvector inside-container, schema, markdown ingest, CLI 2026-05-13 09:04:28 -07:00
Dockerfile dockerfile: copy vendor/ during cache layer (path-dep needs full crate) 2026-05-13 10:30:58 -07:00
entrypoint.sh scaffold v0.1: postgres+pgvector inside-container, schema, markdown ingest, CLI 2026-05-13 09:04:28 -07:00
README.md v0.2 scaffold: vendor clawdforge SDK + forge module + Whisper plan 2026-05-13 10:18:56 -07:00

skald

Long-form story-writer with canon-keeping, sequel continuity, and (future) self-hosted audiobook narration. Database is the source of truth — the writer is the tooling.

Named for the Old Norse poets who composed and memorized kings' sagas across generations.

Status: v0.1 — scaffold

What's wired:

  • Rust workspace (skald-core + skald)
  • Postgres schema for stories, characters, canon facts, chapters, passages, generation runs, audit findings, tags
  • pgvector extension installed for future similarity search
  • skald import-markdown ingests a story file (chapters + bible) into the schema
  • skald serve exposes /health and runs migrations on boot
  • Single-container deploy: postgres + skald in one image

Wired (this commit):

  • clawdforge Rust SDK vendored at vendor/clawdforge/ (upstream: Sulkta-Coop/clawdforge clients/rust/)
  • skald-core::forge — three-pass orchestration shell (gen / cleanup / audit). Prompts are TODO stubs; pipeline plumbing is in place.

Not yet wired:

  • Web UI (the inbox + browse + queue surface)
  • Prompt templates for the three passes (heavy prompt-engineering work — own session)
  • skald-core::context — assemble the LLM context blob from DB rows (bible + characters + parent prose summaries + similarity-matched passages)
  • Embeddings backfill + ivfflat index
  • TTS sidecar container + post-render audit chain (see docs/tts-pipeline.md)

v0.1 smoke

docker compose -p skald up -d
docker exec skald skald import-markdown \
    --path /seed/coast-down.md \
    --title "The Coast-Down"

curl http://lucy:7780/health
# → { ok: true, db_ok: true, story_count: 1, ... }

Schema (cheat sheet)

stories         → meta + status + parent/root for series
characters      → real or fictional, story-scoped
canon_facts     → setting, mystery, theme, rule, historical_anchor, hook
chapters        → full prose body
chapter_summaries → short summaries for cheap context loading
passages        → paragraph-level + embedding vector(1536)
generation_runs → every LLM call logged
audit_findings  → canon audit output (severity + area)
tags            → arbitrary labels

Architecture (v0.1 + the plan)

┌─────────────────────────────────┐
│  skald container                │
│  ┌───────────┐  ┌────────────┐  │
│  │ postgres  │  │ skald-rust │  │
│  │ pgvector  │←─│ axum + cli │  │
│  │ localhost │  │ :7780      │  │
│  └───────────┘  └─────┬──────┘  │
└─────────────────────────┼────────┘
                          │ HTTP (future)
                          ↓
                    ┌──────────┐
                    │clawdforge│
                    └─────┬────┘
                          ↓
                     opus calls

v1.0+: extract postgres to its own container on db-net. skald becomes pure stateless rust, connects via DATABASE_URL. Migration is a connection-string change + a network move; the binary doesn't care where the DB lives.

License

MIT.