concepts

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package concepts provides a registry of scafctl domain concepts with concise explanations, examples, and cross-references. It is used by MCP tools, CLI help, and documentation generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Categories

func Categories() []string

Categories returns a sorted list of unique category names.

Types

type Concept

type Concept struct {
	// Name is the canonical kebab-case concept identifier.
	Name string `json:"name" yaml:"name"`

	// Title is the human-readable display name.
	Title string `json:"title" yaml:"title"`

	// Category groups related concepts (e.g., "resolvers", "testing", "actions").
	Category string `json:"category" yaml:"category"`

	// Summary is a one-sentence description.
	Summary string `json:"summary" yaml:"summary"`

	// Explanation is a multi-paragraph detailed explanation.
	Explanation string `json:"explanation" yaml:"explanation"`

	// Examples provides short YAML or code examples.
	Examples []string `json:"examples,omitempty" yaml:"examples,omitempty"`

	// SeeAlso lists related concept names.
	SeeAlso []string `json:"seeAlso,omitempty" yaml:"seeAlso,omitempty"`
}

Concept describes a single scafctl domain concept.

func ByCategory

func ByCategory(category string) []Concept

ByCategory returns all concepts in a given category, sorted by name.

func Get

func Get(name string) (Concept, bool)

Get returns a concept by name. Returns false if not found.

func List

func List() []Concept

List returns all registered concepts sorted by category then name.

func Search(query string) []Concept

Search returns concepts whose name, title, or summary contain the query (case-insensitive).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL