agentleFS
nikolaj-latnikolaj-lat/World-Puppeteer/.claude/skills/narrative-events/SKILL.md

narrative-events

Skill17 starsChanged 5 months agoMITView on GitHub

Schema and rules for creating narrative events

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
  1. Very specific:

    Only ONE event can be active at a time — a narrative-event-start effect that fires while another event is active is silently ignored.

    line 56
  2. Distinctive:

    NO new generated quests are offered until the event ends

    line 62
  3. Very specific:

    Complete: when the intended outcome has clearly happened and all material beats are expressed.

    line 73
  4. Very specific:

    Stop: when the player temporarily disengages — leaves the starting location, defers, shifts focus (NOT while arguing/fighting/investigating …

    line 74

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

FieldRequirement
titleDisplay name of the event
beatsThe scripted beats/outline the narrator plays out, in order

Conditional Fields

FieldWhen to Include
targetTurnsWhen the event should resolve within a set pace. Recommended 2-4. Without it, the event has no forced turn cap
onCompleteEffectsWhen 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 (starts inactive; engine moves it through active/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, and onCompleteEffects are 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-start effect become true again with no other event active
  • A completed event can only restart via a recurring trigger; 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-status conditions
  • 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-completed with the event's eventId (see the quests skill)
  • Branch on event state: triggers can use the narrative-event-status condition (inactive | active | stopped | completed)

Schema

interface NarrativeEventDefinition {
  title: string
  beats: string
  targetTurns?: number
  onCompleteEffects?: Effect[]
}

Reference

For detailed documentation, see narrative-events-reference.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.