Skip to content

Releases

Athena v1.4.0: Closed-Loop AI Repair and 14-Language Verification

Choose a tag to compare

@aaryanrwt aaryanrwt released this 30 Nov 04:46

Athena v1.4.0 extends breaking-change detection into a full repair pipeline. Athena now fixes affected callers, verifies the result with real compilers and tests, and restores your files exactly if verification fails.

Highlights

  • Closed-loop repair with athena repair and athena verify-fix: deterministic fixes first, then bounded AI repair, then compiler and test verification, then bit-exact rollback on failure.
  • Universal AI provider bridge: handoff (MCP agents), ollama, openai-compat, anthropic, claude-code, codex, cursor, hermes, pi, and auto discovery.
  • Richer AI repair context: full definition diffs including related headers and package files, plus automatic inclusion of files flagged by compiler or test errors on later iterations. All edits stay inside the repository.
  • Fail-closed verification across 14 languages: results are reported as verified_pass, verified_fail, or unverified. A missing toolchain is never reported as success.
  • Multi-language deterministic codemods: symbol renames, keyword renames, argument swaps, None guards, and docstring sync, applied using exact byte spans while preserving CRLF and BOM.
  • Improved test selection using IDF weighting and one-hop caller propagation.
  • MCP server expanded to 18 tools, including prepare_ai_repair_tasks, verify_fix, and run_ai_repair.

Benchmarks

Area Result
Deterministic fixes 0 false edits across 94 real commits
Verification 0 false greens; 13 of 14 live toolchains verified
Rollback integrity 100% bit-exact (18/18, 34/34, 92/92)
Impacted test recall 60.75% top 20, 79.56% unlimited
AI repair, 12 curated commits (5 languages) Up to 50.0% Pass@1
AI repair, 50 unfiltered Python commits 8.0% Pass@3 per model, 10.0% combined

Full methodology: docs/evaluation.md

Breaking Changes

  • Removed athena install. Clone the repository and use athena init-mcp or athena mcp instead.

Fixes

  • CI no longer requires a running Ollama instance for the offline test suite.
  • External CLI adapters now clean up their whole process tree on timeout.

Installation

git clone https://github.com/aaryanrwt/athena.git
cd athena
pip install -e ".[ast]"

GitHub Action: uses: aaryanrwt/athena@v1.4.0

Full changelog: CHANGELOG.md

v1.3.3 — Tree-sitter Multi-Language Precision, Full-Repo Coverage, Auto-Fix Engine & Token Ledger

Choose a tag to compare

@aaryanrwt aaryanrwt released this 26 Nov 01:05

What's New in Athena v1.3.3

1. Tree-sitter Multi-Language AST Backend & Precision Overhaul

  • Optional 14-Language Tree-sitter Parser (pip install -e ".[ast]"): Added tree-sitter>=0.25.0 + tree-sitter-language-pack>=1.0.0 parsing across TypeScript/TSX, JavaScript, Go, Rust, C, C++ (including .h headers), C#, Java, Kotlin, Scala, Ruby, PHP, and Swift, with an automatic hardened fallback (ATHENA_TREESITTER_DISABLE=1).
  • False-Positive Elimination Across Real Enterprise Diffs:
    • Order-insensitive modifier canonicalization (async override vs override async).
    • C/C++ export macro preprocessing (MLX_API, ABSL_DLL, GRPCAPI, __declspec, __attribute__), /internal/ / /detail/ directory & namespace ...internal... visibility scoping, and normalized template specialization names.
    • Enclosing-class visibility inheritance (internal static class / nested classes) and anonymous inner class skipping in C#, Java, Kotlin, and Scala.
    • Order-independent overload pairing with #N overload arity gating and trailing optional parameter compatibility across PHP, TypeScript, C++, Swift, and Kotlin.
    • Python PEP 585 annotation equivalence (Dict/List/Set/Tuple == dict/list/set/tuple), Java @Nullable normalization, and Swift post-name parameter slicing past @available(*, deprecated) / @inlinable.
    • Scoped receiver/import caller matching and generic method guards (__construct, equals, hashCode, toString, get, copy, main, free, list, is_available).

