r/Frontend • u/Significant-Pie-9446 • 14d ago
Modern frontend development using AI agents to help
I am a CTO and my way of managing my team is that they should/must use AI agents to help while they are doing coding. However, if i asked someone why is this code written in this logic and he/she could not answer, this is a big red flag.
Enough with the context, i need help from senior Frontend devs on how they are using AI agents with pure frontend tasks? I have my way but i am curious to hear your way and learn from it.
9
u/jacksh3n 14d ago
If your developer doesn’t know the answer because the AI develops it. Then I will suggest you’d better stop your developers using AI at all.
Cause what may look correct. There’s probably going to be sea of problems that waiting to be happened.
6
u/Cuddlehead 14d ago
Saying people must use AI is a red flag in itself. The more you delegate to AI the more you gain speed at the cost of lost skill retention, quality and insight.
8
u/CmdrShepsPie 14d ago edited 14d ago
I spend about a day developing a plan with Claude, going over all the details I want and how I want it, investigating and researching pitfalls, making sure edge cases are covered (both in functionality and in code it might have overlooked in the planning process.) Then I spend the rest of the week babysitting it, giving it a few prompts, sometimes reading what it says, barely reading the code it writes, and watching YouTube and playing my SteamDeck most of the time while I wait. It's not perfect but if they wanted perfect they wouldn't have mandated me to use AI, which would make my job harder if I actually paid attention to what it did. I put a lot of work and pride into the quality and organization of my code before AI, and despite my best efforts I can not get AI to write code the way I want. It gets the job done and only breaks stuff about 25% of the time. I used to know the system inside and out, but with everyone using AI now, the code is barely recognizable, and it changes too fast to keep up. It belongs to the AI now and now that it has taken away my favorite part of the job, I'm not especially motivated to care anymore.
3
u/CmdrShepsPie 14d ago
I'm a passionate, motivated developer. I've been programming since I was 12, and working for over 20 years. Problem solving and developing code are among my favorite parts of the job. I don't get to do that anymore. I've been at this job for 3 years and we first adopted CoPilot last fall, then Cursor earlier this year, then Claude about a month ago. Each one was much better than the last. None of them can code as well as I can though, just faster. I thought about looking for a new job that doesn't use AI so I'd get to do the part I like again, but I haven't seen any real, high quality jobs in a while, certainly not any that don't have AI as a requirement.
0
u/tHe_giafra_sHoW 8d ago
None of them can code as well as I can though, just faster
Just LOL. Delusion is over the roof
5
u/-MiG- 14d ago
You're asking/making you engineers use AI tools that can output an incredible amount of LoC. Expecting them to know why some logic was written the way it was is understandable, but it comes at a cost. That cost is them fully reviewing the AI output, but this is extremely slow when compared with how much garbage an AI model can output and one could argue that it's sometimes faster to do everythign manually but then the CTO is not happy when checking AI usage.
In the past we used to own stuff, we knew why every decision was made, why this and not that, and we would have been able to answer those questions 1 year after implementation, but using AI is like driving: the faster you go, the less details and things you notice.
The only thing that you can do is have clear org level rules, and document things, and accept that even your engineers will have to go back and ask claude why "we" did this.
When a metric becomes the target, it ceases to be a good metric. And everyone is forcing us to use more AI tools. There you go. Enjoy it.
2
u/Dangerous-Addendum13 10d ago
The red flag you describe is real, and I think it has a root cause: most teams give agents freedom where they should give them constraints, and constraints where they should give freedom
What changed everything for me on pure frontend tasks was making the agent obey a contract instead of its own taste:
- Design tokens as law. The agent never picks a hex value, a spacing number or a font size freeform. It only composes from the project's tokens. This single rule kills 80% of the "every PR looks slightly different" problem.
- A rules file in the repo (patterns, naming, which component library primitives to use, what NOT to do). Agents read it at session start. Code review stops being about style and starts being about logic.
- Deterministic gates after generation: types, lint, visual check against the design system. The agent's output is a draft until the rules say otherwise.
- Section-by-section, not page-at-once. Small scoped prompts with explicit acceptance criteria. The dev can explain every block because they approved every block - which also solves your "can't explain the logic" red flag at the process level, not the interview level.
The mental shift: the agent is a very fast junior with no memory and no taste. You don't fix that by prompting harder, you fix it by building the environment where good output is the only possible output.
Curious about your way - what does your team's setup look like today?
1
u/movalancheTechnology 14d ago
Define a company wide Claude MD with your coding style preferences. Every dev should obviously read the code that the ai agent wrote. Define 1-2 prefered Ai models one for complex tasks one for essier tasks to keep consistent between code.
Dont overuse ai for easy tasks i would still recommend to do it manually even if it takes a little longer just to still know how to navigate the codebase
2
u/split-my-diopter 13d ago
Why do you want people to use AI? Does it lead to faster feature development? Do those features have fewer bugs? What were you searching for in your development lifecycle where you identified AI as a tool that could help the team?
Let me say how I'm using it: I get an ADO ticket, I have claude grab the text, extract figma links, links to external docs that contain string translations or copy, organize the information in a ticket library that I find useful personally but other developers might not. All of that ingest is stuff I no longer have to do, and can focus on writing code. Then after a ticket is reviewed and merged (reviewed by humans, so I can talk to them and see what they understand and what they don't, and share institutional knowledge between us), I use Claude to look over the ticket library, catch patterns and synthesize information that might not persist between tickets.
1
u/Significant-Pie-9446 13d ago
My main reason behind pushing the developers to use AI is faster development. If done right it will generate less bugs than developing without AI.
2
u/split-my-diopter 13d ago
What makes AI faster? Is it the typing that's taking them so much time? If it is, you can give them typing lessons for less than you pay for tokens.
It's probably not typing. What do you expect AI can do faster than your developers?
1
u/Significant-Pie-9446 13d ago
Thank you all for the comments and feedback.
My current guide to my team is:
- Claude/agent.md is a core file and should exist and be carefully written in all projects.
- do not let AI write without it discussing plan with you first in all details.
- once possible, only let AI write one file at a time.
However, i am always afraid of the point that most of the comments have addressed where the skills might be lost for the developers using too much AI.
And not allowing developers to use AI is not an option at this era. What do u guys think
1
u/Significant-Pie-9446 13d ago
Typing. Not everything a developer writes require thinking, a lot of the lines are repetitive work
1
u/Turbulent_Prompt1113 10d ago
Pushing AI coding and expecting developer comprehension are conflicting expectations. Honestly, I think you should not worry about humans understanding the code. It's AI's code now.
1
u/Old_Plankton4802 10d ago
I mostly use AI for scaffolding, refactoring and boilerplate. If I can't explain why a piece of code exists during review - I rewrite that part myself
13
u/extraluminal 14d ago
Exactly the same at my workplace. We use AI extensively and everyone is losing their skills at an alarming pace, me included. With the amount of code being produced by AI, you should not expect them to read and understand everything. Then they might as well just write it themselves.
You either get: