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 the matching lines across all topics, up to defaultSearchHitCap hits, ordered by TOPIC RELEVANCE: a topic whose title matches the term first, then topics with more heading matches, then topics with more body matches, alphabetical only as the tie-break. Within a topic the hits keep their line order. Use SearchWithLimit for a caller-supplied cap.
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.