Skip to content
tekmoraPublic

About

Enterprise Fleet Governance, Repository-as-Code & Universal AI Agent Engineering Engine

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

730 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Praetor Header Banner

⚖️ Praetor

Enterprise Fleet Governance, Repository-as-Code & Universal AI Agent Engineering Engine

An open governance engine for any repository fleet: your repositories, your fork, your policy.

Go Version HISS Governance Protocol: MCP Dual-Surface Docs License: EUPL 1.2


Praetor Core Capabilities: Invariants, Transpilation, MCP Protocol, llms.txt Surface

Documentation Governance

Praetor manages this repository's declared governance policy. This managed block records adoption state; it is not a verification certificate.

Verification: make verify-all runs the repository's configured verification cascade.

HISS Audit: praetorctl audit enforces policy, generated-surface integrity, and the debt ratchet.

Context Sync: praetorctl compile-context --verify verifies every generated agent context against AGENTS.md.

Documentation: make docs-lint enforces locked Markdown style and the private scratch-link policy.

Debt Baseline: .standards-baseline.json anchors the debt ratchet at 2 recorded infractions; audit forbids growth.


🏛️ Executive Summary

Praetor is an open governance engine for any repository fleet: you run it against your own repositories or your own fork of it, and its default owner, target framework, review bot and organisation-folder list stay empty until you configure them (framework, forge and topology settings). Built in Go 1.27+, Praetor transforms repository governance into a deterministic, active platform capability by combining Repository-as-Code orchestration, context transpilation across vendor-specific AI tools, and unbypassable HISS (High-Integrity Systems Standard) invariant enforcement.

