Docs agentinit · build · check

Docs prepared for whoever reads next.

Dewey keeps your Markdown docs, AGENTS.md and llms.txt in step with the code, and builds a static docs site from the same files. People get the pages; agents get the front door, the maps and the index.

bun add -d @deweydocs/dewey
~/my-projectToday’s session
  1. bunx dewey init
  2. → AGENTS.md · SKILL.md · draft guide and maps
  3. bunx dewey build
  4. → .dewey/site · llms.txt · llms-full.txt
  5. bunx dewey check
  6. ✓ references · coverage · reviews · outputs
0 issuesCheck passed
Example session, after the drafts were finished and reviewed.
7commands
4kinds of doc
150line front-door budget
6site skins
Sequence

One drawer per project. Every card filed.

From an empty folder to docs that pass check. Dewey writes its own files and the marked regions of AGENTS.md and llms.txt; everything else is left alone.

Fig. 1 · Card catalogue.dewey/project.json
  1. Initialise

    Front door, skills, settings, a draft guide and a draft map per source area.

    dewey init
  2. Author

    Guides and references for people; maps of the source for agents.

    *.md + *.agent.md
  3. Review

    Record that each map was checked against the code.

    dewey review
  4. Build

    Static site, .md copies, llms.txt and llms-full.txt from the same Markdown.

    dewey build
  5. Check

    Drafts, coverage, stale reviews, broken references and stale outputs.

    dewey check
Document

One page, two readers.

Guides explain tasks to people and agents. Maps tell agents what the source does and declare the files they cover, so check knows when a map needs another look.

docs / quickstart

Quickstart

Install the CLI, set the project up, finish the drafts, then build and check.

  1. Install Dewey as a dev dependency.
  2. Initialise with the project’s purpose and hard rules.
  3. Build, then check.
bun add -d @deweydocs/dewey
bunx dewey init --purpose "…" --no-rules
bunx dewey build
bunx dewey check   # Dewey check passed
guide: on the site · map: covers src/*, not publishedOpen page
Output

Files agents read first.

One build writes the site and the agent files from the same Markdown. Outputs are tracked by hash, and the build stops rather than overwrite a hand edit.

my-project/
├─ AGENTS.md
├─ SKILL.md
├─ llms.txt
├─ .dewey/
│  ├─ project.json
│  └─ site/ html · .md · llms-full.txt
└─ docs/
   ├─ quickstart.md
   └─ src.agent.md
AGENTS.md
Purpose, hard rules, and a marked region Dewey keeps current: scripts, source areas and maps.
llms.txt
An index of the pages, with a summary and size for each.
SKILL.md
How an agent in another project should use this one.
.dewey/site/
A static site with a .md copy of each page. Works with JavaScript off.
llms-full.txt
Every guide and reference in one file, for agents that want all of it.
Agent entry

Where agents start reading.

Static files at the site root. Point an agent at /llms.txt or /agent/manifest.json; everything else is linked from there.

host deweydocs.comschemaVersion 1lifecycle regenerateregistry /.dewey-generated.json
  • /llms.txttext—Plain-text index of every page. Alias: /lm.txt.Open
  • /AGENTS.mdmd—Full agent context with every agent page inline.Open
  • /install.mdmd—Executable install guide for an agent to follow.Open
  • /agent/manifest.jsonjson—Discovery index for docs, prompts and bundles.Open
  • /agent/docs.jsonjson—Structured docs manifest with markdown bodies.Open
  • /agent/bundles/core.mdmd—Core context bundle. Full set: /agent/bundles/all.md.Open
  • /agents/{slug}.mdmd—Agent pages. Read order: overview, quickstart, api.
This site’s files are written by the frozen bunx dewey generate.Agent index →
Judgment

A check you can act on.

dewey check compares the docs with the code and with each other. Each issue has a code, a file, a line and a fix, and any issue exits 1.

bunx dewey checkIllustrative
2issues
Exit 1

Example output. A pass means references, coverage, reviews and outputs agree. It does not prove the prose is true.

  • ✓
    Every source file has a mapNo file is uncovered or covered twice.
    MAP_MISSING
  • ✓
    Cited paths and symbols existsrc/model.ts#loadModel is still declared.
    MISSING_SYMBOL
  • !
    Covered code changedsrc/index.ts changed since the last review.
    REVIEW_REQUIRED
  • !
    Draft not finisheddocs/quickstart.md still has draft: true.
    DOC_DRAFT
Desk

The rest of the toolkit.

Prompt templates: docsReviewAgent, docsDesignCritic, installMdGenerator, promptSlideoutGenerator, improveAIPrompts.

ReviewRecord that a map was checked against the code. Check asks again when that code changes. dewey review
Find the docsList the docs that cover a file before you change it. dewey which
RebuildOutputs are tracked by hash. A hand edit stops the build instead of being overwritten. dewey build
Style the sitePick a skin, theme, accent, fonts and header links, or embed the components in React. .dewey/project.json

Docs that keep up with the code.

Install, initialise, build. Then let check tell you what is out of date.