Maesters

A maester is a source repository that declares what documentation it publishes via a maester.yaml file at its root.

A maester is any repository that publishes documentation for aggregation. The maester owns its publish surface: it decides which files to share via a single maester.yaml at the repository root.

Why source-owned?

The alternative — having a central aggregator decide what to pull from each source — pushes coordination costs onto whoever maintains the aggregator. As the number of sources grows, that person needs to know the internal structure of every repository they pull from, and any source-side restructuring breaks the aggregator silently.

Maesters invert that. Each repository’s maintainers decide what is “public” for documentation purposes, declare it in plain YAML, and review changes to that surface alongside their code changes.

Creating the manifest

Three ways, from the root of the source repo:

  • The walkthrough. Run npx baller-maester and pick “Configure this repo as a maester” (or run maester publish). It collects one or more entries — path or glob, plus optional description, category, tags, and state — and writes maester.yaml. It scaffolds no scripts.
  • Your coding agent. Install the Publisher skill and ask your agent to “set this repo up as a maester”. It inspects the repo, proposes a full manifest, and writes only what you approve.
  • Commands. maester publish add | remove | update | list edit one entry at a time, and maester publish apply applies a whole change set atomically — see the CLI reference.

The publish manifest

schemaVersion: 1
documents:
  - path: README.md
    category: readme
    description: Project overview and quickstart.
    state: canon
  - path: docs/architecture/**/*.md
    category: reference
    state: draft
  - path: docs/runbooks/**/*.md
    state: canon
    tags: [runbook, ops]

Each entry declares a path or glob, plus optional description, category, tags, and state. When a citadel copies a matched file, state, category, and tags are stamped into the file itself, so every reader — human or agent — can classify it just by opening it. See Document state, category and tags.

Publishing the whole repository

A maester.yaml with documents: [] — or no maester.yaml at all — means “publish everything”. Citadels then surface every file except build output, dependencies, binaries, and large files, as symlinks rather than copies.

Going from “everything” to a list of documents narrows what every citadel receives, so the editing commands ask you to confirm it (--acknowledge-narrowing).

Resident vs traveling

A maester can live in two places.

  • Resident. The source repo commits its own maester.yaml. The repo controls its publish surface.
  • Traveling. The citadel declares an includes list for a source whose remote does not (or will not) publish a manifest — a public third-party repo, a repo you have read access to but don’t own. The citadel owns the filter set; the maester “travels” to the remote in the form of an includes list back at the citadel.

Both forms end up in the same place — files materialised in the citadel under the source’s destination — and are processed by the same sync command. See Citadels for the citadel side.

Traveling maesters can also bring live data rather than files: connectors expose services such as issue trackers to agents as tools.

What gets pulled

A citadel that registers a resident maester pulls only the files listed in the publish manifest — not the entire repository. That keeps sync fast and avoids surfacing files that the source didn’t intend to share.

A maester doesn’t have to be a git remote: a citadel can read one straight from a local directory with a path: source.

Document state

Each entry can carry an optional state of canon or draft. Every file matched by the entry inherits that state when sync materialises it in the citadel — so downstream readers can tell stable references from work in progress. Individual files can override the entry inline (markdown frontmatter, HTML comments, YAML/JSON keys, or leading lines in a text file). See Document state, category and tags for the full resolution rules.