Live data from Hacker News

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

github.com

361–370 of 410 posts

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

#361

Earlier quoted context omitted.

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…

Similarly, git logs of existing human code seem to be a good source of info that llms don't look at unless explicitly prompted to do so.

Right now, it might not be worth the cost. That might change in future so that they consider it by default?

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

#362

The way I write code with AI is that I start with a project.md file, where I describe what I want done. I then ask it to make a plan.md file from that project.md to describe the changes it will make (or what it will create if Greenfield). I then iterate on that plan.md with the AI until it's what I want. I then ask it to make a detailed todo list from the plan.md and attach it to the end of plan.md. Once I'm fully sa…

How do you use your agent effectively for executing such projects in bigger brownfield codebases? It's always a balance between the agent going way too far into NIH vs burning loads and loads of tokens for the initial introspection.

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

#363
What would be most useful is some kind of context representation that could be upgraded as better models get developed. If you put it in the commit then you need to compare contexts when comparing code across time. But if you make the context include the changes in the code over time, then the future context will be better at debugging a bug in code written years earlier. The years-old context is likely going to be obsolete by that time anyway.

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

#364
post #340

Earlier quoted context omitted.

Yes, when I first saw this, its exactly what I thought of.

No mention of Agent Trace [0] yet. Interestingly, Entire are not supporting Agent Trace [1] 0. https://agent-trace.dev/ 1. https://github.com/entireio/cli/issues/386

Their response seems reasonable.

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

#365

The way I write code with AI is that I start with a project.md file, where I describe what I want done. I then ask it to make a plan.md file from that project.md to describe the changes it will make (or what it will create if Greenfield). I then iterate on that plan.md with the AI until it's what I want. I then ask it to make a detailed todo list from the plan.md and attach it to the end of plan.md. Once I'm fully sa…

By that time you would’ve written the code yourself, only better.

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

#366
This seems like a very good idea, not just because of the desire to do human archaeology at times, but also to let further agentic exploration occur. It would be best if it became a separate section of the commit that could just be blank or contain other documentation in the case of human authorship. The commit message shouldn't get longer and longer. It should continue to tell the concise story that humans and LLMs alike consume quickly to gain some initial synthesis.

So I like the link's approach quite a bit.

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

#367
Vibecoded code is not C, python, ts, je or whatever.

It need to be considered as a compiled output of vbc-c, vbc-python, or vbc-ts, or vbc-js.

Keeping the source code (the prompt) is very natural, when compiled binaries “vibecoded” output is lacking _context_ and _motivation_ (which the source code / prompt provides)

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

#368

The way I write code with AI is that I start with a project.md file, where I describe what I want done. I then ask it to make a plan.md file from that project.md to describe the changes it will make (or what it will create if Greenfield). I then iterate on that plan.md with the AI until it's what I want. I then ask it to make a detailed todo list from the plan.md and attach it to the end of plan.md. Once I'm fully sa…

Here’s how I do the same thing, just with a slightly different wrapper: I’m running my own stepwise runtime where agents are plugged into defined slots. I’ll usually work out the big decisions in a chat pane (sometimes a couple panes) until I’ve got a solid foundation: general guidelines, contracts, schemas, and a deterministic spec that’s clear enough to execute without interpretation. From there, the runtime runs a…

What store do you use for your run records? A separate git repo? or do you have some SQL lite db holding the records.

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

#369

The way I write code with AI is that I start with a project.md file, where I describe what I want done. I then ask it to make a plan.md file from that project.md to describe the changes it will make (or what it will create if Greenfield). I then iterate on that plan.md with the AI until it's what I want. I then ask it to make a detailed todo list from the plan.md and attach it to the end of plan.md. Once I'm fully sa…

By that time you would’ve written the code yourself, only better.

I am sure this is partly tongue in cheek, but no, you can’t have written the code yourself in that amount of time. Would the code be better if you wrote it? Probably, depending on your coding skills.

But it would not be faster.

OP is talking about creating an entire project, from scratch, and having it feature complete at the end.

Post reply on HN