Documentation
¶
Overview ¶
Package multiagentspec provides Go types for Multi-Agent Spec definitions.
This package provides structs and utilities for defining multi-agent systems with full JSON serialization support.
Example:
agent := multiagentspec.Agent{
Name: "my-agent",
Description: "A helpful agent",
Model: multiagentspec.ModelSonnet,
Tools: []string{"Read", "Write"},
}
data, _ := json.MarshalIndent(agent, "", " ")
Index ¶
- Constants
- Variables
- func BoxReport(report *TeamReport) string
- func MapModelToBedrock(model Model) string
- func MapModelToClaudeCode(model Model) string
- func MapModelToKiroCLI(model Model) string
- func MapToolToAgentKit(tool Tool) string
- func MapToolToKiroCLI(tool Tool) string
- func NarrativeReport(report *TeamReport) string
- func ParseQualifiedName(qualifiedName string) (namespace, name string)
- func StreamBoxReport(qw422016 *qt422016.Writer, report *TeamReport)
- func StreamNarrativeReport(qw422016 *qt422016.Writer, report *TeamReport)
- func WriteBoxReport(qq422016 qtio422016.Writer, report *TeamReport)
- func WriteNarrativeReport(qq422016 qtio422016.Writer, report *TeamReport)
- type ADKGoConfig
- type AWSAgentCoreConfig
- type Agent
- func (a *Agent) CanDelegate() bool
- func (a *Agent) CanDelegateTo(target string) bool
- func (a *Agent) CanReceiveFrom(source string) bool
- func (a *Agent) QualifiedName() string
- func (a *Agent) WithBackstory(backstory string) *Agent
- func (a *Agent) WithDelegation(delegation *DelegationConfig) *Agent
- func (a *Agent) WithGoal(goal string) *Agent
- func (a *Agent) WithInstructions(instructions string) *Agent
- func (a *Agent) WithModel(model Model) *Agent
- func (a *Agent) WithNamespace(namespace string) *Agent
- func (a *Agent) WithRole(role string) *Agent
- func (a *Agent) WithTools(tools ...string) *Agent
- type AgentKitLocalConfig
- type AgentResult
- type Attachment
- type AttachmentType
- type AutoGenConfig
- type Channel
- type ChannelType
- type Check
- type ClaudeCodeConfig
- type CodeExecutionConfig
- type CollaborationConfig
- type CombinedWeights
- type ConsensusRules
- type ContentBlock
- func NewKVPairsBlock(title string, pairs ...KVPair) ContentBlock
- func NewListBlock(title string, items ...ListItem) ContentBlock
- func NewMetricBlock(label, value string, status Status, target string) ContentBlock
- func NewTableBlock(title string, headers []string, rows [][]string) ContentBlock
- func NewTextBlock(title, content string) ContentBlock
- type ContentBlockType
- type CrewAIConfig
- type DelegationConfig
- type Deployment
- type DeploymentMode
- type DockerComposeConfig
- type Effort
- type EvaluationType
- type GeminiCLIConfig
- type Issue
- type KVPair
- type KiroCLIConfig
- type KubernetesConfig
- type LLMEvaluation
- type ListItem
- type Loader
- type LoaderOption
- type LoggingConfig
- type Message
- type MessageType
- type MetricsConfig
- type Model
- type NarrativeRenderer
- type NarrativeSection
- type ObservabilityConfig
- type Platform
- type Port
- type PortType
- type Priority
- type QuickNarrativeRenderer
- type QuickRenderer
- type Renderer
- type ResourceLimits
- type RetryPolicy
- type RuntimeConfig
- type Severity
- type Status
- type Step
- type StepRuntime
- type Target
- type Task
- type TaskResult
- type TaskType
- type Team
- func (t *Team) EffectiveLead() string
- func (t *Team) IsDeterministic() bool
- func (t *Team) IsSelfDirected() bool
- func (t *Team) Validate() error
- func (t *Team) WithAgents(agents ...string) *Team
- func (t *Team) WithCollaboration(collab *CollaborationConfig) *Team
- func (t *Team) WithOrchestrator(orchestrator string) *Team
- func (t *Team) WithPlanApproval(planApproval bool) *Team
- func (t *Team) WithSelfClaim(selfClaim bool) *Team
- func (t *Team) WithWorkflow(workflow *Workflow) *Team
- func (t *Team) WorkflowCategory() WorkflowCategory
- type TeamReport
- type TeamSection
- type Tool
- type TracingConfig
- type Workflow
- type WorkflowCategory
- type WorkflowType
Constants ¶
const BoxTemplate = `` /* 706-byte string literal not displayed */
BoxTemplate is the text/template for the box format report. This is the reference implementation for rendering TeamReport to text. Each task is rendered on its own line with status indicator. Content blocks are rendered after tasks within each team section.
const NarrativeTemplate = `` /* 1388-byte string literal not displayed */
NarrativeTemplate is the Pandoc-friendly Markdown template. Designed for PDF generation via: pandoc report.md -o report.pdf --pdf-engine=xelatex
Variables ¶
var AgentKitTools = map[Tool]string{
ToolWebSearch: "shell",
ToolWebFetch: "shell",
ToolRead: "read",
ToolWrite: "write",
ToolGlob: "glob",
ToolGrep: "grep",
ToolBash: "shell",
ToolEdit: "write",
ToolTask: "shell",
}
AgentKitTools maps canonical tool names to AgentKit local identifiers.
var BedrockModels = map[Model]string{
ModelHaiku: "anthropic.claude-3-haiku-20240307-v1:0",
ModelSonnet: "anthropic.claude-3-5-sonnet-20241022-v2:0",
ModelOpus: "anthropic.claude-3-opus-20240229-v1:0",
}
BedrockModels maps canonical model names to AWS Bedrock identifiers.
var ClaudeCodeModels = map[Model]string{
ModelHaiku: "haiku",
ModelSonnet: "sonnet",
ModelOpus: "opus",
}
ClaudeCodeModels maps canonical model names to Claude Code identifiers.
var KiroCLIModels = map[Model]string{
ModelHaiku: "claude-haiku-35",
ModelSonnet: "claude-sonnet-4",
ModelOpus: "claude-opus-4",
}
KiroCLIModels maps canonical model names to Kiro CLI identifiers.
var KiroCLITools = map[Tool]string{
ToolWebSearch: "web_search",
ToolWebFetch: "web_fetch",
ToolRead: "read",
ToolWrite: "write",
ToolGlob: "glob",
ToolGrep: "grep",
ToolBash: "bash",
ToolEdit: "edit",
ToolTask: "task",
}
KiroCLITools maps canonical tool names to Kiro CLI identifiers.
Functions ¶
func BoxReport ¶
func BoxReport(report *TeamReport) string
func MapModelToBedrock ¶
MapModelToBedrock converts a canonical model to AWS Bedrock format.
func MapModelToClaudeCode ¶
MapModelToClaudeCode converts a canonical model to Claude Code format.
func MapModelToKiroCLI ¶
MapModelToKiroCLI converts a canonical model to Kiro CLI format.
func MapToolToAgentKit ¶
MapToolToAgentKit converts a canonical tool to AgentKit local format.
func MapToolToKiroCLI ¶
MapToolToKiroCLI converts a canonical tool to Kiro CLI format.
func NarrativeReport ¶
func NarrativeReport(report *TeamReport) string
func ParseQualifiedName ¶
ParseQualifiedName splits a qualified agent name into namespace and name parts. Returns empty namespace if no "/" is present.
Examples:
ParseQualifiedName("agent-name") → ("", "agent-name")
ParseQualifiedName("prd/lead") → ("prd", "lead")
ParseQualifiedName("shared/review") → ("shared", "review")
func StreamBoxReport ¶
func StreamBoxReport(qw422016 *qt422016.Writer, report *TeamReport)
func StreamNarrativeReport ¶
func StreamNarrativeReport(qw422016 *qt422016.Writer, report *TeamReport)
func WriteBoxReport ¶
func WriteBoxReport(qq422016 qtio422016.Writer, report *TeamReport)
func WriteNarrativeReport ¶
func WriteNarrativeReport(qq422016 qtio422016.Writer, report *TeamReport)
Types ¶
type ADKGoConfig ¶
type ADKGoConfig struct {
Model string `json:"model,omitempty"`
ServerPort int `json:"serverPort,omitempty"`
SessionStore string `json:"sessionStore,omitempty"`
ToolRegistry string `json:"toolRegistry,omitempty"`
}
ADKGoConfig is the configuration for Google Agent Development Kit (Go).
type AWSAgentCoreConfig ¶
type AWSAgentCoreConfig struct {
Region string `json:"region"`
FoundationModel string `json:"foundationModel"`
IAC string `json:"iac"`
LambdaRuntime string `json:"lambdaRuntime"`
}
AWSAgentCoreConfig is the configuration for AWS AgentCore platform.
type Agent ¶
type Agent struct {
// Name is the unique identifier for the agent (lowercase, hyphenated).
Name string `json:"name" yaml:"name"`
// Namespace is the optional namespace for organizing agents.
// Derived from subdirectory path if not explicitly set in frontmatter.
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
// Description is a brief summary of what the agent does.
Description string `json:"description,omitempty" yaml:"description,omitempty"`
// Icon is the icon identifier for visual representation.
// Formats: 'brandkit:name' (from brandkit repo), 'lucide:name' (Lucide icon),
// or plain name for inference.
Icon string `json:"icon,omitempty" yaml:"icon,omitempty"`
// Model is the capability tier (haiku, sonnet, opus).
Model Model `json:"model,omitempty" yaml:"model,omitempty"`
// Tools are the tools available to this agent.
Tools []string `json:"tools,omitempty" yaml:"tools,omitempty"`
// AllowedTools are tools that can execute without user confirmation.
AllowedTools []string `json:"allowedTools,omitempty" yaml:"allowedTools,omitempty"`
// Skills are capabilities the agent can invoke.
Skills []string `json:"skills,omitempty" yaml:"skills,omitempty"`
// Dependencies are other agents this agent depends on.
Dependencies []string `json:"dependencies,omitempty" yaml:"dependencies,omitempty"`
// Requires lists external tools or binaries required (e.g., go, git).
Requires []string `json:"requires,omitempty" yaml:"requires,omitempty"`
// Instructions is the system prompt for the agent.
Instructions string `json:"instructions,omitempty" yaml:"instructions,omitempty"`
// Tasks are the tasks this agent can perform.
Tasks []Task `json:"tasks,omitempty" yaml:"tasks,omitempty"`
// Role is the agent's role title (e.g., "Security Analyst").
Role string `json:"role,omitempty" yaml:"role,omitempty"`
// Goal describes what the agent aims to achieve.
Goal string `json:"goal,omitempty" yaml:"goal,omitempty"`
// Backstory provides context and background for the agent's role.
Backstory string `json:"backstory,omitempty" yaml:"backstory,omitempty"`
// Delegation defines delegation permissions for self-directed workflows.
Delegation *DelegationConfig `json:"delegation,omitempty" yaml:"delegation,omitempty"`
}
Agent represents an agent definition.
func LoadAgentFromFile ¶
LoadAgentFromFile loads an Agent from a markdown file with YAML frontmatter.
The file format is:
---
name: agent-name
description: Agent description
model: sonnet
tools: [Read, Write, Bash]
tasks:
- id: task-id
description: Task description
---
# Agent Name
Instructions in markdown...
func LoadAgentsFromDir ¶
LoadAgentsFromDir loads all Agent definitions from a directory. It recursively scans subdirectories. Agents in subdirectories have their namespace set to the subdirectory name (relative to the root dir), unless an explicit namespace is specified in the agent's frontmatter.
Example structure:
agents/ ├── shared/ │ └── review-board.md → namespace: "shared", name: "review-board" ├── prd/ │ └── lead.md → namespace: "prd", name: "lead" └── orchestrator.md → namespace: "", name: "orchestrator"
func LoadAgentsFromDirFlat ¶
LoadAgentsFromDirFlat loads agents from a single directory without recursion. This preserves the original non-recursive behavior for cases where subdirectories should be ignored.
func ParseAgentMarkdown ¶
ParseAgentMarkdown parses an Agent from markdown bytes with YAML frontmatter.
func (*Agent) CanDelegate ¶
CanDelegate returns true if this agent can delegate work.
func (*Agent) CanDelegateTo ¶
CanDelegateTo returns true if this agent can delegate to the target agent.
func (*Agent) CanReceiveFrom ¶
CanReceiveFrom returns true if this agent can receive delegations from the source agent.
func (*Agent) QualifiedName ¶
QualifiedName returns the fully qualified agent name. Returns "namespace/name" if namespace is set, otherwise just "name".
func (*Agent) WithBackstory ¶
WithBackstory sets the agent's backstory and returns the agent for chaining.
func (*Agent) WithDelegation ¶
func (a *Agent) WithDelegation(delegation *DelegationConfig) *Agent
WithDelegation sets the agent's delegation config and returns the agent for chaining.
func (*Agent) WithInstructions ¶
WithInstructions sets the agent's instructions and returns the agent for chaining.
func (*Agent) WithNamespace ¶
WithNamespace sets the agent's namespace and returns the agent for chaining.
type AgentKitLocalConfig ¶
type AgentKitLocalConfig struct {
Transport string `json:"transport"`
Port int `json:"port,omitempty"`
}
AgentKitLocalConfig is the configuration for AgentKit local platform.
type AgentResult ¶
type AgentResult struct {
// Schema is the JSON schema URL for validation
Schema string `json:"$schema,omitempty"`
// AgentID identifies the agent (e.g., "pm", "qa", "documentation")
AgentID string `json:"agent_id"`
// StepID is the workflow step name (e.g., "pm-validation", "qa-validation")
StepID string `json:"step_id"`
// Inputs are values received from upstream agents in the DAG
Inputs map[string]interface{} `json:"inputs,omitempty"`
// Outputs are values produced by this agent for downstream agents
Outputs map[string]interface{} `json:"outputs,omitempty"`
// Tasks are the individual task results (one per line in reports)
Tasks []TaskResult `json:"tasks"`
// ContentBlocks holds rich content produced by this agent.
// Allows agents to include findings, action items, etc.
ContentBlocks []ContentBlock `json:"content_blocks,omitempty"`
// Status is the overall status for this agent (computed from tasks)
Status Status `json:"status"`
// ExecutedAt is when the agent completed execution
ExecutedAt time.Time `json:"executed_at"`
// AgentModel is the LLM model used (e.g., "sonnet", "haiku", "opus")
AgentModel string `json:"agent_model,omitempty"`
// Duration is how long the agent took to execute
Duration string `json:"duration,omitempty"`
// Error is set if the agent failed to execute
Error string `json:"error,omitempty"`
}
AgentResult is the JSON-serializable output from each validation agent. This is the intermediate representation that agents produce and the coordinator consumes to build the final TeamReport.
func ParseAgentResult ¶
func ParseAgentResult(data []byte) (*AgentResult, error)
ParseAgentResult parses JSON into an AgentResult.
func (*AgentResult) ComputeStatus ¶
func (a *AgentResult) ComputeStatus() Status
ComputeStatus computes the overall status from tasks.
func (*AgentResult) ToTeamSection ¶
func (a *AgentResult) ToTeamSection() TeamSection
ToTeamSection converts an AgentResult to a TeamSection for the report.
type Attachment ¶
type Attachment struct {
// Name is the attachment identifier.
Name string `json:"name"`
// Type is the attachment type: file, data, or reference.
Type AttachmentType `json:"type"`
// Data is the attachment content (type-dependent).
Data interface{} `json:"data,omitempty"`
}
Attachment represents a message attachment.
type AttachmentType ¶
type AttachmentType string
AttachmentType represents the type of message attachment.
const ( // AttachmentFile is a file path reference. AttachmentFile AttachmentType = "file" // AttachmentData is inline data. AttachmentData AttachmentType = "data" // AttachmentReference is a reference to external content. AttachmentReference AttachmentType = "reference" )
type AutoGenConfig ¶
type AutoGenConfig struct {
Model string `json:"model,omitempty"`
HumanInputMode string `json:"humanInputMode,omitempty"`
MaxConsecutiveAutoReply int `json:"maxConsecutiveAutoReply,omitempty"`
CodeExecutionConfig *CodeExecutionConfig `json:"codeExecutionConfig,omitempty"`
}
AutoGenConfig is the configuration for Microsoft AutoGen deployment.
type Channel ¶
type Channel struct {
// Name is the channel identifier.
Name string `json:"name"`
// Type is the channel type: direct, broadcast, or pub-sub.
Type ChannelType `json:"type"`
// Participants are agent names. Use "*" for all agents.
Participants []string `json:"participants,omitempty"`
}
Channel defines a communication pathway between agents.
type ChannelType ¶
type ChannelType string
ChannelType represents the communication pattern of a channel.
const ( // ChannelDirect is point-to-point communication between two agents. ChannelDirect ChannelType = "direct" // ChannelBroadcast sends messages to all participants. ChannelBroadcast ChannelType = "broadcast" // ChannelPubSub allows agents to subscribe to topics. ChannelPubSub ChannelType = "pub-sub" )
type Check ¶
type Check = TaskResult
Backward compatibility aliases Deprecated: Use TaskResult instead
type ClaudeCodeConfig ¶
type ClaudeCodeConfig struct {
AgentDir string `json:"agentDir"`
Format string `json:"format"`
// TeamMode specifies whether to use subagents or agent teams.
// Values: "subagent" (default), "team"
TeamMode string `json:"team_mode,omitempty"`
// TeammateMode specifies the display mode for agent teams.
// Values: "in-process", "tmux", "auto" (default)
TeammateMode string `json:"teammate_mode,omitempty"`
// EnableTeams sets CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.
EnableTeams bool `json:"enable_teams,omitempty"`
}
ClaudeCodeConfig is the configuration for Claude Code platform.
type CodeExecutionConfig ¶
type CodeExecutionConfig struct {
WorkDir string `json:"workDir,omitempty"`
UseDocker bool `json:"useDocker,omitempty"`
}
CodeExecutionConfig holds AutoGen code execution settings.
type CollaborationConfig ¶
type CollaborationConfig struct {
// Lead is the lead agent name (required for crew workflow).
Lead string `json:"lead,omitempty"`
// Specialists are non-delegating specialist agent names.
Specialists []string `json:"specialists,omitempty"`
// TaskQueue enables shared task queue for self-claiming (swarm workflow).
TaskQueue bool `json:"task_queue,omitempty"`
// Consensus defines consensus rules (council workflow).
Consensus *ConsensusRules `json:"consensus,omitempty"`
// Channels define communication pathways between agents.
Channels []Channel `json:"channels,omitempty"`
}
CollaborationConfig defines how agents interact in self-directed workflows.
func (*CollaborationConfig) GetChannel ¶
func (c *CollaborationConfig) GetChannel(name string) *Channel
GetChannel returns the channel with the given name, or nil if not found.
func (*CollaborationConfig) HasChannel ¶
func (c *CollaborationConfig) HasChannel(name string) bool
HasChannel returns true if a channel with the given name exists.
type CombinedWeights ¶
type CombinedWeights struct {
// Rule is the weight for rule-based score (0-1).
Rule float64 `json:"rule"`
// LLM is the weight for LLM score (0-1).
LLM float64 `json:"llm"`
}
CombinedWeights specifies weighting for combined rule + LLM evaluation.
type ConsensusRules ¶
type ConsensusRules struct {
// RequiredAgreement is the fraction of agents that must agree (0.0-1.0).
// Default is 0.5 (simple majority).
RequiredAgreement float64 `json:"required_agreement,omitempty"`
// MaxRounds is the maximum debate rounds before forcing decision.
// Default is 3.
MaxRounds int `json:"max_rounds,omitempty"`
// TieBreaker is the agent name to break ties, or "lead" for lead agent.
TieBreaker string `json:"tie_breaker,omitempty"`
}
ConsensusRules defines how agents reach agreement in council workflows.
func (*ConsensusRules) EffectiveMaxRounds ¶
func (r *ConsensusRules) EffectiveMaxRounds() int
EffectiveMaxRounds returns the max rounds, defaulting to 3.
func (*ConsensusRules) EffectiveRequiredAgreement ¶
func (r *ConsensusRules) EffectiveRequiredAgreement() float64
EffectiveRequiredAgreement returns the required agreement, defaulting to 0.5.
type ContentBlock ¶
type ContentBlock struct {
// Type discriminates the block variant.
Type ContentBlockType `json:"type"`
// Title is an optional section heading.
Title string `json:"title,omitempty"`
// Pairs holds key-value data (for kv_pairs type).
Pairs []KVPair `json:"pairs,omitempty"`
// Items holds list entries (for list type).
Items []ListItem `json:"items,omitempty"`
// Headers holds table column headers (for table type).
Headers []string `json:"headers,omitempty"`
// Rows holds table data rows (for table type).
Rows [][]string `json:"rows,omitempty"`
// Content holds multi-line text (for text type).
Content string `json:"content,omitempty"`
// Label is the metric name (for metric type).
Label string `json:"label,omitempty"`
// Value is the metric value (for metric type).
Value string `json:"value,omitempty"`
// Status is used for metric blocks to indicate health.
Status Status `json:"status,omitempty"`
// Target is the target value for metric blocks (e.g., "80%").
Target string `json:"target,omitempty"`
}
ContentBlock represents rich content within a report section. The Type field determines which other fields are relevant:
- kv_pairs: uses Pairs
- list: uses Items
- table: uses Headers, Rows
- text: uses Content
- metric: uses Label, Value, Status
func NewKVPairsBlock ¶
func NewKVPairsBlock(title string, pairs ...KVPair) ContentBlock
NewKVPairsBlock creates a kv_pairs content block.
func NewListBlock ¶
func NewListBlock(title string, items ...ListItem) ContentBlock
NewListBlock creates a list content block.
func NewMetricBlock ¶
func NewMetricBlock(label, value string, status Status, target string) ContentBlock
NewMetricBlock creates a metric content block. Target is optional - pass empty string to omit.
func NewTableBlock ¶
func NewTableBlock(title string, headers []string, rows [][]string) ContentBlock
NewTableBlock creates a table content block.
func NewTextBlock ¶
func NewTextBlock(title, content string) ContentBlock
NewTextBlock creates a text content block.
type ContentBlockType ¶
type ContentBlockType string
ContentBlockType discriminates content block variants.
const ( ContentBlockKVPairs ContentBlockType = "kv_pairs" ContentBlockList ContentBlockType = "list" ContentBlockTable ContentBlockType = "table" ContentBlockText ContentBlockType = "text" ContentBlockMetric ContentBlockType = "metric" )
func (ContentBlockType) JSONSchema ¶
func (ContentBlockType) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for ContentBlockType type.
type CrewAIConfig ¶
type CrewAIConfig struct {
Model string `json:"model,omitempty"`
Verbose bool `json:"verbose,omitempty"`
Memory bool `json:"memory,omitempty"`
ProcessType string `json:"processType,omitempty"`
MaxIterations int `json:"maxIterations,omitempty"`
// AllowDelegation enables agent delegation in CrewAI.
AllowDelegation bool `json:"allowDelegation,omitempty"`
// ManagerLLM specifies the model for the manager agent in hierarchical process.
ManagerLLM string `json:"managerLlm,omitempty"`
}
CrewAIConfig is the configuration for CrewAI deployment.
type DelegationConfig ¶
type DelegationConfig struct {
// AllowDelegation enables this agent to delegate work to others.
AllowDelegation bool `json:"allow_delegation,omitempty" yaml:"allow_delegation,omitempty"`
// CanDelegateTo lists agent names this agent can delegate to.
// Empty means no restrictions (can delegate to any agent).
CanDelegateTo []string `json:"can_delegate_to,omitempty" yaml:"can_delegate_to,omitempty"`
// CanReceiveFrom lists agent names this agent can receive delegations from.
// Empty means no restrictions (can receive from any agent).
CanReceiveFrom []string `json:"can_receive_from,omitempty" yaml:"can_receive_from,omitempty"`
}
DelegationConfig defines delegation permissions for an agent.
type Deployment ¶
type Deployment struct {
// Schema is the JSON Schema reference.
Schema string `json:"$schema,omitempty"`
// Team is the reference to the team definition (team name).
Team string `json:"team"`
// Targets is the list of deployment targets.
Targets []Target `json:"targets"`
}
Deployment represents a deployment definition.
func LoadDeploymentFromFile ¶
func LoadDeploymentFromFile(path string) (*Deployment, error)
LoadDeploymentFromFile loads a Deployment from a JSON file.
func NewDeployment ¶
func NewDeployment(team string) *Deployment
NewDeployment creates a new Deployment for the given team.
func (*Deployment) AddTarget ¶
func (d *Deployment) AddTarget(target Target) *Deployment
AddTarget adds a deployment target and returns the deployment for chaining.
type DeploymentMode ¶
type DeploymentMode string
DeploymentMode represents the deployment execution mode.
const ( ModeSingleProcess DeploymentMode = "single-process" ModeMultiProcess DeploymentMode = "multi-process" ModeDistributed DeploymentMode = "distributed" ModeServerless DeploymentMode = "serverless" )
func (DeploymentMode) JSONSchema ¶
func (DeploymentMode) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for DeploymentMode type.
type DockerComposeConfig ¶
type DockerComposeConfig struct {
NetworkMode string `json:"networkMode,omitempty"`
}
DockerComposeConfig is the configuration for Docker Compose deployment.
type Effort ¶
type Effort string
Effort estimates the work required to address an issue.
const ( // EffortTrivial indicates minimal effort (< 15 minutes). EffortTrivial Effort = "trivial" // EffortLow indicates small effort (< 1 hour). EffortLow Effort = "low" // EffortMedium indicates moderate effort (1-4 hours). EffortMedium Effort = "medium" // EffortHigh indicates significant effort (> 4 hours). EffortHigh Effort = "high" )
type EvaluationType ¶
type EvaluationType string
EvaluationType discriminates between rule-based and LLM evaluation.
const ( // EvaluationTypeRule indicates deterministic rule-based evaluation. EvaluationTypeRule EvaluationType = "rule" // EvaluationTypeLLM indicates LLM-based semantic evaluation. EvaluationTypeLLM EvaluationType = "llm" // EvaluationTypeCombined indicates both rule-based and LLM evaluation. EvaluationTypeCombined EvaluationType = "combined" )
type GeminiCLIConfig ¶
type GeminiCLIConfig struct {
Model string `json:"model,omitempty"`
ConfigDir string `json:"configDir,omitempty"`
}
GeminiCLIConfig is the configuration for Google Gemini CLI Assistant.
type Issue ¶
type Issue struct {
// ID is the issue identifier (e.g., "ISS-001").
ID string `json:"id"`
// Category is the evaluation category this issue belongs to.
Category string `json:"category"`
// Severity indicates how serious the issue is.
Severity Severity `json:"severity"`
// Problem describes what the issue is.
Problem string `json:"problem"`
// Location indicates where in the document the issue occurs
// (e.g., "requirements.functional[2]", "executiveSummary.problemStatement").
Location string `json:"location,omitempty"`
// Analysis explains why this is a problem.
Analysis string `json:"analysis,omitempty"`
// Recommendation describes how to fix the issue.
Recommendation string `json:"recommendation,omitempty"`
// Example provides sample improved text or structure.
Example string `json:"example,omitempty"`
// Effort estimates the work required to fix this issue.
Effort Effort `json:"effort,omitempty"`
// RelatedIssues lists IDs of related issues.
RelatedIssues []string `json:"relatedIssues,omitempty"`
}
Issue represents a specific problem identified in evaluation. Used in narrative reports for detailed fix guidance.
type KVPair ¶
type KVPair struct {
// Key is the label/identifier.
Key string `json:"key"`
// Value is the associated value.
Value string `json:"value"`
// Icon is an optional prefix icon (e.g., "🔴", "🟡").
Icon string `json:"icon,omitempty"`
}
KVPair is a key-value pair with optional icon.
type KiroCLIConfig ¶
type KiroCLIConfig struct {
PluginDir string `json:"pluginDir,omitempty"`
Format string `json:"format,omitempty"`
// Prefix is applied to agent names, filenames, and steering files for namespace isolation.
Prefix string `json:"prefix,omitempty"`
}
KiroCLIConfig is the configuration for Kiro CLI platform.
type KubernetesConfig ¶
type KubernetesConfig struct {
Namespace string `json:"namespace"`
HelmChart bool `json:"helmChart"`
ImageRegistry string `json:"imageRegistry,omitempty"`
ResourceLimits *ResourceLimits `json:"resourceLimits,omitempty"`
}
KubernetesConfig is the configuration for Kubernetes platforms.
type LLMEvaluation ¶
type LLMEvaluation struct {
// Score is the numeric score from LLM evaluation (typically 0-10).
Score float64 `json:"score"`
// MaxScore is the maximum possible score (default: 10).
MaxScore float64 `json:"maxScore,omitempty"`
// Confidence is the LLM's confidence in the evaluation (0-1 scale).
Confidence float64 `json:"confidence,omitempty"`
// Reasoning is the LLM's explanation of the score.
Reasoning string `json:"reasoning,omitempty"`
// Strengths are positive aspects identified by the LLM.
Strengths []string `json:"strengths,omitempty"`
// Concerns are issues or problems identified by the LLM.
Concerns []string `json:"concerns,omitempty"`
// Suggestions are actionable recommendations for improvement.
Suggestions []string `json:"suggestions,omitempty"`
// Model is the LLM model used (e.g., "claude-sonnet-4", "gpt-4").
Model string `json:"model"`
// Provider is the LLM provider (e.g., "anthropic", "openai", "bedrock").
Provider string `json:"provider,omitempty"`
// TokensUsed is the total tokens consumed for this evaluation.
TokensUsed int `json:"tokensUsed,omitempty"`
// LatencyMs is the LLM API response time in milliseconds.
LatencyMs int `json:"latencyMs,omitempty"`
// PromptVersion is a version identifier for the evaluation prompt.
// Used for reproducibility and prompt iteration tracking.
PromptVersion string `json:"promptVersion,omitempty"`
}
LLMEvaluation contains LLM-based evaluation results. This is the nested "llm" object in evaluation results when EvaluationType is "llm" or "combined".
type ListItem ¶
type ListItem struct {
// Text is the item content.
Text string `json:"text"`
// Icon is an optional prefix icon.
Icon string `json:"icon,omitempty"`
// Status allows automatic icon selection if Icon is empty.
Status Status `json:"status,omitempty"`
}
ListItem is a list entry with optional icon and status.
func (ListItem) EffectiveIcon ¶
EffectiveIcon returns the Icon if set, otherwise derives from Status.
type Loader ¶
type Loader struct{}
Loader loads multi-agent-spec definitions from files.
func NewLoader ¶
func NewLoader(opts ...LoaderOption) *Loader
NewLoader creates a new loader with the given options.
func (*Loader) LoadDeployment ¶
func (l *Loader) LoadDeployment(path string) (*Deployment, error)
LoadDeployment loads a Deployment from a JSON file.
type LoggingConfig ¶
type LoggingConfig struct {
Level string `json:"level,omitempty"`
Format string `json:"format,omitempty"`
}
LoggingConfig holds logging configuration.
type Message ¶
type Message struct {
// ID is a unique message identifier.
ID string `json:"id"`
// Type is the message type.
Type MessageType `json:"type"`
// From is the sender agent name.
From string `json:"from"`
// To is the recipient agent name, or "*" for broadcast.
To string `json:"to,omitempty"`
// Subject is an optional message subject line.
Subject string `json:"subject,omitempty"`
// Content is the message body.
Content string `json:"content"`
// Attachments are optional file or data attachments.
Attachments []Attachment `json:"attachments,omitempty"`
// Metadata holds additional key-value data.
Metadata map[string]interface{} `json:"metadata,omitempty"`
// Timestamp is when the message was created.
Timestamp time.Time `json:"timestamp"`
}
Message represents an inter-agent message in self-directed workflows.
func NewBroadcast ¶
func NewBroadcast(msgType MessageType, from, content string) *Message
NewBroadcast creates a new broadcast message to all agents.
func NewMessage ¶
func NewMessage(msgType MessageType, from, to, content string) *Message
NewMessage creates a new message with generated ID and timestamp.
func (*Message) IsBroadcast ¶
IsBroadcast returns true if this message is sent to all agents.
func (*Message) WithAttachment ¶
func (m *Message) WithAttachment(name string, attachType AttachmentType, data interface{}) *Message
WithAttachment adds an attachment and returns the message for chaining.
func (*Message) WithMetadata ¶
WithMetadata sets a metadata key-value and returns the message for chaining.
func (*Message) WithSubject ¶
WithSubject sets the message subject and returns the message for chaining.
type MessageType ¶
type MessageType string
MessageType represents the type of inter-agent message.
const ( // MsgDelegateWork assigns a task from lead to specialist. MsgDelegateWork MessageType = "delegate_work" // MsgAskQuestion requests information from another agent. MsgAskQuestion MessageType = "ask_question" MsgShareFinding MessageType = "share_finding" // MsgRequestApproval asks lead to approve a plan. MsgRequestApproval MessageType = "request_approval" // MsgApproval confirms approval of a request. MsgApproval MessageType = "approval" // MsgRejection denies a request with reason. MsgRejection MessageType = "rejection" // MsgChallenge disputes another agent's finding. MsgChallenge MessageType = "challenge" // MsgVote casts a consensus vote. MsgVote MessageType = "vote" // MsgTaskClaimed indicates an agent claimed a task from queue. MsgTaskClaimed MessageType = "task_claimed" // MsgTaskCompleted indicates an agent completed a task. MsgTaskCompleted MessageType = "task_completed" // MsgShutdownRequest asks to terminate the team session. MsgShutdownRequest MessageType = "shutdown_request" // MsgShutdownApproved confirms team session termination. MsgShutdownApproved MessageType = "shutdown_approved" )
type MetricsConfig ¶
type MetricsConfig struct {
Enabled bool `json:"enabled,omitempty"`
Exporter string `json:"exporter,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
}
MetricsConfig holds metrics collection configuration.
type Model ¶
type Model string
Model represents the model capability tier.
func (Model) JSONSchema ¶
func (Model) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for Model type.
type NarrativeRenderer ¶
type NarrativeRenderer struct {
// contains filtered or unexported fields
}
NarrativeRenderer renders TeamReport to Pandoc-friendly Markdown using text/template. Output is designed for conversion to PDF via:
pandoc report.md -o report.pdf --pdf-engine=xelatex
func NewNarrativeRenderer ¶
func NewNarrativeRenderer(w io.Writer) *NarrativeRenderer
NewNarrativeRenderer creates a new NarrativeRenderer writing to w.
func (*NarrativeRenderer) Render ¶
func (r *NarrativeRenderer) Render(report *TeamReport) error
Render renders the report as Pandoc-friendly Markdown. No emojis are used - status is rendered as text (PASS, FAIL, WARNING, SKIP).
type NarrativeSection ¶
type NarrativeSection struct {
// Problem describes the issue or context being addressed.
Problem string `json:"problem,omitempty"`
// Analysis contains the detailed findings.
Analysis string `json:"analysis,omitempty"`
// Recommendation describes the suggested action.
Recommendation string `json:"recommendation,omitempty"`
}
NarrativeSection holds prose content for narrative reports.
type ObservabilityConfig ¶
type ObservabilityConfig struct {
// Tracing contains distributed tracing settings.
Tracing *TracingConfig `json:"tracing,omitempty"`
// Metrics contains metrics collection settings.
Metrics *MetricsConfig `json:"metrics,omitempty"`
// Logging contains logging configuration.
Logging *LoggingConfig `json:"logging,omitempty"`
}
ObservabilityConfig holds observability and monitoring configuration.
type Platform ¶
type Platform string
Platform represents supported deployment platforms.
const ( PlatformClaudeCode Platform = "claude-code" PlatformGeminiCLI Platform = "gemini-cli" PlatformKiroCLI Platform = "kiro-cli" PlatformADKGo Platform = "adk-go" PlatformCrewAI Platform = "crewai" PlatformAutoGen Platform = "autogen" PlatformAWSAgentCore Platform = "aws-agentcore" PlatformAWSEKS Platform = "aws-eks" PlatformAzureAKS Platform = "azure-aks" PlatformGCPGKE Platform = "gcp-gke" PlatformKubernetes Platform = "kubernetes" PlatformDockerCompose Platform = "docker-compose" PlatformAgentKitLocal Platform = "agentkit-local" )
func (Platform) JSONSchema ¶
func (Platform) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for Platform type.
type Port ¶
type Port struct {
// Name is the port identifier (e.g., version_recommendation, test_results).
Name string `json:"name"`
// Type is the data type of this port.
Type PortType `json:"type,omitempty"`
// Description is a human-readable description of this data.
Description string `json:"description,omitempty"`
// Required indicates whether this input is required (inputs only).
Required *bool `json:"required,omitempty"`
// From is the source reference as 'step_name.output_name' (inputs only).
From string `json:"from,omitempty"`
// Schema is a JSON Schema for validating this port's data.
Schema json.RawMessage `json:"schema,omitempty"`
// Default is the default value if not provided (inputs only).
Default interface{} `json:"default,omitempty"`
}
Port represents a typed input or output for a workflow step.
type PortType ¶
type PortType string
PortType represents the data type of a port.
func (PortType) JSONSchema ¶
func (PortType) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for PortType type.
type Priority ¶
type Priority string
Priority represents deployment priority levels.
func (Priority) JSONSchema ¶
func (Priority) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for Priority type.
type QuickNarrativeRenderer ¶
type QuickNarrativeRenderer struct {
// contains filtered or unexported fields
}
QuickNarrativeRenderer renders TeamReport using quicktemplate (compile-time type-safe). This is an alternative to NarrativeRenderer that uses generated code instead of reflection.
func NewQuickNarrativeRenderer ¶
func NewQuickNarrativeRenderer(w io.Writer) *QuickNarrativeRenderer
NewQuickNarrativeRenderer creates a new QuickNarrativeRenderer writing to w.
func (*QuickNarrativeRenderer) Render ¶
func (r *QuickNarrativeRenderer) Render(report *TeamReport) error
Render renders the report using quicktemplate. It automatically sorts teams by DAG order before rendering.
type QuickRenderer ¶
type QuickRenderer struct {
// contains filtered or unexported fields
}
QuickRenderer renders TeamReport using quicktemplate (compile-time type-safe). This is an alternative to Renderer that uses generated code instead of reflection.
func NewQuickRenderer ¶
func NewQuickRenderer(w io.Writer) *QuickRenderer
NewQuickRenderer creates a new QuickRenderer writing to w.
func (*QuickRenderer) Render ¶
func (r *QuickRenderer) Render(report *TeamReport) error
Render renders the report using quicktemplate. It automatically sorts teams by DAG order before rendering.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer renders TeamReport to various formats using text/template.
func NewRenderer ¶
NewRenderer creates a new Renderer writing to w.
func (*Renderer) Render ¶
func (r *Renderer) Render(report *TeamReport) error
Render renders the report using the box template. It automatically sorts teams by DAG order before rendering.
type ResourceLimits ¶
type ResourceLimits struct {
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
GPU int `json:"gpu,omitempty"`
}
ResourceLimits defines resource limits for step execution.
type RetryPolicy ¶
type RetryPolicy struct {
// MaxAttempts is the maximum number of retry attempts.
MaxAttempts int `json:"max_attempts,omitempty"`
// Backoff is the backoff strategy (fixed, exponential, linear).
Backoff string `json:"backoff,omitempty"`
// InitialDelay is the initial delay before first retry.
InitialDelay string `json:"initial_delay,omitempty"`
// MaxDelay is the maximum delay between retries.
MaxDelay string `json:"max_delay,omitempty"`
// RetryableErrors are error types that should trigger retry.
RetryableErrors []string `json:"retryable_errors,omitempty"`
}
RetryPolicy defines the retry behavior for step failures.
type RuntimeConfig ¶
type RuntimeConfig struct {
// Defaults are the default runtime settings for all steps.
Defaults *StepRuntime `json:"defaults,omitempty"`
// Steps contains per-step runtime overrides keyed by step name.
Steps map[string]*StepRuntime `json:"steps,omitempty"`
// Observability contains monitoring and tracing settings.
Observability *ObservabilityConfig `json:"observability,omitempty"`
}
RuntimeConfig holds runtime configuration for workflow execution.
type Severity ¶
type Severity string
Severity indicates how serious an issue is.
const ( // SeverityCritical indicates a blocking issue that must be fixed. SeverityCritical Severity = "critical" // SeverityMajor indicates a significant issue that should be fixed. SeverityMajor Severity = "major" // SeverityMinor indicates a small issue that could be fixed. SeverityMinor Severity = "minor" // SeveritySuggestion indicates an optional improvement. SeveritySuggestion Severity = "suggestion" )
type Status ¶
type Status string
Status represents the validation status following NASA Go/No-Go terminology.
func (Status) JSONSchema ¶
func (Status) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for Status type.
type Step ¶
type Step struct {
// Name is the step identifier.
Name string `json:"name"`
// Agent is the agent to execute this step.
Agent string `json:"agent"`
// DependsOn lists steps that must complete before this step.
DependsOn []string `json:"depends_on,omitempty"`
// Inputs are typed data inputs consumed by this step.
Inputs []Port `json:"inputs,omitempty"`
// Outputs are typed data outputs produced by this step.
Outputs []Port `json:"outputs,omitempty"`
}
Step represents a workflow step definition.
type StepRuntime ¶
type StepRuntime struct {
// Timeout is the step timeout (e.g., 30s, 5m, 1h).
Timeout string `json:"timeout,omitempty"`
// Retry is the retry policy for step failures.
Retry *RetryPolicy `json:"retry,omitempty"`
// Condition is a condition expression for conditional execution.
Condition string `json:"condition,omitempty"`
// Concurrency is the max concurrent executions of this step.
Concurrency int `json:"concurrency,omitempty"`
// Resources are resource limits for this step.
Resources *ResourceLimits `json:"resources,omitempty"`
}
StepRuntime holds runtime settings for a workflow step.
type Target ¶
type Target struct {
// Name is the unique name for this deployment target.
Name string `json:"name"`
// Platform is the target platform for deployment.
Platform Platform `json:"platform"`
// Mode is the deployment mode affecting runtime behavior.
Mode DeploymentMode `json:"mode,omitempty"`
// Priority is the deployment priority.
Priority Priority `json:"priority,omitempty"`
// Output is the directory for generated deployment artifacts.
Output string `json:"output,omitempty"`
// Runtime is the runtime configuration for workflow execution.
Runtime *RuntimeConfig `json:"runtime,omitempty"`
// Platform-specific configurations (use the one matching Platform field)
ClaudeCode *ClaudeCodeConfig `json:"claudeCode,omitempty"`
GeminiCLI *GeminiCLIConfig `json:"geminiCli,omitempty"`
KiroCLI *KiroCLIConfig `json:"kiroCli,omitempty"`
ADKGo *ADKGoConfig `json:"adkGo,omitempty"`
CrewAI *CrewAIConfig `json:"crewai,omitempty"`
AutoGen *AutoGenConfig `json:"autogen,omitempty"`
AWSAgentCore *AWSAgentCoreConfig `json:"awsAgentCore,omitempty"`
Kubernetes *KubernetesConfig `json:"kubernetes,omitempty"`
DockerCompose *DockerComposeConfig `json:"dockerCompose,omitempty"`
AgentKitLocal *AgentKitLocalConfig `json:"agentKitLocal,omitempty"`
}
Target represents a deployment target definition.
type Task ¶
type Task struct {
// ID is the unique task identifier within this agent.
ID string `json:"id"`
// Description describes what this task validates or accomplishes.
Description string `json:"description,omitempty"`
// Type is how the task is executed (command, pattern, file, manual).
Type TaskType `json:"type,omitempty"`
// Command is the shell command to execute (for type: command).
Command string `json:"command,omitempty"`
// Pattern is the regex pattern to search for (for type: pattern).
Pattern string `json:"pattern,omitempty"`
// File is the file path to check (for type: file).
File string `json:"file,omitempty"`
// Files is a glob pattern for files to check (for type: pattern).
Files string `json:"files,omitempty"`
// Required indicates if task failure causes agent to report NO-GO.
Required *bool `json:"required,omitempty"`
// ExpectedOutput describes what constitutes success.
ExpectedOutput string `json:"expected_output,omitempty"`
// HumanInLoop describes when to prompt for human intervention.
HumanInLoop string `json:"human_in_loop,omitempty"`
}
Task represents a task that an agent can perform.
type TaskResult ¶
type TaskResult struct {
// ID is the task identifier (matches task id in agent definition)
ID string `json:"id"`
// Status is GO, WARN, NO-GO, or SKIP
Status Status `json:"status"`
// Severity is the impact level (critical, high, medium, low, info).
// Orthogonal to Status: Status answers "did it pass?", Severity answers "how bad is it?"
Severity string `json:"severity,omitempty"`
// Detail is optional additional information about the result
Detail string `json:"detail,omitempty"`
// DurationMs is the task execution time in milliseconds
DurationMs int64 `json:"duration_ms,omitempty"`
// Metadata allows tasks to include structured data
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
TaskResult represents the result of executing a single task. Each task corresponds to a task defined in the agent's task list.
type TaskType ¶
type TaskType string
TaskType represents how a task is executed.
func (TaskType) JSONSchema ¶
func (TaskType) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for TaskType type.
type Team ¶
type Team struct {
// Name is the team identifier (e.g., stats-agent-team).
Name string `json:"name"`
// Version is the semantic version of the team definition.
Version string `json:"version"`
// Description is a brief summary of the team's purpose.
Description string `json:"description,omitempty"`
// Agents is the list of agent names in the team.
Agents []string `json:"agents"`
// Orchestrator is the name of the orchestrator agent.
Orchestrator string `json:"orchestrator,omitempty"`
// Workflow is the workflow definition for agent coordination.
Workflow *Workflow `json:"workflow,omitempty"`
// Context is shared background information for all agents.
Context string `json:"context,omitempty"`
// Collaboration defines how agents interact in self-directed workflows.
Collaboration *CollaborationConfig `json:"collaboration,omitempty"`
// SelfClaim allows agents to self-claim tasks from a shared queue (swarm).
SelfClaim bool `json:"self_claim,omitempty"`
// PlanApproval requires plan approval before implementation (crew).
PlanApproval bool `json:"plan_approval,omitempty"`
}
Team represents a team definition.
func LoadTeamFromFile ¶
LoadTeamFromFile loads a Team from a JSON file.
func (*Team) EffectiveLead ¶
EffectiveLead returns the lead agent name for self-directed workflows. Checks collaboration.lead first, then falls back to orchestrator.
func (*Team) IsDeterministic ¶
IsDeterministic returns true if this team uses a deterministic workflow.
func (*Team) IsSelfDirected ¶
IsSelfDirected returns true if this team uses a self-directed workflow.
func (*Team) Validate ¶
Validate checks team configuration consistency. Returns an error if the configuration is invalid for the workflow type.
func (*Team) WithAgents ¶
WithAgents sets the team's agents and returns the team for chaining.
func (*Team) WithCollaboration ¶
func (t *Team) WithCollaboration(collab *CollaborationConfig) *Team
WithCollaboration sets the collaboration config and returns the team for chaining.
func (*Team) WithOrchestrator ¶
WithOrchestrator sets the orchestrator and returns the team for chaining.
func (*Team) WithPlanApproval ¶
WithPlanApproval enables plan approval and returns the team for chaining.
func (*Team) WithSelfClaim ¶
WithSelfClaim enables self-claim and returns the team for chaining.
func (*Team) WithWorkflow ¶
WithWorkflow sets the workflow and returns the team for chaining.
func (*Team) WorkflowCategory ¶
func (t *Team) WorkflowCategory() WorkflowCategory
WorkflowCategory returns the category of this team's workflow. Returns empty string if no workflow is defined.
type TeamReport ¶
type TeamReport struct {
// Schema is the JSON schema URL for validation
Schema string `json:"$schema,omitempty"`
// Title is the report title (e.g., "CUSTOM EXTENSION ANALYSIS REPORT").
// If empty, defaults to "TEAM STATUS REPORT" in rendering.
Title string `json:"title,omitempty"`
// Project is the repository identifier
Project string `json:"project"`
// Version is the target release version
Version string `json:"version"`
// Target is a human-readable target description
Target string `json:"target,omitempty"`
// Phase is the workflow phase (e.g., "PHASE 1: REVIEW")
Phase string `json:"phase"`
// Tags are key-value pairs for filtering and aggregation across reports.
// Examples: customer, environment, use_case, target_system
Tags map[string]string `json:"tags,omitempty"`
// SummaryBlocks appear after the header, before the phase.
// For metadata, disposition, use-case descriptions.
SummaryBlocks []ContentBlock `json:"summary_blocks,omitempty"`
// Teams are the validation teams/agents
Teams []TeamSection `json:"teams"`
// For action items, recommendations, required follow-ups.
FooterBlocks []ContentBlock `json:"footer_blocks,omitempty"`
// Summary is the executive summary for narrative reports.
Summary string `json:"summary,omitempty"`
// Conclusion is the closing section for narrative reports.
Conclusion string `json:"conclusion,omitempty"`
// Status is the overall status (computed from teams)
Status Status `json:"status"`
// GeneratedAt is when the report was generated
GeneratedAt time.Time `json:"generated_at"`
// GeneratedBy identifies the coordinator
GeneratedBy string `json:"generated_by,omitempty"`
}
TeamReport is the complete JSON-serializable report. This is what the coordinator produces by aggregating AgentResults.
func AggregateResults ¶
func AggregateResults(results []AgentResult, project, version, phase string) *TeamReport
AggregateResults combines multiple AgentResults into a TeamReport.
func ParseTeamReport ¶
func ParseTeamReport(data []byte) (*TeamReport, error)
ParseTeamReport parses JSON into a TeamReport.
func (*TeamReport) ComputeOverallStatus ¶
func (r *TeamReport) ComputeOverallStatus() Status
ComputeOverallStatus computes the overall status from all teams.
func (*TeamReport) EffectiveTitle ¶
func (r *TeamReport) EffectiveTitle() string
EffectiveTitle returns Title if set, otherwise the default.
func (*TeamReport) FinalMessage ¶
func (r *TeamReport) FinalMessage() string
FinalMessage returns the final status message for display.
func (*TeamReport) IsGo ¶
func (r *TeamReport) IsGo() bool
IsGo returns true if all teams pass validation.
func (*TeamReport) SortByDAG ¶
func (r *TeamReport) SortByDAG()
SortByDAG sorts teams in topological order based on DependsOn relationships. Teams with no dependencies appear first, followed by teams whose dependencies have been satisfied. This uses Kahn's algorithm for topological sorting. Teams at the same level are sorted alphabetically by ID for deterministic output. If the DAG has cycles, teams in cycles appear at the end in their original order.
func (*TeamReport) ToJSON ¶
func (r *TeamReport) ToJSON() ([]byte, error)
ToJSON serializes the report to JSON.
type TeamSection ¶
type TeamSection struct {
// ID is the workflow step ID (e.g., "pm-validation")
ID string `json:"id"`
// Name is the agent name (e.g., "pm")
Name string `json:"name"`
// AgentID matches the agent definition in team.json
AgentID string `json:"agent_id,omitempty"`
// Model is the LLM model used
Model string `json:"model,omitempty"`
// DependsOn lists the IDs of upstream teams in the DAG
DependsOn []string `json:"depends_on,omitempty"`
// Tasks are the task results for this team (one per line in reports).
// Optional: teams can use ContentBlocks instead of or in addition to Tasks.
Tasks []TaskResult `json:"tasks,omitempty"`
// Status is the overall status (computed from tasks)
Status Status `json:"status"`
// Verdict is a domain-specific verdict label, richer than the 4-value Status.
// Status is machine-readable GO/NO-GO; Verdict is the human-readable domain assessment.
// Examples: "BLOCKED_PENDING_ENHANCEMENT", "COMPLIANT", "NEEDS_WORK"
Verdict string `json:"verdict,omitempty"`
// ContentBlocks holds rich content for this team section.
// Supports lists, kv_pairs, tables, text, metrics.
ContentBlocks []ContentBlock `json:"content_blocks,omitempty"`
// Narrative holds prose content for narrative reports.
Narrative *NarrativeSection `json:"narrative,omitempty"`
}
TeamSection represents a team/agent section in the report.
func (*TeamSection) OverallStatus ¶
func (t *TeamSection) OverallStatus() Status
OverallStatus computes the overall status for a team section.
type Tool ¶
type Tool string
Tool represents canonical tool names available to agents.
func (Tool) JSONSchema ¶
func (Tool) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for Tool type.
type TracingConfig ¶
type TracingConfig struct {
Enabled bool `json:"enabled,omitempty"`
Exporter string `json:"exporter,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
SampleRate float64 `json:"sample_rate,omitempty"`
}
TracingConfig holds distributed tracing configuration.
type Workflow ¶
type Workflow struct {
// Type is the workflow execution pattern.
Type WorkflowType `json:"type,omitempty"`
// Steps are the ordered steps in the workflow.
Steps []Step `json:"steps,omitempty"`
}
Workflow represents a workflow definition.
type WorkflowCategory ¶
type WorkflowCategory string
WorkflowCategory represents the two workflow paradigms.
const ( // CategoryDeterministic workflows have execution paths defined in the schema. CategoryDeterministic WorkflowCategory = "deterministic" // CategorySelfDirected workflows let agents decide execution paths. CategorySelfDirected WorkflowCategory = "self-directed" )
func (WorkflowCategory) String ¶
func (c WorkflowCategory) String() string
String returns the string representation of the category.
type WorkflowType ¶
type WorkflowType string
WorkflowType represents the workflow execution pattern.
const ( // WorkflowChain executes steps sequentially: A → B → C WorkflowChain WorkflowType = "chain" // WorkflowScatter executes steps in parallel with fan-out/fan-in: A → [B,C,D] → E WorkflowScatter WorkflowType = "scatter" // WorkflowGraph executes steps as a DAG with conditional paths. WorkflowGraph WorkflowType = "graph" // WorkflowCrew has a lead agent delegating to specialists. WorkflowCrew WorkflowType = "crew" // WorkflowSwarm is self-organizing with shared task queue. WorkflowSwarm WorkflowType = "swarm" // WorkflowCouncil uses peer debate and consensus. WorkflowCouncil WorkflowType = "council" )
func (WorkflowType) Category ¶
func (w WorkflowType) Category() WorkflowCategory
Category returns the workflow category for this type.
func (WorkflowType) IsDeterministic ¶
func (w WorkflowType) IsDeterministic() bool
IsDeterministic returns true if this is a deterministic workflow type.
func (WorkflowType) IsSelfDirected ¶
func (w WorkflowType) IsSelfDirected() bool
IsSelfDirected returns true if this is a self-directed workflow type.
func (WorkflowType) JSONSchema ¶
func (WorkflowType) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.Schema for WorkflowType type.