Root pages are created only when you have something real to write

`brain init` no longer lays down six placeholder templates. New brains start with an empty `pages/` directory, and `brain update-root` creates a root page only when you actually author content.

Highlights

Root pages on demand

A new brain starts with an empty pages/ directory and no root pages. brain init no longer lays down six placeholder templates.

brain update-root <slug> creates one of the six slots (background, architecture, flow, mindmap, stack, roadmap) only when stdin starts with an authored # Title and has real content after that heading. The displayed title comes from that heading.

printf '# System architecture\n\n## Overview\n\nRequests enter through the gateway.\n' | brain update-root architecture

Heading rules for later writes

  • A legacy root page whose stored body has no H1 can omit the heading on its next write. The stored frontmatter title is inserted as the H1.
  • A page that already starts with an H1 must include one on every later write. Omitting it fails, and the file is left unchanged.
  • Existing populated brains are left in place — brain init still does not overwrite them.

Install notes

  • Prefer a global install if you want bare brain on PATH. npx alone does not leave brain on PATH.
  • Existing installs: bump to @mindmux/[email protected], then run brain setup -y.

Related links

Share to