CWQE Phase 10 (remainder): generation-side character framework + structure doctrine#2245
Merged
Conversation
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.js—sanitizeCharactergains the Ghost → Wound → Lie → Want → Need chain, a declaredarcTypeenum (positive/negative/flat), the Three Sliders (sliders.{proactivity,likability,competence}1–10, integer or null), and asecretsstring 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. NewBIBLE_LIMITScaps +CHARACTER_ARC_TYPESenum +ensureSlider/sanitizeCharacterSlidershelpers. Fields added toPROMPT_FIELDS.CHARACTERandMERGE_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 wirehtmlFor/id.secretsmarshals 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-casedarcType(enum, fill-when-blank) andsliders(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).canonCharacterTraitsSummary(checkInfra.js) now surfaces the authored Lie / Want / Need / arc-type, socharacter.consistencyand thearc.*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_MD5bumped) and thesetup-data-drift.test.jsbaseline 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.js—canonCharacterTraitsSummarysurfaces authored framework fields; omits absent ones.client/.../CharacterDetailEditor.test.jsx— arc-type select, slider patch/clear, secrets string-list marshalling, framework prose fields.runPromptMigrationTestssuite) + resynced 003/005/019/027/166 drift-catch +setup-data-drift.test.jsall pass.Remaining work
Refs #2175— NOTCloses. 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