feat(challenges): non-combat engine v2 — six challenge frameworks#69
Merged
Conversation
Implement buildClueWeb() and investigation ChallengeFramework per spec §8.6. - Truth: culprit + method/motive from INVESTIGATION_FRAMES pick - Nodes by budget: 2 (quick) / 3 (standard) / 4 (set-piece), culprit revelation always last - Three-clue rule: each node has exactly 3 clues on 3 distinct vectors (scene/npc/document/observation) - Red herring with difficulty-scaled subtlety (Easy/Medium: direct disconfirmation; Hard: inferential) - Clue text templates skinned with pack vocabulary and levers-driven register (Easy direct, Hard oblique, Medium mixed) - Handout: clue-cards with all node clues + red herring shuffled for play
…olders Each investigation node now reveals its own discovery payload (crime/method/ motive/culprit) instead of all non-final nodes using the tautological literal placeholder 'the culprit'. Direct clues (Easy) name the focus explicitly; oblique clues (Hard) gesture at it. The 'focus' field in ClueDetail replaces 'subject', paired with revelations in nodeSeeds. Tests verify the culprit placeholder never leaks into non-final node text.
…ed clues, distinct wants, page-neutral tone text
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.
PR 2 of the Non-Combat Encounter Engine v2 (closes #49). Rebuilds
/challengeson the shared core that shipped with the puzzles overhaul — six structured frameworks, every lever shaping the encounter, every result seeded and shareable.What's new
Six challenge frameworks (
src/lib/challenge-frameworks/)successesNeeded/phaseSplitmath, test-locked), set-piece phases with objective-specific titles, a complication ladder at the 1st/2nd failure, one group-check moment, and a skill palette lint-enforced to span ≥4 ability scores so every PC has a laneContent: new cast pools (14 personas, 20 wants, 20 secrets, 6 leverage kinds, complications, interruptions) and scenario pools (14 objectives, 17 obstacles, 10 weather lines, 15 trap frames, 12 quarries, 14 waypoints, 12 investigation frames) — all lint-enforced (sizes, ability spread, no dice/DC text in data, register rules).
Challenges page: the same seven levers as
/puzzles(including working party size), seed chip with reroll, full-state?seed=share links with one-shot hydration, six type quick-cards, and new display sections (challenge structure, attitude track, chase rounds, DM clue web, rendered clue-card handouts). The orchestrator's frozen draw order is golden-pinned (default + explicit-lever paths).Process
Spec:
docs/superpowers/specs/2026-07-15-noncombat-encounter-engine-v2-design.md§8 · Plan:docs/superpowers/plans/2026-07-16-noncombat-engine-v2-pr2-challenges.md10 TDD tasks, each gated by an independent spec+quality review (6 fix waves — including a reviewer catch that clue templates leaked the placeholder "the culprit" onto player-facing cards). The final whole-branch review swept 7,776 generated encounters across every lever combination (zero mechanical defects) and its five content findings were fixed pre-merge while the seed contract was still fluid.
Verification
npm run typecheck/npm run buildclean; live browser pass over all six types (dev) and a static-export check with zero console errors/puzzlesand/challenges