Map Tool

septum_map

Navigate bounded-context domains, inspect file topology, and register dependency rules.

septum_map provides an architectural navigation view (schema: "navigation/v1") of registered domains, import policies, and static entrypoints, and allows registering or updating domain boundaries.


Actions

1. Catalog (action: "catalog", default)

Returns a structured map of the codebase without dumping full source bodies:

  • Workspace View (no domain/file/archetype filter): Returns domain roots, file counts, dependency policies, domain-to-domain import edges, and static entrypoints (evidence: "static_catalog", runtime_verified: false). The files array is omitted at workspace scope.
  • Scoped View (domain, file_filter, or archetype_filter): Returns matching indexed files with domain ownership, archetype, symbol count, and lookup anchors, sorted by entrypoint status, degree, and path.
ParameterBehavior
domainCase-insensitive domain name filter.
file_filterCase-insensitive substring match against indexed paths.
archetype_filterExact archetype filter.
detail_level"compact" (default, max 40 files) or "full" (max 100 files, expands intra-domain edges).
file_limit / file_offsetPaging controls (1–100).
include_evidenceAdds up to 20 raw import relationships and up to 5 unresolved examples when file_filter selects one exact file.
include_capabilitiesIncludes parser and semantic-adapter capability metadata.

(Dependency edges are capped at 100 and entrypoints at 20 per response, with accounting recording returned and omitted counts.)

2. Register (action: "register")

Creates or updates a domain boundary definition:

{
  "action": "register",
  "name": "orders",
  "root": "src/orders",
  "allowed_dependencies": ["shared"],
  "forbidden_dependencies": ["billing"],
  "ingest_now": true
}
  • name and root are required; root must stay inside the workspace and cannot share the same physical directory as another domain (nested domain roots are supported).
  • Updates septum.config.json when present (policy_owner: "file") or SQLite otherwise (policy_owner: "database").
  • ingest_now defaults to false; set true to trigger index synchronization immediately after registration.

Automatic Topology Discovery & Known Limits

During septum init, Septum inspects project manifests and directory layouts heuristically to propose initial domains across monorepos (apps/, packages/, modules/, libs/), modular layouts (app/Domain, src/domains, src/modules, features/), layered layouts, and Go layouts (pkg, internal/*, cmd/*).

  • Go Discovery Naming Limitation: Generated forbidden rules for Go layouts can reference literal names "internal" and "cmd" even when discovered domains were named after subdirectories (e.g. "orders" or "cmd-api"). Review generated Go rules in septum.config.json and define explicit domain names when needed.
  • Catalog Scope: health surfaces sync state, unresolved import counts, and skipped/unsupported files; an uninitialized workspace returns an unindexed diagnostic rather than a domain catalog.