Expand description
A documentation library for agents: folders are categories (nested folders are subcategories), markdown files are documents, and every page is served verbatim.
_category.mdin a folder describes it (frontmattertitle,description; the body is the overview). It is not listed as a document. The root one says what the library is.- A document’s frontmatter has
title,description(when to read it), and optionallyorder(lower first) andtags. embed(build scripts) writes a(path, text)table of a folder forinclude!, so a page joins by being added to the folder.Library::overlay_diradds a folder at run time on top, where the same path replaces the built-in page.
Modules§
- write
- Writing pages into the user’s own folder (the one
Library::overlay_dirreads), so an agent can keep notes that later sessions find: save a page, append to one, delete one.
Structs§
- Category
- One category (folder). A folder without
_category.mdstill is one, titled after its name. - Doc
- One document.
- Frontmatter
- The frontmatter fields this library reads, and the text after it.
- Library
- Documents and categories, sorted by path.
- Node
- A category with what is under it, for
Library::tree.
Enums§
- Source
- Where a page came from.
Constants§
- CATEGORY_
FILE - The file in a folder that describes its category.
- MAX_
DEPTH - Folders deeper than this are not read.
- MAX_
FILES - A run-time folder contributes at most this many files.
- MAX_
FILE_ BYTES - A run-time file larger than this is skipped.
Functions§
- embed
- Write the markdown files under
diras a Rust table forinclude!:pub static FILES: &[(&str, &str)] = &[("skills/review.md", include_str!("…")), …];, sorted by path, and printcargo:rerun-if-changedfor every folder and file so an added, removed or edited page rebuilds the crate. For build scripts. Returns how many files were written.