aiforui logo

Using AI at work

I’m currently very much into making interactive components for our blog posts. One of the recent ones is this animated delta sync diagram for the “Rebuilding Linear’s delta sync read path” article:

104108121107121129104108129121126104107108121129104108121126129108 … 130108121129

I had to animate this so that it makes sense in the context of the article. Since I don’t really know how delta sync works, I read the article to get a rough understanding of the concept, and then asked AI to do the same and propose a suitable animation.

Read this article and propose an animation for this diagram [IMAGE #1]

The idea it came back with was roughly this: “lots of numbers go in, they get funneled together, and only a few come out, so we animate the funnel to show the process”. This is very much simplified, but there’s no need to go deep into the technical details here.

I knew that each wire was an SVG path, and knowing that the <animateMotion> SVG element can animate elements along a path, I asked AI to use exactly that for the animation together with the idea it came up with.

Let’s do this. Can you use the `<animateMotion>` SVG element for the animation?

The result was the animation above. I knew what to ask for, since I was aware of animateMotion, but the AI would probably end up using it anyway, it would just take a bit longer.

The motion felt good since the agent automatically invoked the /emil-animations skill. So make sure you have the course skills installed as that can drastically improve the quality of your output without you having to do a thing. Less slop by default, basically.

I keep things simple and try to describe what my goal is and work together with the agent to achieve it, I try to treat it as a colleague. It won’t get everything right at once, so a few extra instructions are needed, but that’s pretty much it. Do not overcomplicate things.

Expanding it further

The above workflow was done without me having to write a line of code. That’s how I usually do it these days. It might sound weird, because Linear cares about craft and quality, but you can maintain these values while using AI. This is the reality of today. The sooner you embrace it, the sooner you can start using AI to its full potential.

To help you get more comfortable with this idea, I’ll give you a few more examples. One of them is the Linear Data report. All the interactive components there were built with AI.

I have not written any code for the graphs and punch cards. This obviously required a lot of back and forth with the agent to get it right, but it was still much faster than if I were to code these graphs myself.

It’s important to know what to delegate though.

I explicitly mentioned the graphs and punch cards, because they are quite complex and require a lot of code to make them work. The whole layout of the page, typography, spacing, etc. were all built by hand, because it was faster this way.

So a natural question that arises is: when would you delegate things to an agent? Let’s put your instinct to the test. Below are 20 tasks, read through them and decide whether you would delegate them to an agent or build them by hand.

1 / 20

A ⌘K command menu

Fuzzy search, keyboard navigation, nested pages, recent items. You know the pattern, and so does the agent.

Judgment → Execution pipeline

I, like most people at Linear, love to fix small bugs, papercuts that gradually build up and make the experience worse and worse. Oftentimes I use our app, spot a bug, create a Linear issue, and delegate it to an agent. This is how this bug was spotted, and fixed:

Emil Kowalski
Emil Kowalski @emilkowalski
Fixed this small bug in Linear’s app today which I often see in other apps as well. Here’s a small before/after.The issue:When you open a popover inside a modal (think a custom select), clicking outside the popover to close it also closes the modal.The desired behavior is to close the select on click outside while keeping the modal open.This often happens because custom dropdowns or select components are rendered in a portal. The modal then treats the interaction as an outside click because, technically, the dropdown isn’t inside the modal in the DOM, it’s rendered elsewhere via a portal.The fix depends on your setup, whether it’s Radix/Base UI, fully custom etc. But since you now know the cause of it, you can ask your agent to fix it for you!

The initial issue description was pretty simple. Just a title and a video showing the issue. The agent then proposed a fix, and I accepted it.

This has a high ROI, since you can fix so many little bugs without spending too much time on it. The workflow is simple: spot something that’s wrong → document it → delegate it to an agent. While the agent is working, you can focus on other things.

To give you just one more example of this workflow, here’s a tweet of me fixing a long-standing bug in Linear. I came up with the solution, described it to an agent, and it fixed it for me.

Emil Kowalski
Emil Kowalski @emilkowalski
We had this long-standing papercut at Linear where the menu items overflow their outer container.It was hard to fix, or so I thought, because the structure is pretty complicated given all the design details, so a simple overflow: hidden wouldn’t work as it would break the animation.But today I had an epiphany that we could just use a simple CSS mask and fade the items out.Here’s a before & after with a zoom on the problem, look at the left edge:

The most important part is documenting the issue clearly so that the agent knows what to fix and how. Using screenshots with arrows pointing out the issue is a great way to do this. If it’s motion, use Lapse. Find the frame where something needs fixing, copy the state, and include it in the issue.

This takes a minute or two, but it’s definitely less than if you were to fix it by hand.

Tooling

When it comes to the specific tools I use, it’s pretty simple: Claude Code for working with AI, Cursor for manually writing code. I don’t have any fancy setups within these two tools either. I use Rex as my terminal for CC, this is how it looks:

I like to use Codex for stuff outside of code. The desktop app as well as the ChatGPT mobile app I enjoy using the most, and since most LLMs from various AI labs have similar capabilities, I base this decision on the UX.