AI & Agentic Coding

Background

During my career break, I explored emerging AI technologies. Below are my experiments in learning and building products with agentic coding tools:

Project: Car HMI Experiment

This experiment explores how far AI can replace a UI/UX designer.

I gave the AI agent vague requirements (similar to what typically happens in the real world), and asked it to conduct UX research, then generate UI designs for a car dashboard, an in-car HMI and a mobile app.

Even using the latest model, the AI-generated results were barely acceptable, with obvious strengths and limitations.

Strengths
Limitations
  • Implementation of general functionality
  • Rapid technical problem-solving through different approaches
  • 3D model analysis and editing
  • User empathy and understanding of real user needs
  • Awareness of consistent user interaction and information organization
  • UI details (typography, spacing, icons, layout, etc)

Then I spent lots of time working with the AI to fix these issues — pointing out what didn't work and asking for corrections — while iterating and testing different models and prompts.

Even with powerful AI, I believe the analysis process and design judgment of an experienced UI/UX designer remain valuable.

Project: Liquid Glass

I've always wanted to implement Apple's Liquid Glass visual style on the web, and I finally achieved it with the help of AI.

The biggest challenge was simulating light refraction. I worked with an AI agent to explore SVG filters and Canvas, but browser support was inconsistent. The final approach we took was WebGL.

Detailed visual parameters can be adjusted via live sliders.

Three visual parameter presets: Clear, Frosted, Dark.

Project: Background Motion Library

To explore web motion, I need to build a small library of code-based motion effects, and study how to apply them as website background animations.

Building with Skill

Based on my previous AI coding experience, I developed a site showcasing eight popular motion effects with code demos:

Built with the Anthropic Frontend Design Skill, the site has a visual style similar to Claude Code's official website.

Bug Fixing

Although the build looked good overall, there were many defects that needed to be fixed. For example, the code panel displayed truncated code, low-contrast colors, and incorrect labels:

Fixing the display issues in the code and improving readability

There were many other bugs, such as the toast being blocked by the glass overlay, the scroll parallax effect not working as expected, and more. It took many rounds of iteration to fix these interesting bugs.

What I learned was to address one issue at a time, which minimizes the risk of regressions.

Feature Enhancements

After fixing the obvious bugs, I refined the motion demo with new designs, and added an adjustment mode to the code panel.

I also built a design system for the project. More updates are on the way.

Project: React/CSS Design System

To improve collaboration with engineering teams, I decided to study React on my own, with the help of AI coding agents.

Purpose

I aimed to build a React/CSS design system using design tokens.

The primary goal was to study React/CSS coding, which would help me better contribute to modern UI implementation.

Process

With just a few prompts, the AI tool generated a mini React/CSS design system with Button and Card components:

The visual style was secondary at this stage. My focus was on analyzing the differences between traditional HTML/CSS/JS components and JSX/CSS.

Also for this reason, I skipped Vite for now, and instead used Babel to compile JSX in the browser.

JSX and CSS design tokens

I learned JSX syntax and design tokens management through this AI-generated code.

However, when I tried to extend the UI components in the next iteration, the AI-generated code didn't seem right: it hardcoded the colors within the components rather than using tokens. I questioned the AI agent and tested with other AI tools.

Eventually, the agent acknowledged the issue and corrected the code:

Agent replaced the hardcoded color with design tokens

That was just one of the many issues I encountered.

The AI agent occasionally generated code with defects. Some issues were critical errors that prevented the code from running at all; some were minor style bugs, like this:

This AI-generated switch component has a border rendering issue

When fixing this issue, instead of using a conversational prompt, I selected the area and added a comment. The agent understood and resolved it immediately:

This interaction is much more efficient, as I don't need to describe where the issue is.

After a few rounds of iteration, the design system now supports toggling between light and dark modes:

Key Takeaways

After comparing the code generated by different AI agents, I summarized the structure of the base design tokens:

All UI components are built upon these base design tokens. For example:

  • Gray color tokens are further used to define colors for text, layer backgrounds and borders.
  • Font-size tokens are used to define font sizes for headings, body text, captions, etc.
  • A Button component consists of typography, spacing (for padding) and border radius tokens, with different color combinations applied to the background and border for its variants.

Project: Color Picker

This was my first AI coding project. When picking colors, I have a particular fondness for color values that are numerically satisfying in Hex, RGB, HSL or other formats.

Purpose

In most design applications, color code is displayed in one of the following formats:

Select color code format in Figma

To analyze the relationships between these color codes, I had to constantly switch formats in the dropdown, which was inefficient.

To view all formats simultaneously, I decided to vibe-code a handy tool with the following requirements:

  • Display Hex, RGB, HSL and HSB in one screen for any given color code
  • Lightweight, with instant response on open and calculation
  • Work without a network connection

Process

Building this function is straightforward for AI coding agents nowadays. I managed to build a single web app that displays color values in four different formats and runs locally.

The feature works quite well. I also added a 'Save color' feature, so I can easily compare new colors with previously saved ones:

Polishing & Bug Fixing

As I kept iterating with enhancements, some bugs started popping up.

For example, when I tried to optimize the input for RGB code, the agent implemented the feature but messed up the layout:

The Copy button was positioned incorrectly.

To fix this issue, I selected the div and commented with instructions, then the agent understood and implemented it.

Left: Human selected and instructed   |   Right: Agent analyzed and implemented

After a brief generation time, the Copy buttons were correctly positioned, and the layout issue was resolved:

Another issue was that, when I updated the list of saved colors to display columns in other color formats, the values were squeezed together. This kind of spacing issue seemed hard for the agent to detect:

The left part was too crowded while the right part was too roomy

It took me more than one round to explain and address the issue:

There were other bugs too. For example, when I typed in one input field, the values in the other fields would shift unexpectedly. The AI agent fixed it by trying different approaches.

Sometimes it's interesting to just watch the agent breaking down the issue, "thinking" and "testing" step by step.

Adding New Features

After polishing the basic feature, I decided to enhance the tool with a new feature: extracting the dominant colors from an uploaded image and turning them into a gradient.

The AI agent was building and testing the color extraction feature.

With the agent's help, I tested and compared several color extraction algorithms:

No single algorithm can extract colors from any given photo and then generate a perfect gradient as I imagined, so I kept the top three extraction methods for comparison.

This experiment is still underway.

Retrospective

Some thoughts from these AI experiments:

  • Even AI tools from top companies worldwide occasionally generate code that contains defects. A solid technical foundation is still essential when reviewing this code.
  • 'Select and comment' is often more efficient than conversational prompts. I believe there are more effective interaction patterns tailored to specific scenarios, since prompting is merely the most fundamental approach.
  • Generally, coding agents are good at understanding functional requirements, but seem to lack a sense of 'space', 'visual balance', and other UI/UX principles. Maybe these aesthetic concepts are just harder to describe in natural language, and this is likely why SKILL.md is needed.

Thank you for scrolling to the end.

More Projects

Bank Treasury Center

A cross-functional financial platform designed to provide data-driven insights and support decision-making.

2024 - 2025

Connected Vehicles Platform

An IoT cloud platform connecting millions of vehicles across 100+ countries, built for automotive manufacturers.

2019 - 2023