Future Thinking Engine (KYTREX) — LLM Constraint Graphs for Scenario Planning

ACTIVEv0.9.0

A constraint-driven graph system that uses LLMs as proposal generators while enforcing structural rules outside the model

▸ core_thesis.log[CLASSIFIED]

CORE_THESIS

An LLM is a generator for candidate hypotheses — it produces plausible causal chains like "A leads to B". But plausible is not the same as structurally valid. Without external enforcement, LLM-generated graphs inevitably produce cycles, abstraction jumps, dangling references, and combinatorial explosions. These are not bugs — they are predictable system effects.

The solution: separate generation from validation. The LLM proposes, the system enforces physics.

LLM = PROPOSAL GENERATOR

Generates candidate nodes, edges, and relationships. Optimizes for semantic plausibility. Has no global view of graph state.

SYSTEM = PHYSICS ENFORCER

Enforces type rules, cycle constraints, referential integrity, and branching budgets. Machine-checkable, deterministic, non-negotiable.

▸ failure_modes.sys[4 MODES]

FAILURE_MODES

Four predictable system effects when generating graph structures from LLM output — and how KYTREX addresses each one

[FM-001]COMBINATORIAL EXPLOSION
PROBLEM:

With branching factor b and depth d, node count grows as b^d. A graph that starts clean becomes an unreadable hairball within 3-4 expand steps.

KYTREX:

Progressive Disclosure: generate only 1-hop per interaction. The user pays for complexity with explicit clicks. Combined with MMR-based pruning to maximize relevant novelty per expand.

[FM-002]GRANULARITY MISMATCH
PROBLEM:

LLMs recognize semantic proximity but don't enforce abstraction layers. A macro-trend like "AI Disruption" gets directly connected to a micro-feature like "dark mode toggle" — a classic abstraction jump.

KYTREX:

Typed Property Graph with strict ontology: 6 node types across 3 layers (Macro/Meso/Micro), 7 edge types. Connections only between adjacent layers — cross-layer shortcuts require bridging nodes.

[FM-003]CYCLIC PARADOXES
PROBLEM:

"More AI → fewer jobs → crisis → more automation → more AI" — plausible as a feedback loop, but catastrophic for forward propagation. Recursive traversal becomes an infinite loop.

KYTREX:

DAG enforcement as operational constraint. Cycle detection via DFS before any edge is committed. Feedback loops are flagged and isolated — valid in Systems Thinking, but handled as a separate simulation layer.

[FM-004]JSON STRUCTURAL BREAKS
PROBLEM:

Even with Structured Outputs, LLMs produce semantically broken graphs: edges pointing to non-existent nodes, duplicate IDs, type violations. Syntactic correctness ≠ structural validity.

KYTREX:

Accept-Validate-Repair pipeline: Zod schema check → referential integrity pass (remove/flag edges with unknown IDs) → optional repair call. The UI only sees validated structures.

▸ ontology_map.sys[STATIC]
ONTOLOGY_MAP

Three-layer hierarchy with 6 node types and 7 edge types

[MACRO]macro-trendpolicy[MESO]industry-shiftevent[MICRO]business-modelproduct-feature
BRIDGING_RULE

Macro nodes cannot directly connect to Micro nodes — a Meso bridge is required

✗ INVALID
macro-trend──✗──→product-feature
✓ VALID
macro-trend→industry-shift→product-feature
NODE_TYPES
●
MACRO_TREND

Large-scale technological or societal shift

●
INDUSTRY_SHIFT

Market-level structural change

●
BUSINESS_MODEL

Monetization pattern or value architecture

●
PRODUCT_FEATURE

Specific capability or deliverable

●
EVENT

Time-bound occurrence with cascading effects

●
POLICY

Regulatory or governance intervention

EDGE_TYPES
▸CAUSES— Direct causal relationship
▸ENABLES— Creates conditions for target to emerge
▸CONSTRAINS— Limits or restricts the target
▸SUBSTITUTES— Replaces or displaces the target
▸AMPLIFIES— Strengthens or accelerates the target
▸CONTRADICTS— Opposes or undermines the target
▸REQUIRES— Target cannot exist without source
▸ graph_explorer.svg[INTERACTIVE]
GRAPH_EXPLORER

Progressive Disclosure in action: expand 1-hop at a time. Each click reveals children — the user controls complexity.

NODES: 6EDGES: 6EXPANDED: 1
[MACRO][MESO][MICRO]causesenablescausesamplifiesconstrainsamplifiesMACRO TRENDAI Disruption−INDUSTRY SHIFTAutomatedContent Creation+INDUSTRY SHIFTAI-native SaaSWave+POLICYRegulatory Pushfor AI Transpare..+MACRO TRENDOpen-SourceModel Commoditiz..+EVENTInference CostCollapse
Click node to expand
LEGEND
macro-trend
industry-shift
business-model
product-feature
event
policy

Sample scenario: AI Disruption. The KYTREX ontology and constraint rules apply to arbitrary domain graphs.

▸ constraint_validator.ts[LIVE]
CONSTRAINT_VALIDATOR

Real validation, not a recording: toggle or add edges and the pipeline checks ontology, cycles and referential integrity live.

INPUT
→
ONT✗
→
CYC✗
→
REF✗
→
OUTPUT
SAMPLE_LLM_OUTPUT
3 nodes · 4 edges
x1macro-trendx2product-featurex3event
x1 → x2enables
x2 → x3causes
x3 → x1amplifies
x2 → x99requires
→

Toggle an edge off/on or add a new one — validation re-runs instantly.

STEP 1: ONTOLOGY CHECKFAIL

Verify all node types and edge-type/node-type combinations are valid

✗ Violation found: macro-trend → product-feature skips a layer — bridge via industry-shift required
↳REPAIR: Insert bridge node (industry-shift) between x1 and x2
✗ Violation found: product-feature → event is not an allowed transition
↳REPAIR: Remove illegal edge x2 → x3
STEP 2: CYCLE DETECTIONFAIL

Run DFS to ensure the graph remains a DAG

✗ Violation found: Cycle detected — x3 → x1 closes a loop (x1 → x2 → x3 → x1)
↳REPAIR: Remove edge x3 → x1 to break the cycle
STEP 3: REFERENTIAL INTEGRITYFAIL

Confirm all edge endpoints reference existing nodes

✗ Violation found: Node x99 does not exist in the graph
↳REPAIR: Remove edge x2 → x99 (dangling reference to x99)
4 violations → 4 repairs
✗
▸ process_flow.dat[CLASSIFIED]

PROCESS_FLOW

┌─────────────────┐
│   USER INPUT    │
│   (scenario)    │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  LLM GENERATOR  │
│  ══════════════ │
│  Propose Nodes  │
│  Propose Edges  │
│  Suggest Types  │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│   CONSTRAINT    │
│   VALIDATOR     │
│  ══════════════ │
│  Ontology Check │
│  Cycle Detect   │
│  Ref Integrity  │
└────────┬────────┘
         │
    ┌────┴────┐
    ▼         ▼
┌────────┐ ┌────────┐
│ GRAPH  │ │SCENARIO│
│ STATE  │ │ OUTPUT │
└────────┘ └────────┘