Skip to content

Bridge 1c: own-words descriptions - #4

Merged
KodeStar merged 4 commits into
mainfrom
feat/bridge-1c
Oct 17, 2026
Merged

KodeStar merged 4 commits into
mainfrom
feat/bridge-1c

Conversation

@KodeStar

@KodeStar KodeStar commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Bridge Phase 1c (BRIDGE-PLAN.md): own-words, spoiler-free descriptions.

What it does

  • The description step (pipeline.Describe, prompt description.md): one more agent call written from the run's synthesized knowledge, never the transcript. The agent sees only opening.md, the fact notes of the opening chapters (logical positions 0..K: a quarter of the story chapters, two at least, never the last; a one-chapter book gets none). Positions are saved as chapter_positions.json so the bound holds after transcript retention.
  • Checks before anything is written: strict {"text"}, 200-1500 code points, no em dash or control character, at most two paragraphs, no second person, question endings or sales words (the book's own title exempt), meta's description.schema.json, and extract.NGram against the source text.
  • sidecars.generate writes .audiosilo/description.json (meta-community's description member format, local only: contribute: issue never files one). It runs at the start of the engine's contributing stage, while an ebook's text still exists, and the done-time write reuses it. It never fails, parks or holds the job; the result gains description and description_error.
  • sidecars.describe (new kind): description-only from the notes still on the Bridge (they outlive the transcript retention). Agent parks wait and retry; a book with no notes fails with a sentence saying to generate again.
  • Scheduler.Hold: the description runs under the scheduler's reservation, so Retry, Delete, PurgeScratch and the retention sweep can't act mid-describe. describing stage runs carry the spend; the scheduler and supervisor skip them through state.IsStage.
  • A regenerate whose own description fails keeps the earlier one vouched for in bridge.json. Model route describing (default sonnet).

Pairs with KodeStar/audiosilo-server#148, KodeStar/audiosilo-frontend#111, KodeStar/audiosilo-docs#141 and KodeStar/audiosilo#62.

Quality passes

  • /simplify (4 reviewers): applied all but rebuilding the n-gram shingles once per call (meta's extract.NGram only takes paths).
  • /code-review max --fix: 15 findings, all fixed with regression tests, among them two spoiler-bound holes (a misheard chapter announcement inflating K; K reaching a short book's last chapter), races between generate, describe and the purge, park flapping, and a provenance read that followed links. The last two (ebook n-gram, a kept description's provenance) were fixed by a follow-up commit.

Test plan

  • go build ./... && go vet ./... && go test -race ./... && golangci-lint run (0 issues)
  • cd web && npm run typecheck && npm run lint && npm run format && npm test (130 tests)
  • Real stack (the Phase 1a spike stack with this build): six description-only runs on books generated before ($0.18 in all, each checked against its transcripts), and a fresh full generate writing characters, recaps and a description in one run.

Left open

  • The describe job waits out a rate limit in-process while holding the book (a regenerate waits for the hold, so the harm is gone).
  • internal/workers TestRouterWorkerConnectsWhileLocalPrepares is a pre-existing ~1-in-10 Phase 1b flake.

The description step (pipeline.Executor.Describe, not an engine stage) writes a
spoiler-free description from the fact notes of the book's opening chapters only:
the staged dir holds opening.md and nothing else. Validated (shape, length, voice,
meta's description schema, the n-gram check against the transcripts left) and
kept as sidecars/description.json with the run's work and sources, its spend on
a describing stage run that reconcile and the supervisor skip.

sidecars.generate runs it once at its finish and writes description.json with the
others, never failing, parking or holding for it; sidecars.describe writes one for
a book already generated here, parking for the agent's parks. The page labels a
describe job and shows a generate result's description outcome.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant