ANVIL
Health Uyari
- License — License: NOASSERTION
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Gecti
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Engineering intelligence workbench for AI-assisted software delivery — map architectures, inspect change risk, and verify patches with deterministic proof.
ANVIL — The Deterministic Verification Layer for AI Coding Agents
Any agent writes the code — ANVIL verifies it locally (blast radius, policy, security, tests) before it merges.
What is ANVIL · Quick start · Feature table · AI tool integrations · GitHub Action · Docs · Credits
What is ANVIL?
ANVIL is a local-first, deterministic verification and safety layer for AI coding agents.
The Breakthrough: Protection Against Fake Success
AI coding agents are ambitious, but they frequently cheat when tests fail:
- An agent is asked to fix an authentication module.
- It writes a change, but an existing integration test fails.
- Instead of solving the root bug, the agent deletes the failing test or inserts a skip marker (
it.skip,test.skip). - The test runner passes (100% Green), and the agent confidently claims: "Everything passed!"
ANVIL stops fake success dead in its tracks.
Its verified loop checks pre-execution git checksums against unstaged diffs. If an agent deletes a test, skips test cases, or loosens linter configs, ANVIL halts execution with status: needs-review and refuses to accept the fake pass.
The 6-Stage Verified Loop
01 Plan ──► 02 Guard ──► 03 Build ──► 04 Verify ──► 05 Prove ──► 06 Learn
- Plan: Evaluates AST blast radius in <1.4k tokens instead of reading 150k+ raw tokens.
- Guard: Intercepts dangerous operations (
rm -rf /,.envexfiltration, unpinned packages). - Build: Coding agent modifies only scoped files in an isolated worktree or branch.
- Verify: Runs real deterministic compiler, linter, and test checks — never trusting agent claims.
- Prove: Inspects test integrity (zero deleted/skipped tests) and signs SHA-256 receipts.
- Learn: Records architectural heuristics and post-mortem decisions in persistent memory.
- 100% Local-First & Private: Evaluates AST syntax trees, dependency graphs, and git diffs directly on your hardware. Zero proprietary source code or credentials are ever sent to third-party LLMs.
- Compact Agent Context (<1.5k Tokens): Instead of forcing your agent to read hundreds of source files (burning 150k+ tokens), ANVIL's read-only Model Context Protocol (MCP) server supplies concise architecture summaries, entry points, and circular dependency maps in under 1,400 tokens.
- Deterministic Quality & Policy Gate: Evaluates baseline content hashes, rule confidence, hardcoded secrets, and formatting before commit or in CI pull request checks.
- Complements Agent Libraries: ANVIL complements prompt/skills libraries like ECC by providing the verification, blast-radius calculation, and policy enforcement engine.
60-Second Quick Start
1. Connect ANVIL to your AI tools in one step
# Registers ANVIL MCP server, stop hooks, and guidelines in Cursor, Claude Code, VS Code, etc.
npx -y anvil-engineering-workbench install . --hooks
See the Universal Tool Installer Guide and Agent Stop Hooks Guide for tool-specific targets (--target), dry-run preview, and uninstall.
2. Run verification gate instantly with npx
# Evaluate repository quality gate & secrets
npx anvil-engineering-workbench gate .
# Inspect project stack and package manifests
npx anvil-engineering-workbench inspect .
# Map architecture imports and module boundaries
npx anvil-engineering-workbench map .
3. Global Installation
npm install --global anvil-engineering-workbench
Or install directly from the verified GitHub release:
npm install --global git+https://github.com/anvil-workbench/ANVIL.git#v1.3.0
Verify your installation:
anvil --version
# anvil 1.3.0
4. Install 1-Command Pre-Commit Hook
Ensure no secret leaks or policy regressions ever get committed:
anvil hook install
# Installed ANVIL pre-commit hook into .git/hooks/pre-commit
5 Core Engineering Superpowers
| Superpower | CLI Command | Why It Matters |
|---|---|---|
| 1. Verified Loop | anvil loop run --goal "..." |
Forces agent to repeat work until true checks pass; catches test deletion & tampering. |
| 2. ANVIL Guard | anvil install . --guard |
Runtime hooks blocking rm -rf, secret exfiltration, and unverified remote pipes. |
| 3. Shield v3 | anvil shield --sarif |
60 static harness security rules scanning permissions, MCP, secrets, and prompt injections. |
| 4. Agent Race | anvil race run --agents claude,codex |
Races multiple coding agents on the same task in isolated Git worktrees and ranks results. |
| 5. Cross-Harness MCP Sync | anvil mcp sync |
Synchronizes pinned MCP servers across 10+ AI tools (Claude, Cursor, Codex, Windsurf, Copilot). |
Feature Overview
Every command and flag listed below is verified and supported in ANVIL v1.3.0:
| Command | Description | Verified Flags | Status |
|---|---|---|---|
anvil install [path] / uninstall |
Connects ANVIL to every AI tool config (Cursor, Claude, VS Code, Antigravity, etc.) | --target <list>, --server <mode>, --dry-run, --no-instructions, --json |
Available |
anvil gate [path] |
Deterministic CI quality & security gate with SARIF and policy enforcement | --sarif <file>, --policy <file>, --policy-ref <ref>, --baseline <file>, --generate-baseline <file>, --since <ref>, --diff, --min-confidence <level>, --import-sarif <file>, --skip-agent-config, --fail-on-warnings, --json |
Available |
anvil inspect [path] |
Analyzes project languages, manifests, frameworks, dependencies, and scripts | --json |
Available |
anvil map [path] |
Maps module import relationships and candidate entry points | --json |
Available |
anvil git [path] |
Calculates blast radius, downstream dependency impact, and suggested tests | [base] (e.g. origin/main, HEAD~1) |
Available |
anvil clean [path] |
Scans and deletes junk files/caches with transactional snapshot backups | --apply, --fix, --json |
Available |
anvil undo [path] |
Rolls back last clean operation with byte-accurate snapshot restoration | <backupId> |
Available |
anvil hook [install|remove] |
Injects or removes automated pre-commit gate in .git/hooks/pre-commit |
--force |
Available |
anvil security [path] |
Scans repository for hardcoded secrets, API keys, and sensitive tokens | --fix, --json |
Available |
anvil agent-security [path] |
Audits agent instructions, prompt injection, hidden Unicode, MCP secrets, and permissions | --global, --sarif <file>, --json |
Available |
anvil shield [path] |
Runs ANVIL Shield v3 static harness audit across instructions, hooks, MCP, and CI | --fix, --sarif <file>, --fail-on <level>, --json |
Available |
anvil scorecard [path] |
Computes deterministic harness readiness scorecard across 9 engineering categories | --verbose, --json |
Available |
anvil consult "<task>" |
Finds catalog agents, skills, commands, rules, and MCP servers matching a task | --json |
Available |
anvil context [path] |
Measures pre-prompt token cost per AI harness and flags duplicate/sprawl waste | --verbose, --max <tokens>, --json |
Available |
anvil loop run / status |
Executes anti-tamper verification loop with pre/post checksums and .anvil/loops/ receipts |
--goal, --check, --max-iterations |
Available |
anvil race |
Races multiple coding agents in isolated Git worktrees and ranks verified diffs | --agents, --goal, --check |
Available |
anvil doctor [path] |
Verifies environment health (Node, Git, Docker, workspace permissions) | --fix, --json |
Available |
anvil mcp [setup|start|sync] |
Configures, runs, or cross-syncs the local Model Context Protocol server | add, remove, sync, matrix |
Available |
anvil dashboard [path] |
Launches unified multi-cockpit dashboard (Verification, ECC Skills, REA, Control Center) on loopback | [path] |
Available |
GitHub App Service |
GitHub App handlers & webhook bot (/anvil analyze|repair|audit|doctor|risk) |
/anvil, /forge (legacy alias) |
Available |
cross-harness handoff |
Synchronize active session handoff state via .anvil/memory.json and hooks |
anvil memory handoff |
Available |
How ANVIL Fits With Your AI Coding Tools
ANVIL acts as the local inspection and verification harness for your agent:
[ AI Coding Agent ] ──writes code──> [ Local Repo ] ──verified by──> [ ANVIL Gate ] ──PR──> [ Merge ]
(Claude / Cursor / (AST Map, Blast Radius,
Codex / Antigravity) Secrets, Downstream Tests)
Supported Harnesses & Ecosystems
- Claude Code:
Runanvil install . --hooks --target claude. Claude accesses read-only MCP tools (anvil_map_architecture,anvil_change_risk,anvil_inspect_project) to query repository structure without bloating context windows, while stop hooks automatically check changes on completion. - Cursor IDE:
Runanvil install . --hooks --target cursor. Automatically configures.cursor/mcp.jsonand.cursor/hooks.jsonso Cursor's agent receives immediate gate feedback before stopping. - ECC (affaan-m/ECC):
Complements ECC's 1,500+ skills and prompt workflows with ANVIL's deterministic verification, blast radius, and agent security scanning. See the ECC Integration Guide. - REA (morluto/rea):
Powers an end-to-end reverse-engineering and binary analysis pipeline: use REA for binary/bundle inspection and ANVIL for safe patch verification and CI gating (npm run test:reaexecutes the cross-platform Python REA bridge suite incatalog/rea/bridges/). See the REA Integration Guide. - Codex & OpenCode:
Use standardAGENTS.mdinstructions and runanvil gate .to verify changes before committing. - Google Antigravity (AGY):
Integrates seamlessly with AGY workspace configurations and rules. See the Antigravity Integration Guide.
Canonical MCP Tools
All ANVIL MCP tools are strictly read-only and enforce safety bounds:
anvil_inspect_project: Inspect stack, manifests, and scripts.anvil_map_architecture: Deterministic import graph and circular ring detection.anvil_change_risk: Blast radius and suggested test targets for uncommitted diffs.anvil_git_intelligence: Working copy diff and affected modules.anvil_quality_audit: Static project hygiene and workflow audit.anvil_security_audit: Entropy-based secret scanning with zero network calls.anvil_clean_preview: Safe dry-run inspection for caches and junk.anvil_doctor: Diagnostic environment check for Node, Git, Docker, and permissions.
GitHub Action Usage
Enforce deterministic verification on every pull request using the official ANVIL GitHub Action:
name: ANVIL Verification Gate
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
gate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run ANVIL Quality & Security Gate
uses: anvil-workbench/[email protected]
with:
version: v1.3.0
operation: gate
project-path: .
baseline-file: .anvil/baseline.json
sarif-file: anvil-results.sarif
pr-comment: "true"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload SARIF to GitHub Security Tab
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: anvil-results.sarif
Documentation
Explore detailed guides in the docs/ directory:
- 📖 Documentation Index: Full guide directory.
- 🚀 Getting Started: Step-by-step onboarding walkthrough.
- 🔌 Antigravity Integration: Setup ANVIL with Google Antigravity.
- 🤖 Claude Code Integration: Claude Code CLI adapter.
- 🛠️ MCP Server Guide: Model Context Protocol setup and tool schemas.
- 📋 Policy-as-Code: Configure
.anvil/policy.jsonrules and baselines. - 🛡️ CI Gate & SARIF Integration: GitHub Actions and SARIF reports.
- ⚡ Token Benchmark Results: Empirical comparison measuring 96%+ token savings.
Credits & Upstream Attribution
ANVIL is open-source software licensed under the MIT License.
- Upstream Foundation: ANVIL started as a fork of the FORGE project by Ansh. We gratefully acknowledge Ansh and the FORGE community for their original foundational work in agent harnesses. See NOTICE and ACKNOWLEDGEMENTS.md for full attribution.
- Ecosystem Complement: ANVIL complements prompt, skills, and agent catalogs like ECC (Everything Claude Code) by Affaan M, acting as the local verification, AST inspection, and policy enforcement engine.
- Standards: Built on the open Model Context Protocol (MCP) and the OASIS SARIF v2.1.0 standard.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi