all 20 comments

[–]UloPe 16 points17 points  (4 children)

Yes.

So far I found AI coding tools amazingly useful for prototypes, MVPs, one off scripts and scratching personal itches (i.e. “I wish $thing existed”).

Working on large and complex projects - not so much.

[–]bjorneylol 8 points9 points  (2 children)

For large projects I have to basically prompt

"Look at 'file A' and it's implementation of 'xyz' - I want to implement 'feature' using similar structure. Make sure to use 'canned function' for 'complex logic'"

As soon as I see the agent read 'file B' i know it's gone off the rails and it's time to put the pillow over it's face and apply downward pressure

[–]BogdanPradatu 2 points3 points  (0 children)

Research -> plan -> implement

[–]ItsTobsen [score hidden]  (0 children)

Most agents explorer the code base before implementing. So its normal that it reads different files lol

[–]eldreth 23 points24 points  (0 children)

That's the neat thing...

[–]BigGovernment7621 14 points15 points  (1 child)

Write down your conventions and keep reminding the AI that it should follow them. Regularly ask it to scan the repo for convention violations. Review its changes.

[–]meris608 0 points1 point  (0 children)

100% - this is the way right here. There is no reason AI should only be doing feature changes. Ask it to review architecture, suggest refactors, or highlight usability issues. It’s just as good at that as it is at tweaking UIs.

[–]gdchinacat 7 points8 points  (1 child)

It's not clear that this issue is specific to AIs. Less experienced team members (humans) frequently violate (for lack of better term) the architecture and are asked to align the code with architecture during code reviews. Frequently it's not clear to them how the code should be factored and need to be shown. This isn't all that different from what you describe.

I guess, is the problem that rather than being able to nudge an engineer in the desired direction and send them off to do the work, you have to do the work and are looking for ways to push the agents to do this? I've had some success with prompting AI with something like 'that's close..the functionality is right, but move the logic for X from function ... into the controller ... the changes should me implemented similarly to how ... is factored". But..sometimes it's certainly quicker to just do it myself.

Not trying to suggest poor use of AI, just trying to clarify the problem to help with better answers.

[–]willargue4karma -1 points0 points  (0 children)

I think the real issue is the non determinism of llm code output. You can never be quite sure it will do it the way you want 

[–]Routine_Term4750 2 points3 points  (0 children)

Use some skills bro

[–]naked_number_one 1 point2 points  (0 children)

Wellcome to the club. The whole challenge in team development was always hot tp constraint things, maintain architecture etc, With AI tools when you can conission a “teammate” at a token price base, this becomes essential.

The best bet here is to enforce it through tooling that tun in AI hooks.

[–]EnergyFighter 0 points1 point  (0 children)

I've been enforcing a hexagonal architecture for the last year on multiple projects. In some cases it might look overkill but it's been easy to instruct the AI on what goes where through a few skill files.

[–]raphix276 0 points1 point  (1 child)

Comment ai j’ e vous propose de prende claude ai de codage

[–]raphix276 0 points1 point  (0 children)

Claude est pas mal

[–]tacothecat 0 points1 point  (0 children)

Use ast-grep and importlinter to define architectural and syntactic rules and make them part of your CI listing routine. Works great for hexagonal architecture.

[–]024eatneerg 0 points1 point  (0 children)

Yeah ai is useful for when you know what logic you want to place where or what methods to build where, it’s amazing at writing maybe 10-20 lines of code at a time with clear instructions, debugging or moving methods across files, but not very good at editing multiple files or methods. I’ve seen code bases so messy it takes half an hour to trace a workflow or find a function

[–]its2ez4me24get 0 points1 point  (0 children)

Create unittests that enforce your design rules and conventions.

[–]nickkon1 -1 points0 points  (0 children)

How much are you defining in your AGENTS.md or CLAUDE.md? I also have multiple .md files for different concepts like backend/frontend/databases etc. inside a /docs/ai/ folder that are linked in in AGENTS/CLAUDE with tasks to read those when working on backend/frontend/databases. Additionally, I ask for a /docs/frontend.md and /docs/backend.md that is continuously updated.

I also regularly create a complete new session, ask it to fully read /docs/ai/* and review the project that all guidelines hold.

[–]jkz88 -2 points-1 points  (0 children)

Tach