# The Mental Model — One Map of the Whole Brain

> The simplest useful model of Anara Brain: what it is, its two-layer page invariant, the five domain directories, the GBrain config that controls storage scope, the RESOLVER routing contract, and what predictions change when you understand the compiled-truth / timeline split.

- Repository: garrytan/anara-brain
- GitHub: https://github.com/garrytan/anara-brain
- Human wiki: https://grok-wiki.com/public/wiki/garrytan-anara-brain-352efa33f049
- Complete Markdown: https://grok-wiki.com/public/wiki/garrytan-anara-brain-352efa33f049/llms-full.txt

## Source Files

- `README.md`
- `gbrain.yml`
- `index.md`
- `RESOLVER.md`

---

<details>
<summary>Relevant source files</summary>
The following files were used as context for generating this wiki page:

- [README.md](README.md)
- [gbrain.yml](gbrain.yml)
- [index.md](index.md)
- [RESOLVER.md](RESOLVER.md)
- [schema.md](schema.md)
- [clients/README.md](clients/README.md)
- [clients/template.md](clients/template.md)
</details>

# The Mental Model — One Map of the Whole Brain

Anara Brain is a structured personal knowledge base built on the **GBrain architecture** — a file-and-YAML system designed to be queried by an AI agent and to compound knowledge over time. It is the complete knowledge representation of wellness practitioner Joseph Gabriel Ilustrisimo: his methodology, philosophy, client relationships, content strategy, and the evidence behind everything he teaches.

Understanding the brain's design at the structural level lets you predict how it behaves, where new information belongs, what an agent reads first, and why two pieces of information that seem equivalent are actually stored very differently. This page gives you that model.

---

## What the Brain Is

Anara Brain is not a flat collection of notes. It is a **typed, two-layer knowledge store** where every page has a known shape, belongs to one of five domain directories, is controlled by a single configuration file for storage scope, and is routable through a central resolver contract.

```text
┌──────────────────────────────────────────────────────┐
│  AI AGENT READS FIRST                                 │
│  ─────────────────────────────────────────────────── │
│  Compiled Truth (living synthesis — always current)   │
│                                                       │
│  ─────────────────── Timeline ─────────────────────  │
│                                                       │
│  Append-only evidence log (reverse-chronological)     │
│  Never edited after writing                           │
└──────────────────────────────────────────────────────┘
```

Every page, regardless of type, respects this two-layer invariant.

Sources: [README.md:16-37](), [clients/README.md:22-42]()

---

## The Two-Layer Page Invariant

### Above the Line: Compiled Truth

The top portion of every page is a **living synthesis** — always-current, freely rewritten as new evidence arrives. It answers: *Who/what is this? What is the current state? What are the key facts, frameworks, or takeaways?*

An AI agent reads the compiled truth section first. It is the authoritative, low-noise answer to any query routed to this page.

### Below the Line: Timeline

The bottom portion is an **immutable, append-only evidence trail**. New entries go at the top (reverse-chronological). Past entries are never edited. The timeline captures raw observations, session notes, quotes, and timestamps.

```markdown
---
## Timeline

### 2026-05-21
- First session note, observation, or evidence entry
```

The split is deliberate: compiled truth is a **synthesis surface** (what an agent needs to answer a question quickly); the timeline is a **provenance surface** (how the picture changed over time, where claims came from).

Sources: [README.md:17-37](), [clients/README.md:22-42]()

---

## The Five Primary Domain Directories

Every content page lives in one of eight directories. Five carry the primary domain knowledge; three are supplementary or infrastructure.

| Directory | Page type | What belongs here |
|---|---|---|
| `people/` | `person` | Anyone with a significant relationship — clients, collaborators, mentors, partners |
| `methodology/` | `methodology` | How Joseph does what he does — protocols, breathwork, teaching frameworks |
| `concepts/` | `concept` | Philosophical ideas and recurring worldview building blocks |
| `content/` | `content` | Content pieces (videos, posts, articles) and content strategy |
| `clients/` | `client-note` | Client-specific pages with session notes and programming |
| `reading/` | `reading` | Books, articles, and intellectual influences |
| `projects/` | `project` | Business initiatives, partnerships, active work |
| `transcripts/` | `transcript` | Raw transcripts of videos, talks, sessions (db_only) |

