Overview
CareSupport is organized around files as database -family.md is the source of truth per family, with no external database. The runtime agent loads context on demand using AGENTS.md routing.
Repository Map
Key Files
AGENTS.md
Purpose: Orchestrator file that routes AI agents to the right context. Location: Root directory Why it exists: Instead of reading everything, AI agents read this file first, find their task type in the routing table, then read ONLY the listed files for that task. Routing table sections:- SMS/Message Pipeline
- Agent Routing Layer
- Adding or Modifying Family Members
- Enforcement Layer
- Transport & Messaging (Linq/iMessage)
- Product Strategy & Domain Model
- Project State & History
- Agent Identity & Learning System
- Review & Learning
- Care Protocols
SOUL.md
Purpose: Agent identity, voice, and behavioral constraints. Location: Root directory Loaded: Every message (injected into system prompt) Size: ~30 lines What it defines:- Who the agent is
- Voice and tone
- Core behavioral rules
- What it can/cannot do
agent_root.md
Purpose: Master routing doc loaded into every system prompt. Location: Root directory Loaded at runtime: The agent uses this to decide which docs to load based on message intent. Example:runtime/config.py
Purpose: Single source of truth for all runtime paths and settings. Critical rule: Every runtime script MUST import from here. No hardcoded paths allowed.- All filesystem paths
- Linq configuration
- Twilio configuration
- Learning paths
- Log paths
Directory Structure
runtime/
The execution layer - Python code that runs the system.fork/workspace/
Live operational data - families, protocols, schedules.docs/
Product strategy, specs, design docs, and executive plans.Family Directory Structure
Each family has a standard directory layout:routing.json Schema
family.md Structure
Medications
Appointments
- Feb 20, 10:00 AM — Dr. Chen (cardiology)
- Transport: needed
- Escort: Abeba (confirmed)
Active Issues
- Feb 19 morning shift uncovered
Recent Events
- 2026-02-18 09:00 — Morning meds confirmed
Patterns
- Sarah is consistently reliable for afternoon shifts
- docs/tasks/scheduling.md
- docs/tasks/model_routing.md
- docs/tasks/medications.md
- fork/workspace/protocols/medications.md
- docs/onboarding.md
- docs/personality.md
-
family.md changes use Edit, not Write - Surgical replacement prevents data loss
-
Safety enforcement is mechanical - Code gates, not prompt instructions
-
Check
docs/exec-plans/active/before starting new work - Update AGENTS.md routing table when adding new files
Build & Run
Related
- Testing Guide - Test suites and pytest setup
- Scripts Reference - Runtime scripts documentation
- Enforcement Layer - Safety gates and access control