2. Full-Repo Monorepo Coverage & Encoding Hardening

  • Replaced the 500-file truncation cap with single-call stdin git grep -I -l -F -f - prefiltering (git_grep_matching_files), eliminating monorepo caller blind spots while avoiding Windows argv limits.
  • Added resilient multi-encoding decoding (utf-8-sig -> utf-8 -> cp1252 -> latin-1 -> replace) and CRLF-only diff short-circuiting so non-UTF-8 files and line-ending churn never crash or pollute audits.
  • Added .swift and .scala indexing and test detection to CodeGraph and affected-tests with exact Rust-vs-Python SHA-256 parity (apple/swift-nio: 88 -> 10,904 nodes, 5 -> 229 impacted tests).

3. Deterministic Auto-Fix Engine (athena fix)

  • New CLI command athena fix and MCP tool generate_fix_plan generate deterministic unified diffs split into:
    • safe: recursion_fix, literal none_guard, 1-to-1 Python keyword caller_update, docstring_sync.
    • review_required: compat_shim, migration_guide.
  • Defaults to dry-run (--format diff supported), with atomic conflict-checked, stale-line-verified, path-confined --apply.

4. Persistent Token-Savings Telemetry (athena gain) & 15 MCP Tools

  • New athena gain CLI command, get_token_savings_report MCP tool, and athena://gain/summary MCP resource backed by an append-only local JSONL ledger (~/.athena/gain.jsonl / $ATHENA_GAIN_LOG) with literal path filtering.
  • Added head+tail truncation (truncate_head_tail), never-worse payload bounds, hardened agent hooks, and Python >=3.13 + Tree-sitter/ledger diagnostics in athena doctor (15 total MCP tools).

Verified Benchmarks (v1.3.2 -> v1.3.3)

5-Company Enterprise Verification (HEAD~1050..HEAD, 16/16 Assertions Passed)

Repository Coverage (v1.3.2 -> v1.3.3) Key Precision & Coverage Impact
openai/openai-python 37.6% -> 99.9% (963 -> 2,557 / 2,560) +1,594 files covered; bogus CLIModels.get callers eliminated (0)
microsoft/semantic-kernel 22.8% -> 100.0% (838 -> 3,682 / 3,682) AggregatorAgent modifier reorder & internal static class AgentThreadActions suppressed (0)
meta-llama/llama-stack 69.6% -> 100.0% (898 -> 1,286 / 1,286) Cross-scope list/main caller collisions eliminated (0)
ml-explore/mlx 100.0% (635 / 635) MLX_API & overload shifts resolved; zero Python/3rdparty/ cross-language collisions
google/go-github 99.4% (516 / 519) Zero declaration-line callers; private unexported helper false alarms suppressed

10-Language / 1,000-Commit Individual Diff Audit

Audited 100 consecutive first-parent commits individually (sha^1..sha, 1,000 diffs total, 677 code commits) across microsoft/playwright, tokio-rs/tokio, google/guava, kubernetes/client-go, pydantic/pydantic, abseil/abseil-cpp, dotnet/extensions, square/okhttp, apple/swift-nio, and laravel/framework:

  • 0 crashes, 99.72%–100.0% average parse coverage (99.97% mean).
  • 6 real-world parser/graph bugs found from raw diffs and fixed, cutting breaking commits from 59 -> 41 (443 -> 347 findings).
  • 10/10 repositories passed across map, CodeGraph Rust-vs-Python SHA-256 parity, cross-process summary -> view, affected-tests, check --staged, semver-check, debt, report --html, release-notes, fix --dry-run, live fix --apply, doctor, and 15/15 MCP checks.
  • athena gain across 31 benchmark commands: 44,226,980 / 44,250,647 tokens saved (99.95% reduction).

Upgrade & Usage

# Install with Tree-sitter multi-language AST support
pip install -e ".[ast]"

# Dry-run deterministic fixes for breaking changes
athena fix HEAD~5..HEAD --format diff

