Documentation
¶
Overview ¶
Package skills serves the bundled Gothic Framework skill documents to AI agents working on a Gothic project.
The markdown files under skills/ are embedded in the CLI binary (//go:embed) — the baseline set is always available, offline, with no filesystem or network access. Each document carries front matter:
name: <skill name> description: <one-line summary> applies_to: <module constraints, e.g. "core@>=1.0.0,<2.0.0 middlewares@>=1.3.0">
Version resolution keys off the framework module versions the consuming project pins in its go.mod require block (see cli.Config.FrameworkModules): a skill is part of the resolved set when every applies_to constraint is satisfied. Empty applies_to means the skill applies to any version. When NO pins are known at all (empty pin matrix), the embedded baseline is served in full — nothing can disqualify it.
Discovery (Search / Applicable) is version-gated. Explicit named requests (Info / Load) serve the embedded document whenever the name exists — the caller asked for it by exact name, so intent wins over the pin filter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
Ref
AppliesTo string
// Body is the markdown content without the front matter block.
Body string
}
Document is a fully loaded skill: front matter fields plus the markdown body (front matter block stripped).
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set is a view of the embedded skill set resolved against a pin matrix. The zero-value pin matrix (empty map / nil) selects the full embedded baseline — with no versions observed, nothing can be disqualified.
func New ¶
New builds a Set resolved against a pin matrix of framework module versions. Keys may be the short module name ("core", "components", "middlewares", "htmx-go") or the full module path ("github.com/gothicframework/core"); values are versions like "v1.6.0" (a leading "v" is optional). The pins should come from the consuming project's go.mod require block (cli.Config.FrameworkModules), optionally merged with the CLI's own FrameworkModules baseline where a project omits a pin.
func (*Set) Applicable ¶
Applicable returns the Refs of the resolved skill set for these pins, sorted by name.
func (*Set) Info ¶
Info returns the metadata (front matter) of the named skills, preserving the requested order. Unknown names are omitted. Named requests are NOT version-gated: an agent that names a skill gets its Info regardless of pins.
func (*Set) Load ¶
Load returns the full documents for the named skills, preserving the requested order. Unknown names are omitted. Named requests are NOT version-gated: an agent that names a skill gets the document regardless of pins. An empty names slice loads every embedded document.