The five that contain *domain knowledge an agent reasons over* are `people/`, `methodology/`, `concepts/`, `content/`, and `clients/`. The `transcripts/` directory is special: it contains primary-source evidence (Joseph's actual words) but lives outside git tracking — it is database-only.

Sources: [README.md:41-70](), [index.md:33-40]()

---

## The GBrain Config: Storage Scope Control

The `gbrain.yml` file is the brain's configuration contract. It declares identity, storage scope, required frontmatter, and the full set of valid page types. Nothing else controls these boundaries.

```yaml
# gbrain.yml
name: anara-brain
description: "Joseph Gabriel Ilustrisimo's personal AI brain — wellness, methodology, philosophy, clients, and content"
owner: joseph-gabriel

storage:
  db_tracked:
    - people/
    - methodology/
    - content/
    - reading/
    - projects/
    - concepts/
    - clients/
  db_only:
    - transcripts/
    - media/

frontmatter:
  required:
    - type
    - title
    - created
    - tags

page_types:
  - person
  - methodology
  - concept
  - content
  - client-note
  - reading
  - event
  - project
  - analysis
  - reference
  - transcript
  - brain
```

**`db_tracked`** directories are both git-tracked and indexed in the database — they are queryable, versioned, and part of the brain's persistent record.

**`db_only`** directories (`transcripts/`, `media/`) are stored only in the database, not in the git repository. This means transcripts and media assets can be large and frequently updated without bloating the git history, but they remain fully queryable by the agent.

The `frontmatter.required` block enforces a minimum schema contract: every page must declare `type`, `title`, `created`, and `tags`. This is what allows type- and tag-based search to work reliably across all directories.

Sources: [gbrain.yml:1-32]()

---

## The RESOLVER Routing Contract

`RESOLVER.md` is the brain's **query-to-page routing map**. It defines a lookup table: given a natural-language query category, return the canonical destination page or directory. The resolver is the first thing to consult when finding information.

```text
Query: "What does 'progress is positivity' mean?"
  → concepts/progress-is-positivity.md

Query: "Breathwork protocols / which breath for what?"
  → methodology/breathwork-protocols.md

Query: "Garry Tan / YC / longest client"
  → people/garry-tan.md

Query: "Content strategy / what to post"
  → content/content-strategy.md
```

The resolver organizes queries into six categories, each with its own lookup table:

| Category | Example queries | Primary destinations |
|---|---|---|
| Who Is Joseph? | bio, origin story, qualifications | `people/joseph-gabriel.md` |
| Philosophy & Concepts | faith/agency paradox, 3 pillars | `concepts/`, `methodology/` |
| Methodology & Protocols | breathwork, corrective exercise | `methodology/` |
| People & Relationships | client lookup, new client template | `people/`, `clients/` |
| Content & Business | what to post, audit, recommendations | `content/`, `projects/` |
| Reading & Influences | books, thinkers | `reading/influences.md` |
| Transcripts | primary-source evidence by topic | `transcripts/` |

Below the tables, the resolver also documents a **search strategy hierarchy**:
1. Start with the resolver for common queries
2. Search by `type` frontmatter field
3. Search by tag
4. Full-text search across all pages
5. Check transcripts for primary-source evidence

Sources: [RESOLVER.md:1-109]()

---

## The Compiled Truth / Timeline Split: What Changes When You Understand It

This split is the most operationally important design decision in the brain. Misunderstanding it produces two failure modes:

**Failure mode 1 — Treating the timeline as the answer.** Reading raw session notes to answer "what is this client's current programming" instead of reading the compiled truth section. The timeline is evidence, not conclusions.

**Failure mode 2 — Treating compiled truth as a log.** Appending new observations to the compiled truth section rather than rewriting it. Compiled truth is always a synthesis, not an accumulation. It should be a clean, current summary — not a list of historical states.

```text
CORRECT MENTAL MODEL:

  New session happens
        │
        ▼
  Append to Timeline     ← immutable log grows
        │
        ▼
  Does it change the picture?
        │
   YES  │  NO
        │   └──→ done
        ▼
  Rewrite Compiled Truth ← synthesis surface updated
```

When an AI agent queries a page, it reads the compiled truth section first and only descends into the timeline when it needs evidence or provenance. This makes the brain efficient to query at scale, regardless of how many timeline entries accumulate.

Sources: [README.md:17-37](), [clients/README.md:22-42](), [clients/template.md:41-57]()

---

## Page Type System

The schema establishes 12 valid page types declared in `gbrain.yml` and elaborated with full templates in `schema.md`. Each type prescribes its own frontmatter fields and section structure, but all share the universal compiled-truth / timeline shape.

```text
Page types by domain:
  Domain knowledge  → person, methodology, concept, content, client-note, reading
  Operations        → project, event, transcript
  Infrastructure    → analysis, reference, brain
```

The `brain` type is reserved for the root `index.md` — the single entry point that maps the whole knowledge base.

Sources: [gbrain.yml:25-38](), [schema.md:22-26]()

---

## System Architecture Diagram

```text
                         ┌─────────────────────────────┐
                         │         gbrain.yml           │
                         │  name / owner / page_types   │
                         │  storage scope (db_tracked   │
                         │  vs db_only) / required      │
                         │  frontmatter fields          │
                         └────────────┬────────────────┘
                                      │ controls
                    ┌─────────────────▼──────────────────────┐
                    │              Anara Brain                │
                    │                                         │
          ┌─────────┴──────┐                    ┌────────────┴─────────┐
          │  db_tracked    │                    │      db_only          │
          │  (git + DB)    │                    │   (DB only, no git)   │
          │                │                    │                       │
          │  people/       │                    │  transcripts/         │
          │  methodology/  │                    │  media/               │
          │  concepts/     │                    └───────────────────────┘
          │  content/      │
          │  clients/      │
          │  reading/      │
          │  projects/     │
          └────────┬───────┘
                   │ every page has
                   ▼
          ┌────────────────────────┐
          │   Two-Layer Invariant  │
          │                        │
          │  [ Compiled Truth ]    │ ← agent reads first; rewritten freely
          │  ─── Timeline ───      │
          │  [ Session entries ]   │ ← append-only; never edited
          └────────────────────────┘
                   │
                   │ routing via
                   ▼
          ┌────────────────────────┐
          │      RESOLVER.md       │
          │  query → page map      │
          │  6 query categories    │
          │  search strategy       │
          └────────────────────────┘
```

---

## Summary

Anara Brain is a GBrain-architecture knowledge base where every page enforces a two-layer contract: a rewritable compiled-truth section for fast AI querying, and an immutable timeline for provenance. Five domain directories (`people/`, `methodology/`, `concepts/`, `content/`, `clients/`) hold the primary knowledge; `gbrain.yml` controls what is git-tracked versus database-only; and `RESOLVER.md` is the routing contract that maps natural-language queries to canonical pages. The entire system is designed around one invariant: compiled truth always reflects *current best understanding*, and the timeline always reflects *how that understanding was earned*. Sources: [README.md:15-38](), [gbrain.yml:1-32](), [RESOLVER.md:100-109]()
