Skip to main content

kaish_help/
lib.rs

1//! Composable help & instructions for kaish.
2//!
3//! kaish's canonical guidance lives here, once, so the kernel `help` builtin, the
4//! REPL, the MCP server, and external embedders (kaijutsu, kaibo) all build their
5//! human- and agent-facing instructions on the same source — a kaish release pushes
6//! updates everywhere instead of each frontend hand-rolling prose that drifts.
7//!
8//! Two surfaces:
9//!
10//! - [`topic`] — the `help <topic>` command / MCP-prompt compatibility surface:
11//!   [`get_help`], [`list_topics`], [`HelpTopic`]. Whole embedded markdown docs.
12//! - [`compose`] — the composition surface: a concept-organized [`Fragment`] model
13//!   ([`Concept`] / [`Variant`] / [`Audience`] / [`Depth`] / locale) assembled by
14//!   [`compose`](compose::compose) via [`Selector`]s and ready-made [`Recipe`]s.
15//!
16//! Design: `docs/composable-help.md`.
17
18pub mod compose;
19pub mod content;
20pub mod fragments;
21pub mod topic;
22
23// Compatibility surface — the `help <topic>` command and MCP prompts.
24pub use topic::{get_help, list_topics, HelpTopic};
25
26// Composition surface — recipes for frontends and embedders.
27pub use compose::{
28    compose, coverage, render_syntax_reference, Audience, Concept, Depth, Fragment,
29    GeneratedContent, MissingFragment, Recipe, SchemaContent, Selector, Variant, DEFAULT_LOCALE,
30};