Intent-Based Commits
11 points
1 hour ago
| 4 comments
| github.com
| HN
laksjhdlka
30 minutes ago
[-]
It is not clear to me that keeping prompts/conversations at something like this level of granularity is a _bad_ idea, nor that it's a good one. My initial response is that, while it seems cute, I can't really imagine myself reading it in most cases. Perhaps though you'd end up using it exactly when you're struggling to understand some code, the blame is unclear, the commit message is garbage, and no one remembers which ticket spawned it.
reply
fc417fc802
6 minutes ago
[-]
You could also feed it back to the next AI agent.
reply
sheept
19 minutes ago
[-]
In my CLAUDE.md, I have Claude include all new prompts verbatim in the commit message body.

While I haven't used Claude long enough to need my prompts, I would appreciate seeing my coworkers' prompts when I review their LLM-generated code or proposals. Sometimes it's hard to tell if something was intentional that the author can stand behind, or fluff hallucinated by the LLM. It's a bit annoying to ask why something suspicious was written the way it is, and then they go ahead and wordlessly change it as if it's their first time seeing the code too.

reply
scottlamb
18 minutes ago
[-]
Huh? Either I don't get it, or they don't get it, or both. I'm so puzzled it's probably both.

> Every ghost commit answers: what did I want to happen here? Not what bytes changed.

Aren't they just describing what commit messages are supposed to be? Their first `git log --online` output looks normal to me. You don't put the bytes changed in the commit message; git can calculate that from any two states of the tree. You summarize what you're trying to do and why. If you run `git log -p` or `git show`, then yeah you see the bytes changed, in addition to the commit message. Why would you put the commit messages in some separate git repo or storage system?

> Ghost snapshots the working tree before and after Claude runs, diffs the two, and stages only what changed. Unrelated files are never touched.

That's...just what git does? It's not even possible to stage a file that hasn't changed.

> Every commit is reproducible. The prompt is preserved exactly. You can re-run any commit against a fresh checkout to see what Claude generates from the same instruction.

This is not what I mean by reproducible. I can re-run any commit against a fresh checkout but Claude will do something different than what it did when they ran it before.

reply
sarathnarendra
1 hour ago
[-]
I find this pretty interesting and useful too. Still pretty fresh on it. I'm definitely gonna give it more time to try and play around.
reply