Guard Tool
septum_boundary
Evaluate proposed file imports, domain dependencies, workspace cycles, and frozen Git staged trees.
septum_boundary evaluates statically resolved import statements against configured domain rules and checks for dependency cycles across files and bounded contexts.
Implemented Boundary Rules
| Rule | Trigger |
|---|---|
forbidden_dependency | A resolved cross-domain target appears in the source domain's forbidden_dependencies list (enforced in both warn and strict modes). |
disallowed_dependency | In strict mode, a cross-domain import target is absent from the source domain's allowed_dependencies list. |
circular_dependency | Depth-first graph search detects a cycle in the resolved domain or file import graph (excluding recognized type-only imports). |
unmapped_domain | In proposal mode, a supplied source file belongs to no registered domain root. |
(Note: Same-domain imports do not require allowlist membership.)
MCP Scopes
| Scope | Example Input | Behavior |
|---|---|---|
file | {"scope": "file", "file_path": "src/orders/service.ts", "proposed_imports": ["../billing/service"]} | Evaluates supplied proposed_imports (or batch file_paths) against policy and checks simulated cycles. Does not audit existing unmentioned imports in the file unless present in existing violation checks. |
domain | {"scope": "domain", "domain": "orders"} | Audits indexed dependencies involving a registered domain. |
all (default) | {"scope": "all"} | Audits the indexed workspace dependency graph for policy violations and cycles. |
staged | {"scope": "staged"} | Freezes the Git index using git write-tree, materializes staged source and interpretation manifests (ignoring unstaged edits), and audits the snapshot. Rejects symlinks and submodules. |
Statuses, CLI Differences & Known Limitations
Status Semantics
approved: No policy violations or cycles were detected within the evaluated static scope and checks.rejected: One or more dependency violations or cycles were detected.unknown: Missing/errored workspace sync, skipped files, or incomplete import resolution prevented a conclusive boundary check.unknownis not approval.
MCP vs. CLI Enforcement
- MCP (
septum_boundary) reports detected violations asrejectedeven when the workspace configuration useswarnmode. - CLI (
septum check) respects effective enforcement: inwarnmode violations report with exit code0, while--strict(orstrictconfig) exits with code1.septum check --stagedaudits the frozen Git index.
Known Static Limitations
- Unmapped Targets: If a mapped source imports a real local file that sits outside all registered domain roots, the evaluator skips the unresolved target domain—so that import can receive
approvedeven instrictmode. - Incomplete Language Resolution: Conditional imports, dynamic expressions, missing Java classpaths, and C#/Rust conditional compilation can leave relationships incomplete (
unknown). - Not Runtime Proof: Passing a static boundary check confirms import-rule hygiene over the analyzed scope, not runtime correctness or application safety.