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.
Purpose: Orchestrator file that routes AI agents to the right context.Location: Root directoryWhy 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
Example routing:
### SMS/Message PipelineThe 13-step pipeline that processes inbound messages and generates responses.- `runtime/scripts/sms_handler.py` — core pipeline- `runtime/config.py` — all paths, settings, API config- `SOUL.md` — agent identity loaded into system prompt- `runtime/learning/capabilities.md` — CAN/CANNOT list
Purpose: Agent identity, voice, and behavioral constraints.Location: Root directoryLoaded: Every message (injected into system prompt)Size: ~30 linesWhat it defines:
Purpose: Master routing doc loaded into every system prompt.Location: Root directoryLoaded at runtime: The agent uses this to decide which docs to load based on message intent.Example:
If message is about scheduling → load docs/tasks/scheduling.mdIf message is about medications → load docs/tasks/medications.mdIf message is first contact → load docs/onboarding.md
Purpose: Single source of truth for all runtime paths and settings.Critical rule: Every runtime script MUST import from here. No hardcoded paths allowed.
from config import pathsfamily_file = paths.family_file("kano")
Sarah is consistently reliable for afternoon shifts
## Navigation for AI Agents### Boot Sequence<Steps> <Step title="Read AGENTS.md first"> This routes you to exactly the files you need for your task. </Step> <Step title="Find your task type in the routing table"> Example: "SMS/Message Pipeline" or "Review & Learning" </Step> <Step title="Read ONLY the listed files for that task"> Don't read everything - read what you need. </Step> <Step title="Start working"> You now have the right context loaded. </Step></Steps>### Runtime Agent RoutingThe runtime agent (processing messages) uses `agent_root.md` to decide which docs to load:**Example: Scheduling request**
Message: “Did she take her morning meds?”
Agent loads:
docs/tasks/medications.md
fork/workspace/protocols/medications.md
**Example: First contact**
Message: “Hi, I’m new here”
Agent loads:
docs/onboarding.md
docs/personality.md
## Key Rules<Warning>These rules are enforced by structural tests and will break CI if violated.</Warning>1. **Import from `runtime/config.py`** - Never hardcode paths ```python from config import paths # ✅ family_dir = paths.family_dir("kano")
family.md changes use Edit, not Write - Surgical replacement prevents data loss
from enforcement.family_editor import apply_updates # ✅
Safety enforcement is mechanical - Code gates, not prompt instructions
from enforcement.role_filter import filter_family_context # ✅from enforcement.phi_audit import PHIAuditLogger
Check docs/exec-plans/active/ before starting new work
Update AGENTS.md routing table when adding new files