Skip to content
hyperpolymathPublic

About

Neurosymbolic CI/CD governance scanner for a ~400-repo estate: rule-based detection with Bayesian confidence gating, safety-triangle remediation (eliminate > substitute > control), SARIF output and machine-checked proofs.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,563 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Hypatia: Neurosymbolic CI/CD Intelligence Platform

Overview

Hypatia is the CI/CD governance scanner for the hyperpolymath estate (~400 repositories). It combines:

  • Symbolic reasoning — Elixir rules producing fast, deterministic findings, in 42 source files under lib/rules/ (full rule catalogue)

  • Neural learning — 8 networks on a shared blackboard, learning which fixes actually stick

  • Bayesian confidence — every recipe carries a Beta-distributed confidence updated from real outcomes, which gates whether a fix is applied automatically, proposed as a PR, or merely reported

  • Machine-checked proofs — Idris2 proofs of the ABI and the decision logic (confidence bounds, safety-triangle routing, dispatch thresholds, quarantine, rollback, the Bayesian update and rate limiting), one Agda model of the Logtalk-to-Elixir migration, and a TLA+ model of the Kin gate that is model-checked on a bounded instance. The proofs are about models of the code, not the Elixir runtime itself. Proof ledger: 22 proven of 42; 0 proven-with-postulates, 11 tested-only, 2 argued, 7 open (details)

Core philosophy

"Dumb rules from smart learning"

The system learns complex patterns through neural analysis, then distils them into simple, fast declarative rules that can be pre-emptively injected into new repositories, applied as cures to existing ones, and executed without ML inference overhead.

That loop is the design, not yet the running code. Today the rules are hand-written, and the neural layer can only lower a recipe’s confidence or demote a finding. The promotion code in lib/rules/learning.ex has no caller (EXPLAINME).

The safety triangle

Every finding is routed Eliminate > Substitute > Control, in that order — remove the hazard if you can, replace it if you cannot, and only then add a control around it. Dispatch is then gated on confidence:

>= 0.95

auto_execute — applied by robot-repo-automaton

0.85–0.94

review — rhodibot opens a PR

< 0.85

report_only — sustainabot advisory

Unknown findings are forced to report_only regardless of score (novelty gating).

panic-attack scan
      │  findings
verisim-data (git-backed flat-file store)
      │
PatternRegistry ──> TriangleRouter ──> FleetDispatcher ──> DispatchManifest (JSONL)
      │                                                            │
      └────────────── OutcomeTracker <───────────── dispatch-runner.sh
                     (Bayesian feedback loop)

Architecture

lib/

155 Elixir source files — pipeline, rules, VCL, neural, safety, web, merge orchestration

lib/rules/

42 source files: rule modules and their helpers; see the catalogue

lib/neural/

8 networks + blackboard, coordinator, persistence, rebalancer

lib/vcl/

VCL query layer over verisim-data: parser, file executor, cache, federation

lib/merge_orchestration/

12 modules — leases, ledger, ticker

lib/hypatia/web/

Dashboard, SSE stream, Prometheus /metrics, GraphQL, SARIF output

src/Hypatia/ABI/

Idris2 ABI — Types, GraphQL, gRPC, REST, FFI, RuleEngine

ffi/zig/

Zig C ABI bridge — 18 exports + 16 protocol connectors

adapters/ cli/ data/ fixer/ integration/

Rust workspace

verification/

Proof ledger and proofs: Idris2, Agda, TLA+

See docs/architecture/topology.adoc for the full map.

Installation

Guix is the estate’s reproducible-build path; Nix was retired estate-wide on 2026-06-05. This repository does not track a guix.scm yet. Until it does, mise.toml pins Erlang/OTP, Elixir and Zig (its other tools float at latest), and deploy/Containerfile builds the image. Podman, not Docker, is the container tool.

git clone https://github.com/hyperpolymath/hypatia.git
cd hypatia

