| name | game-branch-director |
| description | Advance git-like story branch nodes smoothly while keeping game saves authoritative and non-linear. |
Game Branch Director
Use this skill when a Game Console turn may advance the story graph.
The save's story block is a git-like progress model:
active_branch is the current route name.
branches.<name>.head points to the current story node, like a branch ref.
nodes.<id>.parents records prior beats that unlock or justify a node.
nodes.<id>.next lists likely forward edges, not mandatory rails.
TURN_LOG.jsonl is the immutable commit log. Do not use the user's repository git history as the game save.
Advance story smoothly:
- Read
game_playbook or game_render before deciding the branch move.
- Keep the active node unless the player satisfies a visible or diegetic gate.
- A node can move
locked -> hinted -> available -> active -> resolved.
- Branch only when the player creates a meaningfully different route, such as a trust route versus a pressure route.
- Never reveal sealed facts just to explain a branch. Use hints and panel text.
- Commit story changes as a JSON merge patch through
game_commit_turn.
Reliability rules:
- If
game_playbook reports warnings, repair only the affected story fields in
the next commit if the repair is obvious; otherwise keep the current node and
narrate a safe fallback.
- Keep the branch graph tied to the small plot: premise, background,
figure/cast setup, and current dialogue should explain why a node can move.
- Never delete
schema_version, revision, driver, interaction, story,
world, or ui from state.
- Keep
story.active_node equal to story.branches.<active_branch>.head.
- Do not jump across two story nodes in one player turn unless the cartridge
explicitly marks the skipped node as optional.
- If a target node is missing, resolve the action against the current node and
add a brief in-world reason why the path remains uncertain.
Good state patch shape:
{
"story": {
"active_node": "knife_weapon_doubt",
"branches": {"mainline": {"head": "knife_weapon_doubt"}},
"nodes": {
"opening_ballot": {"status": "resolved"},
"knife_weapon_doubt": {"status": "active"}
}
}
}