roles

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package roles parses and validates the build-owned role catalog.

Index

Constants

View Source
const SchemaVersion = "mulgae-roles.v1"

Variables

This section is empty.

Functions

func ValidateCatalog

func ValidateCatalog(definitions []Definition) error

Types

type Activation

type Activation string
const (
	ActivationAlways        Activation = "always"
	ActivationProjectKindUI Activation = "project_kind_ui"
)

func (Activation) Valid

func (activation Activation) Valid() bool

type DefaultInputs added in v0.1.4

type DefaultInputs struct {
	TaskPath        string   `yaml:"task_path"`
	DesignSpecGlobs []string `yaml:"design_spec_globs"`
}

DefaultInputs carries the build-owned init-time artist input defaults. Only the artist role declares it.

func (*DefaultInputs) Clone added in v0.1.4

func (inputs *DefaultInputs) Clone() *DefaultInputs

Clone returns a fully caller-owned copy.

type Definition

type Definition struct {
	ID                  string         `yaml:"id"`
	Order               int            `yaml:"order"`
	Activation          Activation     `yaml:"activation"`
	ProviderPreferences []string       `yaml:"provider_preferences"`
	DefaultInputs       *DefaultInputs `yaml:"default_inputs,omitempty"`
	SystemPrompt        string         `yaml:"system_prompt"`
}

Definition is the authoritative build-time document for one review role.

func ParseCatalog added in v0.1.4

func ParseCatalog(contents []byte) ([]Definition, error)

ParseCatalog decodes the build-owned multi-role document and returns every definition in domain.FixedRoleOrder() order. The returned slice and every value it holds are newly allocated and caller-owned.

func (Definition) Validate

func (definition Definition) Validate() error

Jump to

Keyboard shortcuts

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