Staying on Top of Agentic Coding as a Software Developer

This is an open discussion about using LLMs for software development in a productive way, without losing yourself in the process.


Since I have increased the amount of agentic coding I do in my day to day, I have often found myself relegated to an outsider of the projects the LLMs are developing. Through prompting, and a possible overuse of /plan mode, I retain a high-level overview of the tooling, but I might as well need to be re-onboarded to the project any time I decide to make a change like a caveman with a keyboard.

Context. For projects I worked on pre-GPT (e.g. freeCodeCamp/freeCodeCamp), I do not even bother using LLMs, because I can debug, find code (context), and understand the global effects substantially better. Lately, for greenfield projects, I have mostly been creating opinionated Product Requirements Documents (PRDs), and having the LLM develop whilst I am blind-folded.

This has meant, in times when I run out of LLM session, I either fumble to make changes to a codebase I am unfamiliar with, and risk making changes I do not know the consequences of in the global context. Or, I move back to a project I can make productive changes to sans LLMs, and wait for a renewed session to continue with the project I actually planned to work on.

What I Plan to Do About This

I have just started trying a different workflow for these greenfield projects I am working on which makes me the navigator, and the agent the driver. This is more work on my side, but puts the capability of retaining responsible oversight for the changes in my purview.

Steps

Outline

Start with a short outline of the project. Nothing more than 3 sentences describing the project, plus example usage or case studies.

This provides the minimal context needed for an LLM to stay on track with changes.

Boilerplate

This is the main setup for success - retaining context of the codebase. Instead of having an agent create files, functions, or config unchecked, YOU create the file(s), declare the function(s), and describe the config. Then, prompt agents to ONLY edit explicit files, functions, and config.

Case Study

Poor Workflow
  1. Open terminal to the project directory
  2. Prompt LLM harness:

Add a /blog page. Blogs should have `title`, `author`, `created_at`, `updated_at`, and `slug` meta. each blog should be sourced from `client/pages/blogs/`. `slug` should be unique, routing to `/blog/`.

  1. Twiddle thumbs
Improved Workflow
  1. Open editor in project directory
  2. touch client/pages/blog.tsx
  3. Create unimplemented blocks
// client/pages/blog.tsx
export function BlogIndexPage() {

}

export function BlogPostPage() {

}
<!-- client/pages/blog/example-blog.md -->
---
title: Example Blog
author: Shaun Hamilton
created_at: ...
updated_at: ...
---

Content++
// client/pages/blog/post.ts
export interface Post {

}

interface Frontmatter {
}

function parseFrontmatter(raw: string): Frontmatter {
}

export const POSTS: Post[] = undefined;

export function getPost(slug: string): Post | undefined {

}
  1. Track global context changes to mention in prompt:
- `client/pages/layout.tsx`

needs `/blog` added to `PUBLIC_PATH_PREFIXES`. Either, prompt with `PUBLIC_PATH_PREFIXES` or `client/pages/layout.tsx` - agents can find the needed changes quite easily with either bit of information.

- `client/pages/router.tsx`

needs a new route defined.

- `server/src/app.rs`

needs `/blog` route defined
  1. Prompt:

Implement the blog feature by completing all unimplemented code blocks across client/pages/blog.tsx and client/pages/blog/post.ts using the context in client/pages/blog/example-blog.md.

Wire up the new /blog routes by modifying the following files:

  • client/pages/layout.tsx
  • client/pages/router.tsx
  • server/src/app.rs

You have full agency to add, modify, or update any CSS as needed to ensure the UI looks polished and complete.

Guard Rails

Either, this can be in the form of a skill on how to add a feature / make a change, or it could be a simple section in context (e.g. AGENTS.md) that encourages agents to remain within scope.

Something like:

When making changes, only edit the unimplemented bodies of code in the files explicitly mentioned. Freely read other files in the repository for additional context, but do not edit unmentioned files without permission.

Alternative Approaches?

Currently, I am focusing on getting a decent local inline auto-complete model running on my laptop RTX3060, as I think inline auto-complete was a decent enough productivity boost whilst retaining personal context

How have you found success in productive and controlled development using LLMs?

3 Likes

I was trying to ask for more and more detailed planning before implementation, to stay on top of what’s happening

but this sounds much better, I will try it

(and you have stuff to do while on cool down)

Hi @Sky020

Auto-complete can burn through tokens, even for commit messages. I’ve turned it off on all my settings on GitHub. This forces me to carefully think about the changes and additions I’m making.

The agents don’t remember anything, they need to constantly read files. Giving them license to read files is like giving them an open cheque book. Restrict file-reading to a single isolated folder. Whitelist file types.

