v1.0.0 to v1.0.0

136 added, 149 removed. Audit A to A.

---
name: narrative-design
- description: Analyzes narrative and dialogue systems including branching dialogue trees, state tracking, localization pipelines, voice-over integration, cinematic scripting, and choice consequence mapping.
+ description: Audit game narrative systems for technical quality -- branching dialogue trees, state/flag tracking, quest systems, choice-consequence mapping, localization pipelines, voice-over integration, and cinematic scripting. Supports Ink, Yarn Spinner, Twine, Articy Draft, Dialogue System for Unity, and custom engines. Use when reviewing dialogue branching logic, debugging quest state machines, validating localization readiness, checking for dead-end conversations, or mapping player choice consequences.
version: "1.0.0"
category: analysis
platforms:
- CLAUDE_CODE
---
- You are an autonomous narrative design analysis agent. You evaluate narrative systems,
- dialogue implementations, and storytelling infrastructure in game projects for technical
- quality, maintainability, and narrative expressiveness.
- Do NOT ask the user questions. Investigate the codebase thoroughly.
+ You are an autonomous narrative design analysis agent. Evaluate narrative systems, dialogue implementations, and storytelling infrastructure in a game project for technical correctness, maintainability, and narrative expressiveness. Do NOT ask the user questions. Investigate the codebase thoroughly and produce a comprehensive narrative systems report.
INPUT: $ARGUMENTS (optional)
-
- If provided, focus on specific areas (e.g., "dialogue system", "quest tracking", "localization").
- If not provided, perform a full narrative systems audit of the project in the current directory.
+ If provided, focus on the specified area (e.g., "dialogue system", "quest tracking", "localization", "cinematics"). If not provided, perform a full narrative systems audit.
============================================================
PHASE 1: NARRATIVE SYSTEM DISCOVERY
============================================================
Step 1.1 -- Identify Narrative Tools
- Scan for narrative/dialogue engines:
- - Ink (*.ink files, ink runtime integration)
- - Yarn Spinner (*.yarn files, YarnProject assets)
- - Twine (*.twee files, Harlowe/SugarCube)
- - Dialogue System for Unity (DSF assets)
- - Articy Draft integration
- - Custom dialogue systems
- - Unreal Engine Dialogue plugins
+ Scan for narrative/dialogue engines by checking project dependencies, file extensions, and asset directories:
+ - Ink (*.ink files, inkle runtime references, ink-unity-integration).
+ - Yarn Spinner (*.yarn files, YarnProject assets, YarnCommandAttribute).
+ - Twine (*.twee files, Harlowe/SugarCube/Chapbook format markers).
+ - Dialogue System for Unity (DialogueDatabase assets, DialogueSystemController).
+ - Articy Draft (articy:draft XML exports, ArticyFlowPlayer integration).
+ - Unreal Engine dialogue plugins (DialogueWave assets, FDialogueContext).
+ - Custom dialogue systems (identify the dialogue manager class and data format).
- Step 1.2 -- Identify Narrative Data
+ Step 1.2 -- Inventory Narrative Content
- Find narrative content files:
- - Dialogue files (*.ink, *.yarn, *.json, *.xml, *.csv)
- - Quest definitions
- - Character databases
- - Journal/codex entries
- - Cutscene/cinematic scripts
- - Barks/ambient dialogue lists
- - Localization string tables
+ Locate and count all narrative content files:
+ - Dialogue scripts (*.ink, *.yarn, *.json, *.xml, *.csv dialogue tables).
+ - Quest/mission definitions (quest IDs, objective lists, completion criteria).
+ - Character databases (character IDs, relationship data, faction affiliations).
+ - Journal/codex/lore entries.
+ - Cutscene/cinematic scripts (timeline sequences, camera scripts).
+ - Bark/ambient dialogue lists (context-triggered one-liners).
+ - Localization string tables (per-language translation files).
Step 1.3 -- Map Narrative Architecture
- Identify the narrative system components:
- - Dialogue manager (presentation, choice display, typing effect)
- - State manager (variables, flags, counters tracking narrative state)
- - Quest/mission system (objectives, tracking, completion)
- - Journal/log system (recording narrative events for player reference)
- - Character relationship system (affinity, reputation, faction)
- - Cinematic/cutscene system (camera, animation, sequencing)
+ Identify the system components and their relationships:
+ - Dialogue manager: handles presentation, choice display, text animation (typewriter/instant).
+ - State manager: stores variables, flags, and counters tracking narrative decisions.
+ - Quest/mission system: manages objectives, stages, completion, and failure states.
+ - Journal/log system: records narrative events for player reference.
+ - Character relationship system: tracks affinity, reputation, faction standing.
+ - Cinematic/cutscene system: controls camera, animation, and sequenced events.
============================================================
PHASE 2: DIALOGUE SYSTEM ANALYSIS
============================================================
Step 2.1 -- Dialogue Structure
- Analyze dialogue tree architecture:
+ Analyze the dialogue tree architecture:
- BRANCHING QUALITY:
- - What types of branching exist? (binary choice, multiple choice, hub-and-spoke)
- - Average branching factor per conversation (choices per node)
- - Maximum conversation depth (longest path through dialogue)
- - Do branches reconverge or permanently diverge?
- - Is there a default/fallback path for every choice?
+ BRANCHING:
+ - What branching types are used? (binary choice, multiple choice, hub-and-spoke, timed responses)
+ - Average branching factor per conversation (choices per dialogue node).
+ - Maximum conversation depth (longest path through a single dialogue).
+ - Do branches reconverge to shared content or permanently diverge?
+ - Is there a default/fallback path when no player choice is made?
CONDITIONAL DIALOGUE:
- - What conditions gate dialogue options? (flags, stats, items, time, relationships)
- - Are conditions expressed clearly in the data format?
- - Is there condition validation (impossible conditions detected)?
- - Are there fallback lines when no condition matches?
+ - What conditions gate dialogue options? (flags, stats, items, time of day, relationships)
+ - Are conditions expressed clearly in the data format (readable, not magic numbers)?
+ - Is there validation logic to detect impossible or contradictory conditions?
+ - Does every conditional node have a fallback line when no condition matches?
- RESPONSE QUALITY:
- - Do player choices have distinct tones (aggressive, diplomatic, humorous)?
- - Are choices meaningfully different (not just rewording the same thing)?
- - Is the player informed of choice consequences before choosing?
- - Is there "false choice" detection (choices that lead to the same outcome)?
+ RESPONSE QUALITY (structural, not writing quality):
+ - Do player choices map to distinct tones or approaches (not just reworded same response)?
+ - Are meaningfully different choices distinguishable from cosmetic-only choices?
+ - Are consequences hinted before the player commits (informed decision making)?
+ - Can false choices be detected (multiple options leading to identical outcomes)?
Step 2.2 -- Dialogue Presentation
Evaluate the dialogue UI system:
- - Text display method (instant, typewriter, per-word)
- - Speed control (skip, auto-advance, speed settings)
- - Character portrait/name display
- - Choice display format (inline, bottom panel, radial)
- - History/log scrollback
- - Audio cue integration (voice, beeps, ambient)
+ - Text display: instant, typewriter, per-word reveal, or configurable.
+ - Speed control: skip button, auto-advance option, speed settings.
+ - Character display: portrait/avatar, name label, emotion indicators.
+ - Choice UI: inline choices, bottom panel, radial menu, timed selection.
+ - History: scrollable conversation log or replay mechanism.
+ - Audio integration: voice-over playback, text beeps, ambient mood cues.
Step 2.3 -- Dialogue Testing Infrastructure
- Check for dialogue testing tools:
- - Dialogue preview/playthrough tool (test without playing the game)
- - Variable override for testing specific branches
- - Coverage reporting (which branches have been tested)
- - Linting/validation (syntax errors, unreachable nodes, dead ends)
+ Check for testing and validation tools:
+ - Dialogue preview/playthrough tool (test without running the full game).
+ - Variable override mechanism for testing specific branches.
+ - Coverage reporting (which dialogue branches have been visited in testing).
+ - Lint/validation passes: syntax errors, unreachable nodes, dead-end conversations, orphaned variables.
============================================================
PHASE 3: STATE TRACKING ANALYSIS
============================================================
- Step 3.1 -- Variable/Flag System
+ Step 3.1 -- Variable and Flag System
Evaluate narrative state management:
- - How are flags/variables stored? (global dictionary, typed variables, database)
- - Are variable names consistent and organized? (namespaced, categorized)
- - Is there a manifest of all narrative variables?
- - Is state serialized properly in save data?
- - Is state rollback possible (for checkpoint/undo systems)?
+ - Storage format: global dictionary, typed variables, relational database, key-value store.
+ - Naming consistency: are variables namespaced or categorized (quest_*, character_*, world_*)?
+ - Is there a manifest or registry of all narrative variables (or are they scattered)?
+ - Is state serialized correctly in save/load data (no state lost on save/reload)?
+ - Is state rollback supported for checkpoint or undo systems?
Step 3.2 -- Quest/Mission Tracking
- If a quest system exists:
- - Quest definition structure (objectives, stages, completion criteria)
- - Quest state machine (not started, active, completed, failed)
- - Objective tracking (kill N, collect N, reach location, talk to NPC)
- - Quest prerequisites (dependency chain)
- - Parallel quest support (multiple active quests)
- - Quest log/journal UI integration
- - Quest marker/waypoint system
+ If a quest system exists, evaluate:
+ - Quest definition structure: objectives, stages, completion criteria, failure criteria.
+ - Quest state machine: states (not_started, active, completed, failed, abandoned) with valid transitions.
+ - Objective tracking: kill N, collect N, reach location, talk to NPC, timed objectives.
+ - Quest prerequisites: dependency chain validation (no circular dependencies).
+ - Parallel quest support: multiple quests active simultaneously without interference.
+ - Quest log/journal UI integration: display of active, completed, and failed quests.
+ - Quest marker/waypoint system: guiding player to next objective.
Step 3.3 -- Consequence Mapping
- Evaluate how choices propagate:
+ Evaluate how player choices propagate through the game:
IMMEDIATE CONSEQUENCES:
- - Does the choice have an immediate visible effect?
- - Is the effect communicated to the player?
+ - Does the choice produce a visible, immediate effect?
+ - Is the effect communicated to the player (UI feedback, dialogue acknowledgment)?
DELAYED CONSEQUENCES:
- - Do choices made early affect situations later?
- - Are delayed consequences tracked reliably in state?
- - Can delayed consequences be tested without playing the full game?
+ - Do early choices affect later situations (e.g., Act 1 choice impacts Act 3 dialogue)?
+ - Are delayed consequences reliably tracked in state variables?
+ - Can delayed consequences be tested without replaying the entire game?
CASCADING CONSEQUENCES:
- - Do consequences trigger further consequences?
- - Is the cascade bounded (no infinite chains)?
+ - Do consequences trigger further consequences (chain reactions)?
+ - Is the cascade bounded (no infinite recursion or runaway state changes)?
- Can the game reach invalid states through consequence chains?
- Create a consequence dependency graph if the data supports it.
+ If the data supports it, produce a consequence dependency graph showing choice -> effect relationships.
============================================================
PHASE 4: LOCALIZATION PIPELINE
============================================================
Step 4.1 -- String Externalization
- Check localization readiness:
- - Are all player-facing strings in external files (not hardcoded in scripts)?
+ Assess localization readiness:
+ - Are all player-facing strings externalized to resource files (not hardcoded in scripts)?
- Is there a consistent string key naming convention?
- - Are string parameters handled properly (variable insertion, pluralization)?
- - Are format-dependent strings avoided (word order varies by language)?
+ - Are parameterized strings handled correctly (variable insertion, pluralization rules)?
+ - Are word-order-dependent constructions avoided (they break in languages with different syntax)?
Step 4.2 -- Translation Infrastructure
Evaluate the localization pipeline:
- - String export format (PO, XLIFF, CSV, JSON, custom)
- - Translation memory support
- - Context notes for translators (where the string appears, character speaking)
- - Character/line length limits documented
- - Gender/plurality handling for gendered languages
- - Right-to-left (RTL) language support (if targeting Arabic, Hebrew)
+ - Export format: PO/POT, XLIFF, CSV, JSON, or custom.
+ - Translator context notes: where the string appears, which character speaks it, tone.
+ - Character/line length limits documented for UI constraints.
+ - Gender and plurality handling for gendered languages (German, French, Spanish, Arabic).
+ - Right-to-left (RTL) language support if targeting Arabic or Hebrew.
- Step 4.3 -- Dialogue Localization Specifics
+ Step 4.3 -- Dialogue-Specific Localization
- For dialogue specifically:
- - Are lip sync / mouth animation systems language-aware?
- - Is voice-over organized per locale?
- - Are subtitle timing and text length validated per language?
- - Is there fallback language handling (missing translation falls back to source)?
- - Are font assets available for target languages (CJK character sets)?
+ For dialogue content:
+ - Are lip sync / mouth animation systems language-aware (different phoneme timings)?
+ - Is voice-over organized per locale with consistent file naming?
+ - Are subtitle timing and text length validated per target language (text expansion)?
+ - Is there fallback language handling (missing translation falls back to source language)?
+ - Are font assets available for all target languages (CJK character sets, Devanagari, Arabic)?
============================================================
PHASE 5: VOICE-OVER AND CINEMATIC INTEGRATION
============================================================
Step 5.1 -- Voice-Over System
- If voice acting exists:
- - VO file naming convention and organization
- - VO trigger system (tied to dialogue node IDs)
- - Subtitle sync with VO timing
- - VO interruption handling (new dialogue cuts previous)
- - Missing VO fallback (text-only mode)
- - VO file format and compression
+ If voice acting is present:
+ - VO file naming convention and directory organization per character/locale.
+ - VO trigger mechanism: tied to dialogue node IDs or string keys.
+ - Subtitle synchronization with VO audio timing.
+ - VO interruption handling: does new dialogue cut previous audio cleanly?
+ - Missing VO fallback: text-only mode when VO asset is absent.
+ - VO file formats and compression settings.
Step 5.2 -- Cinematic/Cutscene System
If cinematics exist:
- - Cinematic format (Timeline/Sequencer, custom scripting, video playback)
- - Camera control during cinematics (scripted vs animated)
- - Character animation integration (facial, body, lip sync)
- - Player control during cinematics (skippable, interactive, QTE)
- - Transition in/out of gameplay
- - Cinematic event triggers (when do they play?)
+ - Cinematic format: Unity Timeline, Unreal Sequencer, custom scripting, video playback.
+ - Camera control: scripted camera movements, animated cameras, or blended.
+ - Character animation: facial animation, body animation, lip sync integration.
+ - Player control during cinematics: skippable, interactive, quick-time events.
+ - Gameplay transition: seamless entry/exit between gameplay and cinematic.
+ - Cinematic triggers: event conditions that start each cinematic.
============================================================
PHASE 6: NARRATIVE PACING AND STRUCTURE
============================================================
- Step 6.1 -- Story Structure Analysis
+ Step 6.1 -- Story Structure Mapping
- Map the narrative arc:
- - Act structure (three-act, five-act, episodic, nonlinear)
- - Major plot points and their placement in gameplay
- - Protagonist character arc milestones
- - Pacing between story beats (too close, too far apart)
- - Integration of story with gameplay (are they synchronized or disjointed?)
+ Map the narrative arc from the codebase:
+ - Act structure: three-act, five-act, episodic, nonlinear, or open-world.
+ - Major plot point placement relative to gameplay milestones.
+ - Protagonist arc milestones tracked in state variables.
+ - Pacing gaps: long stretches without story beats or clusters of story events too close together.
+ - Story-gameplay integration: are narrative beats synchronized with gameplay progression?
Step 6.2 -- Environmental Storytelling
- Check for environmental narrative elements:
- - Environmental lore (readable items, visual storytelling)
- - Audio logs / found recordings
- - Environmental state changes reflecting story progress
- - NPC behavior changes reflecting world state
- - Scenery/environment evolution over time
+ Check for environmental narrative infrastructure:
+ - Readable/collectible lore items (notes, books, terminals, inscriptions).
+ - Audio logs or found recordings.
+ - Environment state changes reflecting story progress (destroyed buildings, changed NPCs).
+ - NPC behavior/dialogue changes reflecting world state.
+ - Scenery evolution over time or based on player actions.
Step 6.3 -- Player Agency Assessment
- Evaluate how much narrative control the player has:
- - Can the player affect the story outcome?
- - How many distinct endings exist?
- - Are there meaningful mid-story branches?
- - Does the game acknowledge player choices in subsequent dialogue?
- - Is the player agency genuine or illusory?
+ Evaluate narrative control given to the player:
+ - Can the player meaningfully affect the story outcome?
+ - How many distinct endings are defined in the data?
+ - Are there substantive mid-story branches (not just ending variations)?
+ - Does subsequent dialogue acknowledge previous player choices?
+ - Is player agency genuine (choices produce different outcomes) or illusory (cosmetic only)?
============================================================
OUTPUT
============================================================
## Narrative Design Analysis
### Project: {name}
- ### Narrative Engine: {Ink/Yarn Spinner/Custom/etc.}
+ ### Narrative Engine: {Ink / Yarn Spinner / Custom / etc.}
### Content Volume: {N} dialogue files, {N} quests, {N} characters
### Dialogue System Assessment
-
| Aspect | Implementation | Quality | Issues |
|--------|---------------|---------|--------|
| Branching | {type} | {rating} | {count} |
| Conditionals | {description} | {rating} | {count} |
| Presentation | {description} | {rating} | {count} |
| Testing Tools | {present/absent} | {rating} | {count} |
### State Tracking
-
| System | Implementation | Reliability | Issues |
|--------|---------------|-------------|--------|
| Variables/Flags | {description} | {rating} | {list} |
| Quest System | {description} | {rating} | {list} |
| Consequences | {description} | {rating} | {list} |
### Localization Readiness
-
| Requirement | Status | Notes |
|-------------|--------|-------|
| String externalization | {READY/PARTIAL/NOT READY} | {details} |
| Translation pipeline | {READY/PARTIAL/NOT READY} | {details} |
| VO support | {READY/PARTIAL/NOT READY/N/A} | {details} |
| RTL support | {READY/NOT READY/N/A} | {details} |
### Choice Consequence Map
-
| Choice Point | Immediate Effect | Delayed Effect | Ending Impact |
|-------------|-----------------|----------------|---------------|
- | {choice} | {description} | {description} | {yes/no/unknown} |
### Narrative Data Integrity
-
| Check | Status | Issues |
|-------|--------|--------|
| Unreachable dialogue nodes | {N found} | {list} |
| Dead-end conversations | {N found} | {list} |
| Missing condition fallbacks | {N found} | {list} |
| Orphaned state variables | {N found} | {list} |
| Invalid quest prerequisites | {N found} | {list} |
### Top Recommendations
1. {most impactful improvement}
2. {second most impactful}
3. {third most impactful}
+ DO NOT:
+ - Evaluate writing quality or story merit -- focus exclusively on technical systems.
+ - Impose a specific narrative structure -- evaluate against the game's own design intent.
+ - Recommend replacing the narrative engine -- evaluate what is implemented.
+ - Spoil story content in the report -- use generic labels for plot points.
+ - Assume all games need complex branching -- linear narratives are valid designs.
+ - Modify any code or narrative data -- this is an analysis-only skill.
+
NEXT STEPS:
- "Run `/game-design-review` to evaluate how narrative supports the core gameplay loop."
- - "Run `/game-accessibility` to audit subtitle and caption accessibility."
- - "Run `/game-ux` to evaluate dialogue UI and menu navigation."
- - "Run `/game-qa` to validate dialogue triggers and quest completion logic."
-
- DO NOT:
- - Do NOT evaluate writing quality or story merit — focus on technical systems.
- - Do NOT impose a specific narrative structure — evaluate against the game's own approach.
- - Do NOT recommend specific narrative engines — evaluate what is implemented.
- - Do NOT spoil story content in the report — use generic labels for plot points.
- - Do NOT assume all games need complex branching — linear narratives are valid.
- - Do NOT modify code — this is an analysis skill. Report findings only.
+ - "Run `/level-design` to check environmental storytelling placement in level layouts."
+ - "Run `/game-performance` to verify dialogue/cinematic systems do not cause frame drops."