> ## Documentation Index
> Fetch the complete documentation index at: https://saydo-5cd0e3d7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AGENTS.md Integration

> How to configure Claude to use your wiki automatically every session

After you compile and validate your wiki, the recommended long-term usage pattern is to add a short snippet to your project's `AGENTS.md` or `CLAUDE.md`. Once it's there, Claude reads the wiki automatically at the start of every session — no extra commands needed.

## How it works

The plugin injects wiki context via a `SessionStart` hook based on the `mode` in your `.wiki-compiler.json`. Adding the snippet below to `AGENTS.md` instructs Claude to read the wiki index first, then pull specific topic articles as needed — falling back to raw source files only when coverage is low.

<Warning>
  Never edit wiki files by hand. They are fully regenerated on each `/wiki-compile` run and your changes will be overwritten.
</Warning>

## Integration steps

<Steps>
  <Step title="Compile your wiki">
    Run `/wiki-compile` at least once and let it finish. On a large knowledge base this can take 5–10 minutes.
  </Step>

  <Step title="Validate the output">
    Open `wiki/INDEX.md` and spot-check a few topic articles. Confirm the content accurately reflects your knowledge base before telling Claude to rely on it.
  </Step>

  <Step title="Add the snippet to AGENTS.md">
    Open your project's `AGENTS.md` (or `CLAUDE.md` — both work) and paste the following, replacing `{your output path}` with the value of `output` in your `.wiki-compiler.json`:

    ```markdown theme={null}
    ## Knowledge Base

    A compiled knowledge wiki is available at `{your output path}/`.

    **Session startup:** Read `wiki/INDEX.md` for a topic overview, then read
    specific topic articles relevant to your current task.

    **Using coverage indicators:** Each section has a coverage tag:
    - `[coverage: high]` -- trust this section, skip the raw files.
    - `[coverage: medium]` -- good overview, check raw sources for granular questions.
    - `[coverage: low]` -- read the raw sources listed in that section directly.

    **When you need depth:** Check the article's Sources section for links to
    raw files. Only read raw sources for medium/low coverage sections or when
    you need very specific detail.

    **Never modify wiki files directly** -- they are regenerated by `/wiki-compile`.
    ```
  </Step>

  <Step title="Start a new session">
    Open a new Claude Code session in your project. Claude will now read `INDEX.md` on startup and pull relevant topic articles before answering questions.
  </Step>
</Steps>

## AGENTS.md vs CLAUDE.md

Both files work. Claude Code reads whichever one it finds. `AGENTS.md` is the newer convention and is preferred for multi-agent projects, but either is fine for this use case. If you already have one of these files, just append the snippet — the plugin never modifies either file on its own.

## Changing how much Claude prioritizes the wiki

The plugin has three modes you can set in `.wiki-compiler.json`:

| Mode                | Behavior                                           |
| ------------------- | -------------------------------------------------- |
| `staging` (default) | "Wiki is available — check it when you need depth" |
| `recommended`       | "Check wiki articles before raw files"             |
| `primary`           | "Wiki is your primary knowledge source"            |

The AGENTS.md snippet above gives Claude explicit, permanent instructions regardless of which mode is active. For most projects, setting `mode` to `recommended` or `primary` and adding the snippet is the cleanest setup.
