Long-form story-writer with canon-keeping, sequel-continuity, and self-hosted narration. Database-is-source-of-truth — writer is the tooling.
Three new pieces lock the gen pipeline:
1. seeds/authors/orson-black.md — Orson Black's soul. ~2k words,
strict-headings format per cobb's decision. Voice / Worldview /
Specifics / Pet peeves / Sense of humor / Biography (fully
fictional — synthetic literary persona; coal town Durham 1948,
father died of pneumoconiosis at 14, two winters as welder's
apprentice on the Tyne, etc) / Anchor authors (Orwell, McCarthy,
DeLillo, Judt, Modiano) / Do / Don't.
2. skald-core::forge — author-aware. Forge::generate, ::cleanup,
and ::audit now take Option<&AuthorWithRevision>. When Some:
scaffold + soul composed and passed as SystemMode::Replace —
the model BECOMES the author. When None: house neutral scaffold,
Append mode, claude defaults stay. audit() always neutral,
regardless of author. Real prompt templates ship for gen +
cleanup (the prose-craft IP we were deferring) — scaffold has
{{display_name}}, {{pass_directive}}, {{soul}} substitutions,
plus separate gen/cleanup directive blocks.
3. skald continue --story <uuid> [--author SLUG] [--direction
STR] [--target-words N] [--recent N] [--skip-audit] — the
pipeline CLI:
load story → resolve author (--flag wins, else story.author_id,
else None) → pin author/revision onto story → assemble
ContinuationContext from parent chain → run gen pass →
parse heading + insert chapter + passages → run cleanup pass
on the draft → replace chapter body + passages → run audit
pass (parent prose vs new chapter vs bible) → parse JSON
findings into audit_findings table → status flow
seed→generating→cleaning→auditing→complete.
Plus skald authors seed --slug --display-name --tagline --file
--note for loading souls from disk into the DB.
End-to-end testable: seed Orson Black, create a sequel stub via
web or SQL, fire 'skald continue' against it. Coast-Down chapter 8
in Orson's voice is the smoke test.
|
||
|---|---|---|
| docs | ||
| migrations | ||
| seeds/authors | ||
| skald | ||
| skald-core | ||
| vendor/clawdforge | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| compose.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| README.md | ||
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-markdowningests a story file (chapters + bible) into the schemaskald serveexposes/healthand 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/clawdforgeclients/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.