Architecture Guard
Run repository-level architecture checks with deterministic output.
Workflow
- •Run staged checks before commit:
- •
bash .codex/skills/architecture-guard/scripts/check_layering.sh --staged
- •
- •Fix all blockers (
[ERROR]) first. - •Review warnings (
[WARN]) and either fix or explain in PR notes. - •Optionally run a full scan when planning larger refactors:
- •
bash .codex/skills/architecture-guard/scripts/check_layering.sh --all
- •
What This Skill Checks
- •
SwiftUIimport leakage outside the presentation allowlist. - •Direct entropy/time/I/O API usage in engine-domain candidate files:
- •
Int.random,Bool.random,Date(),Date.now,UUID(),FileManager.default,URLSession,UserDefaults.standard.
- •
- •Boundary-risk warnings:
- •Source changes without test changes in staged mode.
- •New
publicdeclarations in source files.
Scope Notes
- •
--stagedis the default mode and is intended for day-to-day commits. - •
--allis intentionally strict and may surface existing legacy debt. - •Treat this skill as the enforcement tool for the architecture section in
AGENTS.md.
References
- •Rule notes and migration intent:
references/rules.md