Lovely Docs

Hierarchically optimized documentation for AI coding agents

Why Lovely Docs?

AI coding tools work best when given access to up-to-date documentation.

Lovely Docs places the documentation inside a folder (.lovely-docs/ by default) in your project. The documentation is available in both condensed and fulltext forms - noise is removed from pages, and content summaries are created for each directory.

Your coding agent should have an easy time searching and reading the documentation using its built-in tools, and you can also directly point it to any particular file using @.lovely-docs/... or equivalent mechanism.

You can also use Lovely Docs MCP Server, but a local folder works better for AI coding agents.

Quick Start

Note: The Lovely Docs CLI is written in TypeScript, but your project can be written in any language

Initialize
npx -y lovely-docs init
List Libraries
npx -y lovely-docs list
Add Library
npx -y lovely-docs add sveltejs/svelte

Directory structure

You can experiment with the installed. So far I found that "Diegst only" without directory summaries and llm map works best in Windsurf and Antigravity, but give it a try and let me know how it goes.

Installation directory:
Installation mode
Install directory summaries?
Generate LLM_MAP.md?
.lovely-docs/
getting_started.md # Page digest
svelte_files.md # Page digest
$derived.md # Page digest
$effect.md # Page digest
$state.md # Page digest
what_are_runes.md # Page digest

Example rules

You can add the following rule to your .cursorrules or similar configuration to help your AI agent use the documentation effectively:

We have dehydrated documentation in .lovely-docs/. When you start a new session, check what's available. Refer to the docs first time you use a feature of a documented library.

Or a more agressive

We have curated, dehydrated documentation in .lovely-docs/ WORKFLOW: 1. At the START of EVERY session, run: list_dir on .lovely-docs/ 2. If documentation exists for a library you're about to use, read the relevant sections before using a feature for the first time.

MCP Server

You can run a Lovely Docs MCP server locally. Or you can access the one I'm running publicly.

{
  "mcpServers": {
    "lovely-docs": {
      "command": "npx",
      "args": [
        "-y",
        "lovely-docs",
        "mcp"
      ]
    }
  }
}

File → Preferences → Cursor Settings → Features → MCP Servers → "Add New MCP Server" → Paste configuration