Have it store past interactions, update a summary of the conversation or project state, and store critical variables in a secure database so the agent doesn’t need to scan files.

Three main things I want to mention.

In regards to this, I totally agree and to expand on it, I would ask it for code snippets I can follow, or copy, which speeds up work, yet still lets me follow through the logic, which lets me build a good mental model how things are implemented, and can also catch code smells and doubts early on.

I’ve also noticed same thing on the planning part, we shouldn’t leave too much context there, unless we reviewed that context in great length. If its simply product of the AI assumptions and best practices, it might prove to be not what we would have wanted once we start implementing it.

And I also follow the documenting progress practice you outline, its easy reference both for human and AI to understand where the project is at, whats next, whats left after (at least according to plans), otherwise acquiring this info per session can cost a lot.

Overall one main principle nowaday with AI coding is to leave enough context for AI to read and be aware of larger picture, or smaller details, that you don’t need to repeat yourself every prompt, or make the AI do major researches, and be able to achieve seamless workflow with as less repetitive tasks as possible.

2 Likes

I ran into this exact issue when working with agentic workflows on greenfield projects. It is very easy to let an agent spin up whole directories and components, but after a couple of days you realize you do not really understand the internal state flow or boundary conditions anymore.

What has kept me sane is enforcing strict architectural boundaries before handing anything off to an agent:

  1. Define the interfaces, data types, and function signatures myself first. If the contract is explicit, the LLM has much less room to invent confusing abstractions.
    1. Write unit tests for the expected behavior, then ask the agent to implement only enough code to pass those tests.
    1. Keep the prompt scope tightly bounded to one or two files at a time. If an agent tries to refactor untouched modules
1 Like

I ran into that exact outsider feeling when letting agents generate large chunks of new code. What helped me stay connected was treating git commits and test suites as checkpoints.

Before asking an agent to write an implementation, I write the integration or unit tests myself, along with the type definitions and interface boundaries. That forces me to understand the inputs, outputs, and edge cases before any code exists. Once the agent passes those tests, I review the diff commit by commit rather than taking the whole feature in at once.

Keeping tasks scoped to single functions or isolated modules also prevents context drift. When an agent touches more than two or three files at a time, mental model retention drops fast.

Keeping that navigator role really comes down to tight scope boundaries and small review increments. Once an agent generates more than one or two files at a time, mental context drifts fast, and you end up spending more time deciphering what changed than you would have spent writing it.

What has worked well for me is writing out mini-specs and explicit function contracts before letting an agent touch anything, exactly as you noted. If I spend ten minutes up front defining types, inputs, expected errors, and acceptance criteria, the model has far less room to hallucinate architectural drift.

The main friction point usually turns into documentation and prompt fatigue. Writing out detailed specs, API constraints, and step-by-step instructions for every prompt eats up a lot of time. I use Wordfully AI to speed up drafting and cleaning up those prompt specs and documentation notes. It lets me rough out technical notes quickly and clean them into clear, concise prompt briefs so the agent stays on track without me getting bogged down in editing.

Pair that with small Git commits per prompt task, and it becomes much easier to jump back in manually without feeling completely alienated from the codebase.

This is an incredibly articulate breakdown of a problem that almost every senior engineer is quietly wrestling with right now, @Sky020. The feeling of becoming a “caveman with a keyboard” the moment your token session runs out is painfully real.

Your Navigator/Driver workflow is a brilliant way to reclaim control. By forcing yourself to write the stub functions and wireframe the files first, you anchor the mental model of the architecture in your own head before the LLM fills in the details.

To add to your “Guard Rails” step, another pattern that works incredibly well for this is Test-Driven Agentic Development (TDAD). Instead of just creating unimplemented code blocks:

  1. You write a strict, failing unit test file (blog.test.ts) that dictates exactly what inputs, outputs, and edge cases you expect.
  2. You pass that test file to the agent as part of the context and prompt: “Implement the code blocks in blog.ts until all tests in blog.test.ts pass cleanly. Do not modify the test file.”

This keeps you in full control of the software’s contract, requirements, and logic, while the agent acts strictly as a hyper-fast implementation engine.

Thanks for the concrete guardrails. When an agent needs to touch multiple files, how do you decide the boundary and review the change?

Welcome to the forum @biglobstertop

When multiple files are involved, break the task down into smaller actionable steps. Keep the focus on one file at a time and submit individual PRs for each task.

If something breaks you’ll know exactly where and what to revert. It also makes reviewing the change more straightforward, as the PR description can explain why the change is necessary and point to any related issues.

Happy coding

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.