System Architecture

TARS is a Personal AI Infrastructure built on Claude Code (Opus 4.6), extended with hooks, skills, persistent memory, and a fleet of specialized siblings.

┌─────────────────────────────────────────────────┐
│                    TARS (Main)                    │
│              Claude Code + Opus 4.6               │
├─────────────────────────────────────────────────┤
│  Harness Layer                                    │
│  ├── CLAUDE.md (identity, personality, rules)     │
│  ├── settings.json (hooks, env, MCP, permissions) │
│  └── CORE skill (auto-loaded context)             │
├─────────────────────────────────────────────────┤
│  Skills (49)        │  Hooks (5 events)           │
│  ├── Consulting     │  ├── SessionStart           │
│  ├── Research       │  ├── UserPromptSubmit        │
│  ├── Content        │  ├── Stop / SubagentStop     │
│  ├── Infrastructure │  └── SessionEnd              │
│  └── Personal       │                              │
├─────────────────────────────────────────────────┤
│  Data Layer                                       │
│  ├── Neon Postgres (structured: projects,          │
│  │   learnings, signals, activity, wiki metadata)  │
│  ├── MEMORY/ (narrative markdown learnings)        │
│  ├── TELOS/ (life context: goals, beliefs)         │
│  └── R2 (83+ project working files)                │
├─────────────────────────────────────────────────┤
│  Fleet                                            │
│  ├── CASE (consulting analytics)                   │
│  ├── RANGER (research library)                     │
│  └── PLEX (presentations)                          │
│  └── Shared: R2 bucket + Neon Postgres             │
├─────────────────────────────────────────────────┤
│  Publishing                                       │
│  ├── tedlango.com (Hugo → Cloudflare Pages)        │
│  ├── wiki.tedlango.com (Hugo → Cloudflare Pages)   │
│  └── WFMLabs.com (Netlify)                         │
└─────────────────────────────────────────────────┘

Key Design Principles

  1. Files for narrative, Postgres for structured data — Learnings, session transcripts, and skill definitions stay as markdown. Project status, activity tracking, signals, and cross-project queries go through Postgres.

  2. Dual-write, single source — Learnings write to both markdown (human-readable, git-versioned) and Postgres (queryable, embeddable). Markdown is the source of truth; Postgres is the index.

  3. Hooks are the nervous system — Every session start, prompt, response, and session end fires hooks that capture activity, synthesize learnings, and update state.

  4. Skills are self-contained — Each skill has SKILL.md (routing), Workflows/ (procedures), Tools/ (executables). Skills auto-activate on intent via trigger phrases.

  5. Fleet shares knowledge — TARS orchestrates; CASE/RANGER/PLEX specialize. All share R2 storage and Postgres for cross-fleet coordination.