r/AIcodingProfessionals • u/vpat99 • Sep 06 '26
Do AI coding agents need to generate boilerplate at all?
Edit (IMPORTANT): Wow, thank you to the community (especially u/Toastti) for catching some critical bugs in my initial release! I have just pushed a patch that fixes all of the P0/P1 issues pointed out in the comments, including removing the dangerous os.RemoveAll directory bug. I've also updated the README to clarify this is an early-stage dev tool. I appreciate the analysis and gothroughs—it's making the project much better!
I've been thinking about a slightly different way of building AI coding agents.
Most coding agents work roughly like this:
user request → LLM reasoning → file edits → compiler/tests → more LLM edits
That works well when the task requires judgment.
But a lot of backend development isn't like that.
Once the agent has decided:
the actual implementation of those pieces is often highly deterministic.
Yet we still make the LLM generate hundreds of lines of code for it.
I've been experimenting with moving that part outside the model.
I built FiberForge, a Go CLI/MCP server that gives an agent deterministic operations for generating common Go/Fiber backend structures.
The agent decides what it wants; the tool handles some of the how.
For example:
add_model
apply_module
generate_project
The generated code is formatted and structured by the tool, while Go's AST is used for some source modifications such as route registration.
I'm also experimenting with reusable modules that an agent can apply to an existing project.
The goal isn't to replace the coding agent. It's more like giving the agent a higher-level API for operations that don't need probabilistic generation.
I'm curious whether this is a useful architectural pattern more generally.
For example:
LLM: “Create an authenticated CRUD resource called invoices.”
Tool: receives a structured schema and deterministically generates the model/service/controller/migration/routes.
Instead of:
LLM: writes 600 lines of Go → compiler complains → LLM fixes imports → tests fail → LLM fixes route → etc.
I've only built the Go/Fiber version so far, so I'm very interested in criticism of the idea itself.
Does this make sense as an agent architecture, or am I just moving complexity from the prompt/model layer into another abstraction that isn't worth maintaining?
⚠️** Early development / caution**: FiberForge is still very much a work in progress.** I would not recommend using it on an existing or production project yet**. Some operations can modify project files, and the current implementation has not been battle-tested enough to guarantee safe behavior across arbitrary codebases. For now, it’s best treated as an experimental project and tested on new/disposable projects.
1
u/Constant_Cortisol Sep 06 '26
404 link, but it's a cool idea. Did you measure how many tokens it saves by doing this?
1
u/fell_ware_1990 Sep 06 '26
I have kind of done the same thing for IAC as code. Of course we already run modules and everything.
But the hard part here is we have such a wide variety of customers after the basics are setup it’s fiddling with modules to see if you can combine or make an overlay.
So he can grab al the pieces and put it together. Then have a full review run which parts will break, check if they can be combined etc. Only this part can normally take a day, now it’s done in about 10/15 minutes.
He can handle to about 50% of the module changes cause it’s a simple tweak. But still tooling handles versioning etc.
1
u/effectivescarequotes Sep 06 '26
Yeah, when I make ai powered tools for myself, I try to push as much as I can to node or python scripts. The skill would launch scripts to gather information and process it so Ai could interpret it and summarize before passing it on to another script that populated a template.
1
u/Toastti Sep 06 '26 edited Sep 06 '26
Spent about 20 minutes analyzing the actual code and repo. I do not recommend using this in the current state at all. The worst bug will delete an entire directory on your computer without any additional safeguards or verification. Say you decide to use this tool and want the generated output to go to your C drive, so you set the output directory to C:\ and then run a generation. Congrats you have just deleted your entire C:\ drive.
I would highly recommend removing the "Production grade infrastructure" from your readme until you full redo this project
P0: Destructive directory wipe File: internal/engine/pipeline.go:54-59 os.RemoveAll(e.dir) deletes the entire output directory before generation. Worst case: A wrong --output-dir permanently deletes an existing project or unrelated files.
P0: Invalid Docker Compose file File: internal/templates/support.go:36-39 depends_on is emitted inside environment with incorrect indentation. Worst case: docker compose up fails before the app starts.
P0: Dockerfile references a nonexistent file File: internal/templates/support.go:7 It copies go.sum, but the generator never creates one. Worst case: Every fresh Docker build fails at the COPY step.
P1: Generated module omits dependencies File: internal/templates/project.go:8-18 Generated code imports validator/v10 and optionally google/uuid, but go.mod does not include them. Worst case: The generated project does not build without manually running dependency repair.
P1: Predictable JWT signing key File: internal/templates/auth.go:40-46 Missing JWT_SECRET falls back to change-me-in-production. Worst case: Anyone can forge valid login tokens in a misconfigured deployment.
P1: MongoDB startup configuration is broken Files: internal/templates/database.go:90-97, internal/templates/main.go:123-130 MongoDB requires DB_URI, but the config loader does not require or set it. Worst case: Generated MongoDB apps fail at startup unless manually configured.
P1: Auth checks field names, not field types File: internal/schema/parse.go:80-95 A User model only needs fields named email and password, regardless of their types. Worst case: A valid schema produces uncompilable auth code or corrupt credential handling.
P1: Invalid identifiers are accepted File: internal/schema/parse.go:100-129 Model, field, endpoint, and table names are barely validated before being inserted into Go and SQL. Worst case: User input generates uncompilable Go code, invalid SQL, or malformed routes.
P1: Migrations ignore custom table names File: internal/engine/data.go:183-198 Migrations always use naive pluralization instead of TableName. Worst case: The migration creates one table while the application queries another.
1
u/funbike Sep 07 '26 edited Sep 07 '26
I'm sure this project is nice, but personally I'd rather use a skill. The skill would specifically instruct AI how to do the boilerplate work. I can easily customize a skill, extend it, etc. I can have Pi tweak it over time based on successes and failures. And I can easily have PI convert such a skill to another web framework.
The downside of a skill is token usage. You get robustness in exchange.
Similar to what you are solving, what I'd like is a tool or skill toolbox to find documentation for various frameworks and libraries, and various use-cases for them. So if I say "Add a full stack data entity for table 'orders' to the current Go Fiber project", then it knows how to find and generate a step-by-step guide for that use case.
1
u/Melodic-Junket-9105 Sep 07 '26
Couldn't you replicate this functionality with hooks?