agent

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	// Plan launches an interactive planning session.
	// If initialPrompt is non-empty, it is sent as the first message.
	// Returns the structured plan when the session ends.
	Plan(ctx context.Context, initialPrompt string, opts PlanOptions) (*Plan, error)

	// Execute runs a task in headless mode (used by workers).
	Execute(ctx context.Context, task TaskSpec, opts ExecOptions) (*ExecResult, error)

	// Review runs a code review on a diff in headless mode (used by the Integrator).
	Review(ctx context.Context, diff string, opts ReviewOptions) (*ReviewResult, error)
}

Agent abstracts the AI coding tool (Claude Code, Codex, Cursor, Gemini CLI, etc.)

type ExecOptions

type ExecOptions struct {
	RepoRoot     string
	SystemPrompt string
	MaxTurns     int // Max agentic turns (0 = agent default)
}

type ExecResult

type ExecResult struct {
	ModifiedFiles []string
	Summary       string
}

type Plan

type Plan struct {
	BatchName string        `json:"batch_name" yaml:"batch_name"`
	Tasks     []PlannedTask `json:"tasks" yaml:"tasks"`
}

type PlanOptions

type PlanOptions struct {
	RepoRoot     string
	OutputPath   string // Path where the agent writes the plan JSON
	SystemPrompt string
	Context      map[string]string
}

type PlannedTask

type PlannedTask struct {
	Title                   string   `json:"title" yaml:"title"`
	Description             string   `json:"description" yaml:"description"`
	ImplementationDetails   string   `json:"implementation_details" yaml:"implementation_details"`
	AcceptanceCriteria      []string `json:"acceptance_criteria" yaml:"acceptance_criteria"`
	Scope                   []string `json:"scope" yaml:"scope"`
	Conventions             []string `json:"conventions" yaml:"conventions"`
	ContextFromDependencies []string `json:"context_from_dependencies" yaml:"context_from_dependencies"`
	Complexity              string   `json:"complexity" yaml:"complexity"`     // "low", "medium", "high"
	Type                    string   `json:"type" yaml:"type"`                 // "feature", "bugfix" (default: "feature")
	RunnerLabel             string   `json:"runner_label" yaml:"runner_label"` // Runner label override; empty = use config default
	DependsOn               []int    `json:"depends_on" yaml:"depends_on"`     // Indices into the Tasks slice
	Manual                  bool     `json:"manual" yaml:"manual"`             // Requires human action, not dispatched to workers
}

type ReviewFinding added in v0.2.0

type ReviewFinding struct {
	Severity    string `json:"severity"` // "HIGH", "MEDIUM", "LOW"
	Description string `json:"description"`
}

ReviewFinding represents a single finding from a code review with severity.

type ReviewOptions

type ReviewOptions struct {
	AcceptanceCriteria  []string
	RepoRoot            string
	SystemPrompt        string
	Strictness          string   // "standard", "strict", "lenient" — controls review aggressiveness
	PriorReviewComments []string // Full text of previous HerdOS review comments on this PR
}

type ReviewResult

type ReviewResult struct {
	Approved bool            `json:"approved"`
	Findings []ReviewFinding `json:"findings"`
	Comments []string        `json:"comments"` // Deprecated: populated from Findings for backward compatibility
	Summary  string          `json:"summary"`
}

type TaskSpec

type TaskSpec struct {
	IssueNumber        int // GitHub issue number (for commit messages)
	Title              string
	Body               string // Full issue body (raw markdown, passed verbatim to agent)
	AcceptanceCriteria []string
	Scope              []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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