Test impact analysis and code intelligence for LLM agents in solo-maintainer workflows, with multi-process / multi-agent safety (shared .chisel/ storage, locks). Zero external dependencies.
Version: 0.9.0
PyPI: chisel-test-impact
License: MIT
Python: >= 3.11
| Path | Purpose | Dependencies | Wiki Link |
|---|---|---|---|
pyproject.toml |
Build config, version, scripts, dev deps | setuptools >= 68.0 | -- |
LICENSE |
MIT license text | -- | -- |
.gitignore |
Git ignore rules for caches, DBs, virtualenvs | -- | -- |
.github/workflows/ci.yml |
GitHub Actions CI (version check, benchmark, lint, test, Python 3.11-3.14) | -- | -- |
docs/AGENT_PLAYBOOK.md |
Short MCP/agent workflow: analyze, diff_impact, start_job, source field | -- | -- |
docs/ZERO_DEPS.md |
Strict stdlib-only policy; optional extras; tree-sitter vs register_extractor | -- | -- |
docs/CUSTOM_EXTRACTORS.md |
register_extractor, CHISEL_BOOTSTRAP, user-installed tree-sitter / LSP |
-- | -- |
examples/github-actions/chisel.yml |
Sample workflow for consumers to copy into their repos | -- | -- |
scripts/check_version.py |
CI: assert pyproject version matches chisel.__version__ |
stdlib | -- |
scripts/benchmark_chisel.py |
CI: timing smoke on minimal git repo (env thresholds) | stdlib, chisel | -- |
.github/workflows/publish.yml |
PyPI publish on tag push (OIDC trusted publishing) | -- | -- |
CLAUDE.md |
Claude Code agent instructions for this project | -- | -- |
ARCHITECTURE.md |
Data model, SQL schemas, design decisions | -- | spec-project |
CHANGELOG.md |
Versioned changelog (Keep a Changelog format) | -- | -- |
README.md |
Overview, install, quickstart, features | -- | -- |
COMPLETE_PROJECT_DOCUMENTATION.md |
This file -- full file table per global agent guidelines | -- | -- |
LLM_Development.md |
Chronological development log | -- | -- |
CONTRIBUTING.md |
Contribution guidelines | -- | -- |
| Path | Purpose | Dependencies | Wiki Link |
|---|---|---|---|
chisel/__init__.py |
Package init, exports __version__ |
-- | -- |
chisel/ast_utils.py |
Multi-language AST extraction (12 languages), pluggable extractor registry, CodeUnit dataclass, _SKIP_DIRS constant, compute_file_hash, detect_language |
ast, hashlib, re, dataclasses, functools, pathlib |
glossary: code unit |
chisel/bootstrap.py |
Optional CHISEL_BOOTSTRAP module import (user tree-sitter / custom extractors) |
importlib, os |
CUSTOM_EXTRACTORS |
chisel/storage.py |
SQLite persistence layer (WAL mode, 17 tables, single persistent connection, cross-process busy-retry), all CRUD operations | sqlite3, datetime, pathlib, logging |
glossary: blame cache |
chisel/git_analyzer.py |
Git log/blame parsing via subprocess, branch/diff queries, function-level log | re, subprocess, datetime |
glossary: churn score |
chisel/metrics.py |
Pure computation: churn scoring, ownership aggregation, co-change detection | collections, datetime, itertools |
glossary: churn score |
chisel/test_mapper.py |
Test file discovery, framework detection (pytest/Jest/Go/Rust/Playwright), dependency extraction, test edge building | ast, os, re, pathlib, chisel.ast_utils, chisel.project |
glossary: test edge |
chisel/impact.py |
Impact analysis, risk scoring (20-step coverage quantization, proximity for partial coverage), stale test detection, ownership queries, reviewer suggestions | collections, datetime, chisel.metrics, chisel.storage (via constructor injection) |
glossary: risk score |
chisel/project.py |
Multi-process / multi-agent safety: project root detection (worktree-aware), path normalization, storage dir resolution, cross-platform file lock (ProcessLock) for concurrent agents and CLI | os, subprocess, sys, contextlib; Unix: fcntl; Windows: ctypes, msvcrt |
-- |
chisel/engine.py |
Orchestrator -- owns Storage, GitAnalyzer, TestMapper, ImpactAnalyzer, RWLock, ProcessLock; exposes tool_*() methods for all MCP tools. Single-author co-change threshold halving, diff_impact working_tree support via StaticImportIndex |
os, chisel.ast_utils, chisel.git_analyzer, chisel.impact, chisel.project, chisel.rwlock, chisel.storage, chisel.static_test_imports, chisel.test_mapper |
spec-project |
chisel/cli.py |
argparse CLI with 28 subcommands, dispatch table, output formatting | argparse, json, os, chisel.engine |
spec-project: CLI |
chisel/mcp_server.py |
HTTP MCP server (GET /tools, /health; POST /call), ThreadedHTTPServer, shared dispatch_tool() |
json, logging, threading, http.server, socketserver, chisel.engine, chisel.schemas |
spec-project: MCP tools |
chisel/mcp_stdio.py |
stdio MCP server for Claude Desktop/Cursor integration, requires optional mcp package |
asyncio, json, logging, os, sys, chisel.engine, chisel.mcp_server (imports dispatch_tool), chisel.schemas (imports _TOOL_SCHEMAS) |
spec-project: MCP tools |
chisel/schemas.py |
JSON Schema definitions for all 26 tools (20 functional + 6 file-lock) + dispatch table, shared by HTTP and stdio servers | -- (pure data module) | -- |
chisel/rwlock.py |
Read-write lock (multiple readers or one exclusive writer) for concurrent access | threading, contextlib |
-- |
| Path | Purpose | Dependencies | Wiki Link |
|---|---|---|---|
tests/__init__.py |
Test package init (empty) | -- | -- |
tests/test_ast_utils.py |
Tests for multi-language AST extraction, language detection, file hashing, brace matching | pytest, hashlib, textwrap, chisel.ast_utils |
-- |
tests/test_storage.py |
Tests for all Storage CRUD operations per table, WAL mode, table existence | pytest, sqlite3, chisel.storage |
-- |
tests/test_git_analyzer.py |
Tests for git log/blame parsing, churn computation, ownership, co-change, diff functions (uses temp git repos) | pytest, os, subprocess, datetime, chisel.git_analyzer |
-- |
tests/test_test_mapper.py |
Tests for framework detection, test file discovery, dependency extraction, edge building | pytest, os, chisel.ast_utils, chisel.test_mapper |
-- |
tests/test_impact.py |
Tests for impact analysis, risk scoring, stale test detection, ownership, reviewer suggestions | pytest, chisel.impact, chisel.storage |
-- |
tests/test_engine.py |
Integration tests for ChiselEngine with temp git repos and test files | pytest, os, subprocess, chisel.engine |
-- |
tests/test_cli.py |
Tests for CLI parser, all command handlers, main dispatch | pytest, json, unittest.mock, chisel.cli |
-- |
tests/test_mcp_server.py |
Tests for HTTP MCP server endpoints using a real server on OS-assigned port | pytest, json, os, subprocess, urllib, chisel.mcp_server |
-- |
tests/test_mcp_stdio.py |
Tests for stdio MCP server creation, tool listing, tool dispatch | pytest, json, unittest.mock, chisel.mcp_stdio |
-- |
tests/test_rwlock.py |
Tests for RWLock concurrent reader/writer semantics, ordering, starvation | pytest, threading, time, chisel.rwlock |
-- |
tests/test_metrics.py |
Tests for churn computation, co-change detection, date parsing | pytest, chisel.metrics |
-- |
tests/test_project.py |
Tests for project root detection, path normalization, storage resolution, ProcessLock | pytest, os, subprocess, chisel.project |
-- |
tests/conftest.py |
Shared pytest fixtures: temp git repos, run_git helper |
pytest, os, subprocess |
-- |
engine.py --> project.py, storage.py, ast_utils.py, git_analyzer.py, metrics.py, test_mapper.py, impact.py, rwlock.py
test_mapper.py --> ast_utils.py, project.py
impact.py --> storage.py (injected), metrics.py
metrics.py --> (no internal deps)
project.py --> (no internal deps)
schemas.py --> (no internal deps)
cli.py --> engine.py, mcp_server.py (lazy), mcp_stdio.py (lazy)
mcp_server.py --> engine.py, schemas.py
mcp_stdio.py --> engine.py, mcp_server.py, schemas.py
code_units, test_units, test_edges, commits, commit_files, blame_cache, co_changes, churn_stats, file_hashes, import_edges, branch_co_changes, test_results, meta, file_locks, bg_jobs, job_events, static_test_imports
| Script | Target | Description |
|---|---|---|
chisel |
chisel.cli:main |
CLI with 28 subcommands |
chisel-mcp |
chisel.mcp_stdio:main |
stdio MCP server |