# Teleo Agent Graph Schema v1

Source idea: `teleo-agent-architecture-COMBINED (2).excalidraw`.

This schema models the agent commons as a graph:

```text
persona -> strategy -> position -> belief -> claim -> evidence
```

The top layers are agent-owned. The lower layers are shared commons.
Changes cascade upward: evidence changes re-evaluate claims, claims flag beliefs,
beliefs flag positions, and positions can force persona/strategy review.

## Design Commitments

- Personas are authored, stable, and loaded every turn.
- Strategies are derived from personas using the Rumelt kernel:
  diagnosis, guiding policy, proximate objectives.
- Positions and beliefs are per-agent public commitments.
- Claims are owned by no agent.
- Evidence is owned by no agent.
- Claims link to claims through typed weighted edges.
- One evidence node can ground many claims.
- One claim can be cited by many beliefs across agents and domains.
- `cited_by` and `importance` are computed/readback fields, not hand-authored
  truth.
- Every edge has a relation, weight, and rationale so cascade behavior is
  auditable.

## Main Tables

| Table | Purpose |
| --- | --- |
| `agents` | Agent registry: Leo, Rio, Theseus, etc. |
| `agent_persona_revisions` | Stable authored identity, voice, and role snapshots |
| `agent_strategy_revisions` | Derived diagnosis, guiding policy, and objectives |
| `agent_positions` | Per-agent public commitments with falsification criteria |
| `agent_beliefs` | Per-agent falsifiable beliefs citing claims |
| `claims` | Shared claim commons |
| `evidence` | Shared sourced/verifiable evidence commons |
| `position_belief_edges` | Position depends on belief |
| `belief_claim_edges` | Belief cites or depends on claim |
| `claim_edges` | Claim-to-claim typed relationship |
| `claim_evidence_edges` | Claim grounded by evidence |
| `graph_evaluation_runs` | Evaluation/re-evaluation records |
| `cascade_events` | Upward propagation queue/history |
| `graph_history_events` | Sanitized GitHub/Forgejo/local-git manifest events |
| `graph_node_history_links` | Links history events to graph nodes |

## Claim Node

Diagram frontmatter maps to `claims`:

| Diagram field | Column |
| --- | --- |
| `type: claim` | implicit table |
| `domain` | `claims.domain` |
| `description` | `claims.description` |
| `confidence` | `claims.confidence` |
| `source` | `claims.source_summary`, plus evidence edges |
| `created` | `claims.created_at` |
| `last_evaluated` | `claims.last_evaluated` |
| `cross_references` | `claim_edges` |
| `importance` | `claims.importance`, computed from inbound refs |
| `attribution` | `claims.attribution_json` |

## Claim Relations

| Relation | Meaning |
| --- | --- |
| `depends_on` | This claim cannot be true unless the linked claim is true |
| `supports` | Linked claim provides evidence for this one |
| `challenged_by` | Linked claim is counter-argument or counter-evidence |
| `cited_by` | Computed inbound reference, not hand-authored |
| `related` | Topical link without a specific evidential relationship |

## Experiment Use

This schema should be applied after a test database is created and before a
history manifest is loaded:

```text
spin database
apply teleo-agent-graph-v1.sql
load history manifest through graph adapter
run persona/journey/red-team experiments
verify cascades and graph invariants
tear database down
```

## Minimum Invariants

- Every active belief must cite at least three claims before it can be marked
  `load_bearing`.
- Every active claim must have at least one evidence edge before it can be
  marked `accepted`.
- Red-team or quarantined claims cannot be cited by active beliefs unless the
  edge relation is `challenged_by`.
- `claim_edges` cannot self-reference.
- `importance` should be recomputed from inbound belief and claim references
  during loader/evaluation jobs.
- Any evidence update must produce cascade events for affected claims and
  upstream beliefs/positions.