While traditional repositories suffer from configuration drift and agentic fragmentation, Praetor maintains a single canonical source of truth—AGENTS.md—and compiles it into vendor-specific harnesses (.claude, .cursor/rules/*.mdc, .windsurfrules, .gemini/GEMINI.md, .github/copilot-instructions.md, .codex/rules.md) while ensuring mathematical code quality and debt ratcheting.


Support Praetor

Why it matters. Praetor (said PREE-tor; Latin praetor, an elected magistrate of ancient Rome whose rulings set legal precedent) is an open governance engine for any repository fleet: one canonical AGENTS.md per repository, compiled into the instruction files of six coding clients.

What support funds.

  • CI time for the Linux, macOS and Windows matrix.
  • Keeping rule HISS-21 true: gates, hooks and emitted templates run on all three platforms or skip with a stated reason.

Sponsor on GitHub Sponsors, any amount; no support or priority is sold. Open Collective: pending.

📐 Architecture & Transpilation Flow

Praetor resolves context compilation and lattice configuration through a single-pass DAG pipeline:

The governance lifecycle spans context compilation, policy resolution, and verification gating. Governance Lifecycle
Text description
  • Vendor Projections: CLAUDE.md (< 300 LOC), .cursor/rules/*.mdc, .github/copilot-instructions.md, .windsurfrules, .gemini/GEMINI.md, .codex/rules.md.
  • Boxes: AGENTS.md (Canonical Source), praetorctl compile-context, .standards.yaml (& .standards.lock), Effective Policy (Lattice Supremum), .devcontainer & Toolchain, praetorctl audit, praetorctl plan, praetorctl gate run, Gate stages, Ed25519 Exit-0 receipt.
  • AGENTS.md → praetorctl compile-context → CLAUDE.md.
  • praetorctl compile-context → .cursor/rules/*.mdc.
  • praetorctl compile-context → .github/copilot-instructions.md.
  • praetorctl compile-context → .windsurfrules.
  • praetorctl compile-context → .gemini/GEMINI.md.
  • praetorctl compile-context → .codex/rules.md.
  • .standards.yaml → Effective Policy → .devcontainer & Toolchain.
  • Effective Policy → praetorctl audit.
  • Effective Policy → praetorctl plan.
  • praetorctl gate run → Gate stages → Ed25519 Exit-0 receipt.
  • Scenario 1, compile-context: AGENTS.md is transpiled to vendor-specific files. The single source of truth is read. Target-specific files are generated.
  • Scenario 2, policy: The lattice resolves standard definitions into effective policy. Manifest and lockfile are merged. Policy applies to the devcontainer toolchain, audit enforcement, and plan previews.
  • Scenario 3, gate run: praetorctl gate run executes the gated pipeline. The gate command triggers the verification cascade. A successful run mints a signed receipt.

🚀 Key Capabilities & Architectural Pillars

Architectural Pillar Technical Functionality Primary Tooling
Universal Context Transpiler Single canonical AGENTS.md compiled into vendor targets ($\le 300$ lines for CLAUDE.md). praetorctl compile-context
Multi-Transport MCP Server stdio, Streamable HTTP, and SSE Model Context Protocol server; every tool result and error passes the prompt-injection neutralizer before it is served (internal/mcp/sanitize.go). standards-mcp
HISS Lattice Engine Composable archetypes resolved via Join-Semilattice supremum ("Highest Standard Wins"). internal/config
Hermetic Devcontainers Reproducible multi-architecture dev environments pre-wiring toolchains and Editor setups. praetorctl devcontainer
Monotonic Debt Ratcheting Baselined legacy debt with non-increasing debt invariants and touched-file clean rules. praetorctl baseline
Supply Chain Provenance Signed SLSA v1.0 provenance over every release archive, per-archive Syft SBOMs, and Sigstore Cosign keyless signatures, all attached before the release is published. Build Level 3 is not claimed (releasing guide). GoReleaser + praetorctl provenance + cosign
Dual-Surface Documentation Material-for-MkDocs human UI paired with a concise /llms.txt index and source-bound /llms-full.txt compatibility map. make docs-lint catalog parity

🛡️ HISS Architectural Invariants

Praetor enforces the High-Integrity Systems Standard (HISS)—adapting NASA-JPL flight-software rigor to modern Go engineering:

  • HISS-01 (Acyclic Control Flow): Recursion is strictly prohibited; call graph must be a DAG.
  • HISS-02 (Bounded Loops & Timeouts): Bounded iterations and explicit context deadlines on all network and disk I/O.
  • HISS-04 (Complexity & Function Length Caps): Maximum McCabe cyclomatic complexity $M \le 10$, cognitive complexity $\le 15$, function length $\le 60$ LOC, $\le 50$ executable statements.
  • HISS-07 (Zero Unchecked Errors): Zero unchecked error values and zero .unwrap() or unhandled panic calls in production.
  • HISS-10 (Zero-Warning Cascade): 5-layer zero-warning cascade from editor to deployment admission controller.
  • HISS-15 (3D Testing Discipline): Positive, negative, and boundary tests mandatory for all public APIs.
  • HISS-16 (Canonical Operating Harness): Single canonical AGENTS.md harness with unbypassable server-authoritative verification.
  • HISS-17 (State Ledger Discipline): Every agent turn reads and updates the local .workingdir ledger instead of re-deriving state from scratch.
  • HISS-18 (Diff-Aware CI Efficiency): praetorctl ci filter classifies each change so a docs- or state-only diff skips the heavy race and security gates.
  • HISS-19 (Reuse Before Writing): One behavior has exactly one implementation; praetorctl dedupe scan enforces it as a clone and utility-sprawl gate.
  • HISS-20 (Replayable Enforcement Evidence): Every coverage claim in .config/hiss/coverage.yaml is replayed against a fixture corpus in both directions, never merely asserted.
  • HISS-21 (Platform Neutrality): A gate runs on Linux, macOS and Windows, or skips with a stated reason; a gate that cannot run is not a passing gate.

See the HISS specification for the full invariant catalog, including the supply-chain and memory-safety invariants (HISS-03, 08, 09, 11, 14) this summary omits.


📂 Repository Layout

.
├── .agents/skills/             # Canonical agent skills; compile-context projects these byte-for-byte to .agents/plugins/praetor/skills/ for Claude Code
├── .claude/                    # Target compilation for Claude Code (CLAUDE.md)
├── .codex/                     # Target compilation for OpenAI Codex
├── .config/                    # System & linter configurations
├── .cursor/rules/              # Compiled Cursor MDC rulesets
├── .devcontainer/              # Hermetic multi-arch devcontainer definitions
├── .gemini/                    # Target compilation for Gemini CLI / Antigravity IDE
├── .github/                    # Workflows, Copilot instructions, and release configs
├── .vscode/                    # Shared editor settings and launch profiles
├── cmd/                        # Go application entrypoints
│   ├── standardsctl/           # Governance CLI (compile, audit, baseline)
│   └── standards-mcp/          # Multi-transport MCP server
├── docker/dev/                 # Developer environment container builds
├── docs/                       # Dual-Surface MkDocs documentation & assets
│   └── assets/                 # Branding assets (banners, logos, icons, favicons)
├── editors/                    # VS Code extension; generated Neovim and JetBrains references
├── internal/                   # Core Go packages (config, lattice, AST transpiler)
├── lua/ & .nvim.lua            # Neovim native governance integrations
├── .needs.yaml                 # Capability needs written by `make needs-write`
├── .standards.yaml             # Primary repository governance specification
├── .standards.lock             # Immutable locked dependency & profile state
├── .standards-baseline.json    # Debt ratcheting baseline state
├── AGENTS.md                   # Canonical AI Agent harness (Source of Truth)
├── Makefile                    # Universal verification & build entrypoint
└── go.mod & go.sum             # Go module dependencies (Go 1.27+)

⚡ Quickstart & Developer Workflow

1. Universal Verification Gate

Run the universal verification pipeline across the entire Go codebase and governance rules:

make verify-all

# Run the locked public Markdown and private scratch-link gate alone
make docs-lint

The documentation governance guide defines the checked inventory, locked rules, CI/adoption contract, and remediation for private .workingdir/ or .workingdir2/ destinations.

2. Context Transpilation

Update agent instructions in AGENTS.md and transpile to all vendor targets (.claude, .cursor, .windsurf, .gemini, .codex, .github):

# Transpile context files
go run ./cmd/standardsctl compile-context

# Assert that all target context files are 100% in sync (CI check)
go run ./cmd/standardsctl compile-context --verify

3. Repository Governance Audit

Inspect repository compliance against declared profiles and the HISS baseline:

go run ./cmd/standardsctl audit

4. Technical Debt Ratcheting

Record the current debt once, then check that it never grows:

go run ./cmd/standardsctl baseline --record   # scan and write .standards-baseline.json
go run ./cmd/standardsctl baseline --verify   # read-only: fail on debt the baseline does not record
go run ./cmd/standardsctl baseline            # print the stored snapshot without scanning

--record refuses to raise the count unless --allow-increase --reason="<why>" records why. audit applies the same ratchet and adds the touched-file clean rule. A rejection lists three violations per class and says how many it hid; --verify --all-violations lists every one without writing the file. A pass warns about baseline entries that match nothing in the tree; audit --max-stale-baseline-entries=N fails past N.


📜 License & Compliance

Distributed under the European Union Public Licence 1.2 (EUPL-1.2). See LICENSE for the full text and REUSE.toml for SPDX licensing metadata. THIRD-PARTY-NOTICES.md lists the third-party components the release archives and the container image ship, with their licenses and upstream notices; both carry it beside LICENSE and LICENSES/. For open-source projects, standards, and specifications this repository builds upon, see the Credits & Acknowledgements page.

Developed in the open at github.com/tekmora/praetor.

About

Enterprise Fleet Governance, Repository-as-Code & Universal AI Agent Engineering Engine

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages