Skip to main content

The Federation Governance Tricorder

Project description

๐Ÿ”ฑ Omni โ€” The All-Seeing Eye

Omni Header

The Federation Governance Tricorder โ€” A modular, extensible observation engine that scans, maps, and guards codebases at galactic scale.

"Never trust documentation, trust reality." โ€” ACE

Omni is a Python-powered passive observation platform that discovers the truth about your code. It doesn't modify files or break builds โ€” it sees, maps, and reports. Think of it as a tricorder for your codebase: point it at any directory and it reveals structure, dependencies, health, drift, and compliance in seconds.


โœจ At a Glance

Dimension Reading
๐Ÿ” Scanner Categories 12 (from static analysis to git archaeology)
๐Ÿ“ฆ Total Scanners 55 instruments across all categories
โšก CLI Commands 14 verbs for every observation need
๐Ÿง  MCP Server Exposes all scanners as AI-callable tools
๐Ÿ›๏ธ Pillars 4 orchestration subsystems (Cartography, Intel, Gatekeeper, Registry)
๐Ÿ”Œ Federation Mode Optional deep integration with a governance backend
๐Ÿฆด Standalone Mode Works anywhere โ€” no backend required

๐Ÿš€ Quick Start

New Here? Check out the Beginner's Guide: Zero to Hero for a step-by-step setup tutorial.

Install

# From the omni directory
pip install -e .

Your First Scan

# Scan the current directory with all static scanners
omni scan .

# Run a specific scanner
omni scan . --scanner surfaces

# See what Omni knows about itself
omni introspect

Explore the Ecosystem

# Map your entire project constellation
omni map

# Check governance compliance
omni gate .

# Generate a full report
omni report . --format markdown

๐Ÿ—๏ธ Architecture โ€” The Trinity

Omni follows the Trinity Architecture โ€” three layers with strict separation of concerns:

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚        CLI (cli.py)       โ”‚  โ† User interface
                    โ”‚     14 verbs, 1 brain     โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚                  โ”‚                  โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  ๐Ÿง  CORE       โ”‚  โ”‚  ๐Ÿ›๏ธ PILLARS    โ”‚  โ”‚  ๐Ÿ“š LIB      โ”‚
    โ”‚  Identity      โ”‚  โ”‚  Cartography   โ”‚  โ”‚  I/O, Render โ”‚
    โ”‚  Registry      โ”‚  โ”‚  Intel         โ”‚  โ”‚  Reporting   โ”‚
    โ”‚  Gate          โ”‚  โ”‚  Gatekeeper    โ”‚  โ”‚  Tree, TAP   โ”‚
    โ”‚  Paths         โ”‚  โ”‚  Registry      โ”‚  โ”‚  Requirementsโ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚                 โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚              ๐Ÿ” SCANNERS (55 Instruments)            โ”‚
    โ”‚   12 categories โ€ข Dynamic plugin loading             โ”‚
    โ”‚   Each scanner: scan(target: Path) โ†’ dict            โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  ๐Ÿ”ง BUILDERS   โ”‚  โ† The only layer that writes
    โ”‚  Registry Gen  โ”‚
    โ”‚  Report Gen    โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Read-Only Guarantee: Scanners never modify source files. Only Builders write, and only to designated artifact directories.

For the full architectural deep-dive, see ARCHITECTURE.md.


๐Ÿ” Scanner Categories

Omni's 55 scanners are organized into 12 categories. Each scanner implements the universal scan(target: Path) โ†’ dict contract and is auto-discovered via SCANNER_MANIFEST.yaml files.

Open Source Scanners (Included in Build)

Category Scanners Purpose
๐Ÿ“ static 9 Filesystem analysis โ€” contracts, deps, docs, events, hooks, imports, surfaces, tools, UUIDs
๐Ÿ—๏ธ architecture 4 Structural enforcement โ€” import boundaries, coupling detection, drift analysis, compliance
๐Ÿ”Ž discovery 8 Component cataloging โ€” projects, CLI commands, cores, MCP servers, archives, census
๐ŸŒ polyglot 4 Language ecosystems โ€” Python packages, Node.js, Rust crates, generic (Go/Java/.NET/Docker)
๐Ÿ“š library 6 Document intelligence โ€” cohesion analysis, content depth, knowledge graphs, rituals
๐Ÿ”€ git 5 Repository intelligence โ€” status, velocity, commit history, PR telemetry, utilities
๐Ÿ” search 3 Pattern matching โ€” file search, text search, regex pattern search with context
๐Ÿ—„๏ธ db 1 Generic configuration-driven database scanning

