The Core Insight
Time isn’t one thing. The framework supports multiple temporal ontologies, each with different causal semantics and validation rules. Key principle: Each temporal mode changes what “consistency” means and how validation works.M17: Modal Temporal Causality
Five temporal modes, each defining different causal regimes.Temporal Modes
schemas.py:20-27
Mode-Specific Complexity Multipliers
PORTAL Mode: Backward Temporal Reasoning
Given a known endpoint (“startup reaches $1B valuation in 2030”) and origin (“founders meet in 2024”), PORTAL discovers plausible paths connecting them.Configuration
Architecture
Generation → Scoring → Validation → Pivot Detection- Generate candidate antecedent states working backward from endpoint
- Score via hybrid evaluation:
- LLM plausibility
- Historical precedent
- Causal necessity
- Entity capability
- Validate forward coherence: Backward-generated paths must make sense when simulated forward
- Detect pivot points: Key decision moments where paths diverge
Exploration Strategies
Entity Inference Fix (January 2026)
Original problem: Portal mode blindly copiedentities_present from consequent, producing empty lists.
Solution: LLM-based entity inference per generated timepoint.
- Extracts available entities from context or causal graph
- Prompts LLM to identify which entities should be present
- Falls back to regex-based name extraction if LLM unavailable
Forward Coherence Validation
Backward-generated paths must make sense when simulated forward. Paths below coherence threshold are:- Pruned
- Backtracked
- Marked with warnings
Pivot Point Detection (January 2026 Fix)
Original problem:_detect_pivot_points() checked children_states which was never populated during backward simulation → zero pivot points detected.
Solution: Multi-strategy detection:
- Divergence-based: Uses
key_divergence_pointsfrom path analysis (steps where >30% of paths have unique narratives) - Keyword-based: Detects pivot language (“decision”, “pivoted”, “funding”, “launched”, “founded”, “acquired”)
- Event-based: Checks
key_eventsandentity_changesfor significant shifts - Score-variance: Flags states with unusual plausibility scores relative to neighbors
After fix: 84 pivot points detected (14 per path × 6 paths)
Path Divergence Analysis
After path generation, the system analyzes where paths diverge:Quick Mode
backward_steps from default (often 24) to 5 for fast demos (~15 min vs 1+ hour).
Fidelity Template Scaling
Templates now scale proportionally withbackward_steps instead of using hardcoded sizes.
| Template | Distribution |
|---|---|
minimalist | 70% TENSOR, 21% SCENE, 7% DIALOG |
balanced | 33% TENSOR, 33% SCENE, 20% GRAPH, 13% DIALOG |
portal_pivots | 2 TRAINED endpoints + scaled middle |
max_quality | 66% DIALOG, 33% TRAINED |
DIRECTORIAL Mode: Narrative-Driven Reasoning
In DIRECTORIAL mode, causality serves narrative rather than the reverse. Events happen because the story needs them.Configuration
Five-Act Structure
| Act | Tension Range | Temporal Density | Fidelity Allocation |
|---|---|---|---|
| SETUP | 0.2-0.4 | Sparse (establishing beats) | SCENE/TENSOR_ONLY |
| RISING | 0.4-0.7 | Increasing (complications) | DIALOG |
| CLIMAX | 0.8-1.0 | Dense (every moment matters) | TRAINED |
| FALLING | 0.5-0.3 | Decreasing (consequences) | DIALOG |
| RESOLUTION | 0.1-0.2 | Sparse (denouement) | SCENE |
- Rising action: Conflict keywords in prompts
- Climax: Higher temperature (0.7 + tension×0.2) for dramatic unpredictability
- Resolution: Closure and consequence emphasis
Camera System
The “invisible director” controls: POV Rotation:- Main character for climax scenes
- Ensemble for setup
- Antagonist perspective for dramatic irony
- WIDE: Establish scope, show relationships in space
- CLOSE: Internal conflict, decision moments, emotional beats
- OVERHEAD: God’s-eye omniscience, fate bearing down
- SUBJECTIVE: Character’s limited perception, unreliable narration
- ENSEMBLE: Multiple simultaneous perspectives, group dynamics
Dramatic Irony Detection
The system identifies moments where the audience knows something characters don’t. When detected, generation emphasizes the gap—characters make choices that are tragic or comic because of what they don’t know.Fidelity as Dramatic Investment
Resources concentrate where drama concentrates. A 20-timepoint tragedy might allocate 40% of its token budget to 3 climax timepoints. Background setup exists at TENSOR_ONLY because the story hasn’t asked us to look closely yet.Implementation
workflows/directorial_strategy.py
CYCLICAL Mode: Prophecy and Time Loops
CYCLICAL mode supports:- Time loop narratives
- Generational sagas
- Economic/ecological cycles
- Mythic/religious narratives
Configuration
Cycle Semantics Interpretation
Key innovation: Cycle type is discovered, not prescribed. | Cycle Type | Variation Mode | What Repeats | What Changes | Example | |------------|---------------|--------------|--------------|---------|| |repeating | Mutation | Events, structure | Details, awareness | Groundhog Day—same day, growing knowledge |
| spiral | Amplification | Structural beats | Stakes, intensity | Dynasty saga—same conflict, higher stakes |
| causal_loop | Retroactive | Causal structure | Nothing (bootstrap) | Predestination—event causes its own preconditions |
| oscillating | Inversion | Poles | Magnitude, timing | Boom/bust—expansion then contraction |
| composite | Mixed | LLM-directed | LLM-directed | Complex patterns combining multiple types |
The system generates a CycleSemantics object:
cycle_typevariation_modeescalation_ruleprophecy_mechanismkey_recurring_elementsvariation_seeds
Prophecy System
Prophecies aren’t decorative—they’re structural. A prophecy creates narrative obligation: either fulfill it (destiny) or subvert it (tragedy/comedy). Tracking:- prophecy_accuracy (0.0-1.0): How often prophecies come true
- fulfillment_confidence: LLM-rated confidence that a prophecy was fulfilled
- prophecy_source_cycle: Which cycle generated the prophecy (enables “ancient prophecies”)
- Witches’ riddles (Macbeth)
- Deja vu sensations (time loop)
- Analyst forecasts (economics)
- Ancestral curses (dynasty)
Causal Loop System
For bootstrap paradoxes where events cause themselves:- Detect opportunities for loop closure (“this event could be what caused X in cycle 1”)
- Enforce closure by rewriting states to create explicit causal links
- Validate that all opened loops eventually close
Fidelity as Cycle-Awareness
| Position | Fidelity | Why |
|---|---|---|
| Cycle boundaries | DIALOG | The “seam” where patterns become visible |
| Prophecy moments | TRAINED | High-stakes narrative pivots |
| Mid-cycle events | SCENE | The repeating “texture” |
| Variation points | DIALOG | Where this cycle diverges from archetype |
Implementation
workflows/cyclical_strategy.py
Results: 5 paths, 5 cycles, prophecy resolution, coherence 0.727
M7: Causal Temporal Chains
Timepoints form explicit causal chains.Structure
schemas.py:307-316
Validation Constraint
Entity at timepoint T can only reference information from timepoints T’ where a causal path exists from T’ to T. This prevents anachronisms structurally, not heuristically.M8: Vertical Timepoint Expansion
Timepoints can be expanded vertically—adding detail within a moment rather than progressing to the next moment. A “board meeting” timepoint might expand into:- Arrival
- Opening remarks
- Key debate
- Decision
- Aftermath
M12: Counterfactual Branching
Create alternate timelines from intervention points.Implementation
Castaway Colony Example
At Day 7, Commander Tanaka’s decision spawns three counterfactual branches: Branch A (Fortify & Wait):- Copies all state before Day 7
- Propagates conservative resource consumption forward
- Applies exploration interventions
- Sending teams out
- Accumulating injuries and discoveries
- Commits all resources to beacon repair
- Branch B can’t use cave shelter discovered in Branch A’s timeline
- Branch C can’t benefit from food sources found during Branch B’s exploration
Scenario Anchoring
BRANCHING mode forward steps are anchored to the scenario premise via:- Scenario Anchor Block: First 800 chars of
scenario_descriptionwith explicit “do NOT drift” instruction - Entity Roster: Rich role descriptions from template’s
entity_roster - Accumulated World State: Persistent store tracks
key_events_history,resource_states,monitoring
M14: Circadian Activity Patterns
Entities have activity probabilities that vary with time of day.Implementation
Energy Budget Integration
Fromvalidation.py:98-137:
Next Steps
Knowledge Provenance
Who knows what, from whom, when
Entity Simulation
Dialog synthesis and entity behavior

