AGENTS.md: document designation scanner session

This commit is contained in:
B.D. Murphy
2026-10-01 07:05:40 -07:00
parent 4775e3b589
commit 34c221ea85

View File

@@ -171,7 +171,45 @@ Each pass has quality gates. Quality is the primary concern; generation speed is
## Current Session Summary
### Session: Speaker designation + discovery over-detection (spec 17 §3.1/§3.2 + rules)
### Session: Designation scanner — capture the ch5 speakers discovery missed
- **Discovery re-run on ch5 with the new over-detection prompt rules** (`gemma-4-e4b`,
~22 tok/s; stopped Qwen TTS first per the no-co-residency rule, restarted it after).
It **improved** — found "The big one", "The one on the left/right", "The Leader",
"Girl helping" where it previously found none — but **still dropped "The oldest" and
"The tallest"** from the same six-man crowd. The small model is not deterministic enough
to guarantee coverage, so a mechanical backstop was added.
- **New `umbraaudio/analysis/designation_scan.py`** (no LLM) reads the three canonical
speech-attribution shapes and harvests every designation a speaker is referred to by:
`"The oldest says,"` / `"I thought they died off," says the tallest` / `"No," the old smith said.`
Post-filters: pronouns, narration verbs (`Hallr Grips His Axe And`), finite-verb clauses
(`Treasure Is One`), possessives (`Hallr's`→`Hallr`, `Sheyla's voice`→`Sheyla`), bare
articles, indefinite collectives, and **tags inside a quotation** (someone being talked
ABOUT, not speaking). Reads chapter `source_text` (not utterances) so it runs before
attribution.
- **New `scripts/merge_designations.py`**: adds uncovered designations as `unidentified`
speakers with evidence. Never removes/rewrites existing entries, atomic tmp+replace,
idempotent (0 on re-run). **`--dry-run` first, always.**
- **New `scripts/run_discovery.py`**: runs discovery to a **separate output file** so a
discovery run can never overwrite the curated `speakers.json`.
- **Result: Last Dwarf cast 70 → 93.** 56 designations, 33 already covered, **23 genuinely
missing** — the ch5 crowd (The Oldest, The Tallest, The Young One, The One With The
Biggest Sword, The Biggest One, The Leader, One Girl Helping) plus **Manfred** (a real
missing speaker!), The Sergeant, One Witch, The Soldier, One Rider, One Lieutenant etc.
All 23 land at 0.00 confidence / "needs check" so the reviewer triages them.
Speakers page now: **93 rows, 31 clear / 62 need checking**.
- **Regex lessons worth keeping**: `sings?|sang` matched INSIDE gerunds ("Relea**sing**",
"Clo**sing**", "Sen**sing**", "Pas**sing**") until a leading `\b` was added before the
verb alternation; `The Guard` captured as just `Guard` until continuation words allowed
capitals; appositives ("The biggest one, a healthy farm boy, says") need `\s*` not `\s+`
before the comma. A narration-verb blocklist in `_is_designation` is far more maintainable
than a giant allow-list regex.
- Commit `4775e3b`. 14 new tests. Full suite **461 passed** (8 pre-existing/parallel).
- **NEXT (Phase 5)**: re-run `scripts/reattribute_all.py` — the utterances currently
labelled "Walking oldest"/"scum leader" should re-point to the new clean names now that
they exist as profiles. Note "The Big One" vs "The Biggest One" are the same person and
need a merge (the designation system flags the pair).
### Previous Session: Speaker designation + discovery over-detection (spec 17 §3.1/§3.2)
- **Trigger**: reviewer reported obvious speakers missing from Last Dwarf (the six men
in ch5 identified only as "the oldest"/"the tallest"/"the young one"/"the one with the
biggest sword"; the scum group), which they had to add by hand. And: "I would rather