A Companion Pet for an AI Coding Assistant: Visualizing Its Working States
This article describes an open-source experiment: a pixel-art companion pet that shows the status of an AI coding assistant without performing any tasks itself. It covers the three-state design, the rules that define when the pet changes state, and how the pet is rendered in a terminal with half-block characters. It also describes how most of the plugin's code was written with an AI coding assistant.
An Unexpected Open-Source Experiment
Most developers have had a similar experience: you build a tool you think is genuinely useful, publish it to the community, and nobody pays attention. Then a small side project you made on a whim gets noticed. I recently had this kind of contrast. I had used AI assistance to build several small tools aimed at improving productivity, and after publishing them they drew almost no response. The only project a stranger forked (copied the code to modify it independently) was a background image replacement plugin that performed no real function. It swapped one background image in the interface, yet it earned stars and was further developed by others.
This made me rethink a question: which kinds of projects spread in developer communities? The answer is often not “more useful” but “more fun, lower barrier to entry, and more room for self-expression.” The value of a pure utility is capped by its functionality. A fun project with emotional appeal, on the other hand, gets displayed, discussed, and modified by its users on their own initiative.
So this time I built a project that does no real work: a pet for an AI coding assistant.
Design: From Helping With Tasks to Keeping You Company
The pet is a pixel-art character holding a book. She sits beside the conversation area. She doesn’t execute tasks, modify code, or interfere with any workflow. Her only job is to be present.
The interaction logic is simple and maps to three running states of the coding assistant:
- Idle: She sits quietly holding her book, with the line “Waiting for you” displayed below her.
- Working: After the user sends an instruction, she bends over and flips through her book, indicating that the assistant is thinking or running an operation.
- Finished: When the assistant finishes its answer, she raises the book and smiles. About 8 seconds later, she returns to idle.
The key insight is that while an AI coding assistant works, the user is mostly waiting and watching. Most of the time, we can only stare at scrolling output and guess how far along it is. A graphical status indicator turns the abstract “processing” into the concrete image of her flipping pages, which communicates more efficiently.
To make it more practical, I added one more detail: during the working state, the text below the pet shows the name of the tool the assistant is currently calling. At a glance, users can tell whether a step is reading a file, running a command, or searching. It works as a minimal progress monitor.
Key Decisions in the State Machine
Even a simple component needs careful handling of its state boundaries.
First, “finished” must be strictly defined. She raises the book and smiles only when the response ends. If the user interrupts the current turn, or an error occurs during execution, she does not smile and goes straight back to idle. The smile is a strong signal: only when you see it do you know that a turn has fully completed. This is more intuitive than checking for a stop token, because interruptions and errors also stop the text from scrolling.
Second, main conversations and subtasks must be separated. When handling complex tasks, the coding assistant may spawn subtasks that run in parallel. The pet follows only the state of the main conversation, and subtasks trigger no changes. Otherwise, the expression would flicker constantly and make the status harder to read.
Third, zero configuration and zero maintenance. After installation, there are only three expressions. Users don’t need to feed, raise, or customize a “persona” for the pet. The assistant does its work as usual, and the pet only observes and displays. This scope needs to stay restrained. Once features start piling up, the project falls into a “wants to do everything” trap and ends up neither fun nor useful.
Terminal Rendering
The most technically demanding part of this project is drawing pixel art reliably across different environments.
In graphical environments, the full pixel art can be rendered directly, and the character can appear full-body without layout constraints. The real challenge is the terminal, which can display only characters, so pixel art has to be assembled from characters.
I used half-block rendering. Unicode includes upper and lower half-block characters (such as ▀ and ▄). A single character cell can represent the colors of two “pixels,” one above the other: the upper half uses the foreground color, and the lower half uses the background color. This doubles the vertical resolution, so finer images can be shown in fewer rows.
The final terminal version is a 36-column by 16-row half-body portrait. This size came from repeated tuning. Smaller, and facial expressions lose detail. Larger, and it crowds the normal conversation area. At 36×16, it displays well in mainstream terminals and doesn’t depend on special fonts or graphics protocols.
The layout is also adaptive. When the terminal window is 144 columns wide or more, the pet appears automatically beside the conversation. When the window is narrower, the pet takes no space, and the user can summon it manually with a command. This avoids breaking normal interaction in small windows.
# Illustrative: pseudocode for state transitionson_user_message():pet.set_state(WORKING)pet.show_current_tool()on_tool_call(tool_name):pet.update_status_text(tool_name)on_response_done():pet.set_state(FINISHED) # raise the book and smileafter(8s): pet.set_state(IDLE)on_interrupt_or_error():pet.set_state(IDLE) # no smile, back to idle directly
Monitoring state only requires hooking into the assistant’s event callbacks, so the implementation stays lightweight.
Lessons From Building With AI
The plugin’s code was mostly written by the coding assistant itself. My role was designing the character, defining the interactions, and doing the final acceptance testing. For individual developers, this suggests that the bottleneck in small projects is shifting from “writing code” to “knowing exactly what you want.”
My workflow was roughly this: describe the interaction details as precisely as possible, including boundary conditions such as “don’t smile on error, go straight back to idle.” Then let the assistant generate the implementation, and verify the boundary behavior item by item. State-machine projects suit this approach well, because state transitions can be checked exhaustively, the acceptance criteria are clear, and rework costs are low.
For users who want to replace the character with their own design, they can also describe the requirements to a coding assistant and ask it to swap in new assets and text within the existing structure, with little or no hand-written code.
Why “Useless” Things Can Be Valuable
Looking back, this small project spread far more than any of the “serious tools” I had built before. The reasons are worth summarizing:
- Emotional value is a real need: Developers who spend long hours in a terminal need a bit of fun to relieve the monotony. Companionship is valuable in itself.
- Zero learning cost: It works right after installation, with no configuration or mental overhead, so the path to sharing is very short.
- Easy to modify: The pixel character is easy to replace, so users can swap in a figure they like, which naturally invites remixing.
- Hidden utility: Although the pet does no work, status visualization reduces the effort users need to judge what the assistant is doing.
For anyone building developer tools, this is a reminder that a tool’s value lies not only in its feature list but also in how it feels to use. A tool people are happy to keep open all day can go further than a powerful one that wears people out.
Conclusion
Building a pet for a coding assistant may look like an unserious side project, but it’s also a small experiment on the relationship between people and tools. The state machine design, character rendering in the terminal, and AI-assisted development each involve real technical work. Its popularity points to the emotional side of developer experience, which is often overlooked. If you want to add a little warmth to your own toolchain, consider starting with a project like this one that does no real work. It may be more useful than you expect.