# Inspect cumulative token savings
athena gain --all
# GitHub Action
- uses: aaryanrwt/athena@v1.3.3

Verification

  • Full offline 3-mode pytest matrix (-m "not ollama"): 195 passed, 1 deselected with Tree-sitter+Rust ON (221.75s), ATHENA_TREESITTER_DISABLE=1 (254.76s), and FAST_ANYTHING_DISABLE=1 (362.33s).

Full Changelog: v1.3.2...v1.3.3

Athena v1.3.2 — MCP Resources & Prompts, Disk-Backed Evidence Paging, 6x–18x Faster Large-Diff Scans & athena doctor

Choose a tag to compare

@aaryanrwt aaryanrwt released this 24 Nov 18:39

What's New in Athena v1.3.2

Modern MCP Surface & Scoping

  • Read-Only MCP Resources & URI Template: Added athena://server/capabilities, athena://repo/map, athena://evidence/recent, and athena://evidence/{evidence_id} so AI clients can inspect capabilities, repo maps, and retained evidence without extra tool calls.
  • 3 Guided Workflow Prompts: Added pre_merge_audit, release_readiness_review, and codebase_onboarding, plus human-friendly title metadata across all 13 MCP tools.
  • Scoped Toolsets & Read-Only Mode: Run athena mcp --toolsets git,graph --read-only to expose only the tool categories you need and hide write-capable release tools at startup.
  • Local streamable-http Transport: Added --transport streamable-http --host 127.0.0.1 --port 8000 with loopback binding enforced by default (REMOTE_BIND_BLOCKED unless --allow-remote is passed explicitly).
  • Uniform Error Recovery Metadata: Structured error payloads now include error_kind, retryable, and remediation_action across MCP tools and EvidenceStore.

Cross-Process Evidence Paging, Validation & Diagnostics

  • Disk-Backed EvidenceStore (ev_<sha256>): Evidence bundles are now persisted atomically to ~/.athena/evidence (or $ATHENA_EVIDENCE_DIR) with strict ID validation, symlink defense, secret redaction, and LRU pruning.
  • --detail summary + Cross-Process athena view: Added --detail {complete,summary} to athena analyze, athena breaking-changes, and athena graph (compressing 3–12 MB reports down to ~644 B summaries) so separate athena view <ev_id> --facet ... calls work cleanly across CLI and MCP sessions.
  • Bounded Pagination: Added --offset and --limit (has_more, partial) to athena debt, athena affected-tests, and their MCP tools, plus strict INVALID_OFFSET / INVALID_LIMIT validation in inspect_view().
  • athena doctor & Strict Input Checks: Added athena doctor [repo_path] for live Python, Git, MCP SDK, Rust (fast-anything), evidence store, and repo diagnostics; fixed athena map --max-chars <= 0 (INVALID_MAX_CHARS) and CLI exit codes on map, debt, and affected-tests.

Large-Diff Performance Fix (6.02x–17.92x Faster)

  • Bounded raw diff-hunk slicing prior to secret redaction in src/athena/git_inspector.py (_parse_unified_diff_by_file) and added precompiled doc-drift/dynamic-call regex guards plus O(1) commit_by_file indexing in src/athena/ast_analyzer.py.
  • Eliminated a >300s timeout encountered on Meta's llama-stack (HEAD~1050..HEAD, 40.7M raw tokens), cutting the scan to 37.57s (Hybrid Rust) / 48.44s (pure Python) with exact findings parity.

5-Company 1,050+-Commit Real-World Verification (v1.3.1 -> v1.3.2)

Tested offline across 5,291 commits (63.8M raw tokens / 255.2 MB). Athena surfaced 366 potential breaking API changes (274 high, 92 medium), 893 affected caller sites, and 2,180 impacted tests:

Company & Repo Commits Found (Breaking / Callers) Scan Time (v1.3.1 -> v1.3.2) Map Token Savings
Google (google/go-github, Go) 1,050 111 breaks · 151 callers 133.26s -> 22.15s (6.02x faster) 5,103.0x
Apple (ml-explore/mlx, C++/Py) 1,050 39 breaks · 45 callers 176.68s -> 11.12s (15.89x faster) 6,026.7x
OpenAI (openai/openai-python, Py) 1,091 132 breaks · 460 callers 284.69s -> 30.98s (9.19x faster) 11,246.0x
Meta (meta-llama/llama-stack, Py/TS) 1,050 61 breaks · 113 callers TIMEOUT 300.14s -> 37.57s (>8.0x) 81,438.6x
Microsoft (microsoft/semantic-kernel, C#/Py) 1,050 23 breaks · 124 callers 223.71s -> 12.48s (17.92x faster) 24,290.1x

Highlights caught in those repositories include secret/variable Go API signature rewrites in google/go-github, array::set_data / simd_gemm C++ changes in ml-explore/mlx, SyncAPIClient.request and CLI removals in openai/openai-python, CLI/SDK removals in meta-llama/llama-stack, and the .NET Agent InvokeAsync / InvokeStreamingAsync redesign in microsoft/semantic-kernel.

Upgrade

pip install --upgrade git+https://github.com/aaryanrwt/athena.git@v1.3.2
athena doctor .

Full Changelog: v1.3.1...v1.3.2

v1.3.1 — Hybrid Rust Acceleration, Predictive Test Selection, CUDA/TeX Support & Accuracy Fixes

Choose a tag to compare

@aaryanrwt aaryanrwt released this 23 Nov 19:16

What's New in Athena v1.3.1

Athena (athena-mcp) is a 100% offline, 0-LLM default local code-intelligence CLI, Terminal UI, GitHub Action, and MCP server (13 tools, 14 languages, Python 3.12–3.15).

New Capabilities & Accuracy Fixes

  • Predictive Test Selection (athena affected-tests / predict_affected_tests): Maps changed files and AST symbols directly to impacted pytest, Playwright (.spec.ts / .e2e.ts), and unit test suites.
  • WORKING_TREE Stat-First TOCTOU Drift Detection: Records (st_mtime_ns, st_size) while reading working-tree blobs and re-stats touched files before returning, emitting an explicit drift warning if files mutate mid-flight.
  • Unit-Shift Heuristic on behavior_changed: Flags likely unit-scaling changes (e.g., milliseconds vs. seconds on timeout, delay, or ttl parameters) even when parameter types remain compatible.
  • Multi-Hop TS/JS Barrel Re-Exports: Resolves export { ... } from '...', export * from '...', and directory index stems so consumer -> barrel -> target call edges connect in CodeGraph.
  • Dynamic Dispatch ResidualUnknown Tracking: Flags Python metaclass / __init_subclass__ / setattr / globals and PHP/Laravel magic (__callStatic, __call, ->bind(, ->singleton(, app()->make() as explicit ResidualUnknownRecord(kind="dynamic_dispatch") entries so graphs honestly report completeness="partial".
  • CUDA & TeX Language Support: Added .cu/.cuh (__global__ / __device__ / __host__ kernels) and .tex (\section / \newcommand) structural extraction.

Hybrid Rust PyO3 Acceleration & Batched Git Reads (on main 35af0ae)

  • Batched Git Blob Reads (git cat-file --batch): Replaced per-file git cat-file -s + git show calls with batched binary reads, cutting athena (v1.0.0..v1.3.1) breaking-change analysis 4.02x (12,737 ms -> 3,170 ms).
  • Verified Rust Hot-Path Kernels (EL4CTEO/fast-anything, automatic pure-Python fallback via FAST_ANYTHING_DISABLE=1):
    • redact_secrets: 41x (237.3us -> 5.8us, 776/776)
    • score_graph_trigrams: 8.8x (37.3ms -> 4.2ms, 330/330)
    • compute_community_assignments: 3.5x (9.6ms -> 2.7ms, 206/206)
    • extract_structural_symbols_raw: 1.9x (16.2us -> 8.6us, 800/800)

Real-World Verification & Benchmarks

  • 3-Company 1,000+ Commit Before vs. After Rust Parity Audit (FAST_ANYTHING_DISABLE=1 vs. Rust PyO3 enabled):
    Repo Span Graph Build (Before → After) Total Pipeline Parity
    NVIDIA/cuvs 1,472 commits 29.89s -> 1.33s (22.48x) 89.49s -> 28.78s (3.11x) 14/14 identical (0 regressions)
    google/flatbuffers 1,000 commits 43.39s -> 1.62s (26.73x) 74.31s -> 24.12s (3.08x) 14/14 identical (0 regressions)
    microsoft/playwright-python 1,000 commits 45.78s -> 12.22s (3.75x) 112.03s -> 87.93s (1.27x) 14/14 identical (0 regressions)
  • 13-Repository Offline Benchmark: 13/13 passed with 0 errors across CUDA/C++, Python, Rust, JS, TS/Go, C#, Kotlin, Ruby, PHP, and TeX — up to 3,025.0x token reduction (NVIDIA/NeMo-Relay).

Use in GitHub Actions

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  with:
    fetch-depth: 0
- uses: aaryanrwt/athena@v1.3.1

Install / Upgrade

git clone https://github.com/aaryanrwt/athena.git
cd athena
pip install -e .

# Optional: build local Rust accelerations
python scripts/build_rust_accel.py

Full Changelog: v1.3.0...v1.3.1

Athena v1.3.0 — Persistent Code Graph, Zero-Search Repo Map, Debt Ledger & Cross-Agent Installer

Choose a tag to compare

@aaryanrwt aaryanrwt released this 21 Nov 18:43

Your git diff says it is safe. Athena checks the callers.

Athena v1.3.0 expands from a diff-only breaking-change analyzer into a persistent, local-first codebase intelligence layer for developers and AI coding agents (Python 3.12–3.15). Everything runs offline by default with zero cloud APIs or vector databases required.

What's New in v1.3.0

  • Persistent, Incremental Code Knowledge Graph (athena graph, query_code_graph):
    • Builds .athena/graph.json from Python ASTs and multi-language structural extractors with SHA-256 incremental file caching, deterministic community clustering, and non-blocking atomic snapshot reloads.
    • Queries via character-trigram + IDF scoring and hub-guarded BFS (token_budget=2000), automatically down-weighting tests/ and boilerplate utilities in god_nodes.
  • Zero-Search Codebase Map (athena map, get_repo_map):
    • Generates a <=2000-character architectural export map of shared modules, sanitized against prompt injection.
  • shortcut: Technical Debt Ledger (athena debt, scan_debt):
    • Scans # shortcut: <limit>, <when to upgrade> markers bound to enclosing Python AST symbols and flags missing upgrade triggers.
  • Cryptographic Evidence & Retained Paging (ev_<sha256>, unk_<sha256>, inspect_analysis_view):
    • Tracks dynamic dispatch (getattr, eval, oversized/partial parses) as explicit ResidualUnknown records instead of hiding gaps.
    • Supports detail="summary" on heavy MCP tools with paged inspection via inspect_analysis_view and athena view, plus discover_tools catalog discovery.
  • Transactional Cross-Agent Installer (athena install):
    • Installs skills and session-scoped hooks with SHA-256 backups and readback verification for Hermes, OpenClaw, Claude Code, Codex, Cursor, and Pi.

Real-World Benchmark (10 Languages, 100+ Commits Each)

Tested offline across 10 fresh 10k+-star repositories (396,964 cumulative stars, 1,000 commits HEAD~100..HEAD, 8,804 source files) — 10/10 passed with 0 errors, achieving 49x–2,067x token reduction (athena map + query_code_graph vs. full corpus) and up to 17.9x–25x incremental cache speedup.

See docs/evaluation.md and CHANGELOG.md for the full breakdown.

Upgrade / Install

pip install -e .
# or in GitHub Actions:
# uses: aaryanrwt/athena@v1.3.0

Athena v1.2.0 — Studio TUI, MCP Client Configs, SARIF Export, SemVer Gate & Pre-Commit Check

Choose a tag to compare

@aaryanrwt aaryanrwt released this 31 Oct 07:32

Here is everything shipping in v1.2.0.

🚀 What's New in v1.2.0

1. Athena Studio Terminal UI (athena ui)

You don't need complex command flags to see what's happening. Run athena ui in any repository to launch the interactive terminal studio:

  • Live Git Context: Shows your active branch, HEAD commit, staged changes, and working tree status at a glance.
  • One-Key Actions: Press 1 to run a pre-commit check on staged files, 2 to scan your branch for breaking changes, 3 to render an HTML report, or 5 to generate your MCP configuration.
  • Dual-Mode Ergonomics: Run athena in an interactive terminal to get the studio dashboard; pipe it into an editor or agent and it silently routes to the JSON-RPC stdio MCP server.

2. One-Click MCP Client Configs (athena init-mcp)

Connecting Athena to your editor takes five seconds:

# Print or write configuration for your favorite editor
athena init-mcp cursor
athena init-mcp claude-desktop
athena init-mcp vscode

3. SARIF 2.1.0 Code Scanning Export

Export breaking change findings in standard SARIF format for GitHub Code Scanning, SonarQube, or your CI annotations:

athena breaking-changes . --base main --target HEAD --format sarif

4. Pre-Commit Breaking Change Gate (athena check --staged)

Catch breaking API changes before they even hit your commit log. Add it as a pre-commit hook (.pre-commit-hooks.yaml) or run it manually:

athena check --staged

If you stage a breaking signature change, Athena flags the exact line and exits with status 1—without modifying any files or git refs.

5. Standalone Single-File HTML Reports (athena report --html)

Need to share a breaking-change review with your team? Athena can bundle its visual call graph, impacted caller trees, and unified diff citations into a single self-contained HTML file:

athena report . --html --output athena-report.html

Zero external scripts, zero CDNs, completely offline.

6. Automated SemVer Bump Gate (athena semver-check)

Never accidentally release a breaking change under a patch or minor version bump:

athena semver-check . --declared patch

If your changes contain breaking signature mutations, Athena fails the check and tells you the minimum SemVer bump required.

7. Incremental Content-Hash Symbol Cache (--cache-dir)

Speed up repeat runs across large monorepos. Athena hashes file contents via SHA-256 and caches parsed symbols, eliminating redundant AST re-parsing.

8. Real-World Engine Hardening

  • Strengthened detection for recursive function defects (unconditional recursion without base cases, broken self-recursion arity).
  • Fixed schema validation for behavioral function mutations.
  • Multi-language coverage across Python, TypeScript, JavaScript, C++, C, Go, Rust, Java, C#, Ruby, and PHP.

📊 Real-World Testing & Verification

Athena's release criteria are backed by real, unvarnished numbers from real-world open-source codebases:

  • 158 Automated Tests: 157 offline deterministic tests + 1 live Ollama integration test (100% green).
  • 55-Repository Multi-Language Benchmark: 100% pass rate across 11 languages over 5,500 commits, 10,680 diff hunks, and 411 recursive functions.
  • Top-Tier Scale Corpus: Evaluated against top GitHub projects representing over 8.3 million cumulative stars, verifying deterministic caller blast-radius extraction across real commit histories.
  • 5-Pass Consistency Verification: Repositories tested across 5 consecutive passes to confirm zero finding drift and identical hash invariance across runs.

📦 Quickstart

Install directly from source:

# Clone and install locally
git clone https://github.com/aaryanrwt/athena.git
cd athena
pip install -e .
# Launch the interactive Studio UI
athena ui
# Or configure your MCP client
athena init-mcp cursor

Maintainer: Aaryan Rawat (aaryan28rwt@gmail.com)

v1.1.0 — Multi-Language Structural & Recursive AST Intelligence, Dual Ollama Engine (Gemma 7B & Qwen 2.5 Coder), and Full MCP ToolAnnotations

Choose a tag to compare

@aaryanrwt aaryanrwt released this 20 Oct 18:12

Overview

Athena v1.1.0 expands Athena from a Python-focused AST change-intelligence server into a multi-language structural and recursive AST release-readiness engine, adds dual local Ollama model support (gemma:latest / Gemma 7B and qwen2.5-coder:7b), and declares full MCP ToolAnnotations across all 7 tools (100/100 Code Score on M8ven).


What's New in v1.1.0

1. Multi-Language Structural Signature & Contract Diffing (14 Languages)

  • Added structural symbol, parameter arity, return-type, and visibility diffing across TypeScript, JavaScript, Python, C++, C, Go, Rust, Java, Kotlin, Scala, C#, Ruby, PHP, and Swift.
  • Supports namespace/class-indented C++ methods, TypeScript/JavaScript class methods and export declare function signatures, Ruby def self.method class methods, and cross-header #include / module re-export relocations without false-positive removal spikes (BUG-032, BUG-034, BUG-038).

2. Multi-Language Recursive Function & Self-Call Arity Analysis

  • Extended recursive function detection (is_recursive) and broken recursive self-call arity verification beyond Python to brace-delimited (TS, JS, C, C++, Go, Rust, Java, C#, PHP) and def ... end (Ruby) languages (BUG-035).
  • Distinguishes true recursive self-calls (this.fn(), $this->fn(), self::fn()) from delegated calls on collaborator objects ($this->factory->fn(), parent::fn(), super.fn()) (BUG-037).

3. Python Positional Binding Relation ($M$-Model) Fix (BUG-030)

  • Detects optional positional parameters inserted before existing positional parameters (e.g., def f(a, b=2) $\to$ def f(a, inserted=0, b=2)), which silently shift positional argument bindings for existing callers, while keeping trailing optional positional appends and keyword-only (*) insertions non-breaking.
  • Validated against a 66-case parametrized positional-binding test matrix (test_m_binding_matrix).

4. Dual Local Ollama Acceleration (gemma:latest & qwen2.5-coder:7b)

  • Added model alias resolution, automatic VRAM swap eviction for 6 GB GPUs, and tuned context/token budgets (num_ctx=1536, num_predict=220) for both gemma:latest (Gemma 7B) and qwen2.5-coder:7b (BUG-025, BUG-036).
  • Remains 100% deterministic-first (Mode A) by default with zero network or LLM requirement.

5. Priority Tiered Git Blob Selection & 50x Caller Scan Speedup

  • Implemented 4-tier path prioritization (_path_priority_key) on partial clones (--filter=blob:none) so .changeset/*.md, CHANGELOG.md, docs/, and multi-language test files (*_test.go, *Test.java, *Test.php, *_spec.rb) never starve production source code blobs (BUG-031, BUG-039).
  • Pre-compiled single-pass caller and test-coverage regular expressions in _scan_callers_and_tests_and_docs, reducing large C/C++ repository analysis time by up to 7x–50x (BUG-033).

6. MCP ToolAnnotations & Apache-2.0 License

  • Added explicit ToolAnnotations (readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False) to all 7 MCP tools (inspect_repository, analyze_git_history, detect_potential_breaking_changes, generate_release_notes, analyze_change_graph, verify_breaking_and_doc_drift, generate_verified_release_brief).
  • Added standard LICENSE (Apache License 2.0).

v1.1.0 Multi-Language Benchmark Summary (55 Repositories, 100+ Commits Each)

Evaluated across 55 actively maintained 10,000+ star repositories (1,558,900 cumulative GitHub stars) spanning 11 languages over HEAD~100..HEAD:

  • Pass Rate: 55 / 55 (100.0%) across all 4 core MCP tools
  • Total Commits Inspected: 5,500 commits (100 per repository)
  • Total Diff Hunks Processed: 10,680 diff hunks
  • Total Recursive Functions Analyzed (Multi-Language): 411 recursive functions
  • Automated Test Suite: 121 / 121 passing (pytest) + 19 / 19 ground-truth contract & recursion scenarios passing (100%)

Maintainer & Owner

  • Aaryan Rawat (aaryan28rwt@gmail.com) — @aaryanrwt

v1.0.0 — Local-First Git & AST Change Intelligence, Breaking-Change Detection & MCP Server

Choose a tag to compare

@aaryanrwt aaryanrwt released this 18 Oct 13:42

Athena v1.0.0 is the first stable release of athena-mcp — a local-first Model Context Protocol (MCP) server and CLI that analyzes Git history, AST contract changes, recursive function defects, downstream caller blast radius, and documentation drift without relying on cloud APIs or trusting commit message prefixes.

Most changelog tools just summarize commit messages. If a developer commits a breaking API change under fix: minor cleanup, conventional tools miss it completely. Athena parses the actual Python (ast) and TypeScript/JavaScript code diffs across commits, traces affected callers across the repository, and backs every finding with exact commit SHAs, file paths, and line spans.


What's Included in v1.0.0

  • 4 Read-Only MCP Tools (stdio) & CLI (athena / python -m athena)
    • inspect_repository: Branch, tag, working-tree, and recent commit inspection with shallow/partial-clone awareness.
    • analyze_git_history: Multi-commit diff extraction and AST symbol delta grouping into evidence-backed change stories.
    • detect_potential_breaking_changes: Detects removed public symbols, added required parameters, unguarded default=None changes (griffe#469), return-type mutations, (str, Enum) to StrEnum changes (griffe#501), newly raised exceptions (griffe#498), affected callers, and stale documentation examples.
    • generate_release_notes: Audience-tailored Markdown changelogs (developers, maintainers, end_users, clients) with verified citations.
  • Recursive Function Bug & Blast-Radius Analysis
    • Detects broken recursive self-call arity when a recursive function's signature changes (BUG-021).
    • Flags unconditional infinite recursion missing a base-case branch (RecursionError) and unqualified method self-calls inside classes (NameError, BUG-022).
    • Hardened against RecursionError on deeply nested ASTs (BUG-023).
  • Public API Exposure & Dynamic Call Coverage
    • Distinguishes public package exports (__all__, __init__.py re-exports, TS export) from internal _private modules.
    • Detects unresolved dynamic calls (getattr, eval, globals(), importlib.import_module, TS bracket dispatch) and reports static parse coverage and blast-radius confidence.
  • 100% Offline Deterministic Engine + Optional Local Ollama (gemma:latest 7B & qwen2.5-coder:7b)
    • Works out of the box with zero LLM dependencies (Mode A).
    • Supports optional local Ollama synthesis (Mode B) with gemma:latest (gemma:7b) and qwen2.5-coder:7b, automatic VRAM model swap eviction on 6 GB GPUs, strict citation verification, and automatic deterministic fallback (Mode C).
  • Hardened Security Boundaries
    • Path traversal and symlink jail checks, Windows reserved device-name and NTFS Alternate Data Stream blocks, Git flag-injection and .gitconfig spoofing defenses, secret redaction before output/LLM prompts, and <untrusted_repo_content> prompt fencing.

Benchmarks & Verification

  • 49 / 49 Automated Tests Passing (100%): Covers unit, security, MCP stdio client-server roundtrips, and 29 real-world edge-case regressions (BUG-001 through BUG-029).
  • 19 / 19 Ground-Truth Quality Benchmark Scenarios (100% Accuracy): Verified across both the deterministic engine and live local Ollama (qwen2.5-coder:7b and gemma:latest).
  • Large-Scale Multi-Commit MCP Evaluation: Evaluated across 85 cloned open-source repositories (from a 176-repo manifest totaling 5.36M+ GitHub stars), passing 81 / 85 repositories (4.39M+ cumulative stars, 4,050 commits inspected, 13,817 diff hunks processed) including facebook/react, microsoft/vscode, huggingface/transformers, vercel/next.js, golang/go, ollama/ollama, pytorch/pytorch, django/django, tiangolo/fastapi, and pallets/flask.

Quick Start

git clone https://github.com/aaryanrwt/athena.git
cd athena
pip install -e .

# Inspect a repository
athena inspect /path/to/repo

# Detect breaking changes & caller blast radius
athena breaking-changes /path/to/repo --base v0.1.0 --target HEAD

# Generate developer release notes (optionally with local Ollama Gemma 7B)
athena release-notes /path/to/repo --base v0.1.0 --target HEAD --audience developers --llm --model gemma:7b