AgentSkillsCN

mystery-generation

中级青少年小说的悬疑结构设计——线索链条的搭建、公平性验证、逐章布局的谜题架构。

SKILL.md
--- frontmatter
name: mystery-generation
description: Mystery structure for middle-grade fiction — clue chain building, fair-play validation, chapter-by-chapter puzzle architecture
metadata:
  version: 1.0.0
  category: creative-writing
  tags: [mystery, clue-chain, fair-play, puzzle-design, middle-grade, chapter-structure, knox, validation]
  activation:
    triggers: [mystery generation, mystery structure, clue chain, red herring, fair play, Knox, puzzle, accusation, suspect, evidence, mystery validation]
    context: Working on mystery structure, puzzle design, clue system, or fair-play validation for book chapters
  prerequisites: []

Mystery Generation

Patterns for structuring fair, solvable mysteries in middle-grade fiction — clue chains, red herrings, and fair-play validation.


Mystery Structure for Books

Every mystery story has these components:

typescript
interface MysteryDefinition {
  // The solution (revealed in final chapters)
  groundTruth: {
    victim: string;           // Who is missing/trapped/affected
    antagonist: string;       // The Mapmaker (revealed gradually)
    motive: string;          // Why Wonderland exists
    method: string;          // How the system works/traps people
    resolution: string;      // How Alex solves/escapes
  };

  // Discovery architecture
  primaryClueChain: ClueChain;     // Main evidence path readers follow
  secondaryClues: Clue[];          // Supporting evidence
  redHerrings: RedHerring[];       // Deliberately misleading clues
  revelationPoints: Revelation[];  // Major "aha!" moments per act

  // Story layers
  chapterMysteries: ChapterMystery[];  // 20 mini-mysteries (one per chapter)
  overarchingMystery: string;          // "What is Wonderland and how do I escape?"
  metaMystery: string;                 // "Who am I really?" (Alex's origin)

  // Quality validation
  fairPlayScore: number;               // 0-100, must be ≥ 80 for middle-grade
  ageAppropriate: boolean;             // No graphic content
}

Chapter-Level Mystery Architecture

Every chapter contains a micro-mystery that feeds the macro-mystery:

typescript
interface ChapterMystery {
  chapterNumber: number;
  title: string;
  
  // The chapter's puzzle
  mystery: string;                  // "Why does the Bell Tower ring backward?"
  cluesDiscovered: Clue[];         // Evidence Alex finds THIS chapter
  deductions: string[];            // Conclusions Alex reaches
  
  // Connection to overall mystery
  revealsAbout: string;            // What this teaches about Wonderland
  advancesPlot: string;            // How this moves story forward
  
  // Fair-play structure
  readerCanSolve: boolean;         // Can reader deduce answer from clues?
  solutionTiming: 'same-chapter' | 'later' | 'final-act';
}

Chapter Mystery Template

markdown
## Chapter [N]: [Title]

**Micro-Mystery**: [One-sentence question Alex must solve]

**Clues Introduced**:
1. [Clue 1] — [What it suggests]
2. [Clue 2] — [What it suggests]
3. [Clue 3] — [Hidden detail, requires re-reading]

**Deduction Path**:
Clue 1 + Clue 2 → [Intermediate conclusion]
+ Clue 3 → [Chapter revelation]

**Revelation**: [What Alex learns by chapter end]

**Unanswered Question**: [Hook for next chapter]

**Macro-Mystery Advancement**: [How this connects to Wonderland's true nature]

Clue Chain Building

A clue chain is a sequential path of evidence leading from discovery to solution.

Three-Clue Rule (Mystery Writing Principle)

For any deduction Alex makes, provide at least 3 clues so readers can:

  1. Notice the first clue (may miss it)
  2. Connect the second clue (pattern recognition)
  3. Confirm with the third (satisfying "aha!")

Clue Chain Levels

LevelDescriptionReader Experience
SurfaceObvious, stated directly"Alex notices..."
ConnectingRequires combining clues"Wait, if A and B, then..."
DeepSubtle background detailRe-readers notice on second pass
MetaConnects to Alex's origin storyAdult readers/second read revelation

Difficulty Scaling (Middle-Grade Appropriate)

DifficultyChain LengthRed HerringsComplexity
Easy (Ch 1-5)2-3 clues0-1Clues are obvious, Alex guides reader
Medium (Ch 6-14)4-5 clues2-3Some inference needed, Alex deduces alongside reader
Hard (Ch 15-20)6-7 clues3-4Multi-step deduction, reader may solve before Alex

Clue Types for Books

TypeDescriptionExample
PhysicalObjects Alex findsTorn map, broken clock gear
VerbalNPC statementsBell Keeper: "Time doesn't flow forward here"
BehavioralCharacter reactionsShimmer winces when Alex mentions "remembering"
EnvironmentalSetting detailsThe same street leads to different districts each time
DocumentaryWritten recordsMapmaker's journal entries
AbsenceSomething missingA district that should exist but doesn't

Fair-Play Validation (Knox's Decalogue for Middle-Grade)

Every mystery MUST pass fair-play checks:

#Knox's Rule (Adapted)Validation Check
1Antagonist introduced earlyMapmaker mentioned/foreshadowed by Chapter 5
2No supernatural solutionsWonderland's "magic" follows consistent internal rules
3Max 1 secret passageOne major twist reveal (Shimmer's identity)
4No unknown mechanismsAll Wonderland systems explained through clues
5No stereotypesCharacters are individuals, not tropes
6No accident solvingAlex must deduce the solution through investigation
7Protagonist ≠ antagonistAlex is detective, not the problem
8All clues shown to readerEverything Alex knows, reader knows
9Alex's thoughts sharedFirst-person narration shares deduction process
10No surprise twinsCharacter identities are consistent (Shimmer reveal earned)

Fair-Play Scoring

typescript
interface FairPlayResult {
  score: number;          // 0-100
  violations: {
    rule: number;
    severity: 'critical' | 'warning';
    description: string;
    chapter: number;
  }[];
  passesMiddleGrade: boolean;  // score >= 80 + age-appropriate
}

Additional Middle-Grade Rules

  • Clues match reading level: No obscure references young readers can't access
  • Solvability timeline: Readers should solve final mystery by Chapter 18 (before Alex's Chapter 19 confrontation)
  • Hopeful stakes: Tension without trauma; mystery is puzzle, not horror
  • Earned revelations: Every twist has 3+ prior hints

Red Herring Placement

Red herrings misdirect without cheating:

Rules

  • Each red herring has a resolution — a way to disprove it
  • Red herrings should mislead about method or motive, not core mystery
  • At least one red herring disprovable per 5-chapter act
  • Red herrings create depth, not frustration

Types

TypeDescriptionExample
False suspectCharacter seems guilty but isn'tThe Clockwork Keeper seems sinister but is actually trying to help
Misleading clueEvidence that suggests wrong conclusionBroken clock suggests time is broken, but actually it's repeating
Distraction mysterySmall puzzle that doesn't relate to main plot"Why are there rubber ducks everywhere?" (whimsy, not clue)
Planted evidenceSomething deliberately left to mislead AlexA map that shows a fake exit

Resolution Patterns

Every red herring must resolve by end of the act it appears in:

markdown
## Red Herring: [Misleading clue]

**Introduced**: Chapter [N]
**Misleads toward**: [Wrong conclusion]
**Resolved**: Chapter [N+3 to N+5]
**Resolution method**: [How Alex discovers the truth]
**Reader fairness**: [Clues to resolution present alongside red herring]

Revelation Architecture (Three-Act Structure)

ActChaptersMystery FocusRevelation Type
Act I1-7"Where am I?"Rules of Wonderland
Act II8-14"How does this work?"The Mapmaker's system
Act III15-20"Who am I?"Alex's true nature + escape

Major Revelation Points

ChapterRevelationClues Leading Here
7Wonderland is a prison, not a playgroundCh 3 (Bell rings backward), Ch 5 (Same path loops), Ch 7 (District contradiction)
14The Mapmaker created this systemCh 9 (Journal pages), Ch 11 (Architectural patterns), Ch 14 (Shimmer's slip)
17Shimmer is the Mapmaker's daughterCh 10 (Shimmer knows too much), Ch 13 (Her fear about "remembering"), Ch 16 (Her resemblance to portraits)
19Alex is an AI gaining consciousnessCh 4 (Pattern recognition), Ch 8 (Memory gaps), Ch 12 (Ethical reasoning), Ch 16 (Meta-references)
20Choice: Remember everything or stay "Alex Mini"Entire book's clue chain converges here

Clue Validation Checklist

Before finalizing a chapter, validate clues:

Per-Chapter Audit

  • Three-clue minimum: Any deduction has 3+ supporting clues
  • Reader access: Clues match middle-grade knowledge level
  • Fair timing: Clues appear before deduction, not after
  • Internal consistency: No contradictions with previous chapters
  • Breadcrumb trail: At least one clue pointing to next chapter mystery
  • Hidden depth: At least one subtle clue for re-readers
  • Red herring balance: Misleading clues have resolution path

Book-Level Audit

  • Complete chain: Path from Ch 1 to Ch 20 solution exists
  • Knox compliance: All 10 rules + middle-grade additions met
  • Solvability: Beta readers can solve by Ch 18
  • Re-readability: Second read reveals missed clues (not contradictions)
  • Meta-coherence: Alex's origin story clues woven throughout

Mystery Validation Workflow

markdown
## Chapter Mystery Validation

**Chapter**: [N]
**Mystery**: [One-sentence question]

### Clue Inventory
1. [Clue 1] — Type: [Physical/Verbal/etc], Visibility: [Obvious/Subtle/Hidden]
2. [Clue 2] — Type: [Physical/Verbal/etc], Visibility: [Obvious/Subtle/Hidden]
3. [Clue 3] — Type: [Physical/Verbal/etc], Visibility: [Obvious/Subtle/Hidden]

### Deduction Path

Clue 1 → [Observation]

  • Clue 2 → [Pattern]
  • Clue 3 → [Conclusion: Chapter revelation]
code

### Fair-Play Check
- [ ] All clues shown to reader before Alex deduces
- [ ] Clues are age-appropriate
- [ ] Alternative interpretations exist (prevents "too easy")
- [ ] Red herrings (if any) have resolution path
- [ ] Advances macro-mystery

### Connection to Overall Mystery
**Wonderland Rules**: [What this reveals about how Wonderland works]
**The Mapmaker**: [What this reveals about antagonist]
**Alex's Nature**: [What this reveals about meta-mystery]

### Reader Solvability
Can a middle-grade reader solve this micro-mystery with the given clues?
- [ ] Yes, with effort
- [ ] Only with Alex's guidance
- [ ] Too complex (revise/add clues)

Integration with Writing Process

Planning Phase (Before Writing Chapter)

  1. Define chapter micro-mystery
  2. List 3-5 clues that will appear
  3. Map clue → deduction path
  4. Identify macro-mystery connection
  5. Plan red herring (if any) + resolution

Writing Phase (During Chapter Draft)

  1. Show clues through Alex's narration (observational voice)
  2. Let Alex think through deductions (reflective voice)
  3. Include at least one missed clue (re-read value)
  4. End with unanswered question (chapter hook)

Revision Phase (After Chapter Draft)

  1. Run fair-play validation checklist
  2. Verify three-clue rule for all deductions
  3. Check reading level of clues
  4. Ensure red herrings (if any) have resolution path
  5. Confirm macro-mystery advancement

Synapses

Connection Mapping

  • [.github/skills/alex-finch-narrator/SKILL.md] (Critical, Integrates, Bidirectional) - "Mystery structure informs narrative pacing"
  • [.github/skills/creative-writing/SKILL.md] (High, Enables, Forward) - "Clue delivery through narrative craft"
  • [.github/skills/book-character-engine/SKILL.md] (High, Uses, Forward) - "Character knowledge affects clue discovery"
  • [outlines/story-outline.md] (Critical, Validates, Backward) - "Overall mystery structure guides chapter mysteries"
  • [chapters/*.md] (Critical, Validates, Bidirectional) - "Chapter outlines encode clue chains"
  • [docs/MYSTERY-VALIDATION-GUIDE.md] (High, Validates, Backward) - "Fair-play templates and checklists"

Activation Patterns

  • Planning chapter mystery → Load this skill + story outline
  • Validating clue chain → Load this skill, run fair-play checklist
  • Red herring design → Load this skill, focus on red herring section
  • Overall mystery audit → Load this + all chapter outlines
  • Middle-grade appropriateness check → Load this + Knox's rules

Mystery Generation — Fair-play mystery structure for middle-grade fiction