# ADR-0007: `project_id` in the data model from day one **Status:** Accepted (2026-08-08) ## Context The design doc placed multi-project support in the final build phase. But `get_rules(project_id, agent_type)` already carries a project identifier in its phase-1 signature, and retrofitting multi-tenancy after five subsystems exist means migrating rules, audit, memory collections, permissions, and the panel simultaneously. ## Decision Every table and every tool signature carries **`project_id` from phase 1**. Memory collections are namespaced per project (`_sessions`). The Web Panel and CLI default to a single project so the v1 user experience is unchanged. ## Consequences - Near-zero upfront cost — the identifier was already in the API design. - Phase 9 becomes exposing a project switcher rather than performing a cross-subsystem migration. - Every query must be project-scoped from the start; a missing `WHERE project_id = ?` is a correctness bug, so this belongs in the review checklist.