Attribution without a feedback loop is just trivia. Plenty of tools will tell you "62% of this repo is AI-written." ai-codekeep exists to tell you which 62% is actually costing you rework — and to let an agent (Claude Code, or anything else with a skills/instructions mechanism) manage that tracking itself, at a verbosity level you choose.
Most attribution tracking stops at "who wrote this line." ai-codekeep goes a step further and asks whether that line held up:
- Outcome-aware, not just attribution-aware — links AI authorship to
the fixes, reverts, and incidents it caused downstream, and reports a
risk-sorted hotspot list (
ai_share × churn × fix_rate), not a raw percentage. - Zero install — a skill plus a plain Node CLI. No git extension, background daemon, or binary to set up.
- Quiet by default — commit trailers stay capped at two lines, and
inline code comments are opt-in only, at
verbose+ — nothing scattered through your source by default. - Reasons, not just numbers — every commit either captures a change reason or explicitly asks for one, depending on mode.
If you already run git-ai or whogitit, ai-codekeep layers on top of them — see docs/DATA-MODEL.md. If you don't, it works standalone via commit trailers.
git clone https://github.com/<you>/ai-codekeep.git
cd ai-codekeep
./install.sh # installs into ./.claude of whatever project you run it from
# add --global for ~/.claude, --hook to also add a post-commit hookThen, from inside the repo you want tracked:
node .claude/ai-codekeep/bin/ledger.mjs mode standardA repo with no .ai-codekeep/config.json is treated as off — nothing
happens until you turn it on.
off → minimal → standard → verbose → audit — each level only adds detail,
never changes the meaning of a field. Full table in
docs/MODES.md.
Per-file AI share, confidence, fix count, revert count, and a risk score
(ai_share × churn × fix_rate) meant to surface files that are both
AI-heavy and demonstrably expensive — not just AI-heavy. Full definitions in
docs/METRICS.md.
ai-codekeep is a file-level code-quality signal, not an individual
productivity or performance-evaluation system. The tool never aggregates by
person — history[].author is always "ai" or "human", never a real
name — and none of its metrics were validated as a measure of any one
engineer's output.
One honest caveat: that's a policy choice, not a technical guarantee.
Trailers live in commits and commits carry author names, so anyone with
git log could derive per-person numbers themselves — no tool can prevent
that. What we can do is refuse to make it easy: per the
SPACE framework's warning
against Activity-style metrics doubling as performance signals, ai-codekeep
will never ship a per-engineer view, and if your team needs that boundary
enforced, it needs a team agreement — not a tool feature.
node bin/ledger.mjs status
node bin/ledger.mjs mode <off|minimal|standard|verbose|audit>
node bin/ledger.mjs ask-for-message <on|off>
node bin/ledger.mjs update [--range A..B | --commit SHA | --rebuild]
node bin/ledger.mjs report [--json] [--top N]
ask-for-message (default off) makes the agent ask you for the commit
subject/body and use it verbatim instead of drafting one itself — the
trailer still gets appended either way. See
SKILL.md.
Once installed, the skill (skills/ai-codekeep/SKILL.md) triggers
automatically around commits and merges in a tracked repo, and four slash
commands are available: /ai-track, /ai-track-report, /ai-track-mode,
/ai-track-message.
Early — the risk-score constants in particular are a documented starting heuristic (see docs/METRICS.md), not something validated against real project data yet. Issues and PRs with real-world tuning data are the most useful contribution right now.
MIT