SuperAPI AI Directory

audit-branching-complexity

Writing & research

View repository

Updated 10-28 08:38

About this skill

Audit Branching Complexity

Audit complexity and production risk, not artistic ambition.

A large branch can be justified. A small graph can still be fragile if state combinations are poorly controlled.

Inputs

Use any representation available:

  • node / edge graph
  • flowchart
  • quest outline
  • Ink, Yarn, JSON, YAML, spreadsheet, or script structure
  • variable definitions
  • conditional dialogue
  • design document

If code or structured data is supplied, preserve identifiers so findings can be traced back.

Structural Metrics

Calculate or estimate when possible:

  • decision nodes
  • terminal nodes
  • maximum branch depth
  • average branch factor
  • reconvergence rate
  • unique-content nodes
  • shared-content nodes
  • unreachable nodes
  • dead-end nodes
  • state variables
  • variables set but never read
  • variables read before set
  • conditional combinations

Do not invent precise numbers when the source is incomplete. Label estimates.

Branch Explosion

Look for decisions whose downstream content multiplies because later content must account for multiple earlier branches.

Flag especially:

  • nested non-reconverging choices
  • companion × faction × quest-state combinations
  • repeated bespoke versions of the same scene
  • ending matrices that require unique content for every combination

Reconvergence Quality

Classify:

  • Healthy foldback — shared continuation preserves relevant state and callbacks.
  • Hard erase — branches rejoin and prior choice is effectively forgotten.
  • Artificial reconvergence — paths are forced together without believable causality.
  • Underused state — choice is remembered in data but rarely reflected in content.

State Complexity

Check for:

  • one-off flag proliferation
  • mutually impossible states
  • missing default values
  • set-but-never-read variables
  • read-before-set logic
  • duplicate variables representing the same concept
  • high-cardinality combinations with no authored handling

Where appropriate recommend semantic state such as relationship level or faction alignment instead of many isolated flags.

Content ROI

For expensive unique content ask:

  • how many players can see it in one playthrough?
  • how long is it?
  • does it deliver distinctive agency, information, gameplay, or emotional payoff?
  • could the same agency be preserved through conditional variants or state?

Do not automatically recommend removing low-reach content. Make the cost visible.

Finding Types

  • Branch explosion risk
  • Late multiplication
  • Weak reconvergence
  • Choice erasure
  • Unreachable content
  • Dead end
  • Set but never read
  • Read before set
  • Flag proliferation
  • Unhandled state combination
  • Duplicate branch content
  • High-cost / low-distinction branch
  • Healthy foldback

Severity

  • Critical — likely broken logic, unreachable required content, or combinatorial scope threatening implementation.
  • High — substantial content multiplication or choice erasure.
  • Medium — avoidable complexity or weak state usage.
  • Low — optimization opportunity.

Confidence is separate.

Audit Procedure

  1. Normalize the supplied graph or structure.
  2. Identify decision, convergence, and terminal nodes.
  3. Map state set/read locations.
  4. Measure or estimate branch depth and multiplication.
  5. Identify unique-content islands.
  6. Check reconvergence quality.
  7. Inspect state-variable hygiene.
  8. Identify unreachable / dead content if evidence permits.
  9. Rank production risks.
  10. Suggest foldback or state-based simplifications that preserve agency.

Output

Complexity verdict

Low / manageable / elevated / high / structurally risky.

Structural summary

Report metrics with exact or estimated labels.

Risk hotspots

Node / region Risk Why Severity Confidence Suggested containment

State hygiene

Foldback opportunities

Explain what can reconverge and what state must remain visible afterward.

Content ROI notes

Healthy structures

Call out good reuse, clean reconvergence, and meaningful selective divergence.

Failure Modes

Avoid:

  • equating more branches with better agency
  • equating fewer branches with better design
  • recommending foldback that erases meaning
  • counting nodes without analyzing state combinations
  • inventing unreachable paths without graph evidence
  • ignoring VO/cinematic/localization multiplication
  • optimizing narrative solely for cheapest production

Final Quality Check

Verify that:

  • metrics distinguish exact from estimated
  • state logic and content branching are both considered
  • recommendations preserve player intention where possible
  • every high-severity finding identifies a concrete multiplication or logic risk