Back to Home
I shipped the wrong abstraction, then deleted it

I shipped the wrong abstraction, then deleted it

B
Blizine Admin
·2 min read·0 views

Mike Lane Posted on May 31 I shipped the wrong abstraction, then deleted it # ai # rust # llm # devtools git-prism's first git-interception mechanism was a Claude Code hook. It worked, until I watched an agent run make review : the Makefile shelled out to git diff , and the hook never fired. The interception I'd shipped was invisible to one of the cases it most needed to catch. v0.9.0 fixes that. The hook is gone, replaced by a PATH shim that intercepts git at the process layer. This is the story of why a hook can't win here, what a spike proved, and what gave me the confidence to delete working, shipped code. What git-prism is, in one paragraph git-prism is an MCP server that gives AI coding agents structured git data instead of human-oriented porcelain. When an agent reads a unified diff, it pays tokens for @@ hunk headers, + / - line prefixes, and whitespace context that carry no semantic meaning. Then it has to reconstruct what actually changed (which functions, which imports, whether the file is generated) from raw text. git-prism hands it that structure directly. Five MCP tools cover it: get_change_manifest (what changed), get_file_snapshots (before/after content), get_commit_history (per-commit manifests), get_function_context (callers, callees, test references), and review_change (manifest plus context in one call, built to replace git diff <ref>..<ref> ). Here is that difference on a real change in git-prism's own history: the fix that taught the shim to return exit code 126 (found but not executable) instead of 127 (not found). The porcelain an agent gets from git diff : @@ -67,8 +67,8 @@ impl<E: EnvSource> RealGitExec for StdRealGitExec<'_, E> { - eprintln!("git-prism shim: failed: {err}"); - ExitCode::from(127) + eprintln!("git-prism shim: {} failed: {err}", real.display()); + ExitCode::from(exec_failure_exit_code(&err)) } @@ -90,6 +90,17 @@ impl<E: EnvSource> RealGitExec for StdRealGitExec<'_, E> { +/// Map an io

📰Dev.to — dev.to

Comments