Adds `skald dedup --story <id>`: reads a story's most recent prose-audit findings and walks every chapter, handing the author the chapter prose + the findings with instructions to rephrase ONLY the flagged repetitions (each recurrence made distinct) and fix flagged continuity errors — everything else stays verbatim. A surgical dedup, not a rewrite. Overwrites body_md, clears body_md_tts so the chapter is re-prepped before narration. High effort (prose-craft). Migration 0011 adds the 'dedup' run kind. Completes the QC loop: audit (find) -> dedup (fix) -> re-audit.
9 lines
483 B
SQL
9 lines
483 B
SQL
-- The dedup pass: the fix half of the audit loop. Takes a chapter
|
|
-- plus the story's prose-audit findings and rephrases only the
|
|
-- flagged repetitions, leaving everything else verbatim.
|
|
ALTER TABLE generation_runs DROP CONSTRAINT generation_runs_kind_check;
|
|
ALTER TABLE generation_runs ADD CONSTRAINT generation_runs_kind_check
|
|
CHECK (kind = ANY (ARRAY[
|
|
'gen', 'cleanup', 'audit', 'summary', 'embed',
|
|
'narrate_prep', 'rewrite', 'prose_audit', 'dedup'
|
|
]));
|