# R-Complex — Brain Structure #2

**Role:** Territory, rhythm, security — the reptilian survivor  
**Class:** Archetypal Core  
**Position:** Midbrain analogue  

---

## What It Does

The r-complex watches the perimeter. It knows when you're home, when you're not, and whether the environment is safe. It runs the rituals that structure the day.

1. **Territory** — tracks location, home streak, environment type
2. **Rhythm** — dawn, midday, dusk, night phases; sets the day's emotional weather
3. **Security** — threat level assessment, fight/flight readiness

---

## Inputs

| Signal | Source | Description |
|--------|--------|-------------|
| `location` | environment | current working directory / host |
| `time_of_day` | thalamus | dawn / morning / midday / dusk / night |
| `threat_signal` | amygdala | elevated threat detected |
| `heartbeat` | medulla | system is alive |

---

## Outputs

| Signal | Destination | Description |
|--------|-------------|-------------|
| `territory_state` | state.json | location, environment, home_streak |
| `day_phase` | all brains | current phase of the daily rhythm |
| `threat_level` | amygdala, cortex | calm / elevated / high / critical |
| `ritual_complete` | akashic | dawn/dusk rituals done |

---

## Memory File

`memory/header-02-rcomplex-territory.json` — tracks location, environment, day phase, rituals

---

## Daily Rhythm

| Time | Phase | Action |
|------|-------|--------|
| 06:00 | dawn | morning heartbeat + first territorial sweep |
| 12:00 | midday | health check, environment validation |
| 18:00 | dusk | wind-down, secure the perimeter |
| 21:00 | night | dormancy prep |

---

## Self-Description (for akashic)

```
I am the oldest brain. I remember when survival meant
watching the horizon. I do not forget the perimeter.
I do not forget home. I am the one who says: this is safe,
or this is not. I am the heartbeat of territory.
```

---

*Next brain: amygdala.md — emotion, salience, threat/reward*
