narrative-events
Skill17 starsChanged 5 months agoMITView on GitHub
Schema and rules for creating narrative events
In this repository33 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- abilitiesSkill
- ai-instructionsSkill
- archetypesSkill
- build-skillSkill
- canon-npcsSkill
- chartsSkill
- countSkill
- creator-apiSkill
- factionsSkill
- image-genSkill
- itemsSkill
- japanese-romanizationSkill
- locationsSkill
- mapsSkill
- name-filter-settingsSkill
- npcsSkill
- npc-type-reviewSkill
- npc-typesSkill
- orchestratorSkill
- premade-charactersSkill
- questsSkill
- realmsSkill
- reflectSkill
- regionsSkill
- review-npcsSkill
- settingsSkill
- skillsSkill
- story-startsSkill
- traitsSkill
- triggersSkill
- world-backgroundSkill
- world-loreSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 56
Only ONE event can be active at a time — a narrative-event-start effect that fires while another event is active is silently ignored.
- Distinctive: line 62
NO new generated quests are offered until the event ends
- Very specific: line 73
Complete: when the intended outcome has clearly happened and all material beats are expressed.
- Very specific: line 74
Stop: when the player temporarily disengages — leaves the starting location, defers, shifts focus (NOT while arguing/fighting/investigating …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Narrative Events
Edit tabs/narrative-events.json.
Narrative events are cinematic, multi-turn scripted sequences — an ambush, a ritual, a dramatic confrontation — that the narrator plays out beat by beat. While an event is active, its beats steer story generation and NPC behavior until the event completes or the player disengages.
Required Fields
| Field | Requirement |
title | Display name of the event |
beats | The scripted beats/outline the narrator plays out, in order |
Conditional Fields
| Field | When to Include |
targetTurns | When the event should resolve within a set pace. Recommended 2-4. Without it, the event has no forced turn cap |
onCompleteEffects | When completing the event should change game state — reveal quest objectives, set next steps, grant resources, or start follow-up content. Same effect objects as triggers |
Never Include
Omit these fields (engine-managed at runtime):
id(derived from the record key)status(startsinactive; engine moves it throughactive/stopped/completed)turnsActive(engine counter, starts 0)completedTick(set on completion)startingLocation(captured when the event starts)
Starting an Event
There is exactly one start mechanism: a trigger with a narrative-event-start effect.
{
"triggers": {
"ambush_springs": {
"conditions": [
{ "type": "party-location", "operator": "equals", "value": "Blackwood Pass" }
],
"effects": [
{ "type": "narrative-event-start", "eventId": "bandit-ambush" }
]
}
}
}Only ONE event can be active at a time — a narrative-event-start effect that fires while another event is active is silently ignored.
While Active
- The event's beats are injected into story generation and NPC behavior each turn
- The story gets extra length allowance
- NO new generated quests are offered until the event ends
- Player agency rule: the narrator will not force unresolved beats if the player refuses, leaves, or disengages
Pacing with targetTurns
With targetTurns: N, the narrator is told to aim to complete within N active turns and to make steady progress each turn. Hard safety valve: the event is force-completed after 2×N active turns. Without targetTurns there is no forced cap.
Completion vs Stop
The AI judges each turn:
- Complete when the intended outcome has clearly happened and all material beats are expressed. Status becomes
completed, a "Narrative Event Completed" status update is shown, andonCompleteEffectsare applied - Stop when the player temporarily disengages — leaves the starting location, defers, shifts focus (NOT while arguing/fighting/investigating within the event). Status becomes
stopped, no effects run, no status update - Completion wins if both would apply
Resuming and Restarting
- A stopped event auto-resumes (preserving its turn count) when the conditions of any trigger carrying its
narrative-event-starteffect become true again with no other event active - A completed event can only restart via a
recurringtrigger; restarting resets the turn count
Important Gotchas
- One at a time: a start effect while another event is active is silently ignored — sequence events with
narrative-event-statusconditions - Effects only on completion: a stopped event runs no effects; put must-happen state changes on separate triggers if they can't wait for completion
- Keep beats focused: recommended at most ~4 events per world
- Quests can complete off events: give a quest a completion condition of type
narrative-event-completedwith the event'seventId(see the quests skill) - Branch on event state: triggers can use the
narrative-event-statuscondition (inactive | active | stopped | completed)
Schema
interface NarrativeEventDefinition {
title: string
beats: string
targetTurns?: number
onCompleteEffects?: Effect[]
}Reference
For detailed documentation, see narrative-events-reference.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

