astrix
You can evaluate proposed actions against repository policies, analyze the current Git diff’s impact, and run impacted Go tests.
Evaluate a proposed ActionIntent against
Astrixfile.axpolicies and returnallowed,denied,requires_approval, and an optional reason without executing the action.Analyze the current staged/unstaged Git diff against HEAD to return changed symbols, reverse-dependency impact, selected tests, and changed-file line ranges.
Recompute the diff’s blast radius and execute selected Go test packages, or the full Go suite if no test symbols map to packages, returning selected tests and pass/fail results.
Integrates with OpenAI-compatible chat-completions endpoints to generate bounded unified-diff repair candidates during verification, subject to policy checks and Docker sandbox validation.
Provides Prometheus query adapters for canary SLO monitoring, enabling progressive deployment watchers to detect threshold breaches and request rollback through a configured traffic controller.
Astrix
Astrix is a local-first DevOps verification engine. It selects tests from source-level dependency impact, enforces AxLang-authored policies, optionally runs bounded LLM-assisted repair in an isolated sandbox, and exposes analysis tools over MCP.
Astrix is under active development. Review policies, deployment integrations, and generated changes before using them in production workflows.
Glama quality score
Glama evaluates Astrix's MCP tool definitions to show how clearly agents can understand and use them.
Related MCP server: uacos
Quick start
Choose the setup that fits your workflow. The installer and GitHub Action install Astrix; the Action also installs axc to validate Astrixfile.ax.
A. Install Astrix with one command
curl -fsSL https://raw.githubusercontent.com/vivek5200/astrix/main/install.sh | sh -s -- --bin-dir "$HOME/.local/bin"Add $HOME/.local/bin to PATH if it is not already there. The installer downloads the latest published release and verifies its checksum when available. If you want to edit or validate .ax files directly, install the AxLang compiler too:
go install github.com/vivek5200/axlang/cmd/axc@latestB. Initialize a project and verify it
From the root of a supported project, run:
astrix init && astrix verifyastrix init creates Astrixfile.ax and will not overwrite an existing file. astrix verify runs the detected project test command; set ASTRIX_TEST_COMMAND when your project needs a custom command. The Astrix CLI can create and use its config without the standalone axc binary; install axc separately to run compiler commands such as axc check Astrixfile.ax.
C. Run the composite GitHub Action
Use a published Astrix release tag that contains action.yml in your workflow. Pinning the tag makes the CI version explicit:
name: Astrix
on: [push, pull_request]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vivek5200/astrix@<release-tag>
with:
version: <release-tag>
command: verifyThe Action installs Astrix and axc, checks Astrixfile.ax, then runs the selected command. The version input pins the installed CLI to the same release as the Action. To initialize a repository, set command: init; run verification in a later workflow run after the generated config is committed. Replace both <release-tag> values with a published tag that includes the composite action.
D. Install with Go and configure MCP
go install github.com/vivek5200/astrix/cmd/astrix@latest
go install github.com/vivek5200/axlang/cmd/axc@latest
astrix mcp configastrix mcp config prints copyable MCP setup for Claude Code, Cursor, and VS Code. Keep astrix on the PATH inherited by the MCP client. AxLang's axc is needed to check or format .ax files; the Astrix MCP server itself runs as astrix mcp serve.
Components
astrixCLI: validatesAstrixfile.ax, prints symbol graphs or diff blast radiuses, verifies changes, optionally requests a bounded repair, and serves MCP tools.astrixddaemon: accepts HMAC-signed webhook requests and checks incoming diffs for credentials and policy violations.AxLang: the companion compiler for workspace, stage, policy, repair, and deployment declarations. The standalone compiler lives at github.com/vivek5200/axlang.
How the engine works
AST blast radius
pkg/astgraph normalizes source definitions and references into a shared graph of symbol nodes, definition edges, and reference edges. Go files use the standard-library Go parser; JavaScript/JSX, TypeScript/TSX, and Python use Tree-sitter adapters. Other UTF-8 text files receive a conservative file-level node, so projects using other languages remain visible to astrix graph and changed files are not silently dropped. Add a Tree-sitter adapter to get symbol-level dependency traversal for another language. Binary assets and generated/dependency/cache directories are skipped.
astrix graph .
astrix graph . --symbol ParseConfig
astrix graph . --diff changes.patchThe JSON graph output includes source locations and file hashes. The --diff form emits changed symbols, the transitive impact set, and selected tests. For languages without an AST adapter, blast radius is file-level and cannot infer callers or select language-specific tests reliably.
Cache and flaky-test history
pkg/cache derives stable SHA-256 keys from symbol subgraphs and edges and stores verification outcomes beneath .astrix/cache. pkg/runner tracks bounded per-test outcome history in SQLite and computes a rolling failure fraction for quarantine decisions. The cache is local to the repository unless an external cache layer is added by the caller.
Policy gate
Astrixfile.ax policies compile through AxLang to Rego v1 and are evaluated by the embedded OPA engine against an ActionIntent. Guardrails can deny an action or require approval. Diff glob rules operate on the modified-file list; secret scanning runs at ingress and blocks findings before policy evaluation.
When a policy requires approval, the gate returns a requires_approval decision and keeps the action blocked until an approved intent is supplied. The current CLI stops on that decision; Astrix does not yet provide operator notifications or an approval inbox. Integrators should surface the request through their CI or deployment platform and require authenticated human approval before resuming.
Bounded repair triage
astrix verify --fix runs verification, sanitizes nondeterministic log details, constructs a repair prompt with impact context, and requests a unified diff from an OpenAI-compatible endpoint. The patcher bounds attempts to three, rejects forbidden test changes, applies policy before acceptance, and verifies candidate changes in a disposable Docker sandbox with networking disabled. Keep credentials in environment variables or a local ignored .env file.
astrix verify detects common project test runners (Go, npm, pytest, Cargo, Maven/Gradle, .NET, Composer, Bundler, and Make). For another build system or a monorepo with a nonstandard command, set ASTRIX_TEST_COMMAND to a JSON argument array, such as ASTRIX_TEST_COMMAND='["./scripts/check.sh","--ci"]' astrix verify. This runs the command directly without a shell. For astrix verify --fix, set ASTRIX_SANDBOX_IMAGE to an image with the required toolchain; the repair sandbox has no network access and mounts existing node_modules and vendor trees read-only. Other offline dependencies must be available through the selected image or project setup. Common-language AST support and test-command detection are separate capabilities: unknown languages still receive file-level graph coverage, while test execution uses the project's detected or configured command.
MCP server
astrix mcp serve runs JSON-RPC over stdio and exposes astrix_get_blast_radius, astrix_evaluate_policy, and astrix_run_impacted_tests so compatible clients can inspect impact, evaluate an intent, and run selected tests.
Canary watcher
pkg/canary maps a validated AxLang deploy declaration to progressive traffic steps, polling intervals, and SLO thresholds. It provides Prometheus query and HTTP traffic-controller adapters. On a breached SLO, the watcher requests rollback through the configured controller. Integrators supply endpoints and deployment credentials.
Requirements and install
Go 1.26 or newer for this module.
Docker for isolated repair verification.
An OpenAI-compatible model endpoint for LLM-assisted repair.
go install github.com/vivek5200/astrix/cmd/astrix@latest
go install github.com/vivek5200/astrix/cmd/astrixd@latestInstall axc and axls from the companion AxLang project.
Configure
Create a local .env in the repository root for model-assisted repair:
ASTRIX_LLM_BASE_URL=http://localhost:8000/v1
ASTRIX_LLM_API_KEY=replace-with-your-local-key
ASTRIX_LLM_MODEL=your-model-nameASTRIX_LLM_ENDPOINT can provide a full chat-completions URL. Process environment settings take precedence over .env. Never commit real credentials.
The daemon accepts ASTRIX_WEBHOOK_SECRET and ASTRIXD_ADDR; it serves /healthz and an HMAC-SHA256 authenticated /webhook. It does not terminate TLS, so deploy it behind a TLS-terminating reverse proxy on a trusted network.
CLI reference
astrix check [Astrixfile.ax]
astrix graph [path] [--symbol name]
astrix graph [path] --diff changes.patch
astrix verify
astrix verify --fix
astrix mcp serveDevelopment
go test -race ./...
go vet ./...
go build ./cmd/astrix ./cmd/astrixdThe live Docker/LLM scenario is skipped if its endpoint credentials or Docker daemon are unavailable. It can be run explicitly with:
go test -v ./e2e -run '^TestLiveDockerAndLLM_ClosedLoopSelfHealing$' -count=1Set ASTRIX_RUN_LIVE_E2E=1 to opt into that test; ordinary go test ./... runs the deterministic suite and skips external LLM calls.
The dual-repository workspace includes a self-hosted validation workflow and a root Makefile; see the workspace overview for commands.
See ARCHITECTURE.md for graph, policy, repair, and runtime subsystem details.
License
Apache License 2.0. See LICENSE.
Available Tools
3 toolsastrix_evaluate_policyEvaluate Proposed Action PolicyARead-onlyIdempotent
Evaluate a proposed ActionIntent against the Astrixfile.ax policies in the opened repository and return allowed, denied, and requires_approval booleans with an optional reason. Use this before carrying out a proposed action; it evaluates policy but does not execute the action. For changed-file impact use astrix_get_blast_radius, and for selected test execution use astrix_run_impacted_tests. The required intent object contains actor.type, target.env, modified_files, and diff.modifies_tests (the string "true" or "false"); set approved=true only when approval has already been recorded.
Inputs: intent (required). Returns: denied, reason, allowed, requires_approval
astrix_get_blast_radiusAnalyze Repository Blast RadiusARead-onlyIdempotent
Analyze the current staged and unstaged Git diff against HEAD in the opened repository and return changed symbols, their reverse-dependency impact, selected tests, and changed-file ranges. Use this before astrix_run_impacted_tests to inspect what the diff affects; this tool only reads repository state and does not run tests. It accepts no arguments.
Inputs: no named parameters. Returns: impact, changes
astrix_run_impacted_testsRun Impacted Go TestsADestructive
Recompute the blast radius from the current staged and unstaged Git diff against HEAD in the opened repository, then execute the selected Go test packages (or the full Go suite if no test symbols map to packages). Use this to verify changed code after reviewing impact with astrix_get_blast_radius; it recomputes from the workspace and does not reuse a prior tool call's state. Test code runs locally with the current process permissions and may access the network or create or modify files. Returns selected test symbols on success; test failures are returned as tool errors. It accepts no arguments.
Inputs: no named parameters. Returns: tests, passed
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools have distinct roles: policy evaluation, diff impact inspection, and test execution. However, blast radius and impacted tests both analyze the same Git diff, and the test runner recomputes blast radius internally, creating some conceptual overlap that descriptions mostly resolve.
All tool names use the same astrix_ prefix followed by a clear verb_noun pattern: evaluate_policy, get_blast_radius, run_impacted_tests. The convention is predictable and readable.
Three tools are well-scoped for a focused policy-and-impact-analysis workflow. Each tool has a clear, non-redundant purpose in the lifecycle from policy check to impact inspection to test execution.
The surface covers the core loop of evaluating a proposed action, inspecting blast radius, and running impacted tests. A minor gap exists around recording or retrieving approval status, which the policy tool references but no tool provides.
Maintenance
Related MCP Connectors
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Zero-log MCP server with 49 tools for AI guardrails, secret scanning, MCP linting & EU compliance.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to analyze employee GitHub activity including PRs, code reviews, comments, and contributions across repositories with time-range filtering for performance assessment and impact analysis.6MIT
- AlicenseNot gradedqualityBmaintenanceLocal-first code intelligence and safety layer for AI coding agents. MCP server exposes dependency graph, impact analysis, and AST-compressed repo context, backed by typed local memory, patch-scope safety gates, and git-independent transaction rollback.1MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that builds a local code intelligence layer, letting AI agents explore call graphs, blast radius, and source slices via a single tool without external APIs.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that builds a dependency graph of your codebase, giving AI agents structural understanding to analyze impact, find context, and make safe modifications across languages and infrastructure.MIT