Standalone CLI that scans a git repository and produces actionable, privacy-safe “what to look at next” archaeology artifacts (high-churn files, temporal coupling pairs, stale/abandoned structures).
Use this tool when you want fast, bounded git-history intelligence for a repo (especially to find risky co-change patterns and high-leverage cleanup targets).
recon-workbench= evidence orchestration platformcode-archaeology-kit= focused git-history intelligence product
python -m pip install -e .cak scan \
--repo /path/to/repo \
--since-days 365 \
--format both \
--top-actions 3 \
--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 \
--share-snippet \
--output-dir ./artifactsarchaeology.jsonarchaeology_report.md- (optional)
archaeology_share.md(when--share-snippetis set) — paste into Slack/PR comments (respects--include-repo-path) - (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}for temporal coupling on commits that touch more than--max-files-per-commitfiles (default:cap).
- deterministic ordering
- explicit overwrite gate (
--force) - PII gate (
--include-authorsrequires--ack-pii) - bounded analysis (
--max-commits,--max-files-per-commit,--timeout-seconds) - noise filtering (
--ignore-glob+ default ignore rules) - path classes (
product|test|infra|docs|generated|unknown) - coupling classes (
expected|risky|suspicious) - confidence explainers and top high-leverage action list
After a successful run you should see:
artifacts/archaeology.jsonartifacts/archaeology_report.md- (optional)
artifacts/archaeology_share.md(if--share-snippet)
error: 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-piior omit--include-authors.error: git not found: installgitand 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