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

RuleTrigger
forbidden_dependencyA resolved cross-domain target appears in the source domain's forbidden_dependencies list (enforced in both warn and strict modes).
disallowed_dependencyIn strict mode, a cross-domain import target is absent from the source domain's allowed_dependencies list.
circular_dependencyDepth-first graph search detects a cycle in the resolved domain or file import graph (excluding recognized type-only imports).
unmapped_domainIn proposal mode, a supplied source file belongs to no registered domain root.

(Note: Same-domain imports do not require allowlist membership.)


MCP Scopes

ScopeExample InputBehavior
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. unknown is not approval.

MCP vs. CLI Enforcement

  • MCP (septum_boundary) reports detected violations as rejected even when the workspace configuration uses warn mode.
  • CLI (septum check) respects effective enforcement: in warn mode violations report with exit code 0, while --strict (or strict config) exits with code 1. septum check --staged audits 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 approved even in strict mode.
  • 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.