How as a Senior Frontend Engineer I Use AI in My Day-to-Day Life

• 8 min read

If you open Twitter or LinkedIn on any given morning, you will see two extreme camps screaming at each other.

One side claims that AI has completely replaced programmers and that anyone learning frontend in 2026 is wasting their time. The other side insists that AI is just a glorified autocomplete that writes broken code and should be avoided at all costs.

I have used AI to refine this blog but the content, experience and overall message is mine.

As a Senior Frontend Engineer who builds web applications every day, the reality on the ground is completely different from both extremes.

AI has not replaced the need for deep engineering skills. If anything, it has made solid engineering fundamentals more critical than ever. What AI has done is eliminate the mundane friction: the boilerplate typing, the repetitive test scaffolding, the hunting for forgotten CSS syntax and the manual drudgery of legacy upgrades.

Here is an honest, hype-free look at how I actually integrate AI into my day-to-day frontend workflow, the tools I keep open, the 4-step sequence I follow and the expensive mistakes you need to avoid.


# My AI Stack

I don't use 20 different shiny tools. In practice, my workflow revolves around four usecases:

  1. Editor Autocomplete:
    Tools: Antigravity / Cursor
    The AI autocomplete excels at ghost text: completing repetitive JSX markup, filling in obvious object properties and generating predictable helper methods. It saves good amount of time.

  2. Chat & Discussion: Tools: Claude / ChatGPT / Gemini
    I use chat interfaces not to write code for me, but to think with me. When I need to evaluate trade-offs between two libraries, brainstorm edge cases or reason about rendering performance, I use chat as discussion partners.

  3. Agentic Coding: Tools: Antigravity IDE, Cursor, Opencode For coding, refactoring, running terminal commands and broad project upgrades, I prefer Agents with IDE or Editor. Currently I am also exloring opencode which is only agent without editor. These tools can audit codebase, make coordinated changes across components and CSS and run builds to verify their work.

  4. Instant Inference or Quick Questions:
    Tools: Claude, ChatGPT, Gemini
    When I just need a quick regex explanation or code snippet. The kind of things we used to search on Stackoverflow :( . Mostly I prefer chatgpt with temporary mode on so that my chat history stays clean. Latelly Google Search with AI results has also become a good option.


# The 4-Step Daily Workflow Sequence

Here is what building a real feature or refactoring a component actually looks like:

# Step 1: The PRD (What Are We Actually Building?)

Before opening an AI prompt or asking an agent to write a single line of code, I review the PRD along with claude:

  • What are the user interaction states (idle, loading, error, empty, offline)?
  • What does the data contract look like?
  • Where does state live and what are the failure modes?

If you feed vague thoughts into an AI, you get plausible-looking spaghetti code back. Prompt engineering for a senior engineer isn't magic tricks or buzzwords—it is simply clear technical specification.

Always tell Claude or ChatGPT to ask questions and not assume. Also tell it to ask questions about what you missed in PRD.

# Step 2: Architecture Review (The "Spike 3 Ways" Rule)

Once the requirements are clear, I often ask the AI to propose 2 or 3 distinct technical approaches.

For example, when architecting an interactive reader preference panel:

"Propose three ways to manage global reader settings in an Astro application: 1) Vanilla Custom Events with localStorage, 2) Nanostores / lightweight signals, 3) React Context inside hydrated islands. List the bundle impact, hydration cost and cross-island sync trade-offs for each."

Seeing three viable implementations side-by-side in 30 seconds lets me make an informed architectural decision based on my team's existing conventions and long-term maintenance.

# Step 3: Agentic Scaffolding (Letting AI Do the Grunt Work)

This is where AI saves hours of manual labor:

  • TypeScript Types & Zod Schemas: Generating strict types from raw API JSON payloads.
  • Component Shells: Creating boilerplate JSX with accessible ARIA attributes, semantic HTML5 tags and baseline CSS tokens.
  • Unit Test Matrices: Generating unit test suites covering happy paths, null checks and boundary numbers.

Instead of spending 45 minutes hand-typing mock data and interfaces, the AI generates them in seconds.

# Step 4: The Senior Code Review & Edge-Case Hunt

This is the most critical step that separates senior engineers from juniors. I treat every line of AI-generated code as if it was written by a hyper-eager junior engineer.

I review it with healthy skepticism:

  • Did it introduce an accidental re-render loop in a useEffect?
  • Is the contrast ratio on that active button meeting WCAG standards?
  • What happens when the network fails mid-request?
  • Is it using deprecated syntax or made-up configuration options?

I fix the edge cases, tighten the types and test keyboard navigation manually. Only then does the code get committed.


# How I Migrated This Blog in an Hour

To give you an example: this very website (Code Entity) was originally built on Gatsby 2.

If you have ever maintained a legacy Gatsby site with old GraphQL queries, deprecated Webpack configs and obsolete npm plugins, you know that upgrading it manually is a painful, multi-day work.

Using Cursor, I did the migration in few hours. No manual copy pasting, no package troubleshooting and no debugging.

I followed above steps to get the migration done:

  1. A requirement prompt with exact tech stack, folder structure, conventions followed etc.
  2. Reviewed the plan created by cursor, did some changes around handling of cms integration during build time
  3. Asked cursor to proceed with the migration, which it did in around 5 minutes.
  4. Did the code review. AI generated pretty good code now, mostly changes around seo, file naming and splliting few components.
  5. Did a quick QA and Visual check. Found some css issues (this is the area where most AI tools make mistakes). Apparently Ai also don't understand css that well.
  6. Created a plan around adding some new features and repeated above steps.

What would have taken 5-6 hours of manual copy-pasting, package troubleshooting and debugging was completed within 1 hour with 0 errors, 0 warnings.


# The Senior vs. Junior Mindset: Where People Go Wrong

The biggest difference between how junior engineers and senior engineers use AI comes down to control and ownership:

Aspect Vibe Coder Approach Senior Engineer Approach
Role of AI Keep using AI without understanding the code. A fast assistant that needs clear direction.
Trust Level Blind trust: "It compiled, so it must be right." Zero trust: "Verify logic, review diffs, test edge cases."
Prompting Vague questions: "Build me a dashboard." Precise constraints: "Here is the contract, state machine and error states."
Focus Area How to write code faster. How to design cleaner systems and eliminate tech debt.
Documentation Argues with AI prompts for hours. Checks official docs or source code in 2 minutes.

AI amplifies your existing skill level. If you have solid fundamentals, AI makes you 5x faster. If you don't understand the fundamentals, AI helps you produce bugs 5x faster.


# The 4 Traps to Avoid (Save Yourself the Pain)

Over the past two years of using AI daily, I have watched developers fall into four recurring traps:

# 1. The Blind Copy-Paste Trap

Never commit code you cannot explain line-by-line. If prod crashes at 2 AM or a performance regression hits your users, you cannot tell your team "the AI wrote that part." You own every line that enters your pull request.

Always focus on creating a good documentation. Its going to help you and AI both. Whatever feature you develop either ask AI to create documentation for it or create one yourself and keep it updated. Review it carefully and always keep it updated.

# 2. The Prompt-Looping Trap

We have all been there: you prompt the AI, it gives you a slightly broken answer. You rephrase the prompt, it breaks something else. 40 minutes vanish.
Rule of thumb: If an AI doesn't get it right after two iterations, close the chat. Open the official documentation, read the source code or inspect the DOM in DevTools. You will almost always solve it in 3 minutes.

# 3. The Hallucinated & Deprecated API Trap

LLMs are trained on millions of outdated repositories. They will confidently suggest React patterns from 2019, deprecated Astro APIs or completely fictional props that look convincing. Always verify library APIs against the version declared in your package.json.

This is mostly solved now as most of the frameworks and libs now ship agent skills and docs. But you should always keep in check.

# 4. The Architecture Erosion Trap

AI solves problems locally, not globally. It will gladly generate a quick piece of inline state that solves today's ticket while silently violating your team's design system and architectural boundaries. Keep architectural decisions strictly in human hands. Laverage AI for options. Not for decisions.

I would suggest create architectural documentation and patterns. Add gaurdrails and constrains for AI on what patterns to follow, how to write code, how to write unit test cases, how not to write test cases.(Trust me it sometime generates some crazy test cases too ). This will help AI to generate better code and reduce the time it takes to review the code.


# The Golden Rule

AI has fundamentally changed frontend development for the better. It has freed us from repetitive boilerplate, accelerated learning and made large-scale refactoring accessible.

But the essence of great frontend engineering hasn't changed:

  • Understanding the HCI (Human Computer Interaction). We don't just write code, we build end-user experiences.
  • Understanding the browser platform (DOM, CSS, networking, security)
  • Building accessible, performant and user-friendly digital experiences.
  • Designing scalable, maintainable architectures that your team can evolve for years.

Use AI to automate the typing so you can focus your mind on the thinking. That is where your real value will always be.


Vishal Sharma

Hey there! This is Vishal Sharma. I reside and work at Gurgaon, India. I am a Software Engineer and primarily works with JavaScript, ReactJS and NodeJS.
Connect with Vishal Sharma on LinkedIn