benchmine is designed to address the lack of a personal baseline in coding model evaluation: public leaderboards test other people's tasks, and scores may not apply to one's own codebase. It mines benchmark tasks from the repository's own git history, letting developers evaluate coding agents using their own project's code, conventions, and dependencies.
Purpose and task generation Every historical change that touches both code and tests becomes a task: the parent commit is the starting code tree, the commit or PR message is the prompt, and the tests included in the change are the hidden grader. Merge commits use the PR title plus the branch commit messages; adding --gh instead uses the PR title and body from GitHub.
Task validation and anti-cheating Commits are discarded if the tests already passed before the change or still fail after the change; documentation-only, test-only, version-number changes, and excessively large changes are skipped (-v shows the reasons). The agent receives an exported new repository with a single commit, so git log cannot leak the answer; hidden test files are written back only before grading, so an agent gains nothing by modifying or deleting tests, and such behavior is counted in edited tests.
Built-in validation agents oracle applies the real change and must score 100%; noop makes no changes and must score 0%. If either fails to meet this, it indicates that the test command or task set needs adjustment.
Statistics and regression detection compare reports paired differences, bootstrap intervals, and a one-sided exact sign test (using McNemar's exact test when each task is run only once), and declares a REGRESSION only when below --alpha (default 0.05). At least 5 tasks changing in the same direction are required for significance to be possible, and the tool explicitly points this out.
Usage Install: pipx install git+https://github.com/hamarshehmhmd/benchmine or uv tool install git+https://github.com/hamarshehmhmd/benchmine;无依赖,需 Python 3.9+ and git, with support for Linux and macOS. init / mine automatically guesses the test command, such as python -m pytest -q {tests}, go test {test_pkgs}, npx vitest run {tests}, npx jest {tests}, npm test, node --test {tests}, cargo test, bundle exec rspec {tests}, mvn test, ./gradlew test, make test, and can be overridden with --test-cmd. Placeholders include {tests}, {test_dirs}, {test_pkgs}. If the code tree needs dependencies, you can set setup_cmd (such as npm ci, pip install -e .), which will be executed in each new code tree before the agent runs. You can use benchmine run --agent codex --dry-run to view the prompt, agent command, and test command for the first task. Presets follow the headless mode in each tool's documentation, but CLI arguments may change, so it is recommended to use benchmine agents and --dry-run to check against the installed version.
Data and sharing Everything is local files under .benchmine/ (tasks.json, runs/<run-id>.json, and the agent patch and logs for each attempt). You can commit tasks.json and config.json to share the task set with your team; runs are ignored by git by default.
Use cases and limitations Suitable for teams that want to continuously evaluate coding agents with their own codebase and detect regressions after model updates. Limitations include: it is not a security sandbox, the agent runs as the current user in a temporary directory, and if you do not trust the agent you should put it in a container or virtual machine; prompt quality depends on commit and PR messages, and overly short messages will be skipped; tasks whose tests require network, services, or secrets will fail validation and be discarded or require setup_cmd; hidden tests only check the behavior tested by the original author, and the agent may pass or fail with a different design; the history of public repositories may already be in model training data, so it is recommended to use --since to select recent commits or use a private repository; Windows is untested.
License GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later), and the author Mohammad Hamarsheh (@hamarshehmhmd) can provide a commercial license without AGPL obligations.