Documentation
¶
Overview ¶
Package docs ships the framework's user-facing markdown docs as an embedded filesystem. Two consumers:
- `gofastr docs` CLI subcommand — list + show + search.
- `framework.WithMCPIntrospection()` — exposes framework_docs_list and framework_docs_get tools so agents connected to a running app can answer "how do I use hooks" without leaving the session.
The embedded tree is the source of truth for shipped docs; the repo's canonical edit location IS framework/docs/content/. There's no generation step — every commit changes the binary's docs the next build.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SearchHit ¶
type SearchHit struct {
Topic string
Line int
Heading string // the nearest preceding `# `-level heading, if any
Excerpt string // the matching line itself
}
SearchHit is a single grep match: which topic, which line, the line text, and a window of surrounding context for the CLI's --grep output.
func Search ¶
Search returns every line across all topics that contains the (case- insensitive) substring `term`, up to defaultSearchHitCap hits. Use SearchWithLimit for a caller-supplied cap.
func SearchWithLimit ¶
SearchWithLimit is the explicit-cap variant. limit <= 0 falls back to defaultSearchHitCap. The first `limit` matching lines are returned; the function stops scanning once the cap is reached so the cost is O(limit) for common queries.
type Topic ¶
type Topic struct {
// Name is the short identifier — the filename without .md.
// Use this with Get().
Name string
// Title is the first H1 heading from the file's content, or the
// humanised file name when no heading is present.
Title string
// Summary is the first non-heading paragraph, truncated to ~200
// chars. Empty when the file has no prose body.
Summary string
// Bytes is the size of the underlying markdown in bytes.
Bytes int
}
Topic describes a single doc file in the embedded tree.