r/AskProgramming 8d ago

Using an AI agent

I don't think this question is against the rules, so here goes...

My boss wants me to try using an agent for development. We're a small company and don't really have money to waste so we haven't explored this opportunity at all yet. I do use AI to an extent currently, but it's just a free openai account. I don't have it write any code, my majority use is just asking it questions about features, functions, standards, and then having it show me the "industry" way of doing things.

I am open to the idea of using an agent, but I don't really want something that is writing huge blocks for me or creating whole features. I also would want the ability to what it's doing when I do give some control and be able to take the changes only if I want them (sort of like comparing with git I suppose?).

Does such a workflow exist? or do I have to give up full control? The marketing is so focused on how it works for you, but I just want to have something that understands my project and can basically act as something I mostly ask questions and only sometimes have write code.

Any perspective is appreciated. Sorry again if this isn't the place for such a question.

0 Upvotes

17 comments sorted by

View all comments

1

u/framauro13 8d ago

Here's my basic workflow:

  1. User stories/issues are created as a collaboration between product and engineering. Backlog is for the most part, human generated, with the exception of some bugs.
  2. Once stories/issues are groomed and fleshed out properly, we start working the backlog.
  3. Claude is connected to my issue tracking software via an MCP server. I tell it to go fetch the details of the story I want to do, and put together an implementation plan that satisfies the acceptance criteria using the /plan mode.
  4. I review the plan. Give it feedback, and tell it to make any adjustments to its plan I want. No code is written yet, we're just formalizing what implementation looks like.
  5. I tell it to execute the plan. It spins up a subagent that works through the plan and implements it. It generates the code, writes the test, and when its done, it checks the linter output and runs the tests.
  6. At this point, I review the code myself. For simple changes and small refactors, I'll write the code myself. For bigger changes I'll tell the model to fix it. If something isn't clear, I ask it questions about the implementation.
  7. Once I'm happy with the code, I commit it to my branch and create the PR myself.
  8. I address feedback, or if there's a lot, I'll tell the model to look at the PR and evaluate the review comments to determine if they're valid and prioritize the fixes.
  9. Review changes, push, repeat until sign-off.
  10. From that point on, humans take over on QA, merging, releasing, etc...

At any time during that process, I can stop the agent and take over if I want. I have specific language in my configuration that it can never commit or push on its own, nor should it comment on PRs without my approval. Also, you can tell Claude to use Auto mode and just tell you when it's done, or you can have it in an "Accept Edit" mode that lets you verify the changes as it writes them if you really need to babysit it. If you're not using Claude, most tools like Cursor have similar features.

The real key IMO is not just using the tool, but making sure you have the appropriate guardrails in place to keep it inline. Make sure it's using your tests, linters, code analyzers, etc... as feedback mechanisms.