Federation-Exclusive Scanners (Not in Open Source Build)

These scanners require the Federation Heart backend and are part of the proprietary governance layer. They appear in omni introspect when the Heart is available but are not distributed with the open-source release.

Category Scanners Purpose
๐Ÿ›ก๏ธ health 6 Runtime health โ€” Federation, CMP, pillar, station, tunnel, and system status
๐Ÿ—ƒ๏ธ database 5 CMP entity scanning โ€” agents, artifacts, conversations, entities, projects
โš“ fleet 1 Fleet registry generation and validation
๐Ÿ”ฅ phoenix 3 Git history resurrection โ€” archive scanning, orphan detection, temporal gap analysis

Each category has its own README with detailed scanner documentation. See the Scanner Architecture Guide for the complete reference.


๐Ÿ›๏ธ The Four Pillars

Pillars are orchestration subsystems that coordinate multiple scanners and produce higher-level intelligence:

Pillar Role Key Capability
๐Ÿ—บ๏ธ Cartography Ecosystem Mapper Maps project constellations and dependency webs
๐Ÿ•ต๏ธ Intel Intelligence Gatherer Aggregates multi-scanner data into actionable insights
โš–๏ธ Gatekeeper Policy Enforcer Validates compliance, catches drift, flags violations
๐Ÿ“‹ Registry Registry Operator Parses, validates, and manages PROJECT_REGISTRY_V1.yaml

See Pillars Architecture for the deep dive.


โšก CLI Command Reference

Command Purpose
omni scan Run scanners against a target directory
omni inspect Deep inspection of a single project
omni gate Policy enforcement and compliance checks
omni map Ecosystem cartography and dependency mapping
omni tree Directory tree visualization
omni audit Provenance, dependency, and lock auditing
omni registry Registry operations and event scanning
omni library Grand Librarian document intelligence
omni canon Canon validation and discovery
omni report Generate structured reports
omni init Scaffold new Federation-compliant projects
omni introspect Self-inspection โ€” shows all scanners, drift, capabilities
omni interpret Interpret and explain scan results
omni inspect-tree Combined tree + inspection

๐Ÿ”Œ Federation Mode vs. Standalone

Omni operates in two modes, transparently:

Standalone Mode (Default)

No external dependencies. Configuration from omni.yml and environment variables. All open-source scanners work perfectly. Ideal for individual developers and open-source projects.

Federation Mode (Optional)

When federation_heart is installed, Omni gains:

  • CartographyPillar โ€” Canonical path resolution across the entire Federation
  • Constitution โ€” Governance rule enforcement from a central authority
  • CMP Integration โ€” Project identity resolution against the Canonical Master Project database
  • Runtime Health โ€” Live status of Federation services, stations, and tunnels

The integration is handled by a single shim (omni/config/settings.py) that bridges to the Heart when available and falls back gracefully when it's not.


๐Ÿง  MCP Server

Omni includes a Model Context Protocol (MCP) server that exposes all 55 scanners as AI-callable tools. Any MCP-compatible AI assistant can invoke Omni's scanners programmatically.

# The MCP server auto-discovers all registered scanners
python -m mcp_server.omni_mcp_server

See MCP Server Documentation for setup and configuration.


๐Ÿ“ Project Structure

