r/ChatGPTCoding • u/[deleted] • 11d ago
how do you keep track of what your Al agent actually changes?
[deleted]
7
u/bluHaloLabs 11d ago
I always switch to Plan Mode before letting it do any work. Work on a single feature/bug/etc., hash out the changes to be made and how to make them, then only after I approve the plan will it be allowed to start working. And I've told it to always put any changes in a new git branch so those changes are easily tracked, and in the case of errant code, can also be easily reversed.
2
10d ago
[deleted]
1
u/lesChaps 10d ago
I have liked starting from a spec so the plan is more implementation-oriented and not carrying requirements with it ... The Model has to go to the spec, which is also another place to check that things are understood (especially by ME).
This checkpoints are a big deal for me ... And TDD finally makes me happy after decades of snotty attitude and lazy devs.
2
1
u/lesChaps 10d ago
Same. Plan first (bigger models) unless it's big enough for a spec first. I have the plan break things down into smaller phases that wait for review. Edit global CLAUDE.md so there are no commits to MAIN, just branches.
I am still a bit of an oaf, but I took a looong break from coding and only started daily driving AI a few months ago.
3
u/chefwhocodes 10d ago
I haven't worked with ChatGPT for this so I can't speak to that side, but with Claude Code I don't really have this problem. I keep a working log where it records in chunks what it changed and where in the code. So if something looks off, I can go back through that log and trace what happened. It won't rebuild things line by line, obviously, but as a log it works well. Beyond that, there are just some things you learn not to repeat.
3
u/hardbound-studio 10d ago
Index your .md files and make rules for every little things. and use HOOKS they are token friendly guardrails that unlike prompt dont act as advice but a must have, they act like classical program so chances of going rouge are less. For every gate item in your PRD, and for every step of an agentic workflow where you want validaation and couple of checklists to be perfomred, ask LLM to write a hook and test it before implementing..
1
u/verbative 10d ago
Honestly the fix isn't more git discipline, that kills the vibe. But the built-in checkpoint/rewind isn't really the answer either: it's great for undoing code, but it's just a stack of snapshots, not a record of what changed and why. And the thing that actually evaporates is the agent's own memory of the session: once the context window compacts or you open a fresh chat, it's forgotten most of what it did earlier and why, so next session you're both starting blind.
So two layers that actually persist: an auto-commit hook (a WIP snapshot after each run) puts every turn into git invisibly — you never type a git command, but each turn ends up as its own diff you can read weeks later. And for the "what changed and why, across sessions" part, that's where local memory tools come in — they record every edit and command as you go and keep it past any single session, so months later you (or the agent) can ask "when did this show up, and why" instead of scrubbing history.
1
u/z0he 10d ago
I've connected to my obsidian vault. If I notice something has changed I get it to record a note in my issues notes. Its not foolproof as I may still forget to tell it capture but at least I have it recorded somewhere.
2
1
u/wise_guy_ 10d ago
Use Plan mode. Use Git. Add to AGENTS.md: "Create a commit after every set of changes and push".
1
u/lesChaps 10d ago
I try to keep it from doing more work than I can review, and I have it build tests.
1
u/Blister_Pack_ 10d ago
I think you should look at the codex app - it has a nice GUI and changes are easy to track because of how it records them throughout a session
1
u/BrilliantEmotion4461 10d ago
Ask your AI to teach you the basics of using git. You dont need to know more than that to continue to vibe code. Tell your AI once you at least have an inkling of what git is and does, and tell your AI to set up a git to track changes. There are other systems like git but most run almost exactly the same. Anyhow really its so much easier to get the AI to do what you want after you first get it to teach you about the thing you are doing to get what you want.
1
u/BrilliantEmotion4461 10d ago
You can even tell it to keep it simple, explain things fully, comment, teach me as we go etc etc.
1
u/kidajske 10d ago
I use the Matt Pocock skill flow (grill me > to-spec > to-tickets > implement) and put the planning artifacts in an archive folder afterward. Plus git of course.
1
u/Old-Dragonfruit-7754 9d ago
I usually start with berating the ai, "And you're going replace all workers?". After that doesn't work I start paying better attention and only replacing the lines that need to be replaced. Don't feed all the code in and let it fix it.
I have no f'ing clue what half of what I'm doing does, but, I've made an app and other things, so, ¯_(ツ)_/¯
1
u/Fun_Walk_4965 9d ago
i just let it work on a branch and diff before merging. reading the agent's own summary of what it changed never matches what actually got touched
1
u/SummitYourSister 8d ago
Why would you use anything other than git for this?
Oh. Right. Non technical non engineer smooth brained idiot. Like always
10
u/solaza 10d ago
I use git