From 8d3f54ac54061678d71018eab2647b6b85ecb2a4 Mon Sep 17 00:00:00 2001 From: David Baity <158404677+MazakTheDwarf@users.noreply.github.com> Date: Wed, 25 Mar 2026 03:49:27 -0400 Subject: [PATCH] Sprint 56h: self-check now expands word count when draft is >10% short of target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed 'STRUCTURAL VALIDATION ONLY' → 'STRUCTURAL VALIDATION AND WORD-COUNT EXPANSION' - Word floor check now EXPANDS (not just flags) when draft is >10% below chapter_target_words - Added expansion rules: interiority, sensory grounding, dialogue beats, scene transitions - Added max_tokens: 32000 and model: power to self-check step for capacity headroom - Removed 'Expand any description or add sensory detail' from NOT ALLOWED (only applies to existing prose) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- templates/book_chapter.yml | 39 +++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/templates/book_chapter.yml b/templates/book_chapter.yml index f105430..b2b1b2e 100644 --- a/templates/book_chapter.yml +++ b/templates/book_chapter.yml @@ -197,12 +197,14 @@ steps: No commentary, no plan headers, no "Pass 1" label. - type: think + model: power + max_tokens: 32000 hint: | - SELF-CHECK — STRUCTURAL VALIDATION ONLY + SELF-CHECK — STRUCTURAL VALIDATION AND WORD-COUNT EXPANSION - You have just written a chapter draft. Your job here is narrow: check the draft against - the structural checklist below, apply ONLY the corrections that fall within scope, and - output the final chapter. + You have just written a chapter draft. Your job: check the draft against the structural + checklist below, apply all corrections within scope (including word-count expansion if + the draft is short), and output the final chapter. DRAFT TO CHECK: {steps[1].text} @@ -216,8 +218,9 @@ steps: project state? Flag any factual break. 4. FORMATTING: Are there obvious section-break artifacts, duplicate headers, or missing chapter title? Flag and fix. - 5. WORD FLOOR: Is the draft within 10% of {chapter_target_words}? Flag only if - critically short (more than 20% under target) — do not expand for style. + 5. WORD FLOOR: Count the words in the draft. Target is {chapter_target_words} words. + - If the draft is MORE THAN 10% under target: EXPAND (see expansion rules below). + - If within 10% of target: PASS, output verbatim. 6. OPENING HOOK: Check the PASS 0 draft prompt ({steps[0].text}) for a line labeled "LOCKED PREVIOUS CHAPTER HOOK:". If present, verify the chapter's opening paragraph directly resolves it. If not, add a brief resolution sentence at the opening — @@ -237,14 +240,20 @@ steps: - If the chapter is missing its closing hook entirely, add it as a final paragraph that matches the hook specified in the draft prompt — no new invention beyond the planned hook + - WORD COUNT EXPANSION (when draft is more than 10% below {chapter_target_words}): + Continue writing new prose scenes AFTER the existing chapter content. Add: + * Extended interiority beats between action moments + * Sensory grounding — ground each scene location with 1–2 sensory details + * Dialogue elaboration — one extra exchange per speaking pair, voice-distinct + * Scene transitions — don't jump cuts; write the walk/wait/breath between scenes + Keep writing until the full output (original + new) is within 5% of {chapter_target_words}. + Obey all voice anti-patterns from PASS 1. Do NOT add new plot beats not in PASS 0. NOT ALLOWED — do not make any of these changes: - - Improve any sentence for prose quality, rhythm, or lyricism - - Deepen emotional beats or add interiority - - Expand any description or add sensory detail + - Improve existing sentences for prose quality, rhythm, or lyricism - Reorder scenes or restructure the chapter - - Add new metaphors, aphorisms, or quotable lines - - Normalize or upgrade the authorial voice + - Add new metaphors or aphorisms to existing prose + - Normalize or upgrade the authorial voice in existing sentences OUTPUT FORMAT: Start your response with a VALIDATION LOG section: @@ -253,7 +262,7 @@ steps: 2. NAMES & POV: [check pass/fail with brief note] 3. CONTINUITY TERMS: [check pass/fail with brief note] 4. FORMATTING: [check pass/fail — note any fixes applied] - 5. WORD FLOOR: [check pass/fail — include word count] + 5. WORD FLOOR: [PASS/EXPANDED — include word count before and after] 6. OPENING HOOK: [check pass/fail or N/A] 7. AUTHOR'S INTENT: [honored / partially missed — note / N/A if no intent set] 8. CLOSING HOOK LOCK: [locked hook delivered / missing / N/A if not locked] @@ -261,9 +270,9 @@ steps: Then output the separator on its own line: ---BEGIN CHAPTER--- - Then output the final chapter text (corrected where structurally required, - verbatim everywhere else). Start the chapter directly with the chapter title - and first line. No preamble or commentary within the chapter text. + Then output the COMPLETE final chapter text (all original prose + any expansion). + Start the chapter directly with the chapter title and first line. + No preamble or commentary within the chapter text. # Commit chapter draft now — last_text() = self-check output (step 2). Must come before # PASS 3 think so the character-state extraction does not overwrite last_text().