omni/
โ”œโ”€โ”€ README.md              โ† You are here
โ”œโ”€โ”€ ARCHITECTURE.md        โ† Full architectural deep-dive
โ”œโ”€โ”€ CONTRIBUTING.md        โ† How to add scanners and contribute
โ”œโ”€โ”€ CHANGELOG.md           โ† Version history
โ”œโ”€โ”€ ROADMAP.md             โ† Future plans
โ”œโ”€โ”€ pyproject.toml         โ† Package definition
โ”œโ”€โ”€ omni/
โ”‚   โ”œโ”€โ”€ cli.py             โ† CLI entry point (14 commands)
โ”‚   โ”œโ”€โ”€ core/              โ† Brain โ€” identity, registry, gate, paths
โ”‚   โ”œโ”€โ”€ config/            โ† Configuration & Federation Heart bridge
โ”‚   โ”œโ”€โ”€ scanners/          โ† 55 scanners across 12 categories
โ”‚   โ”œโ”€โ”€ pillars/           โ† 4 orchestration subsystems
โ”‚   โ”œโ”€โ”€ lib/               โ† Shared utilities (I/O, rendering, reporting)
โ”‚   โ”œโ”€โ”€ builders/          โ† Registry and report generators
โ”‚   โ”œโ”€โ”€ scaffold/          โ† Project templates
โ”‚   โ””โ”€โ”€ templates/         โ† Jinja2 report templates
โ”œโ”€โ”€ mcp_server/            โ† MCP server exposing scanners as AI tools
โ”œโ”€โ”€ scripts/               โ† Operational scripts
โ”œโ”€โ”€ tests/                 โ† Test suite (pytest)
โ”œโ”€โ”€ docs/                  โ† Historical docs and plans
โ””โ”€โ”€ contracts/             โ† Crown Contracts (C-TOOLS-OMNI-*)

๐Ÿ”ง Configuration

Omni follows a strict configuration hierarchy (highest priority wins):

  1. CLI flags (e.g., --scanner surfaces)
  2. Environment variables (e.g., OMNI_ROOT)
  3. omni.yml (project-level configuration)
  4. Built-in defaults (sensible fallbacks)

Key environment variables:

Variable Purpose
OMNI_ROOT Override root path for scanning
OMNI_REPO_INVENTORY Path to repository inventory JSON
OMNI_WORKSPACES Workspace root paths
OMNI_DB_CONFIG_PATH Database configuration directory

See Configuration Guide for full details.


๐Ÿงช Testing

# Run all tests
pytest tests/ -v

# With coverage
pytest tests/ --cov=omni --cov-report=html

See Test Suite Documentation for fixtures, standards, and CI setup.


๐Ÿค Contributing

We welcome new scanners, pillars, and improvements. The scanner plugin system makes it straightforward to add new observation capabilities:

  1. Create a scanner file with a scan(target: Path) โ†’ dict function
  2. Register it in the category's SCANNER_MANIFEST.yaml
  3. Add tests and documentation

See CONTRIBUTING.md for the full guide.


๐Ÿ“œ Requirements

  • Python: 3.8+
  • Dependencies: pyyaml, pydantic (core); federation_heart (optional, for Federation mode)
  • OS: Windows, macOS, Linux

๐Ÿ“‹ License

Open source. See LICENSE for details.


The All-Seeing Eye observes. The Code writes the Code.
Omni v0.7.0 โ€” Pantheon LadderWorks

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omni_governance-0.7.2.tar.gz (239.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omni_governance-0.7.2-py3-none-any.whl (305.8 kB view details)

Uploaded Python 3

File details

Details for the file omni_governance-0.7.2.tar.gz.

File metadata

  • Download URL: omni_governance-0.7.2.tar.gz
  • Upload date:
  • Size: 239.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for omni_governance-0.7.2.tar.gz
Algorithm Hash digest
SHA256 580eed160252be8be39e3464a9559149b9ec3f1751da552e0021f203eea930be
MD5 6fc75c647003f62f25ad1e7448a83a5a
BLAKE2b-256 0bdfbc4cbff29cea3bb463013bc2a348d974d4b0d0d7080b4f56bdd511bcf8cb

See more details on using hashes here.

File details

Details for the file omni_governance-0.7.2-py3-none-any.whl.

File metadata

File hashes

Hashes for omni_governance-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e21dd1deadf7b5b9a6fe83453127148588b32a68ea876343ea61d38d006fb56
MD5 1aaad293031b5f4eecc113959b7a0956
BLAKE2b-256 ab9cbca12ecd574e39ce46ec5bb6c277c5962e64ff8f1c0f9bffefc43b9107cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page