Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Default values for the spec. DefaultVersion = 1 // DefaultName is the default filename for the spec file. It can be changed in the builder configuration. DefaultName = ".builder.yml" // DefaultFolder is the default folder where the spec file is stored. DefaultFolder = ".builder" )
Variables ¶
View Source
var Files embed.FS
Functions ¶
Types ¶
type Context ¶
type Context struct {
// Requires is the list of requirements for the task.
Requires []string `json:"requires,omitempty" yaml:"requires,omitempty"`
// Instruction is the instruction for the task.
Instruction string `json:"instruction" yaml:"instruction"`
// TrackBy is the list of fields to track by.
TrackBy []string `json:"trackBy,omitempty" yaml:"trackBy,omitempty"`
// Documents is the list of documents for the task.
Documents Documents `json:"documents" yaml:"documents"`
}
Context is the context for a task.
type Deploy ¶
type Deploy struct {
// Path is the path to the deployment configuration file.
Path string `json:"path" yaml:"path"`
// Site is the name of the site to deploy to.
Site string `json:"site" yaml:"site"`
// Ignore is a list of files to ignore during deployment.
Ignore []string `json:"ignore" yaml:"ignore"`
}
Deploy defines the deployment configuration for the specification.
type Document ¶
type Document struct {
// ID identifies a document in the specification.
ID string `json:"id" yaml:"id"`
// Generates the document from the task's output.
Generates string `json:"generates" yaml:"generates"`
// Description is the description of the document.
Description string `json:"description,omitempty" yaml:"description,omitempty"`
// Instruction is the instruction for generating the document.
Instruction string `json:"instruction" yaml:"instruction"`
// Template is the basis for the document.
Template string `json:"template" yaml:"template"`
}
Documents is the documents for the specification.
type Model ¶
type Model struct {
RequestOptions map[string]any `json:"requestOptions,omitempty" yaml:"requestOptions,omitempty"`
ID string `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
URL string `json:"url" yaml:"url"`
Provider Provider `json:"provider" yaml:"provider"`
Roles []string `json:"roles" yaml:"roles"`
}
Model specifies a model.
type Provider ¶
type Provider string
Provider is a string that specifies the provider for a model. For example, openai, azure, etc.
type Spec ¶
type Spec struct {
Version int `json:"version" yaml:"version"`
Name string `json:"name,omitempty" yaml:"name"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Rules Rules `json:"rules" yaml:"rules"`
Constitution string `json:"constitution" yaml:"constitution"`
Models []Model `json:"models,omitempty" yaml:"models,omitempty"`
Deploy *Deploy `json:"domain,omitempty" yaml:"domain,omitempty"`
Tasks Tasks `json:"tasks" yaml:"tasks"`
Root string `json:"root,omitempty" yaml:"root,omitempty"`
}
Spec defines the structure for a specification document. This could be used in various contexts such as API specifications, software design documents, etc.
func (*Spec) UnmarshalYAML ¶
UnmarshalYAML unmarshals YAML data into a Spec struct.
type Task ¶
type Task struct {
// ID is the ID of the task.
ID string `json:"id" yaml:"id"`
// Name is the name of the task.
Name string `json:"name" yaml:"name"`
// Description is the description of the task.
Description string `json:"description" yaml:"description"`
// Context is the context for the task.
Context Context `json:"context" yaml:"context"`
}
Task defines a specifiction.
Click to show internal directories.
Click to hide internal directories.