2026-11-26 15:47 UTC

Git hook records self-reported AI model details on commits

state: watchingheat: lowuncertainty: highrelevance: mediumcoding-agent-provenance model-identificationSenthil Kumaran

What is this?

Senthil Kumaran’s open-source GitHub project, “Model Identification hook for Git Commits,” adds a Git hook that rejects AI-authored commits unless their message includes a model and related details such as harness, effort, and confidence. After a commit, it copies that self-identification into Git notes, where a review tool can list status and attach reviewer comments. The project says it works with agents that run `git commit`; humans can bypass the check, and merges and reverts are exempt. Its README explicitly warns that the identification is self-reported and can be false. The supplied evidence is the project’s own README and its Show HN post; it does not establish adoption or independent validation.

Why it matters

A small but practical experiment in making AI-assisted software development more legible: teams could see which model and harness reportedly produced a commit, then organize review around that record. If adopted, this could support comparisons of tools and clearer review practices. It is not reliable proof of authorship, because the model identity and confidence are self-reported and Git notes require explicit pushing; the project does not establish broader uptake.

Current assessment

Senthil Kumaran’s open-source Git hook enforces a commit-message trailer with self-reported AI model and related details, then copies it into Git notes for a review workflow. The project says it works with agents that run git commit; humans can bypass the check, merges and reverts are exempt, and notes are not pushed by default. This records claims rather than verifying provenance, and the supplied evidence establishes neither adoption nor improved review or evaluation. A separate Show HN item titled “Git blame for AI code, down to the agent session” suggests adjacent interest, but its evidence here is only a title with no description or link, so its relationship and implementation remain unknown.

Measured heat

now 0 pts/hpeak 8 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 194h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-18 13:00⭐ origin echo-reconstructedThe repository README presents this as original work: “This repository provides a git hook that enforces a commit message format and a revie
Senthil Kumaran (@orsenthil) on github (echo) · attributed from hn.story.50556343
—
11-19 05:18first on hacker news · published · +16.3hShow HN: Git Hook for Model Identifation
orsenthil
—
11-19 05:18amplified on hacker newshn.story.50556343
orsenthil
peak 2 · 0 comments · 41% of case engagement
11-21 22:51amplified on hacker news 👑hn.story.50594433
keepplain
peak 3 · 0 comments · 59% of case engagement
11-19 05:21our radar first saw it · +16.4hdiscovery anchor: hn.story.50556343—
pace: p29 vs 2096 stories at the 168h mark (now 194h old) — ahead of adap-delegated-authority-protocol-draft (2.0x), behind abmaze-protein-fitness-agent-benchmark (0.7x)

Evidence (3) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: Git Hook for Model Identifation
Retrieved article excerpt

Open article · Retrieved 2026-11-19T05:23:03.469458+00:00

# Model Identification hook for Git Commits

It is desirable to have model and model properties identification in git
commits authored by AI models. This repository provides a git hook that
enforces a commit message format and a review workflow.

Every AI-authored commit carries a one-line self-identification, so a stronger
model can review it later and know who wrote it and how sure they were.

A git hook can't instruct a model directly, so `commit-msg` **rejects the
commit with instructions**. The agent reads the error, adds the trailers, and
retries. It works with any agent that runs `git commit`.

## What a commit looks like

```
Add retry backoff to fetch

Model: claude-sonnet-5-5 harness=claude-code effort=high conf=medium
```

Full format and rules: [SPEC.md](https://github.com/orsenthil/git-hook-model-identification/blob/main/SPEC.md).

## Install

```
cd your-repo && /path/to/install.sh     # this repo only (core.hooksPath -> this project's hooks/)
/path/to/install.sh --global            # all repos (copies hooks to ~/.config/git/hooks)
```

Global install copies the hooks, so re-run it after updating them. It also
overrides any per-repo `.git/hooks`.

## Use

- Agents: commit normally; if rejected, follow the printed instructions.
- Humans: `GIT_HUMAN_COMMIT=1 git commit ...` skips the check. Merges, reverts are exempt automatically

## Review workflow

`post-commit` copies the `Model` trailer into `git notes --ref=model-id` with `Review-Status: pending`.

```
bin/model-review list [range]            # self-ID + status per commit
bin/model-review comment <sha> "<text>"  # reviewer comment -> refs/notes/model-review; marks reviewed
git push origin refs/notes/model-id refs/notes/model-review   # notes are not pushed by default
```

The trailer in the commit message is the source of truth; notes are an index
and can be lost on amend/rebase.

## Limits

The identification is self-reported: a model can misstate its own ID or
confidence if it is instructed to do so.

## License

Apache License 2.0 - see [LICENSE](https://github.com/orsenthil/git-hook-model-identification/blob/main/LICENSE) for details. Copyright 2026 Senthil Kumaran.
orsenthil20
🟧 echo.github ⭐The repository README presents this as original work: “This repository provides a git hook that enforces a commit message format and a revieSenthil Kumaran (@orsenthil)——
🟧 hnShow HN: Git blame for AI code, down to the agent sessionkeepplain30

Interpretation history

Decision trace