← Guides

kaya editor · local review surface

Stop reviewing plans in a terminal.

An agent writes a plan, a spec, a report. Kaya serves that file as a page you can actually look at, lets you attach notes to specific parts of it, and hands those notes back to the agent as structured feedback. Everything runs on your machine - no account, no upload, no third-party host.

Why I built it instead of using something else → read the full newsletter post.

Requires Node 22 or newer. Zero runtime dependencies.

step 1 of 8

Install

One global install. It gives you the kaya command.

npm i -g kaya-editor

Check it landed:

kaya --help

step 2 of 8

Open a review

Point it at any HTML or Markdown file. It prints a local URL and opens your browser.

kaya plan.html

Kaya serving /path/to/plan.html at http://127.0.0.1:57749/
A launch plan rendered in Kaya, with the Annotate toggle in the top bar and the Conversation panel on the right
The page on the left is your artifact, unmodified. The top bar and the right-hand panel are Kaya's, injected at serve time. Your file on disk is never rewritten.

step 3 of 8

Know what you get styled, and what you don't

This catches people out on their first HTML artifact.

If you are asking an agent for an HTML artifact, tell it to include a <style> block. If you do not care about styling, ask for Markdown and let Kaya theme it.

step 4 of 8

Annotate

Flip Annotate on in the top bar. Then either click an element - a heading, a paragraph, a table row, a diagram node - or select text inside a paragraph to comment on that phrase specifically.

Annotate mode on, a paragraph boxed in orange, and a composer showing the targeted text with a note being typed
The composer quotes what you targeted, so you can confirm you hit the right thing before writing the note.

Press Queue to stage it. Keyboard: Enter queues, ⌘ + Enter sends the whole batch immediately.

Queued notes collapsed to single lines above the send buttons
Notes collapse to one line each. Hover to see the full text and its target. They go back as one batch, not one message per note.

Queued notes survive a reload. They are staged in session storage and restored automatically, so a refresh or an accidental back-button does not destroy what you typed. Staging clears only after a send succeeds.

step 5 of 8

Send, and run the loop

Send to Agent delivers the batch and keeps the review open. Send & End delivers it and closes the review.

On the agent side, this is the blocking half. It waits until you send something:

kaya poll plan.html --agent-reply "Rewrote the risk table, dropped the unverified claim."

The reply text appears in the Conversation panel, so you see what changed before you read the revision. Each agent reply is badged with its round number and the thread persists across rounds. When the agent rewrites the file, the open tab live-reloads in place - you do not reopen anything.

step 6 of 8

Ask the reviewer a typed question

Rather than asking a question in prose and parsing the answer, an artifact can declare a control and Kaya renders it:

<div data-kaya-ask="copy"
     data-kaya-label="How should the unverified claim be handled?"
     data-kaya-options="delete it|rewrite as edition note|leave and flag"></div>
A rendered question control with three clickable options inside the artifact
Clicking an option queues [ask] copy = rewrite as edition note. The answer comes back typed, so the agent never has to interpret a sentence.

step 7 of 8

Diagrams, zoom and layout checks

Put Mermaid in a fenced mermaid block (Markdown) or <pre class="mermaid"> (HTML). Kaya renders it dark themed and hand drawn.

A Mermaid flowchart rendered dark and hand-drawn inside the artifact, with a decision diamond and labelled edges
Rendered server-side, so it looks the same in the exported copy.

Hover any diagram, image or SVG for a zoom control. Wheel to zoom, drag to pan. With Annotate on, clicking a node inside the zoom comments on that node, not the whole diagram. Zoom is a hover affordance rather than a click, deliberately, so it never competes with annotating.

A zoom affordance appearing over a diagram on hover
Hover to zoom. Click a node inside it, with Annotate on, to comment on that box specifically.

The top bar carries a live count of layout problems and flags when the page scrolls sideways. Containers that scroll on purpose - a wide table you wrapped in overflow-x: auto - are not flagged. It reports real breakage, not intentional design.

step 8 of 8

Export, end, reopen

Export a standalone copy from the ⋮ menu, or from the terminal:

kaya export plan.html --out plan-standalone.html

Local assets are inlined - CSS, fonts, local scripts, and the vendored Mermaid runtime - so the result opens with no Kaya server running and no sibling files. Remote CDN references stay as links, so those still need network.

Ending and stopping:

kaya end plan.html     # end it as the agent
kaya stop plan.html    # stop that one server
kaya stop              # stop all of them
kaya list              # show active sessions

One asymmetry worth knowing: if you end a review from the browser, a plain kaya <file> refuses to reopen it and says why. An agent cannot wander back into a review you closed - it has to be asked.

kaya plan.html --reopen

An agent ending its own turn does not lock you out.

Command reference

CommandWhat it does
kaya <file>Open or resume a review
kaya <file> --reopenReopen a review you ended
kaya poll <file> [--agent-reply "..."]Block until feedback or end
kaya export <file> [--out <path>]Write a standalone HTML copy
kaya end <file>End the review as the agent
kaya listShow active sessions
kaya stop [file]Stop one server, or all

Kaya serves your file through a local server rooted at that file's own directory. Put images, CSS and fonts next to the artifact and reference them with relative paths, never a leading slash.

The store this was used to build is at hudphoto.com. The reasoning behind the whole rebuild, and what happened when I asked five AI models to find it, is in the newsletter.