Live data from Hacker News

If AI writes code, should the session be part of the commit?

github.com

261–270 of 410 posts

Re: If AI writes code, should the session be part of the commit?

#261
post #9
post #6

Maybe Git isn't the right tool to track the sessions. Some kind of new Semi-Human Intelligence Tracking tool. It will need a clever and shorter name though.

I don't think git is the right tool for much of modern software, where things like blobs aren't even properly supported.

Is there anything better?

Re: If AI writes code, should the session be part of the commit?

#263
post #199

Earlier quoted context omitted.

I agree that probably not everything should be stored - it’s too noisy. But the reason the session is so interesting is precisely the later part of the conversation - all the corrections in the details, where the actual , more precise requirements crystallize.

AKA the code. You're all talking about the code.

Not at all, unless it contains very thorough reasoning comments (which arguably it should). The code is only an artifact, a lot of which is incidental and flexible. The prompts contain the actual constraints.

Re: If AI writes code, should the session be part of the commit?

#264
I understand the idea but the way I work, a commit isn't "a" session, it's potentially tens of sessions with branching in each session.

I honestly don't know if I'm doing something very wrong or if I have a very different working style than many people, but for me "just give the prompt/session" isn't a possibility because there isn't one.

I'm probably incredibly inefficient, because even when I don't use AI it is the same, a single commit is usually many different working states / ideas / branches of things I tried and explored that have been amended / squashed.

Re: If AI writes code, should the session be part of the commit?

#265
post #94

IMO: This might be a contrarian opinion, but I don't think so. Its much the same problem as asking, for example, if every single line you write, or every function, becomes a commit. The answer to this granularity is, much like anything, you have to think of the audience: Who is served by persisting these sessions? I would suspect that there is little reason why future engineers, or future LLMs, would need access to t…

While it's noisy and complicated for humans to read through, this session info is primarily for future AI to read and use as additional input for their tasks. We could have LLMs ingest all these historical sessions, and use them as context for the current session. Basically treat the current session as an extension of a much, much longer previous session. Plus, future models might be able to "understand" the limitati…

> While it's noisy and complicated for humans to read through, this session info is primarily for future AI to read and use as additional input for their tasks.

Context rot is very much a thing. May still be for future agents. Dumping tens/hundreds of thousand of trash tokens into context very much worsen the performance of the agent

Re: If AI writes code, should the session be part of the commit?

#266

Earlier quoted context omitted.

I agree that probably not everything should be stored - it’s too noisy. But the reason the session is so interesting is precisely the later part of the conversation - all the corrections in the details, where the actual , more precise requirements crystallize.

Then just summarize the final requirements

That’s what I do! I think it works well and helps future agents a lot in understanding why the codebase is the way it is. I do have to oversee the commit messages, but it does avoid a lot of noise and maybe it’s a normal part of HITL development.

Re: If AI writes code, should the session be part of the commit?

#267

Earlier quoted context omitted.

> Obviously yes I don't think this is obvious at all. We don't make the keystroke logs part of the commit history. We don't make the menu item selections part of the commit history. We don't make the 20 iterations you do while trying to debug an issue part of the commit history (well, maybe some people do but most people I know re-write the same file multiple times before committing, or rebase/squash intermediate com…

> well, maybe some people do but most people I know re-write the same file multiple times before committing, or rebase/squash intermediate commits into more useful logical commits Right, agreed on this, we want a distillation, not documentation of every step. > For example, having some documentation for the intent behind a given series of commits and any assumptions made can be quite valuable in the future, but every…

> Also, as I said, information about the prompts quickly reveals competence / incompetence, and is crucial for management / business in hiring, promotions, managing token budgets, etc.

I fail to see why you would need that kind of information to find out if someone is not competent. This really sounds like an attempt at crazy micro-management.

The "distillation" that you want already exists in various forms: the commit message, the merge request description/comments, the code itself, etc.

Those can (and should) easily be reviewed.

Did you previously monitor which kind of web searches developpers where doing when working on a feature/bugfix? Or asked them to document all the thoughts that they had while doing so?

Re: If AI writes code, should the session be part of the commit?

#268
post #94

IMO: This might be a contrarian opinion, but I don't think so. Its much the same problem as asking, for example, if every single line you write, or every function, becomes a commit. The answer to this granularity is, much like anything, you have to think of the audience: Who is served by persisting these sessions? I would suspect that there is little reason why future engineers, or future LLMs, would need access to t…

This is a central problem that weve already seen proliferate wildly in Scientific research , and currently if the same is allowed to be embedded in foundational code. The future outlook would be grim. Replication crisis[1]. Given initial conditions and even accounting for 'noise' would a LLm arrive at the same output.It should , for the same reason math problems require one to show their working. Scientific papers re…

> for the same reason math problems require one to show their working.

We don't put our transitional proofs in papers, only the final best one we have. So that analogy doesn't work.

For every proof in a paper there is probably 100 non-working / ugly sketches or just snippets of proofs that exist somewhere in a notebook or erased on a blackboard.

Re: If AI writes code, should the session be part of the commit?

#270

People keep talking about how LLMs are like a compiler from human language to code. We commit source code instead of just compiled machine code, so why should this be any different? The "source code" is the prompts

The prompt isn't very useful. You'd see the exact same prompt on every ticket for me.

Prompt 1: "Research domain, think deeply, and record a full analysis in /docs/TICKET-123-NOTES.md"

Prompt 2: Based on our research, read TICKET-123 and began formulating solutions. Let's think this problem through and come up with multiple potential solutions. Document our solutions in TICKET-123-SOLUTIONS.md

Prompt 3: Based on Solution X, let's formulate a complete plan to implement. Break the work into medium sized tasks that a human could complete in 5-10 hours. Write our plan in TICKET-123-PLAN.md

I've often thought that some of this metadata, such as the research, solutioning and plan could be shared. I think they're valuable for code review. I've also translated these artifacts into other developer documentation paradigms.

But the prompts? You're not getting a lot of value there.

Post reply on HN