- Category: B. Software Architecture
- English term: Separation of Concerns (SoC) / Role Boundaries
- Related: Control Plane and Data Plane · Bulkhead Pattern (Isolation) · Principle of Least Privilege (PoLP) · Active-Standby Redundancy · Work Queue (Producer-Consumer Pattern)
General Meaning
Articulated by Edsger W. Dijkstra, Separation of Concerns (SoC) is a classic computer science principle stating that each module or program should address a single, well-defined responsibility.
Separating user interfaces, business logic, and data persistence prevents a specification change in one area from breaking unrelated parts of the system. Clear boundaries also make unit testing and fault isolation straightforward.
Why It Matters
- Preventing bloat and bottlenecks: Packing every task into a single process causes blocking delays and spaghetti code.
- Optimizing execution intervals and resource allocation: Allows tailored scheduling per role, such as 15-minute monitoring loops versus overnight batch jobs.
- Avoiding collisions among autonomous agents: Prevents multiple autonomous processes from fighting over the same data or tasks.
How the Site Factory Uses It
The Site Factory assigns distinct automation roles (patrol, macgakari, unkou, and honbu-agent-* workers) and strictly defines both what each role does and what it must never do in AGENTS.md and ops/machines.md.
For example, the dispatcher patrol runs every 15 minutes on one of the 3 Macs to reclaim stale tickets, enqueue work, auto-merge PRs, and verify deployments, but it never invokes AI models directly and never touches ops/builds/. macgakari registers tasks in D1 every 15 minutes without running AI or ops/builds/. unkou runs every 30 minutes to build new sites, perform Direct Uploads, and record publication proofs in D1 without touching ops/cloud/ tickets. Meanwhile, KeepAlive honbu-agent-* workers execute leased D1 jobs in isolated directories without taking unreserved tasks.
Caveats & Operational Rules
- Never tack a 'quick helper task' onto a neighboring role: Having
patrolcall an AI model for a 'small code fix' blocks the 15-minute monitoring loop while waiting for LLM inference, paralyzing the entire system. - Defining only positive duties is insufficient: Especially for AI agents, you must explicitly state forbidden boundaries ('what not to do'), or helpful agents will modify unrelated files and neighboring projects.
Related Terms
- Control Plane and Data Plane
- Bulkhead Pattern (Isolation)
- Principle of Least Privilege (PoLP)
- Active-Standby Redundancy
- Work Queue (Producer-Consumer Pattern)
References
- Book: Mark Richards & Neal Ford, *Fundamentals of Software Architecture*, Chapter 3 (Modularity)
Verified: 2026-11-08