agentkb

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package agentkb is the embedded knowledge base that briefs AI coding agents building PromptArena kits. Concepts are the single hand-authored source; the skill, schema, and catalog accessors are layered on top.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentsBrief

func AgentsBrief() []byte

AgentsBrief returns the cross-agent AGENTS.md shim written into a scaffolded project. The marker comment lets init detect a prior brief and avoid duplicating.

func AuthoringPackYAML

func AuthoringPackYAML() []byte

AuthoringPackYAML returns the full authoring-agent PromptConfig YAML with AgentsBrief() embedded as the system_template block scalar.

func GenerateConfigFieldsReference

func GenerateConfigFieldsReference() ([]byte, error)

GenerateConfigFieldsReference renders a compact per-kind field cheat-sheet from the embedded JSON schemas. It is a navigation aid; `promptarena schema <type>` remains the authoritative full schema.

func GenerateEvalsReference

func GenerateEvalsReference() ([]byte, error)

GenerateEvalsReference renders the unified eval/assertion catalog markdown from the live handler registry + evalmeta.yaml + the alias table.

func Reference

func Reference(name string) ([]byte, error)

Reference returns the bytes of one bundled reference doc by filename.

func ReferenceNames

func ReferenceNames() ([]string, error)

ReferenceNames lists the bundled reference doc filenames (sorted).

func RenderExample

func RenderExample(loader ExampleLoader, name string) (string, error)

RenderExample resolves a catalog entry by name and renders its files as text. Builtin sources resolve offline via the loader. It is the single definition shared by the `examples show` command and the MCP show_example tool.

func Schema

func Schema(name string) ([]byte, error)

Schema returns the raw JSON schema bytes for a config type (e.g. "scenario").

func SchemaNames

func SchemaNames() ([]string, error)

SchemaNames lists the top-level config schema type names (sorted), excluding the common/ $ref directory.

func Skill

func Skill() ([]byte, error)

Skill assembles a SKILL.md from the authored lifecycle spine plus the embedded concepts (the idioms). Both are authored sources, so the skill can never drift from them.

Types

type Catalog

type Catalog struct {
	Entries []CatalogEntry `yaml:"entries"`
}

Catalog is the embedded example index.

func LoadCatalog

func LoadCatalog() (Catalog, error)

LoadCatalog parses the embedded catalog.yaml.

type CatalogEntry

type CatalogEntry struct {
	Name        string   `yaml:"name" json:"name"`
	Description string   `yaml:"description" json:"description"`
	Source      string   `yaml:"source" json:"source"` // "builtin:<name>" or "remote:<ref>"
	Concepts    []string `yaml:"concepts" json:"concepts"`
	Tags        []string `yaml:"tags" json:"tags"`
}

CatalogEntry indexes one example/template the agent can discover.

type Concept

type Concept struct {
	ID      string
	Title   string
	Summary string
	Tags    []string
	Body    string
}

Concept is one authoring idiom parsed from concepts/<id>.md.

func ConceptByID

func ConceptByID(id string) (Concept, error)

ConceptByID returns a single concept by ID.

func Concepts

func Concepts() ([]Concept, error)

Concepts returns every embedded concept, sorted by ID.

type ExampleLoader

type ExampleLoader interface {
	Load(name string) (*templates.Template, error)
	ReadTemplateFile(templateName, filePath string) ([]byte, error)
}

ExampleLoader is the subset of templates.Loader that RenderExample needs. templates.Loader satisfies it.

Jump to

Keyboard shortcuts

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