Test impact analysis and code intelligence for LLM agents
Project description
Chisel
Test impact analysis and code intelligence built for LLM agents — especially when several agents or sessions touch the same repo (solo developer, multi-agent workflow).
Chisel maps tests to code, code to git history, and answers: what to run, what’s risky, and where attention should go — including blame-based lineage when you need audit context (not “team roster” features).
Who this is for
- Solo developers using Cursor, Claude Code, or other MCP clients — not a substitute for human code review queues.
- Multi-agent usage: parallel agent runs, background tasks, or sequential sessions that share one project. Chisel keeps one consistent graph (project-local
.chisel/storage, cross-process locks) so agents don’t corrupt analysis mid-write. - Primary interface: MCP tools and structured responses (
next_steps, diagnostic statuses), not dashboards for managers.
The Problem
An LLM agent changes engine.py:store_document(). It then either:
- Runs all 287 tests (slow, wasteful), or
- Guesses with
-k "test_store"(misses regressions)
When multiple agent runs (or agents plus you) work on the same codebase, changes in one area can break another. Chisel gives each agent test impact, import-aware suggestions, and risk signals so they narrow what to run and where regressions may hide — before you merge or ship.
Install
pip install chisel-test-impact
Or from source:
git clone https://github.com/IronAdamant/Chisel.git
cd Chisel
pip install -e .
Use with Claude Code (MCP)
Add to your Claude Code MCP config (~/.claude/settings.json or project .mcp.json):
{
"mcpServers": {
"chisel": {
"command": "chisel-mcp",
"env": {
"CHISEL_PROJECT_DIR": "/path/to/your/project"
}
}
}
}
Or run the HTTP server for any MCP-compatible client:
chisel serve --port 8377
Once connected, agents can call the full tool surface — analyze, diff_impact, suggest_tests, risk_map, triage, and more. Run analyze first to build the project graph, then diff_impact after edits to narrow which tests to run. For long analyses on large repos, prefer chisel analyze / chisel update in a terminal so MCP clients don’t time out.
Use with Cursor / Other MCP Clients
Chisel exposes a standard MCP interface. For stdio-based clients:
pip install chisel-test-impact[mcp]
chisel-mcp
For HTTP-based clients, point them at http://localhost:8377 after running chisel serve.
Quickstart (CLI)
# Analyze a project (builds all graphs)
chisel analyze .
# What tests are impacted by my current changes?
chisel diff-impact
# What tests should I run for this file?
chisel suggest-tests engine.py
# Who owns this code?
chisel ownership engine.py
# What files always change together?
chisel coupling storage.py
# Which tests are stale?
chisel stale-tests
# Risk heatmap across the project
chisel risk-map
# Incremental update (only re-process changed files)
chisel update
# Find code with no test coverage, sorted by risk
chisel test-gaps
Try It on This Repo
git clone https://github.com/IronAdamant/Chisel.git
cd Chisel
pip install -e .
chisel analyze .
chisel risk-map
chisel diff-impact
chisel test-gaps
chisel stats
MCP tools (core)
Core query and write tools below; the MCP server also exposes advisory file-lock helpers for multi-process coordination. See schemas.py / chisel serve for the full list.
| Tool | What it does |
|---|---|
analyze |
Full project scan — code units, tests, git history, edges |
update |
Incremental re-analysis of changed files only |
impact |
Which tests cover these files/functions? |
diff_impact |
Auto-detect changes from git diff, return impacted tests |
suggest_tests |
Rank tests by relevance (edges, co-change, import graph) + failure rate |
churn |
How often does this file/function change? |
ownership |
Blame-based authors (useful for audit / “who wrote this line”) |
who_reviews |
Recent commit activity on the file (heuristic “hot spots”, not org chart) |
coupling |
Co-change partners + import-graph neighbors and numeric scores |
risk_map |
Risk scores for all files (churn + coupling + coverage gaps) |
stale_tests |
Tests pointing at code that no longer exists |
test_gaps |
Code units with zero test coverage, sorted by risk |
history |
Commit history for a specific file |
record_result |
Record test pass/fail for future prioritization |
stats |
Database summary counts |
triage |
Composite: top risk + gaps + stale tests in one call |
Features
- Zero dependencies — stdlib only, works everywhere Python 3.11+ runs
- Encoding-safe — handles non-UTF-8 content in git history (Latin-1 commits, binary diffs) without crashing
- Multi-language — Python, JavaScript/TypeScript, Go, Rust, C#, Java, Kotlin, C/C++, Swift, PHP, Ruby, Dart
- Framework detection — pytest, Jest, Go test, Rust #[test], Playwright, xUnit/NUnit/MSTest, JUnit, XCTest, PHPUnit, RSpec, Minitest, gtest, Dart test
- Incremental — only re-processes changed files via content hashing
- MCP servers — both stdio and HTTP for LLM agent integration
- Risk scoring — weighted formula: churn, coupling, coverage gaps, author concentration, test instability
- Branch-aware —
diff_impactauto-detects feature branch vs main
Ecosystem
Chisel is designed to sit in the agent loop (MCP): impact → tests → record results → refresh analysis. It works standalone or alongside tools like Stele for semantic code context — Chisel stays focused on test graph, git signals, and static imports for blast-radius reasoning.
Design Notes
Coupling: co-change vs. import-graph
Chisel's coupling tool exposes two coupling sources:
-
Co-change coupling (
co_change_partners) — files that often appear in the same git commits. Stronger when history has many small commits (including a solo dev committing often, or multiple agents landing separate commits). Sparse history → thin co-change signal. -
Import-graph coupling (
import_partners, plus numericimport_coupling/effective_coupling) — staticimport/requireedges. Always available after analysis and is the main structural signal for single-author repos.
risk_map and impact tools combine both; import graph also powers transitive test suggestions (e.g. facade tests covering inner modules).
Coverage Gap: Graduated Scoring
Coverage gap is quantized to 4 steps (0.0, 0.25, 0.5, 0.75, 1.0) rather than binary. This graduated scoring provides finer granularity for risk assessment in risk_map.
--verbose Flag
chisel analyze does not accept a --verbose flag. Using it causes the command to silently fail. For diagnostic output after analysis, use chisel stats to verify edge counts.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chisel_test_impact-0.6.4.tar.gz.
File metadata
- Download URL: chisel_test_impact-0.6.4.tar.gz
- Upload date:
- Size: 120.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4915d2ed03c02f3b4abb2ac8722584c2de950bb02a12786209324f2c2dc524a0
|
|
| MD5 |
bdea77aa5690903cd480a05ef039cfd2
|
|
| BLAKE2b-256 |
cf83f4e15e8aeb5de95b4fdda59c3ad0ea8730abf30db840cc6707e7069e5048
|
Provenance
The following attestation bundles were made for chisel_test_impact-0.6.4.tar.gz:
Publisher:
publish.yml on IronAdamant/Chisel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chisel_test_impact-0.6.4.tar.gz -
Subject digest:
4915d2ed03c02f3b4abb2ac8722584c2de950bb02a12786209324f2c2dc524a0 - Sigstore transparency entry: 1187665083
- Sigstore integration time:
-
Permalink:
IronAdamant/Chisel@d2ab10e0b38538aa675a9d4b1b079de855868624 -
Branch / Tag:
refs/tags/v0.6.4 - Owner: https://github.com/IronAdamant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d2ab10e0b38538aa675a9d4b1b079de855868624 -
Trigger Event:
push
-
Statement type:
File details
Details for the file chisel_test_impact-0.6.4-py3-none-any.whl.
File metadata
- Download URL: chisel_test_impact-0.6.4-py3-none-any.whl
- Upload date:
- Size: 75.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cf2e3919d07d8609c6f70cc370e101f4034abf29f22645bb4c8db929bf577c1
|
|
| MD5 |
4e8e15c27d5250964e742f9c2a7769e4
|
|
| BLAKE2b-256 |
98c30695cd2827bee3f7ee0d5284132d2240a56a8dc001523b209333d59c3354
|
Provenance
The following attestation bundles were made for chisel_test_impact-0.6.4-py3-none-any.whl:
Publisher:
publish.yml on IronAdamant/Chisel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chisel_test_impact-0.6.4-py3-none-any.whl -
Subject digest:
1cf2e3919d07d8609c6f70cc370e101f4034abf29f22645bb4c8db929bf577c1 - Sigstore transparency entry: 1187665090
- Sigstore integration time:
-
Permalink:
IronAdamant/Chisel@d2ab10e0b38538aa675a9d4b1b079de855868624 -
Branch / Tag:
refs/tags/v0.6.4 - Owner: https://github.com/IronAdamant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d2ab10e0b38538aa675a9d4b1b079de855868624 -
Trigger Event:
push
-
Statement type: