This is a standalone CLI tool. It scans a git repository to produce actionable archaeology artifacts. These artifacts are privacy-safe. They tell you what to look at next. Artifacts include high-churn files, temporal coupling pairs, and abandoned structures.
Use this tool when you want fast, bounded git-history intelligence for a repo. It helps find risky co-change patterns and high-leverage cleanup targets.
recon-workbench= evidence orchestration platform.code-archaeology-kit= focused git-history intelligence product.
python -m pip install -e .python -m venv .venv
.venv/bin/python -m pip install -e ".[dev]"cak scan \
--repo /path/to/repo \
--since-days 365 \
--format both \
--top-actions 3 \
--adaptive-mode shadow \
--share-snippet \
--output-dir ./artifacts# Run-from-source (no install needed):
PYTHONPATH=src python -m code_archaeology scan \
--repo /path/to/repo \
--since-days 365 \
--format both \
--top-actions 3 \
--adaptive-mode shadow \
--share-snippet \
--output-dir ./artifactsarchaeology.json.archaeology_report.md.- (optional)
archaeology_share.md(when--share-snippetis set) — paste into Slack/PR comments. - (optional)
archaeology_events.jsonl(when--share-snippetis set) — local JSONL event log.
--include-repo-path(opt-in) include full repo path insummary.repo_path(default: basename only).--include-commit-messages(opt-in) include sanitized commit messages in outputs (default: redacted).--include-authors(opt-in) requires--ack-pii.
- Event:
share_snippet_generated(appends one line toarchaeology_events.jsonlper run)
--large-commit-strategy {cap,skip}configures temporal coupling for large commits. Use it for commits that touch more than--max-files-per-commitfiles. Default iscap.--adaptive-mode {disabled,shadow,adaptive}controls adaptive top-action ranking against a baseline artifact.disabled(default): raw top actions.shadow: computes adaptive order inactionability.shadow_top_actionswhile leavingtop_actionsunchanged.adaptive: applies adaptive reranking totop_actions.
--adaptive-baseline-artifact /path/to/archaeology.jsonsets explicit baseline source. By default, adaptive modes use<output-dir>/archaeology.json.
- Deterministic ordering of rules.
- Explicit overwrite gate via force.
- Privacy gate keeps data out.
- Bounded analysis limits max commits.
- Noise filtering ignores glob matches.
- Path classes tag folders precisely.
- Coupling classes show risk securely.
- Confidence explainers boost trust metrics.
After a successful run you should see:
artifacts/archaeology.json.artifacts/archaeology_report.md.- (optional)
artifacts/archaeology_share.md.
npm test
npm run test:deep
npm run docs:linterror: Not a git repo: ...: pass a path that contains a.git/directory.Refusing overwrite: ... (use --force): add--forcewhen re-running into the same--output-dir.error: --include-authors requires --ack-pii: add--ack-piito opt into metadata checks.error: git not found: installgitlocally and ensure it is on yourPATH.
See docs/competition-matrix.md.
- Contributing guide:
CONTRIBUTING.md. - Security policy:
SECURITY.md. - Code of conduct:
CODE_OF_CONDUCT.md.
- Maintainer: @jscraik.
- Last updated: 2026-02-15.
- License: Apache-2.0.