just doctor                # toolchain preflight
just build-all             # Rust workspace + Elixir
just build-ffi             # Zig FFI
just compile-abi           # Idris2 ABI

just --list shows all 45 recipes; CONTRIBUTING.md treats just as the canonical entry point.

Elixir development

mise.toml pins Erlang/OTP and an Elixir build for that OTP, matching the OTP 27 / Elixir 1.17 test lane. With mise installed and activated, install and bootstrap the Elixir dependencies from the repository root:

mise install erlang elixir
mix local.hex --force
mix local.rebar --force
mix deps.get --check-locked
mix test

Installing the toolchain and Hex does not vendor project dependencies: mix deps.get needs network access to the configured Hex repository (normally repo.hex.pm). In a restricted environment, use an approved Hex mirror or a pre-populated dependency cache. Do not interpret a failed fetch as a successful or clean test run.

Usage

The escript exposes six commands:

hypatia scan <path> [--format json|text|github|sarif] [--exit-zero] [--advisory]
hypatia report <path>
hypatia pr-eligibility --owner <owner> --repo <repo> --pr <n>
hypatia secret-alerts --owner <owner> --repo <repo>
hypatia version
hypatia help

Mix tasks cover the operational surface — mix hypatia.rsr_score, mix hypatia.recipe_health, mix hypatia.watch, mix hypatia.triage_issues and twelve more. See the Operations wiki page.

Running the supervision tree also serves an HTML dashboard, an SSE event stream, a Prometheus /metrics endpoint and an /api/ on port 9090. With HYPATIA_API_BEARER_TOKEN set and not empty, every /api/ request needs that bearer token. Without one, only loopback clients are answered unless HYPATIA_API_ALLOW_NONLOCAL=true.

Consuming the RSR oracle from another repository

The RSR conformance oracle (mix hypatia.rsr_score) is consumed through one reusable workflow, pinned by full commit SHA:

jobs:
  rsr-score:
    uses: hyperpolymath/hypatia/.github/workflows/rsr-oracle.yml@<40-char SHA>

The pin decides which oracle code runs: the workflow checks this repository out at job.workflow_sha, i.e. the commit you named, so a consumer never tracks main. The SSOT stays explicit — the workflow always passes --ssot, defaulting to <standards>/0-canon/rsr/rsr-criteria-v2.a2ml. See docs/consumers/rsr-oracle.adoc, including why an unpinned consumer broke on 2026-10-25.

Integration with robot-repo-automaton

Hypatia writes JSONL dispatch manifests; dispatch-runner.sh in gitbot-fleet consumes them and routes each entry by its confidence tier. Outcomes flow back through mix hypatia.record_outcome, which drives the Bayesian update and, when a recipe degrades, auto-quarantine.

Project status

Development state, milestones and known gaps live in machine-readable form:

  • .machine_readable/descriptiles/STATE.a2ml — current state and milestone status

  • .machine_readable/descriptiles/PLAYBOOK.a2ml — operational runbook

  • ROADMAP.adoc — milestone history

Before trusting any metric or green board, read docs/DEBT-REGISTER.adoc. It is the authoritative, evidence-backed account of what is broken, ungated or stale. That includes the :verisim_data tests excluded from every run and the safety systems that are built but not yet invoked by any dispatch path.

Documentation

Licence

Hypatia is licensed under the Mozilla Public License 2.0. Source files declare MPL-2.0 and documentation declares CC-BY-SA-4.0, both via per-file SPDX headers; where a header and prose disagree, the header governs.

The Palimpsest Licence (PMPL) is a separate licence maintained at palimpsest-license. It is not a variant or extension of MPL-2.0 and its text is not distributed here. See NOTICE.

MPL-2.0

OPSM Core
  |
  v
hypatia (policy/knowledge services used by OPSM)

About

Neurosymbolic CI/CD governance scanner for a ~400-repo estate: rule-based detection with Bayesian confidence gating, safety-triangle remediation (eliminate > substitute > control), SARIF output and machine-checked proofs.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages