chisel-test-impact 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. chisel_test_impact-0.5.0/LICENSE +21 -0
  2. chisel_test_impact-0.5.0/PKG-INFO +178 -0
  3. chisel_test_impact-0.5.0/README.md +148 -0
  4. chisel_test_impact-0.5.0/chisel/__init__.py +1 -0
  5. chisel_test_impact-0.5.0/chisel/ast_utils.py +578 -0
  6. chisel_test_impact-0.5.0/chisel/cli.py +408 -0
  7. chisel_test_impact-0.5.0/chisel/engine.py +428 -0
  8. chisel_test_impact-0.5.0/chisel/git_analyzer.py +326 -0
  9. chisel_test_impact-0.5.0/chisel/impact.py +397 -0
  10. chisel_test_impact-0.5.0/chisel/mcp_server.py +226 -0
  11. chisel_test_impact-0.5.0/chisel/mcp_stdio.py +142 -0
  12. chisel_test_impact-0.5.0/chisel/metrics.py +203 -0
  13. chisel_test_impact-0.5.0/chisel/project.py +196 -0
  14. chisel_test_impact-0.5.0/chisel/rwlock.py +56 -0
  15. chisel_test_impact-0.5.0/chisel/schemas.py +284 -0
  16. chisel_test_impact-0.5.0/chisel/storage.py +539 -0
  17. chisel_test_impact-0.5.0/chisel/test_mapper.py +657 -0
  18. chisel_test_impact-0.5.0/chisel_test_impact.egg-info/PKG-INFO +178 -0
  19. chisel_test_impact-0.5.0/chisel_test_impact.egg-info/SOURCES.txt +35 -0
  20. chisel_test_impact-0.5.0/chisel_test_impact.egg-info/dependency_links.txt +1 -0
  21. chisel_test_impact-0.5.0/chisel_test_impact.egg-info/entry_points.txt +3 -0
  22. chisel_test_impact-0.5.0/chisel_test_impact.egg-info/requires.txt +8 -0
  23. chisel_test_impact-0.5.0/chisel_test_impact.egg-info/top_level.txt +1 -0
  24. chisel_test_impact-0.5.0/pyproject.toml +53 -0
  25. chisel_test_impact-0.5.0/setup.cfg +4 -0
  26. chisel_test_impact-0.5.0/tests/test_ast_utils.py +1563 -0
  27. chisel_test_impact-0.5.0/tests/test_cli.py +770 -0
  28. chisel_test_impact-0.5.0/tests/test_engine.py +464 -0
  29. chisel_test_impact-0.5.0/tests/test_git_analyzer.py +654 -0
  30. chisel_test_impact-0.5.0/tests/test_impact.py +281 -0
  31. chisel_test_impact-0.5.0/tests/test_mcp_server.py +280 -0
  32. chisel_test_impact-0.5.0/tests/test_mcp_stdio.py +381 -0
  33. chisel_test_impact-0.5.0/tests/test_metrics.py +66 -0
  34. chisel_test_impact-0.5.0/tests/test_project.py +163 -0
  35. chisel_test_impact-0.5.0/tests/test_rwlock.py +339 -0
  36. chisel_test_impact-0.5.0/tests/test_storage.py +293 -0
  37. chisel_test_impact-0.5.0/tests/test_test_mapper.py +517 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 IronAdamant
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.4
2
+ Name: chisel-test-impact
3
+ Version: 0.5.0
4
+ Summary: Test impact analysis and code intelligence for LLM agents
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/IronAdamant/Chisel
7
+ Project-URL: Repository, https://github.com/IronAdamant/Chisel
8
+ Project-URL: Issues, https://github.com/IronAdamant/Chisel/issues
9
+ Keywords: test-impact-analysis,code-intelligence,mcp,llm,ai-agents,git-analysis,churn,risk-map,test-coverage,code-ownership
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Software Development :: Testing
19
+ Classifier: Topic :: Software Development :: Quality Assurance
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Provides-Extra: mcp
24
+ Requires-Dist: mcp>=1.0.0; extra == "mcp"
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=7.0; extra == "dev"
27
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
28
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ # Chisel
32
+
33
+ Test impact analysis and code intelligence for LLM agents.
34
+
35
+ Chisel maps tests to code, code to git history, and answers: **"what to run, what's risky, who touched it."**
36
+
37
+ ![Chisel analyzing a real project — risk map, churn, ownership, test gaps, and agent interpretation](docs/chisel-demo.png)
38
+
39
+ ## The Problem
40
+
41
+ An LLM agent changes `engine.py:store_document()`. It then either:
42
+ - Runs **all** 287 tests (slow, wasteful), or
43
+ - Guesses with `-k "test_store"` (misses regressions)
44
+
45
+ When multiple agents (or agents + humans) work on the same codebase, changes in one area silently break another. Chisel gives agents the intelligence to understand the blast radius of their changes before they commit.
46
+
47
+ ## Install
48
+
49
+ ```bash
50
+ pip install chisel-test-impact
51
+ ```
52
+
53
+ Or from source:
54
+
55
+ ```bash
56
+ git clone https://github.com/IronAdamant/Chisel.git
57
+ cd Chisel
58
+ pip install -e .
59
+ ```
60
+
61
+ ## Use with Claude Code (MCP)
62
+
63
+ Add to your Claude Code MCP config (`~/.claude/settings.json` or project `.mcp.json`):
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "chisel": {
69
+ "command": "chisel-mcp",
70
+ "env": {
71
+ "CHISEL_PROJECT_DIR": "/path/to/your/project"
72
+ }
73
+ }
74
+ }
75
+ }
76
+ ```
77
+
78
+ Or run the HTTP server for any MCP-compatible client:
79
+
80
+ ```bash
81
+ chisel serve --port 8377
82
+ ```
83
+
84
+ Once connected, Claude Code can use all 15 tools directly — `analyze`, `diff_impact`, `suggest_tests`, `risk_map`, and more. Run `analyze` first to build the project graph, then `diff_impact` before each commit to know exactly which tests to run.
85
+
86
+ ## Use with Cursor / Other MCP Clients
87
+
88
+ Chisel exposes a standard MCP interface. For stdio-based clients:
89
+
90
+ ```bash
91
+ pip install chisel-test-impact[mcp]
92
+ chisel-mcp
93
+ ```
94
+
95
+ For HTTP-based clients, point them at `http://localhost:8377` after running `chisel serve`.
96
+
97
+ ## Quickstart (CLI)
98
+
99
+ ```bash
100
+ # Analyze a project (builds all graphs)
101
+ chisel analyze .
102
+
103
+ # What tests are impacted by my current changes?
104
+ chisel diff-impact
105
+
106
+ # What tests should I run for this file?
107
+ chisel suggest-tests engine.py
108
+
109
+ # Who owns this code?
110
+ chisel ownership engine.py
111
+
112
+ # What files always change together?
113
+ chisel coupling storage.py
114
+
115
+ # Which tests are stale?
116
+ chisel stale-tests
117
+
118
+ # Risk heatmap across the project
119
+ chisel risk-map
120
+
121
+ # Incremental update (only re-process changed files)
122
+ chisel update
123
+
124
+ # Find code with no test coverage, sorted by risk
125
+ chisel test-gaps
126
+ ```
127
+
128
+ ## Try It on This Repo
129
+
130
+ ```bash
131
+ git clone https://github.com/IronAdamant/Chisel.git
132
+ cd Chisel
133
+ pip install -e .
134
+
135
+ chisel analyze .
136
+ chisel risk-map
137
+ chisel diff-impact
138
+ chisel test-gaps
139
+ chisel stats
140
+ ```
141
+
142
+ ## 15 Tools
143
+
144
+ | Tool | What it does |
145
+ |------|-------------|
146
+ | `analyze` | Full project scan — code units, tests, git history, edges |
147
+ | `update` | Incremental re-analysis of changed files only |
148
+ | `impact` | Which tests cover these files/functions? |
149
+ | `diff_impact` | Auto-detect changes from `git diff`, return impacted tests |
150
+ | `suggest_tests` | Rank tests by relevance + historical failure rate |
151
+ | `churn` | How often does this file/function change? |
152
+ | `ownership` | Who wrote this code? (blame-based) |
153
+ | `who_reviews` | Who maintains this code? (commit-activity-based) |
154
+ | `coupling` | What files always change together? |
155
+ | `risk_map` | Risk scores for all files (churn + coupling + coverage gaps) |
156
+ | `stale_tests` | Tests pointing at code that no longer exists |
157
+ | `test_gaps` | Code units with zero test coverage, sorted by risk |
158
+ | `history` | Commit history for a specific file |
159
+ | `record_result` | Record test pass/fail for future prioritization |
160
+ | `stats` | Database summary counts |
161
+
162
+ ## Features
163
+
164
+ - **Zero dependencies** — stdlib only, works everywhere Python 3.9+ runs
165
+ - **Multi-language** — Python, JavaScript/TypeScript, Go, Rust, C#, Java, Kotlin, C/C++, Swift, PHP, Ruby, Dart
166
+ - **Framework detection** — pytest, Jest, Go test, Rust #[test], Playwright, xUnit/NUnit/MSTest, JUnit, XCTest, PHPUnit, RSpec, Minitest, gtest, Dart test
167
+ - **Incremental** — only re-processes changed files via content hashing
168
+ - **MCP servers** — both stdio and HTTP for LLM agent integration
169
+ - **Risk scoring** — weighted formula: churn, coupling, coverage gaps, author concentration, test instability
170
+ - **Branch-aware** — `diff_impact` auto-detects feature branch vs main
171
+
172
+ ## Ecosystem
173
+
174
+ Chisel works standalone or alongside [Stele](https://github.com/IronAdamant/Stele) for multi-agent code coordination. Chisel handles test intelligence; Stele handles document-level context and conflict prevention.
175
+
176
+ ## License
177
+
178
+ MIT
@@ -0,0 +1,148 @@
1
+ # Chisel
2
+
3
+ Test impact analysis and code intelligence for LLM agents.
4
+
5
+ Chisel maps tests to code, code to git history, and answers: **"what to run, what's risky, who touched it."**
6
+
7
+ ![Chisel analyzing a real project — risk map, churn, ownership, test gaps, and agent interpretation](docs/chisel-demo.png)
8
+
9
+ ## The Problem
10
+
11
+ An LLM agent changes `engine.py:store_document()`. It then either:
12
+ - Runs **all** 287 tests (slow, wasteful), or
13
+ - Guesses with `-k "test_store"` (misses regressions)
14
+
15
+ When multiple agents (or agents + humans) work on the same codebase, changes in one area silently break another. Chisel gives agents the intelligence to understand the blast radius of their changes before they commit.
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ pip install chisel-test-impact
21
+ ```
22
+
23
+ Or from source:
24
+
25
+ ```bash
26
+ git clone https://github.com/IronAdamant/Chisel.git
27
+ cd Chisel
28
+ pip install -e .
29
+ ```
30
+
31
+ ## Use with Claude Code (MCP)
32
+
33
+ Add to your Claude Code MCP config (`~/.claude/settings.json` or project `.mcp.json`):
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "chisel": {
39
+ "command": "chisel-mcp",
40
+ "env": {
41
+ "CHISEL_PROJECT_DIR": "/path/to/your/project"
42
+ }
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ Or run the HTTP server for any MCP-compatible client:
49
+
50
+ ```bash
51
+ chisel serve --port 8377
52
+ ```
53
+
54
+ Once connected, Claude Code can use all 15 tools directly — `analyze`, `diff_impact`, `suggest_tests`, `risk_map`, and more. Run `analyze` first to build the project graph, then `diff_impact` before each commit to know exactly which tests to run.
55
+
56
+ ## Use with Cursor / Other MCP Clients
57
+
58
+ Chisel exposes a standard MCP interface. For stdio-based clients:
59
+
60
+ ```bash
61
+ pip install chisel-test-impact[mcp]
62
+ chisel-mcp
63
+ ```
64
+
65
+ For HTTP-based clients, point them at `http://localhost:8377` after running `chisel serve`.
66
+
67
+ ## Quickstart (CLI)
68
+
69
+ ```bash
70
+ # Analyze a project (builds all graphs)
71
+ chisel analyze .
72
+
73
+ # What tests are impacted by my current changes?
74
+ chisel diff-impact
75
+
76
+ # What tests should I run for this file?
77
+ chisel suggest-tests engine.py
78
+
79
+ # Who owns this code?
80
+ chisel ownership engine.py
81
+
82
+ # What files always change together?
83
+ chisel coupling storage.py
84
+
85
+ # Which tests are stale?
86
+ chisel stale-tests
87
+
88
+ # Risk heatmap across the project
89
+ chisel risk-map
90
+
91
+ # Incremental update (only re-process changed files)
92
+ chisel update
93
+
94
+ # Find code with no test coverage, sorted by risk
95
+ chisel test-gaps
96
+ ```
97
+
98
+ ## Try It on This Repo
99
+
100
+ ```bash
101
+ git clone https://github.com/IronAdamant/Chisel.git
102
+ cd Chisel
103
+ pip install -e .
104
+
105
+ chisel analyze .
106
+ chisel risk-map
107
+ chisel diff-impact
108
+ chisel test-gaps
109
+ chisel stats
110
+ ```
111
+
112
+ ## 15 Tools
113
+
114
+ | Tool | What it does |
115
+ |------|-------------|
116
+ | `analyze` | Full project scan — code units, tests, git history, edges |
117
+ | `update` | Incremental re-analysis of changed files only |
118
+ | `impact` | Which tests cover these files/functions? |
119
+ | `diff_impact` | Auto-detect changes from `git diff`, return impacted tests |
120
+ | `suggest_tests` | Rank tests by relevance + historical failure rate |
121
+ | `churn` | How often does this file/function change? |
122
+ | `ownership` | Who wrote this code? (blame-based) |
123
+ | `who_reviews` | Who maintains this code? (commit-activity-based) |
124
+ | `coupling` | What files always change together? |
125
+ | `risk_map` | Risk scores for all files (churn + coupling + coverage gaps) |
126
+ | `stale_tests` | Tests pointing at code that no longer exists |
127
+ | `test_gaps` | Code units with zero test coverage, sorted by risk |
128
+ | `history` | Commit history for a specific file |
129
+ | `record_result` | Record test pass/fail for future prioritization |
130
+ | `stats` | Database summary counts |
131
+
132
+ ## Features
133
+
134
+ - **Zero dependencies** — stdlib only, works everywhere Python 3.9+ runs
135
+ - **Multi-language** — Python, JavaScript/TypeScript, Go, Rust, C#, Java, Kotlin, C/C++, Swift, PHP, Ruby, Dart
136
+ - **Framework detection** — pytest, Jest, Go test, Rust #[test], Playwright, xUnit/NUnit/MSTest, JUnit, XCTest, PHPUnit, RSpec, Minitest, gtest, Dart test
137
+ - **Incremental** — only re-processes changed files via content hashing
138
+ - **MCP servers** — both stdio and HTTP for LLM agent integration
139
+ - **Risk scoring** — weighted formula: churn, coupling, coverage gaps, author concentration, test instability
140
+ - **Branch-aware** — `diff_impact` auto-detects feature branch vs main
141
+
142
+ ## Ecosystem
143
+
144
+ Chisel works standalone or alongside [Stele](https://github.com/IronAdamant/Stele) for multi-agent code coordination. Chisel handles test intelligence; Stele handles document-level context and conflict prevention.
145
+
146
+ ## License
147
+
148
+ MIT
@@ -0,0 +1 @@
1
+ __version__ = "0.5.0"