# Notion Relational Schema v1 — Agency Brain
**Date:** 2026-02-23 | **Author:** Kitt | **Status:** Draft for review

---

## Design Principles

1. **Every entity connects.** No isolated databases. If it exists, it relates.
2. **Query from any node.** Start at a Person → see their projects, tasks, meetings, comms. Start at a Project → see everything.
3. **Single source of truth.** One People DB, one Tasks DB, one Projects DB. Period.
4. **Temporal awareness.** Every interaction logged with dates. We can reconstruct "what happened with X in February?"
5. **Bot-queryable.** Every relation must be API-traversable so Kitt/agents can pull connected data programmatically.

---

## Core Databases (8 total, down from 22)

### 1. 🏗️ Projects
The anchor. Every client engagement, internal initiative, or product.

| Property | Type | Notes |
|----------|------|-------|
| Name | Title | |
| Status | Select | Active / On Hold / Complete / Archived |
| Priority | Select | High / Medium / Low |
| Area | Select | Client Work / Internal / Product / Personal |
| Owner | Relation → People | Who's responsible |
| Team | Relation → People | All people involved (client contacts, team members) |
| Tasks | Relation → Tasks | All tasks under this project |
| Meetings | Relation → Meetings | All meetings about this project |
| Comms | Relation → Comms Log | Email threads, message threads |
| Start Date | Date | |
| Due Date | Date | |
| Budget | Number | If applicable |
| Links | URL | Google Drive, Figma, GitHub, etc. |
| Notes | Rich Text | |
| Discord Channel | Text | Channel ID for project comms |

**Rollups:**
- Open Tasks Count (from Tasks relation, filter Status ≠ Done)
- Next Meeting (from Meetings relation, nearest future date)
- Last Activity (latest edit across all related items)

---

### 2. ✅ Tasks
Every actionable work item. Absorbs To-Dos.

| Property | Type | Notes |
|----------|------|-------|
| Task | Title | |
| Status | Select | Not Started / In Progress / Blocked / Done |
| Priority | Select | P0 (urgent) / P1 (high) / P2 (medium) / P3 (low) |
| Project | Relation → Projects | Which project this belongs to |
| Assignee | Relation → People | Who's doing it (person or agent) |
| Reporter | Relation → People | Who requested it |
| Due | Date | |
| Start Date | Date | |
| Source | Select | Meeting / Email / Discord / Manual / Cron |
| Source Meeting | Relation → Meetings | If born from a meeting |
| Source Comms | Relation → Comms Log | If born from an email/thread |
| Blocks | Relation → Tasks | Self-referential: what this blocks |
| Dependencies | Relation → Tasks | Self-referential: what this depends on |
| Notes | Rich Text | |
| Area | Select | Strategy / Creative / Dev / Admin / Research |

**Rollups:**
- Project Name (from Project relation)
- Assignee Name (from People relation)

---

### 3. 👥 People
ONE database for all humans. Absorbs Contacts CRM, Authorized Contacts, Contacts Inbox.

| Property | Type | Notes |
|----------|------|-------|
| Name | Title | |
| Type | Multi-select | Client / Team / Family / Friend / Vendor / Lead |
| Relationship | Select | Active / Warm / Cold / Archived |
| Email | Email | |
| Phone | Phone | |
| Company | Text | |
| Role/Title | Text | |
| Location | Text | |
| LinkedIn | URL | |
| Projects | Relation → Projects | All projects they're involved in |
| Tasks Assigned | Relation → Tasks | Tasks assigned to them |
| Tasks Reported | Relation → Tasks | Tasks they requested |
| Meetings | Relation → Meetings | Meetings they attended |
| Comms | Relation → Comms Log | All communications with them |
| Tags | Multi-select | VIP / Authorized / Can-DM-Bot / Investor / etc. |
| Next Follow-up | Date | |
| Last Contact | Date | Auto-updated via rollup |
| Notes | Rich Text | |
| Priority | Select | A (weekly touch) / B (monthly) / C (quarterly) / D (archive) |

**Rollups:**
- Active Projects Count
- Last Meeting Date (from Meetings relation)
- Open Tasks Count (assigned to them)

**Key tags for access control:**
- `Authorized` = can interact with bot directly
- `VIP` = Assaf wants to know about any interaction
- `Can-DM-Bot` = whitelisted for bot DMs

---

### 4. 📅 Meetings
Every meeting, call, or significant sync. ClawPilot feeds into this.

| Property | Type | Notes |
|----------|------|-------|
| Title | Title | |
| Date | Date | |
| Project | Relation → Projects | What this meeting was about |
| Attendees | Relation → People | Who was there |
| Platform | Select | Google Meet / Zoom / In-person / Phone / Discord |
| Summary | Rich Text | AI-generated or manual |
| Action Items | Relation → Tasks | Tasks created from this meeting |
| Recording | URL | If available |
| Transcript | Rich Text | From ClawPilot/Recall |
| Status | Select | Scheduled / Completed / Cancelled / No-show |
| Follow-up Date | Date | When to follow up |
| Comms | Relation → Comms Log | Related email threads |

**Rollups:**
- Attendee Names
- Open Action Items Count
- Project Name

---

### 5. 💬 Comms Log (NEW)
Every significant email thread, Discord conversation, or message exchange. This is the missing piece.

| Property | Type | Notes |
|----------|------|-------|
| Subject | Title | Email subject or conversation topic |
| Type | Select | Email / Discord / WhatsApp / Signal / Phone Call |
| Direction | Select | Inbound / Outbound / Internal |
| Date | Date | |
| People | Relation → People | Who's involved |
| Project | Relation → Projects | Which project it relates to |
| Related Tasks | Relation → Tasks | Tasks referenced or created |
| Related Meeting | Relation → Meetings | If follow-up to a meeting |
| Thread ID | Text | Gmail thread ID, Discord message ID, etc. |
| Summary | Rich Text | Key points |
| Status | Select | Open / Waiting / Resolved / FYI |
| Priority | Select | Urgent / Normal / Low |
| Needs Response | Checkbox | Flag for action |

**Rollups:**
- People Names
- Project Name

---

### 6. 🎨 Inspiration Library (KEEP AS-IS)
Already well-structured and actively used by taste pipeline.

---

### 7. 📡 Intelligence (MERGE Trend Intelligence + Qualified Sources)
Combine into single intelligence DB with type tags.

| Property | Type | Notes |
|----------|------|-------|
| Signal | Title | |
| Type | Select | Trend / Source / Pattern / Zeitgeist |
| Category | Multi-select | Design / Business / Cultural / Technology |
| Source | Text | Where we found it |
| Source Tier | Select | Tier 1 (Trust) / Tier 2 (Medium) / Tier 3 (Low) |
| Date Captured | Date | |
| Strategic Insight | Rich Text | |
| CE Angle | Rich Text | How CE uses this |
| Confidence | Select | High / Medium / Low |
| Status | Select | Active / Monitoring / Archived |
| Related Projects | Relation → Projects | Which projects this informs |
| Screenshot | Files | |

---

### 8. 🔒 Operations (NEW)
Agency infrastructure: emergency protocols, service inventory, agent registry, incident log.

Uses **sub-pages** within a single DB rather than 4 separate DBs:

| Property | Type | Notes |
|----------|------|-------|
| Name | Title | |
| Category | Select | Emergency Protocol / Service / Agent / Incident |
| Status | Select | Active / Resolved / Deprecated |
| Priority | Select | Critical / High / Normal / Low |
| Owner | Relation → People | Who's responsible |
| Details | Rich Text | Steps, config, resolution, etc. |
| Last Tested/Updated | Date | |
| Related Project | Relation → Projects | If applicable |
| Tags | Multi-select | Security / Infrastructure / API / Server / Backup |

---

## Relation Map (How Everything Connects)

```
                    ┌─────────┐
                    │ PEOPLE  │
                    └────┬────┘
                         │
            ┌────────────┼────────────┐
            │            │            │
       ┌────▼────┐  ┌────▼────┐  ┌───▼─────┐
       │ PROJECTS│  │MEETINGS │  │COMMS LOG│
       └────┬────┘  └────┬────┘  └───┬─────┘
            │            │            │
            └────────────┼────────────┘
                         │
                    ┌────▼────┐
                    │  TASKS  │
                    └────┬────┘
                         │
              ┌──────────┼──────────┐
              │          │          │
         ┌────▼───┐ ┌───▼────┐ ┌──▼────────┐
         │INSPIRE │ │ INTEL  │ │OPERATIONS │
         └────────┘ └────────┘ └───────────┘
```

### Example Queries (What This Enables)

**"What's happening with Grid Health?"**
→ Project: Grid Health
  → Tasks: 12 open, 3 blocked
  → People: Assaf (owner), [client contact], Julia (research)
  → Meetings: Last call Feb 21, next scheduled Mar 1
  → Comms: 3 open email threads, 1 needs response
  → Intelligence: 2 trend signals relevant to healthcare AI

**"When did we last talk to [client]?"**
→ Person: [client]
  → Last Meeting: Feb 15 (Grid Health kickoff)
  → Last Email: Feb 20 (sent SOW follow-up, status: Waiting)
  → Open Tasks: 2 assigned to them (review SOW, approve budget)

**"What came out of yesterday's meeting?"**
→ Meeting: Feb 22 standup
  → Action Items: 3 tasks created (linked)
  → Attendees: Assaf, [team]
  → Follow-up: Email sent to [client] (linked in Comms Log)
  → Project: Grid Health (linked)

**"Show me everything that needs a response"**
→ Comms Log: filter Needs Response = true
  → Each entry shows: who, what project, when, summary
  → Click through to person → see full relationship context

---

## Migration Plan

### Phase 1: Consolidate (destructive — needs Assaf approval)
1. Merge Contacts CRM (2 entries) → People Directory
2. Merge Authorized Contacts → People Directory (add "Authorized" tag)
3. Merge To-Dos → Tasks
4. Delete empty DBs (6 databases)
5. Archive Expenses/Licenses Spoken (check if needed)

### Phase 2: Add Relations (non-destructive)
1. Add relation properties to Projects, Tasks, People, Meetings
2. Wire up existing data (match tasks to projects, people to projects)
3. Add rollup properties

### Phase 3: Create New DBs
1. Create Comms Log
2. Create Operations DB
3. Merge Trend Intelligence + Qualified Sources → Intelligence

### Phase 4: Automate
1. ClawPilot meeting transcripts → auto-create Meeting entry + link to Project + People
2. Gmail integration → auto-log significant emails to Comms Log
3. Task creation from meetings → auto-link to source Meeting
4. Daily cron: flag stale projects, overdue follow-ups, open comms needing response

### Phase 5: Query Layer
1. Build Kitt query functions: "Tell me about [project/person/meeting]"
2. Build daily briefing: open items across all DBs
3. Build relationship health dashboard: who haven't we talked to?

---

## Open Questions for Review
1. Should Comms Log be auto-populated from Gmail, or manual/curated?
2. How granular should Discord conversations be logged? (every thread? only decisions?)
3. Should agents (Kitt, Gerri, etc.) exist in People DB or in Operations?
4. Do we need a separate Finance/Billing DB, or fold into Projects?
5. Planning & Ideas — keep as separate DB or fold into Tasks with "Idea" status?
