Matt Waite
Tools
selfdocsComing next

Architecture docs that keep your notes.

Scan a repo, draft five docs with your local claude CLI, and read them in a viewer. Regenerate whenever the code changes, and your notes stay where you put them.

npx @excellent-so/selfdocs build --mocknpm

FreeMITRuns on your machineNo runtime dependencies

127.0.0.1:4630
selfdocs: Docs with your notes

What you get

  1. 01

    Drafted from the code

    Architecture, schema, API, data flow and integrations, each written from the files that match it.

  2. 02

    Your notes survive

    A note is pinned to the block above it. A regeneration rewrites the draft around it and leaves the note in place.

  3. 03

    Nothing gets lost

    If a section disappears, its notes wait at the end of the doc, and each goes back in when its section returns.

  4. 04

    Try it offline

    build --mock drafts all five docs from the file scan alone, with nothing else installed.

01

Add a note anywhere

Every paragraph, list, table and code block has its own Add note button. Here someone writes down why the fulfilment retries wait so long, right under the paragraph that describes them.

127.0.0.1:4630
selfdocs: Add a note anywhere
02

An API reference, drafted

The API Reference gives each endpoint a parameter table and sample JSON, drafted from the routes. The note under the table holds what the code can't say: when the header becomes required.

127.0.0.1:4630
selfdocs: An API reference, drafted
03

Notes survive regeneration

The partner feed was taken out of the code and the Integrations Guide regenerated. The note under the table stayed where it was, and the note about the feed moved to a list of detached notes, where it waits for its section to come back.

127.0.0.1:4630
selfdocs: Notes survive regeneration
04

The schema, in dark

The Database Schema in the dark theme: each table with its columns, types and constraints, drafted from the migrations, and a note on the column the app must never write.

127.0.0.1:4630
selfdocs: The schema, in dark

How it works

  1. 1

    Draft the docs

    npx @excellent-so/selfdocs build --mock
  2. 2

    Read and add notes

    npx @excellent-so/selfdocs open
  3. 3

    Draft with the model

    npx @excellent-so/selfdocs build

Details

Needs
Node 20. The claude CLI, signed in, to draft with a model
Writes
The docs and your notes to .selfdocs/ in your repo
Viewer
One HTML file with no outside requests, on 127.0.0.1
Dependencies
None at runtime
License
MIT

Why I made it

Regenerating is a merge: delete a section and your note sets itself aside, bring the section back and the note goes back in.

Matt Waite

Try selfdocs.

Free and MIT licensed. Coming soon: the code goes public at launch.

npx @excellent-so/selfdocs build --mocknpm