agent

package
v0.0.0-...-4b0c08a Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const InstructionTemplate = `## XDocs Structured Documentation

This project uses **xdocs** for structured, machine-readable documentation.
Load the ` + "`guiho-s-xdocs`" + ` agent skill when working with structured
documentation, ` + "`XDOCS.md`" + ` indexes, named ` + "`*.xdocs.md`" + ` descriptors,
companion documents, repository scanning, metadata discovery, or validation.

The project configuration is ` + "`xdocs.yaml`" + `. Respect ` + "`ai.mode`" + `:
` + "`prompt`" + ` requires confirmation before documentation writes, while
` + "`auto`" + ` permits immediate descriptor maintenance. Also respect
` + "`ignore.gitignore`" + ` and every ` + "`ignore.rules`" + ` entry: excluded paths are
outside the xdocs corpus, while ` + "`frontmatter: false`" + ` keeps matching documents
tracked without adding or requiring YAML frontmatter. Use ` + "`xdocs scan`" + `,
` + "`xdocs meta`" + `, ` + "`xdocs context`" + `, ` + "`xdocs tree`" + `, and
` + "`xdocs doctor`" + ` to discover and validate documentation.
`
View Source
const (
	SkillName = "guiho-s-xdocs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapResult

type BootstrapResult struct {
	Skills       []InstallResult     `json:"skills"`
	Instructions []InstructionResult `json:"instructions"`
}

type InstallResult

type InstallResult struct {
	Tool               string   `json:"tool"`
	Scope              string   `json:"scope"`
	Path               string   `json:"path"`
	Installed          bool     `json:"installed"`
	Updated            bool     `json:"updated"`
	RemovedLegacyPaths []string `json:"removedLegacyPaths"`
	PreviousVersion    string   `json:"previousVersion,omitempty"`
	BundledVersion     string   `json:"bundledVersion,omitempty"`
}

type InstructionResult

type InstructionResult struct {
	Path    string `json:"path"`
	Exists  bool   `json:"exists"`
	Changed bool   `json:"changed"`
}

func ApplyInstructions

func ApplyInstructions(cwd string) ([]InstructionResult, error)

func RemoveInstructions

func RemoveInstructions(cwd string) ([]InstructionResult, error)

type Prompt

type Prompt struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Body        string `json:"-"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(resources fs.FS, homeDirectory ...string) *Service

func (*Service) Bootstrap

func (s *Service) Bootstrap(cwd string) (BootstrapResult, error)

func (*Service) Install

func (s *Service) Install(scope, cwd string) ([]InstallResult, error)

func (*Service) ListSkills

func (s *Service) ListSkills(filter string) ([]SkillRecord, error)

func (*Service) Prompts

func (s *Service) Prompts() ([]Prompt, error)

func (*Service) ShowPrompt

func (s *Service) ShowPrompt(id string) (Prompt, error)

func (*Service) ShowSkill

func (s *Service) ShowSkill(id string) (SkillRecord, error)

func (*Service) Skill

func (s *Service) Skill() ([]byte, error)

func (*Service) Uninstall

func (s *Service) Uninstall(scope, cwd string) ([]string, error)

type SkillRecord

type SkillRecord struct {
	ID          string         `json:"id"`
	Path        string         `json:"path"`
	Description string         `json:"description"`
	Metadata    map[string]any `json:"metadata"`
}

Jump to

Keyboard shortcuts

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