| name | architecture-boundary-guard |
| description | Enforce DDD and Hexagonal architecture boundaries for code changes. Use when implementing or reviewing any change that touches module boundaries, ports/adapters, controllers, or repositories. |
Purpose
Prevent architecture drift and preserve bounded-context integrity.
Workflow
- Load and apply docs/ai/CONVENTIONS.md, especially sections 1 through 4 and section 8.
- Identify impacted modules and boundaries.
- Validate dependency direction and port usage.
- Flag forbidden cross-context imports.
- Confirm controller/use-case layering.
- Validate mapper, job/scheduler, and Redis rules when touched.
- Produce findings with concrete file paths.
Inputs
Outputs
- Boundary compliance summary.
- Violations and corrective actions.
Failure and Escalation
Escalate when business intent conflicts with architecture invariants.