Live data from Hacker News

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

github.com

391–400 of 410 posts

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

#391

Earlier quoted context omitted.

What is a junior? I don't see it in claude.

It's how a middle manager can improve its standing, so the Junior will be a thing in bigger orgs for quite a while.

Both the manager and junior are a cost center for the company tbh if there are fewer employees to manage. Already seeing it here on this side of the pond: https://www.reddit.com/r/developersIndia/comments/1rinv3z/ju...

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

#392
post #45
post #19

If the model in use is managed by a 3rd party, can be updated at will, and also gives different output each time it is interacted with, what is the main benefit? If I chat with an agent and give an initial prompt, and it gets "aspect A" (some arbitrary aspect of the expected code) wrong, I'll iterate to get "aspect A" corrected. Other aspects of the output may have exactly matched my (potentially unstated) expectatio…

reproducibility isn't really the goal imo. more like a decision audit trail -- same reason code comments have value even though you can't regenerate the code from them. six months later when you're debugging you want to know 'why did we choose this approach' not 'replay the exact conversation.'

[dead]

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

#393

Earlier quoted context omitted.

> it's foolish to fight the future And yet, the premise of the question assumes that it's possible in this case. Historically having produced a piece of software to accomplish some non-trivial task implied weeks, months, or more of developing expertise and painstakingly converting that expertise into a formulation of the problem precise enough to run on a computer. One could reasonably assume that any reasonable-look…

>a plan detailed enough to reliably one-shot an implementation across several models. What. Why should this be an output? Why if I make a project should I be responsible for also making this, an entirely different and much more difficult and potentially impossible project? If I come and show you a project that require required thousands of sessions to make I also have to show you how to one shot it in multiple models…

To be clear: I don't think it will happen.

But the point of comparison is something like the HTML specification. That's supposed to be a document that is detailed enough about how to create an implementation that multiple different groups can produce compatible implementations without having any actual code in common.

In practice it still doesn't quite work: the specification has to be supplemented with testsuites that all implementations use, and even then there often needs to be a feedback loop where new implementations find new ambiguities or errors, and the specification needs to be updated. Plus implementors often "cheat" and examine each other's behaviour or even code, rather than just using the specification.

Nevertheless it's perhaps the closest thing I'm familiar with to an existing practice where the plan is considered canonical, and therefore worth thinking about as a model for what "code as implementation detail" would entail in other situations.

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

#394
If you want an answer to the OP question, just ask AI to analyze the session jsonl files in your user directory and give you statistics of what's in there.

You'll find that at least half of it is noise.

If you put that in commits, you lose the ability to add "study git commits to ground yourself" in your agents.md or prompts. Because now you'll have 50%+ noise in your active session's context window.

Context window is precious. Guard it however you can.

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

#395

Earlier quoted context omitted.

It's how a middle manager can improve its standing, so the Junior will be a thing in bigger orgs for quite a while.

Both the manager and junior are a cost center for the company tbh if there are fewer employees to manage. Already seeing it here on this side of the pond: https://www.reddit.com/r/developersIndia/comments/1rinv3z/ju...

Companies (C-suites) do not actually want for their worker pool (humans + agents) to stay constant in time, there is no reason for it to stay constant in time. C-suites have very different worries.

And "cost center" is a lie from Outsourcing Era, forget about it.

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

#396
If a commit's job is to capture state at a particular point in time, so that it can be reproduced and understood, then it _also_ needs to include the exact model used. This is only useful if you can ensure access to the previous versions of the model -- which is not something that providers are willing to do (in fact, they regularly "retire" old models). The only transparent way forward is to open source the models, along with their weights, and their training set (to verify that the weights match, and to retrain the model when new architectures and new hardware are released).

Not insisting upon this, would be similar to depending on a SaaS to compile and packages software, and being totally cool with it. Both LLMs and build systems, convert human-friendly notation into machine-friendly notation. We should hold the LLM companies to the same standards of transparency that we hold the people who make things like nix, clang, llvm, cmake, cargo, etc.

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

#397

Earlier quoted context omitted.

>a plan detailed enough to reliably one-shot an implementation across several models. What. Why should this be an output? Why if I make a project should I be responsible for also making this, an entirely different and much more difficult and potentially impossible project? If I come and show you a project that require required thousands of sessions to make I also have to show you how to one shot it in multiple models…

To be clear: I don't think it will happen. But the point of comparison is something like the HTML specification. That's supposed to be a document that is detailed enough about how to create an implementation that multiple different groups can produce compatible implementations without having any actual code in common. In practice it still doesn't quite work: the specification has to be supplemented with testsuites th…

I think the looping part is what stops this from being a practical solution. If we imagine that the actual code required some iteration in order to put down, I don’t know that we could say there is a one shot equivalent without testing that. Sometimes there may not even be an equivalent.

It’s possible that the solution to code being implementation detail is to be less precious about it and not more. I don’t really have an answer here and I don’t think anyone does because it’s all very new and it is hard to manage.

There’s also a pretty normal way in which this is going to diverge and perhaps already has. Developers are building local bespoke skills just like they used to develop and still do local bespoke code to make their work more efficient. They may be able to do something that you or I cannot using the same models—-there’s no way to homologize their output. It would be like asking someone to commit their dot files alongside the project output. Regardless of whether or not it was the right thing to do no one would do it.

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

#398
post #386

Earlier quoted context omitted.

Where is this deluge tho? In the last week how many have we seen hit the front page? A dozen? That Mathematica clone, the ZX spectrum emulator, the poorly named rtk, and…like 1-2 more are what I can remember from the last week that got popular. That’s…pretty manageable.

They’re in /shownew. the last 30 Show HN submissions were sent in the last two hours. I think that’s a lot more than what we used to see.

OK, so I just stopped in there and I saw two projects that looked like they were generated by AI. The real flood seems to be scam blog posts.

I guess from reading about it, It would seem like this is a four-alarm fire. But I don’t see that when I go look around.

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

#399
No, the (github issue) ID is enough.

For my AI coding sessions I just point opencode to the issue. It does a plan, (build, ie) implements and tests the plan, and commits it. For reference you always have the issue, revise the issue when something changed.

We always worked like this, recording the thinking and planning part is silly. You can always save your session data.

Post reply on HN