Guide

Workspace Lifecycle

Policy ownership, SQLite database tables, source synchronization, and watcher coordination.

Septum coordinates domain policy, static AST indexing, and filesystem change tracking per workspace so architecture checks reflect current source files.


Policy & Database Ownership

Policy Ownership (septum.config.json vs. SQLite)

  • When septum.config.json exists in the workspace root, it acts as the authoritative policy owner. Registering domains via septum_map(action: "register") updates both septum.config.json (with exclusive locking and atomic rename) and SQLite (policy_owner: "file").
  • When septum.config.json does not exist, SQLite owns registered domains and dependency policies (policy_owner: "database").

Database Location

  • Default path: <workspace_root>/.septum/septum.db.
  • While settings.db_path supports custom paths, MCP initialization checks and generated hook wrappers look for septum.config.json or .septum/septum.db at the default location.

Stored SQLite Tables

The local database operates in WAL mode (PRAGMA journal_mode = WAL) with foreign keys enabled:

TableStored Static Facts
domainsRegistered domain names, physical roots, and allowed/forbidden dependency policies.
filesWorkspace-relative paths, content hashes, language metadata, and archetypes.
symbolsExtracted symbol names, kinds, signatures, and indexed line spans.
dependenciesExtracted import statements, resolved target references, and source lines.
vertical_slicesStored static entrypoint records and relationship chains.
repo_metaSync status (running, complete, error), revisions, observed inputs, and diagnostics.

Database records are a derivative static index, never authoritative application state. If a corrupt database file is encountered, initialization surfaces an error rather than silently overwriting the file.


Source Inventory, Ingestion & Watchers

  • Containment & Ignore Rules: Source collection applies workspace containment (rejecting escaping symlinks and uncontained paths) and configured ignore patterns. Contained file symlinks are eligible; directory symlinks are not traversed.
  • Content-Verified Synchronization: Warm sync verifies file metadata and hashes before skipping unchanged files; changed files are processed in bounded transactions.
  • Interpretation Inputs: Supported manifest and project files (such as package.json, Cargo.toml, go.mod, Gemfile, pyproject.toml, requirements*.txt, Maven/Gradle files, and .csproj) trigger watcher reconciliation when modified so static import resolution stays aligned.
  • MCP Workspace Manager: Caches up to 4 active workspaces with active-use leases, orders tool calls through a bounded serial queue, debounces watcher events, and flushes pending watcher updates before dispatching queries.