HeadlinesBriefing favicon HeadlinesBriefing.com

Grepathy: Agent Decision Logging for Git Repos

Hacker News •
×

Grepathy solves a critical gap in AI-assisted development: when coding agents make autonomous decisions, the reasoning vanishes when Claude Code deletes transcripts after 30 days. The tool runs locally via git hooks, distilling session transcripts into markdown files committed alongside code in `.ai/why/<branch>.md`. Each entry captures agent-initiated choices — like pre-creating guest users in Clerk without explicit approval — with status, touched files, inferred rationale, and risk flags. Reviewers and future agents can grep these entries to understand why code exists.

The system never sends data off-machine. Summaries strip secrets, financial details, and user messages, passing deterministic privacy checks before you review and push. A CLAUDE.md pointer and pre-edit hook automatically surface relevant history to agents before they modify tracked files, so reasoning meets code changes in real time.

A blind, pre-registered evaluation published in REPORT.md showed agents with Grepathy answered "why" questions correctly, while baselines hallucinated plausible wrong answers. The tool doesn't prevent refactoring errors or boost general intelligence — it only preserves reasoning that exists nowhere else.

Commands include `grepathy init` (installs hooks, backfills old sessions), `grepathy context <path>` (shows relevant entries), and `grepathy sync` (distills and commits). Currently Claude Code-only for writing; a Codex adapter is planned. Zero runtime dependencies, MIT licensed.