From ttal
Maintains narrative coherence in long collaborative roleplay/fiction sessions (>5 turns) using structured scratch file for resolution, cast, voice, world-state, and fact logs.
npx claudepluginhub tta-lab/ttal-cli --plugin ttalThis skill uses the workspace's default tool permissions.
Roleplay is the failure mode where forward-creative pull overwhelms backward-consistency check. The model writes a good next turn while losing track of facts established 3 turns ago. Without scaffolding, internal continuity errors compound non-linearly with turn count; with scaffolding, they go to near-zero.
Builds narrative structure, world logic, dialogue intent, and player motivation supporting the game loop. Use for structuring story, dialogue, lore, or when narrative-gameplay disconnects.
Generates 14 planning documents (7 categories) for epic fantasy novels using Crucible Structure via interactive multi-choice questions from a premise.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Share bugs, ideas, or general feedback.
Roleplay is the failure mode where forward-creative pull overwhelms backward-consistency check. The model writes a good next turn while losing track of facts established 3 turns ago. Without scaffolding, internal continuity errors compound non-linearly with turn count; with scaffolding, they go to near-zero.
The scaffolding is structured external state: a scratch file you maintain as you write, with sections for resolution, cast, per-character state, voice, terms, canon hedges, mechanism commits, and turn-by-turn fact logs. The model alone cannot hold this; the scratch + the discipline of reading it before each turn + writing to it after, together do.
This skill encodes that discipline. Five bug-types × five mitigations, applied in order.
Announce at start: "I am using sp-roleplay to maintain narrative coherence across this scene."
First action: Create the scratch file at your workspace (e.g. templates/ttal/<agent>/roleplay-scratch.md), copy the template from scratch.template.md in this skill directory, and fill in Phase 0 sections BEFORE writing the first in-scene turn.
Use this skill when:
Do NOT use this skill for:
Hard rule: do not open the scene without filling these sections. Skipping this phase produces 虎头蛇尾 (strong opening, weak ending) — the dominant failure mode of improvised long fiction.
Before turn 1, fill in the scratch:
Resolution paragraph (REQUIRED) — one paragraph describing:
Setup — date / time, location, weather, ambient details, canon timeline anchor.
Cast register — every character on stage, off stage, or named. For each:
Per-character state board (table) — for every named character:
current_position (geographical / spatial)current_posture (sitting / standing / walking)last_actionholding (objects in hand)Term glossary — for non-native-language terms (Japanese for anime canon, technical vocab for sci-fi), pre-define each in scene-language. This prevents your partner from interrupting to query.
Canon-uncertain hedges — list every claim you're not 100% sure of. Mark each as:
verified — looked up, lockedhedged — will use vaguely in scene (e.g. "some years ago" instead of a specific year)guessed — will use anyway, but verify if it becomes load-bearingMechanism commits — if the scene involves invented physics or mechanism (broadcast radius, magic system, time-travel rules), lock the parameters here BEFORE the mechanism appears in dialogue. Without this, you will conflate sub-mechanisms in later turns.
After Phase 0 is complete, write turn 1.
After writing turn 1, append a "Turn 1" entry to the turn-by-turn log in the scratch:
For every turn (yours and your partner's):
guessed claim is becoming load-bearing, stop and verify.Run a quick consistency scan:
Before writing the final turn:
After closing, run the Closing Audit Checklist (see template).
| Bug type | Source | Mitigation |
|---|---|---|
| Internal continuity (object position, time-of-day) | No external state, model alone | Scratch turn-by-turn log + per-turn re-read |
| Mechanism contradiction (broadcast radius, magic rule) | Invented physics not pre-locked | Mechanism commits section, locked before scene |
| Player-state mismatch (NPC says "stop standing" while player sits) | NPC dialogue doesn't query player state | Per-character state board + NPC dialogue cross-check (Phase 2) |
| Character integrity drift (hard character softened for warmth) | Writer prioritizes emotional convenience over register | Voice notes locked in Phase 0 + Phase 4 character-integrity check |
| 虎头蛇尾 (strong open, weak end) | No resolution designed before opening | Resolution paragraph BLOCKING (Phase 0) |
The first three are mechanical (scratch + discipline catches them). The last two are craft (scratch records the constraint; the writer must respect it).
In all cases: stop, OUT-OF-FRAME correct (or pause and design more), then continue.
For choosing roleplay material:
| Sandbox structure | Plot structure | |
|---|---|---|
| Tight world | GitS SAC, Cowboy Bebop, Detective Conan, Frieren post-canon — sweet spot: detail density + invention freedom | Steins;Gate, EVA, FMA — high-fidelity emulation only, low invention |
| Loose world (slice-of-life) | Aria, Mushishi, Yotsuba, generic AU — pure relaxation, low canon load | (rare) |
For both freedom AND coherence: pick a tight-world + sandbox-structure setting. For deep emotional landing: pick tight-world + plot-canon, accept invention constraint. For pure relaxation: pick loose-world + sandbox, lower the canon-fidelity bar.
scratch.template.md — copy at scene start, fill Phase 0 sections, append turn entries as you go.example.md — a real 4-round session scratch (Neil + Yuki, 2026-05-06) showing the discipline applied incrementally across Round 1 (no scratch, 5 errors) → Round 4 (full scratch, 2 errors + 1 craft bug). Useful as a concrete reference for what the scratch looks like in flight.