Examples

A running stream of Maester use cases, newest first. Each post walks through the scenario, the approach, and what it gets you — follow the link on any example to see the working configuration.

  1. Let your agent draft maester.yaml

    Install the Publisher skill and have your coding agent propose a repository's publish manifest — grounded in the repo, reviewed by you, written atomically.

    A repository with forty markdown files, three doc folders, and an .env nobody should ever publish. Writing its maester.yaml by hand means auditing every directory. Your coding agent can do the audit; you just review it.

    The scenario

    The billing service has never published anything, so every citadel that pulls it gets the whole repository. You want a curated manifest — overview, ADRs, runbooks — with sensible descriptions and categories that match what other repos already use.

    How this example handles it

    Install the Publisher skill once, in the service repo:

    npx baller-maester skill install --skill publisher --target claude-code

    Then ask the agent: “Set this repo up as a maester.” It runs maester publish inventory, drafts a change set, checks it with maester publish apply --dry-run and maester publish preview, and shows you something like:

    PathDescriptionCategoryStateWhy
    README.mdBilling service overviewreadmecanonEntry point for new readers
    docs/adr/*.mdArchitecture decisionsadrcanon12 ADRs; adr already used in 3 files
    docs/runbooks/**/*.mdOn-call runbooksrunbook (new)draftOperational docs, still being revised

    It also tells you what it left out — .env (sensitive), dist/ (generated) — and that switching from “publish everything” to a list narrows what every citadel receives. Approve, drop, or edit rows; only what you approve is written.

    What it gets you

    • A grounded proposal, not a guess. Every row comes from the repo’s actual files and the categories and tags already in use.
    • Nothing written behind your back. One atomic maester publish apply after you approve, preserving any comments you add later.
    • Safe by construction. Sensitive paths are refused unless you explicitly allow them, and the agent never edits your documents.

    Run it again later with “tidy up maester.yaml”: in refine mode the agent proposes only additions, removals, and missing fields, and asks separately before changing anything you already set.

  2. Docs from a sibling checkout

    Pull documentation straight from a directory on your machine — linked for live edits, or copied for a committable snapshot — with no git round-trip.

    You’re editing a service’s design docs in one checkout and want your agent, working in another repo, to see them now — not after you push, merge, and sync.

    The scenario

    Your platform team keeps its docs in platform-docs, checked out next to the app you’re working on. A git source would only see what’s been pushed. You want the citadel to read the working copy directly, and you also keep a team handbook in a folder that isn’t a git repo at all.

    How this example handles it

    Declare the sources with path: instead of url::

    # citadel.yaml
    schemaVersion: 1
    sources:
      # Linked (default): one symlink per file, gitignored.
      - name: platform-docs
        path: ../platform-docs
    
      # Copied: a committable snapshot, stamped with state/category/tags.
      - name: handbook
        path: ${HANDBOOK_HOME}
        mode: copy
        includes:
          - '**/*.md'

    maester sync links every file platform-docs publishes (from its own maester.yaml, if it has one) and copies the handbook’s Markdown. No git, no cache, no network.

    What it gets you

    • Edits show through immediately. A linked file is the original; only adding or removing files needs another sync.
    • A snapshot when you want one. mode: copy gives teammates and CI the same files, committed alongside your code.
    • Status still works. maester status compares on disk and reports local-changed when the files have moved on since the last sync — or source-missing if the directory is gone.

    Linked sources are machine-specific by design, so they stay out of git. Paths can be relative, absolute, ~/…, or built from an environment variable so each teammate can point at their own checkout.

  3. System docs for a spec-driven SOA

    Aggregate per-service specs and changelogs from many service repos into one citadel so system-wide documentation, release notes, and architecture summaries can be generated against the whole platform.

    A service-oriented system splits cleanly into deployables — and every artifact that explains the system (rather than one service) ends up scattered across the same number of repositories.

    The scenario

    A team running a service-oriented architecture ships each service from its own repository, with its own deploy cycle and its own spec-driven workflow — a specs/ (or gspec/) directory describing what the service does, plus a CHANGELOG.md tracking what it has done. The discipline is healthy at the service level: every change has a spec, every release has a note.

    The trouble starts one level up. Anything that needs to describe the system — an architecture overview, a quarterly release summary, a “what does this platform actually do” page for new hires — has to be assembled by hand from material the team has already written, just in different repos. AI assistants asked to summarize, search, or reason across the whole platform run into the same wall.

    How this example handles it

    One citadel collects exactly the artifacts that describe each service. For every service repo, the citadel’s source declares an includes list that pulls in the spec files and the changelog and nothing else — no service source code, no test fixtures, no build configs:

    • specs/**/*.md from each service repo
    • CHANGELOG.md from each service repo

    The resulting tree is a system map written in the same vocabulary the teams already use: one directory per service, each containing the canonical statement of what it does and the canonical record of what changed. Add a new service, add a new source entry; retire one, drop the entry.

    What it gets you

    • System-wide documentation, generated. An AI agent reading the citadel can produce an up-to-date architecture overview, a service catalog, or a “how do these services fit together” page — grounded in specs written by the teams that own each service rather than guessed from code.
    • One changelog across N deployables. A release summary that covers every service is a walk across the aggregated CHANGELOG.md files — useful for stakeholder updates, quarterly reviews, and incident retrospectives.
    • No central docs to drift. Because the system view is rebuilt from the per-service sources, it cannot fall out of sync independently — the only way to change the system docs is to change the underlying specs and changelogs, exactly where the team is already working.
    • Per-service autonomy preserved. Each service team owns its repo, its spec format, and its release cadence. The citadel adds a system view without pulling anything back to a monorepo.

    Spec-driven SOA pairs naturally with aggregation: the artifacts that describe each service are already structured, already authored, and already updated alongside the code. A citadel just makes them addressable as one thing.

  4. CI-driven docs sync

    Sync a citadel inside GitHub Actions so the aggregated tree is always rebuilt against the latest sources before publication.

    Documentation goes stale the moment someone merges a change — and most teams notice only when an outdated answer surfaces in chat or a model hallucinates against a six-week-old README.

    The scenario

    Teams that publish documentation — or feed it to an AI assistant — usually share one problem: their canonical sources live in many repositories, and the published view drifts the moment something merges. Manual syncs work for a week and then quietly fall behind.

    How this example handles it

    This recipe moves the sync into CI. A scheduled GitHub Actions workflow (plus a workflow_dispatch trigger for ad-hoc rebuilds) checks out the citadel definition, runs maester sync, and uploads the resulting tree as a build artifact. The aggregation runs against the latest commit on every source repo, every time the workflow fires.

    What it gets you

    • Always-fresh artifacts. Docs sites, RAG indexes, and downstream pipelines see the freshest content without anyone remembering to push a button.
    • Fully declarative, fully audited. Every rebuild is a CI run with logs, diffs, and a permalink — drift is easy to spot and rollbacks are trivial.
    • Plays well with what you already ship. Slots cleanly next to whatever you publish from Actions: Pages, S3, a docs bucket, an embeddings job.

    The pattern generalizes: any CI provider that can run npx on a cron schedule can drive a Maester sync the same way. GitHub Actions is just the most convenient default.

  5. Third-party docs via includes

    Aggregate documentation from third-party repos that don't publish their own maester.yaml by declaring an includes list on each source.

    Your team’s documentation is only half the story — the other half lives in the framework docs, library READMEs, and reference sites your code actually depends on. Most of those upstream projects have no reason to ship a Maester config for you.

    The scenario

    The libraries and frameworks your team depends on usually have excellent documentation — but it lives in their repository, on their terms, and they have no reason to publish a Maester config for downstream consumers. Without a way to pull selectively from those repos, your aggregated context stops at the edge of code you control.

    How this example handles it

    Each source declares an includes list of glob patterns. Maester resolves the upstream repo, matches the globs against its tree, and pulls only the files you actually want — for instance:

    • src/content/docs/**/*.mdx from the Astro docs
    • src/pages/docs/**/*.mdx from the Tailwind site

    Nothing else from those repositories enters the citadel.

    What it gets you

    • Canonical upstream references, on your terms. AI agents and code search see the framework docs alongside your own, pinned to the version you choose.
    • No forks, no vendoring, no upstream PRs. Pull what you need without asking the maintainers for cooperation.
    • One-line upgrades. When a dependency moves, bumping the ref is the only change required to refresh its docs in your aggregation.

    Think of includes as a polite way to depend on someone else’s documentation: you take only what you need, and you take it explicitly.

  6. Multi-repo docs aggregator

    Pull READMEs and docs trees from three sibling repositories into one local citadel for cross-repo reading.

    Reading a system that lives in three repositories shouldn’t require three clones and an unreliable memory of which main is most recent. A single aggregated tree fixes that.

    The scenario

    Most non-trivial systems span more than one repository — an API service, a web client, a shared library or two — and the documentation that explains them spans every one. Reading across that boundary normally means cloning each repo, remembering where each piece lives, and accepting that whatever you’re looking at is some unknown amount behind main.

    How this example handles it

    Three sibling repositories are listed as sources in a single citadel.yaml, each named, pinned to a branch, and dropped under a shared base directory. Once the citadel is synced, the codebase looks like one folder rather than three — and tools that operate on folders (grep, search, indexers, AI agents) operate on the whole system at once.

    What it gets you

    • One mental model for cross-repo work. Onboarding engineers can read the whole system without juggling tabs.
    • Tooling that just works. Code search, grep, IDE indexes, and AI assistants get a coherent context window instead of a patchwork.
    • Reproducible by design. Anyone running the same citadel.yaml ends up with the same tree — useful for review, CI, and shared dev environments.

    This is the simplest useful Maester configuration: three sources, no includes, no transforms. It’s the starting point most teams grow from.