agent

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBlueprint

func ValidateBlueprint(path string, content []byte) error

ValidateBlueprint checks blueprint.yaml has valid structure and cross-references.

func ValidateBuildfile

func ValidateBuildfile(path string, content []byte) error

ValidateBuildfile checks buildfile.yaml has required fields.

func ValidateBuildfileDeep

func ValidateBuildfileDeep(buildfilePath, adapterPath string) []string

ValidateBuildfileDeep performs cross-reference validation on a buildfile. Returns string-formatted errors for backwards compatibility. For structured output suitable for agent consumption, use ValidateBuildfileDeepStructured.

func ValidateInfrastructure added in v0.1.8

func ValidateInfrastructure(path string, content []byte) error

ValidateInfrastructure checks infrastructure.md has valid fragment structure.

func ValidateInfrastructureDeep added in v0.1.8

func ValidateInfrastructureDeep(path string) ([]ValidationError, []PortabilityWarning)

ValidateInfrastructureDeep performs full schema validation on an infrastructure.md file.

func ValidateSurface

func ValidateSurface(path string, content []byte) error

ValidateSurface checks surface.md has fragment headings with Shows fields.

func ValidateYAML

func ValidateYAML(path string, content []byte) error

ValidateYAML checks that a file is valid YAML.

Types

type PortabilityWarning added in v0.1.8

type PortabilityWarning struct {
	Fragment   string `json:"fragment"`
	Field      string `json:"field"`
	Content    string `json:"content"`
	Suggestion string `json:"suggestion"`
}

type ValidationError

type ValidationError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Context string `json:"context,omitempty"`
	Fix     string `json:"fix"`
}

ValidationError is a structured error returned by deep validation. Fields are designed for agent consumption: code identifies the error class, context provides specifics about where it occurred, and fix suggests recovery.

func ValidateBuildfileDeepStructured

func ValidateBuildfileDeepStructured(buildfilePath, adapterPath string) []ValidationError

ValidateBuildfileDeepStructured performs cross-reference validation and returns structured errors. Each error has a code (for programmatic handling), context (location), and fix (recovery hint).

type Validator

type Validator func(path string, content []byte) error

Validator checks a file's content against its schema.

Jump to

Keyboard shortcuts

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