Skip to content

CWQE Phase 10 (remainder): generation-side character framework + structure doctrine#2245

Merged
atomantic merged 2 commits into
mainfrom
claim/issue-2175
Jul 7, 2026
Merged

CWQE Phase 10 (remainder): generation-side character framework + structure doctrine#2245
atomantic merged 2 commits into
mainfrom
claim/issue-2175

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Second cohesive slice of the CWQE Phase 10 generation-side craft doctrine (#2175). Following the worldbuilding-doctrine slice (#2219), this ships the character framework and structure rules pillars — the doctrine autonovel's CRAFT.md injects before the writer drafts.

Character framework (generation + reconciliation).

  • server/lib/storyBible.jssanitizeCharacter gains the Ghost → Wound → Lie → Want → Need chain, a declared arcType enum (positive/negative/flat), the Three Sliders (sliders.{proactivity,likability,competence} 1–10, integer or null), and a secrets string list. All OPTIONAL — a pre-CWQE Phase 10: generation-side craft doctrine — worldbuilding laws, character framework (Wound/Lie/Want/Need + sliders), try-fail & beat rules #2175 record produces the empty/legacy shape (absent-vs-empty rule), so existing installs + federated peers round-trip unchanged. New BIBLE_LIMITS caps + CHARACTER_ARC_TYPES enum + ensureSlider/sanitizeCharacterSliders helpers. Fields added to PROMPT_FIELDS.CHARACTER and MERGE_CONFIG.character.userEditable.
  • client/src/lib/bibleLimits.js — client mirror updated (enforced verbatim by the storyBible client-mirror test).
  • client/src/components/universe/CharacterDetailEditor.jsx — a "Character framework" prose section (ghost/wound/lie/want/need), an "Arc type & sliders" section (enum <select> + three 1–10 range inputs with explicit unset/clear), and a "Secrets" list section. All fields wire htmlFor/id. secrets marshals string[]↔row objects at the section boundary.
  • server/services/universeCharacterExpand.js — the AI-expand no-clobber merge fills the new prose/secret fields via the existing STRING/LIST loops, plus special-cased arcType (enum, fill-when-blank) and sliders (fill only the unset axes). Same source-of-truth field lists used by the vision-expand path.
  • data.reference/prompts/stages/universe-character-expand.md — lean field guidance + output-contract keys, with the interlock checks (state the Lie in one sentence; the Need is its direct opposite; the Ghost causally explains the Lie) and the sliders rule (HIGH on ≥2, or one with growth; all-low = boring, all-high = Mary Sue).
  • ReconciliationcanonCharacterTraitsSummary (checkInfra.js) now surfaces the authored Lie / Want / Need / arc-type, so character.consistency and the arc.* checks compare plan-vs-delivery instead of inferring the intended arc from the prose alone.

Structure rules at generation.

  • pipeline-season-episodes.md — a "Structure rules" block: the try-fail mandate (60%+ of middle episodes end "Yes, but"/"No, and"), beat rules (Catalyst external; Break Into Two a protagonist choice; All Is Lost includes a death — literal or of a hope/relationship/identity), and climax = the protagonist's hardest ACTIVE choice between Want and Need.
  • pipeline-arc-overview.md — MICE-style thread nesting (threads close in reverse order of opening; each season names the thread it opens and the thread it closes).

Migrations + drift. Shipped-template edits ship to existing installs via hash-keyed prompt-replace migrations 171 (universe-character-expand), 172 (season-episodes), 173 (arc-overview), each keyed on the OLD shipped md5 (line-ending-normalized). Prior owners of those files' current hash (003/005/019/027/166) are drift-cross-synced (old-current moved into ACCEPTED_OLD_MD5, NEW_SHIPPED_MD5 bumped) and the setup-data-drift.test.js baseline updated to match. Prompts kept lean — short imperative rules.

Test plan

  • server/lib/storyBible.test.js — framework sanitizer round-trip WITH and WITHOUT the new fields; unknown arc-type / out-of-range / non-integer / numeric-string slider normalization; caps.
  • server/services/universeCharacterExpand.test.js — updated field counts (21 strings + 6 lists); arcType/sliders no-clobber merge; framework prose + secrets fill.
  • server/lib/editorial/checkRegistry.test.jscanonCharacterTraitsSummary surfaces authored framework fields; omits absent ones.
  • client/.../CharacterDetailEditor.test.jsx — arc-type select, slider patch/clear, secrets string-list marshalling, framework prose fields.
  • Migration 171/172/173 tests (standard runPromptMigrationTests suite) + resynced 003/005/019/027/166 drift-catch + setup-data-drift.test.js all pass.
  • Full server suite (file backend): the only failures are the pre-existing environmental ones requiring live PostgreSQL/env stubs (dataRoot / backup / installState / mediaAssetIndex / runner / visionCli) — none touched by this change, identical set to CWQE Phase 10 (slice 1): worldbuilding craft doctrine — generation prompt + world.* editorial checks #2219.

Remaining work

Refs #2175 — NOT Closes. One Phase 10 item is deferred: the Le Guin style doctrine ("style is not ornament — it IS the fantasy"; prefer strong nouns/verbs over adjective-noun clichés) into the style-guide → prompt flow. The worldbuilding pillar (#2219) and now the character + structure pillars are done; the style-doctrine pillar remains on #2175.

Refs #2175

@atomantic atomantic merged commit d28780d into main Jul 7, 2026
2 checks passed
@atomantic atomantic deleted the claim/issue-2175 branch July 7, 2026 01:53
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