Shelf is open source and in early preview
Shelf

For AI agents: the documentation index is at /llms.txt, and any docs page is available as Markdown by appending .md to its URL.

Agents

Set up Shelf for a coding agent, and the loop it follows: search, add, read the source, change it, check.

Against a package, an agent sees types and docs. When the API doesn't fit, it adds a wrapper or an override. With Shelf, it reads the file that renders and changes that.

Set up a project

Paste this into your agent. It works in any React project.

shelf init also prepares the project for every later session. It adds a short Shelf block to AGENTS.md (between <!-- shelf:start --> and <!-- shelf:end -->, so it can be refreshed without touching your own text) and a skill at .agents/skills/shelf/SKILL.md. Pass --no-agents to skip both.

The loop

the agent loop
The agent loop: search, add, read, change, shelf check, and ship. A failing check loops back to change.

Every step is a command with short, stable output and no prompts. A failing check names the file and what to run, so the agent can fix it and check again.

Commands an agent can parse

Add --json to read output without scraping text.

  • search: { query, items: [{ name, type, description, useWhen?, avoidWhen?, related? }] }. Best match first. Every word must match somewhere in the name, keywords, description, or use notes, and "confirm" matches "confirmation".
  • status: { project, items: [{ name, revision, modified, modifiedFiles, updateAvailable }], notInstalled, summary }.
  • check: { ok, steps: [{ name, status, summary, issues }] }. Each issue has file, line, problem, and fix when there is one.
  • diff: { item, mode, changed, diff }.

Results are ordered so the first one is usually the right one: a name match beats a keyword, a keyword beats the description, and on a tie a template comes before a block, a block before a pattern, and a pattern before a component. Read avoidWhen before choosing: it names the item that fits better.

To read how a component works, run shelf docs button. It prints the description, dependencies, and source. shelf docs lists the topics, which are these pages as Markdown.

An example

terminal
An agent adds a confirm step: it searches Shelf, adds Alert Dialog, edits it, and shelf check passes with one file modified locally.

The output above is real. The agent found Alert Dialog instead of building a modal, added it, changed it, and got a passing check that lists the change.

Read these docs as Markdown

  • /llms.txt is the index, and /llms-full.txt is everything in one file.
  • Append .md to any docs URL, for example /docs/installation.md.
  • The copy icon beside each page title copies the page for an agent.

Install the skill on its own

To share the skill across repositories, or add it to a project that ran shelf init before the skill existed:

Why guessing is the default

An agent doesn't know which file is current, so it picks one that looks right. The fix is a system it can read: the source, the revision each product installed, and a check that names what is wrong. Read why agentic systems are the future of interfaces.

What comes next

Today, when shelf update leaves conflict markers, an agent resolves them with shelf diff --local for context, and shelf check fails until none are left. Planned, not available yet: stories and tests alongside each version, and visual feedback that says what changed.