magus-docs-lookup
Short form: 3432 bytes, 19% smaller than the full form's 4259.
Traverse magus's own documentation to answer a "how does magus do X / what does Y mean / where is Z documented" question, instead of guessing an answer or a URL. Use when you need authoritative magus behavior (a CLI flag, a spell op, a diagnostic code, a config key, a stdlib module) and the workspace graph cannot give it. Do NOT use for facts about THIS workspace (use magus-query) or to run work (use magus-run).
Install it, rather than copying from this page:
magus agent install .claude/skills # writes both forms below
An installed copy carries a provenance stamp, so magus doctor can tell you when a magus upgrade has made it stale. Text copied from this page carries none.
What an installed copy carries
magus agent install writes this frontmatter above the body. magus doctor reads it to report whether your installed skills are current.
| field | value |
|---|---|
license |
GPL-3.0-or-later |
compatibility |
any-agent |
source |
magus |
agent-skill-version |
88 |
knowledge-schema-version |
15 |
skill-content |
46d6f7420b0d |
skill-variant |
full |
The skill-content digest covers this skill alone, and both forms below report it: they go stale together, never one silently, and a change to another skill does not move it.
The two forms
Both are hand-authored from one source body. The short form is the always-loaded primary - the enumeration dropped, the judgment kept, for the most capable readers rather than the least. The full form is its <name>-full twin, loaded by name when a reader wants the rationale. The bar above shows how much shorter the primary is; switch between them here to see exactly what it gave up. See Skills for how to choose.
magus agent install --tar | tar -xO -f - magus-docs-lookup/SKILL.md
# Navigating the magus docs
magus ships one official documentation site. Reach for it when a magus-domain fact
is not derivable from the workspace graph - they are the source of
truth for magus's own behavior.
Two places serve the same pages:
- In the magus repo (a `magusfile.buzz` at the root, a `docs/` tree): query the section
(next), or read `docs/<name>.md` when you already know the page.
- Published: the deployed site at `https://eli.gladman.cc/magus/`. Every page is
also emitted as raw Markdown at `<page-url>index.md` for clean fetching.
## In a magus workspace, ask the graph for the passage
Every markdown heading in the workspace is a `docsection` node, so "where is this
explained" is a query rather than a scan:
```sh
magus query kind=docsection "cache key"
```
Each result's id is `<path>#<anchor>`, a pointer to the one passage. Read that
section, not the file it sits in. The index route
below is for the PUBLISHED site, where there is no graph to ask.
## FAST PATH: start from the index, do not guess URLs
Two files at the docs root turn "find the right page" into a lookup, not a guess:
- `llms.txt` - one titled link per page, each pointing at that page's raw
Markdown (`<url>index.md`), with a one-line description. Read this FIRST to
locate a page, then fetch its `index.md`.
- `search-index.json` - a flat array of `{url, title, text, tags, description}`,
one record per page. Search it when you do not know the page name.
## URL scheme
Pages use extensionless directory URLs; append `index.md` for the raw source.
| You have | Page URL | Raw Markdown |
| ---------------------------- | -------------------- | --------------------------- |
| the `go` spell | `/spells/go/` | `/spells/go/index.md` |
| the `magus run` command | `/manpage/magus-run/`| `/manpage/magus-run/index.md`|
| diagnostic MGS2001 | `/codes/sandbox/MGS2001/` | `.../MGS2001/index.md` |
## Where things live (stable IDs route straight to a page)
magus mints stable IDs; each maps to a fixed section:
| Looking for | Go to |
| ---------------------------------- | ---------------------------- |
| a CLI command / flag | `/manpage/magus-<cmd>/` |
| a spell and its ops | `/spells/<name>/` |
| a diagnostic `MGSxxxx` | `/codes/` (grouped by family)|
| a stdlib module (fs, os, http, ...)| `/buzz/modules/<name>/` |
| a core concept (targets, cache, charms, sandbox, affected, ...) | `/<concept>/` |
| install / download | `/download/` and its children|
| the whole map | `/documentation/` |
## Traversing within the docs
Every page gives you three axes:
- Breadcrumb (up): the trail back to `/documentation/`.
- "In this section" (siblings + children): the other pages under this page's
section landing.
- Prev / next (pager): the adjacent pages in the same section.
Land via `llms.txt`, then sweep siblings via "In this section".
## In the magus repo
The `docs/` Markdown is the source of truth; `docs/gen/` is generated output
(never edit it - change the source and regenerate). MAGUS.md is a routing index
generated for HUMAN readers, so do not answer from it: true only as of its last
regeneration. `magus query "kind=doc"` lists every
page from the graph.
magus agent install --tar | tar -xO -f - magus-docs-lookup-full/SKILL.md
# Navigating the magus docs
magus ships one official documentation site. It is a static site, so its
structure is fixed and machine-readable: this skill teaches HOW to move through
it; the pages themselves carry the WHAT. Reach for it when a magus-domain fact
is not derivable from the workspace graph - the docs are the source of truth for
magus's own behavior, so read them rather than guessing.
Two places serve the same pages:
- In the magus repo (a `magusfile.buzz` at the root, a `docs/` tree): query the section
(next), or read `docs/<name>.md` when you already know the page. This is where
the skill is dogfooded, so prefer it here.
- Published: the deployed site at `https://eli.gladman.cc/magus/`. Every page is
also emitted as raw Markdown at `<page-url>index.md` for clean fetching.
## In a magus workspace, ask the graph for the passage
Every markdown heading in the workspace is a `docsection` node, so "where is this
explained" is a query rather than a scan:
```sh
magus query kind=docsection "cache key"
```
Each result's id is `<path>#<anchor>`, a pointer to the one passage. Read that
section, not the file it sits in. `project=<p>` scopes it, and `magus explain
"docsection:<path>#<anchor>"` walks the page's outline from there. The index route
below is for the PUBLISHED site, where there is no graph to ask.
## FAST PATH: start from the index, do not guess URLs
Two files at the docs root turn "find the right page" into a lookup, not a guess:
- `llms.txt` - one titled link per page, each pointing at that page's raw
Markdown (`<url>index.md`), with a one-line description. Read this FIRST to
locate a page, then fetch its `index.md`.
- `search-index.json` - a flat array of `{url, title, text, tags, description}`,
one record per page. Grep it for a keyword when you do not know the page name.
WRONG: guess `https://.../go-spell` or grep the open web.
CORRECT: read `llms.txt` (or `docs/` locally), find the entry, fetch its Markdown.
## URL scheme
Pages use extensionless directory URLs; append `index.md` for the raw source.
| You have | Page URL | Raw Markdown |
| ---------------------------- | -------------------- | --------------------------- |
| the `go` spell | `/spells/go/` | `/spells/go/index.md` |
| the `magus run` command | `/manpage/magus-run/`| `/manpage/magus-run/index.md`|
| diagnostic MGS2001 | `/codes/sandbox/MGS2001/` | `.../MGS2001/index.md` |
## Where things live (stable IDs route straight to a page)
magus mints stable IDs; each maps to a fixed section, so you jump without searching:
| Looking for | Go to |
| ---------------------------------- | ---------------------------- |
| a CLI command / flag | `/manpage/magus-<cmd>/` |
| a spell and its ops | `/spells/<name>/` |
| a diagnostic `MGSxxxx` | `/codes/` (grouped by family)|
| a stdlib module (fs, os, http, ...)| `/buzz/modules/<name>/` |
| a core concept (targets, cache, charms, sandbox, affected, ...) | `/<concept>/` |
| install / download | `/download/` and its children|
| the whole map | `/documentation/` |
## Traversing within the docs
Every page gives you three axes, so from one page you can reach its whole area:
- Breadcrumb (up): the trail back to `/documentation/`.
- "In this section" (siblings + children): the other pages under this page's
section landing. A `page_type: overview` page IS a section landing.
- Prev / next (pager): the adjacent pages in the same section.
So: land via `llms.txt`, read the page, then use "In this section" to sweep its
siblings - do not re-search for each one.
## In the magus repo
The `docs/` Markdown is the source of truth; `docs/gen/` is generated output
(never edit it - change the source and regenerate). MAGUS.md is a routing index
generated for HUMAN readers, so do not answer from it: it is true only as of the
last regeneration, and every fact in it has a live command. The knowledge graph
carries every page as a `doc` node, so `magus query "kind=doc"` (see the
magus-query skill) lists them from the graph.