Versions in this module Expand all Collapse all v1 v1.9.0 Jun 8, 2026 v1.8.1 Jun 7, 2026 v1.8.0 Jun 7, 2026 v1.7.3 Jun 11, 2026 v1.7.2 Jun 7, 2026 Changes in this version type NIMAgent + func (n *NIMAgent) Config() AgentConfig + func (n *NIMAgent) Name() string + func (n *NIMAgent) Run(ctx context.Context, task *Task, scratch *Scratchpad) (string, error) v0 v0.1.2 Jun 11, 2026 v0.1.1 Jun 11, 2026 v0.1.0 Jun 11, 2026 Changes in this version + func DefaultUserAgentsPath() string + func GenerateID(prefix string) string + func HashScratchpad(content []byte) string + func PlanningPrior(episodes []*Episode) string + func UseLLM() bool + func UseNIM() bool + type Adversary struct + Agent AdversaryAgent + MaxAttacks int + ProbeTimeout time.Duration + Workdir string + func NewAdversary(agent AdversaryAgent, workdir string) *Adversary + func (adv *Adversary) Review(ctx context.Context, diff, impactBrief string) (*AdversaryResult, error) + type AdversaryAgent interface + ProposeAttacks func(ctx context.Context, diff, impactBrief string, maxAttacks int) ([]Attack, error) + type AdversaryResult struct + Attacks []Attack + Cleared bool + Landed int + func (r *AdversaryResult) CounterexampleBrief() string + type Agent interface + Config func() AgentConfig + Name func() string + Run func(ctx context.Context, task *Task, scratch *Scratchpad) (string, error) + type AgentConfig struct + BaseURL string + Description string + MaxContext int + MaxTokens int + MemoryNS string + Model string + Name string + Provider string + RetentionDays int + SystemFile string + Temperature float64 + ToolsAllow []string + ToolsDeny []string + Type TaskType + func DefaultAgents() []AgentConfig + func LoadUserAgents(baseDir string) ([]AgentConfig, error) + type AgentFactory func(rung Rung) []Agent + type AgentState struct + EpisodeCursor int64 + HeldLeases []int64 + LastVerdict json.RawMessage + ScratchpadHash string + TaskID string + type Aggregator struct + func NewAggregator(scratch *Scratchpad) *Aggregator + func (a *Aggregator) Aggregate(plan *Plan) *Result + type Artifact struct + Data any + Type string + type Attack struct + Hypothesis string + Kind AttackKind + Landed bool + Output string + ProbeSource string + type AttackKind string + const AttackBoundary + const AttackConcurrency + const AttackContract + const AttackInjection + const AttackResource + type Attempt struct + Diagnose string + Output string + Round int + Verdict *Verdict + type BlameResult struct + Bisections int + Check Check + Culprit *EditRecord + PriorGreen int + func (b *BlameResult) Diagnosis() string + type Blamer struct + Verifier *Verifier + func (bl *Blamer) Blame(ctx context.Context, log *EditLog, failing Check) (*BlameResult, error) + type Calibrator struct + func NewCalibrator(db *sql.DB) (*Calibrator, error) + func (c *Calibrator) BrierScore(ctx context.Context, agent string) (float64, int, error) + func (c *Calibrator) Calibrate(ctx context.Context, agent string, declared float64) (float64, error) + func (c *Calibrator) Record(ctx context.Context, claim ConfidenceClaim) error + type Candidate struct + Agent Agent + Err error + ID string + Output string + Verdict *Verdict + Worktree string + type Cartographer struct + func NewCartographer(repoRoot string) *Cartographer + func (c *Cartographer) IndexAll(ctx context.Context) error + func (c *Cartographer) Invalidate(files []string) + func (c *Cartographer) SliceFor(imp *Impact, k int) []ContextItem + func (c *Cartographer) SymbolCount() int + type Chain struct + func NewChain(name string, stages ...Stage) (*Chain, error) + func (c *Chain) Run(ctx context.Context, in Artifact) (Artifact, *Trace) + type ChainTemplate struct + Class TaskClass + ID int64 + LiveSuccesses int + LiveTrials int + Sequence []ToolCall + Status string + SuccessRate float64 + Support int + func (t *ChainTemplate) Key() string + type ChangedLine struct + File string + Line int + Text string + func ParseAddedLines(diff string) []ChangedLine + type Check struct + AllowedPaths []string + Cmd []string + Kind CheckKind + Name string + Timeout time.Duration + func DefaultGoChecks() []Check + type CheckKind string + const CheckBuild + const CheckDiffScope + const CheckLint + const CheckPredicate + const CheckTest + type CheckResult struct + Check Check + Duration time.Duration + Output string + Passed bool + type Checkpoint struct + CreatedAt time.Time + Green bool + ID int64 + Label string + State AgentState + TreeSHA string + type CompiledContext struct + Budget int + Evicted []string + Included []string + Prompt string + Used int + type ConfidenceClaim struct + AgentName string + Declared float64 + Passed bool + TaskClass TaskClass + type Conflict struct + HeldBy string + Intent string + Overlap string + TaskID string + type ContextCompiler struct + Budget int + KindCaps map[string]int + func NewContextCompiler(budget int) *ContextCompiler + func (cc *ContextCompiler) Compile(items []ContextItem) (*CompiledContext, error) + type ContextItem struct + Body string + Kind string + Name string + Pinned bool + Relevance float64 + func GatherStandard(contract *Contract, diagnosis string, impact *Impact, episodes []*Episode, ...) []ContextItem + type Contract struct + AllowedGlobs []string + ForbiddenPatterns []ForbiddenPattern + FrozenGlobs []string + MaxFilesChanged int + MaxLinesChanged int + RequiredInvariants []Check + TaskID string + func CompileContract(task *Task) *Contract + func (c *Contract) AsChecks() []Check + func (c *Contract) CheckDiffStats(filesChanged, linesChanged int) []Violation + func (c *Contract) CheckEdit(path string, addedLines []string) []Violation + type Critic struct + Checks []Check + Policy RepairPolicy + Verifier *Verifier + func NewCritic(vf *Verifier, checks []Check) *Critic + func (c *Critic) Drive(ctx context.Context, ag Agent, task *Task, scratch *Scratchpad) (*CriticResult, error) + type CriticResult struct + Attempts []Attempt + Final *Verdict + Passed bool + type DagExecutor struct + AgentID string + Leases *LeaseTable + MaxParallel int + func NewDagExecutor(leases *LeaseTable, agentID string) *DagExecutor + func (d *DagExecutor) Execute(ctx context.Context, nodes []*PlanNode, run NodeRunner) (*DagResult, error) + type DagResult struct + Order []string + Status map[string]NodeStatus + func (r *DagResult) Brief() string + type Decision string + const DecisionAutoMerge + const DecisionBlock + const DecisionGreenReview + type Decl struct + Key string + Pos int + Src string + type Dispatcher struct + func NewDispatcher(registry *Registry, scratch *Scratchpad, maxParallel int) *Dispatcher + func (d *Dispatcher) Dispatch(ctx context.Context, plan *Plan) error + type EditLog struct + Base string + Edits []EditRecord + TaskID string + Workdir string + type EditRecord struct + Path string + SHA string + Seq int + Summary string + type EditRequest struct + DeclaredConfidence float64 + Edits map[string][]byte + TaskID string + type Episode struct + CreatedAt time.Time + Diff string + ID int64 + Intent string + Passed bool + PlanJSON json.RawMessage + Rounds int + Score float64 + TaskTitle string + type EpisodeStore struct + func NewEpisodeStore(db *sql.DB) (*EpisodeStore, error) + func (s *EpisodeStore) Record(ctx context.Context, ep *Episode) error + func (s *EpisodeStore) Similar(ctx context.Context, taskTitle string, k int) ([]*Episode, error) + type Escalation struct + At time.Time + FromRung string + Reason string + ToRung string + Verdict *Verdict + type ForbiddenPattern struct + Name string + OnlyNewCode bool + Pattern *regexp.Regexp + func DefaultForbidden() []ForbiddenPattern + type FsTxn struct + func BeginTxn(workdir string) *FsTxn + func (t *FsTxn) Commit() error + func (t *FsTxn) DeleteFile(relPath string) error + func (t *FsTxn) Rollback() error + func (t *FsTxn) Touched() []string + func (t *FsTxn) WriteFile(relPath string, content []byte) error + type FuncStage struct + Fn func(ctx context.Context, in Artifact) (Artifact, error) + In string + Out string + StageName string + func (f *FuncStage) InType() string + func (f *FuncStage) Name() string + func (f *FuncStage) OutType() string + func (f *FuncStage) Run(ctx context.Context, in Artifact) (Artifact, error) + type Governor struct + Checks []Check + Factory AgentFactory + Ladder []Rung + RepoRoot string + Router *StrategyRouter + Verifier *Verifier + func (g *Governor) Execute(ctx context.Context, task *Task, scratch *Scratchpad) (*GovernorResult, error) + type GovernorResult struct + Escalations []Escalation + FinalRung string + Passed bool + TotalRounds int + Verdict *Verdict + type Impact struct + AffectedPkgs []string + AffectedTestPkgs []string + ChangedPkgs []string + Radius float64 + func (i *Impact) RiskBrief() string + type ImpactGraph struct + func BuildImpactGraph(ctx context.Context, repoRoot string) (*ImpactGraph, error) + func (g *ImpactGraph) Predict(changedFiles []string) *Impact + type Intent string + const IntentArchitecture + const IntentCodebase + const IntentDocs + const IntentGeneral + const IntentReview + const IntentSecurity + const IntentTest + type Kernel struct + Workdir string + func NewKernel(db *sql.DB, workdir string) (*Kernel, error) + func (k *Kernel) Capture(ctx context.Context, label string, state AgentState, green bool) (*Checkpoint, error) + func (k *Kernel) LastGreen(ctx context.Context) (int64, string, error) + func (k *Kernel) Rewind(ctx context.Context, checkpointID int64) (*AgentState, error) + func (k *Kernel) Timeline(ctx context.Context, limit int) (string, error) + type LLMAgent struct + func NewLLMAgent(cfg AgentConfig) *LLMAgent + func NewLLMAgentWithClient(cfg AgentConfig, client *llm.Client) *LLMAgent + func (a *LLMAgent) Config() AgentConfig + func (a *LLMAgent) Name() string + func (a *LLMAgent) Run(ctx context.Context, task *Task, scratch *Scratchpad) (string, error) + type Lease struct + AgentID string + ExpiresAt time.Time + Globs []string + ID int64 + Intent string + TaskID string + type LeaseTable struct + DefaultTTL time.Duration + func NewLeaseTable() *LeaseTable + func (lt *LeaseTable) Acquire(agentID, taskID, intent string, globs []string) (*Lease, []Conflict, error) + func (lt *LeaseTable) Board() string + func (lt *LeaseTable) Count() int + func (lt *LeaseTable) Release(id int64, agentID string) error + func (lt *LeaseTable) Renew(id int64, agentID string) error + type MacroResult struct + Applied bool + Decision Decision + ResumeContext string + Trace *Trace + Verdict *Verdict + type Macros struct + Agent string + Calib *Calibrator + Class TaskClass + Contract *Contract + Policy MergePolicy + Probe func(testCmd []string) *MutationProbe + Targeted *TargetedVerifier + Workdir string + func (m *Macros) SinChange(ctx context.Context, req EditRequest) (*MacroResult, error) + func (m *Macros) SinRefactor(ctx context.Context, req EditRequest) (*MacroResult, error) + type MergePolicy struct + AutoMergeThreshold float64 + ReviewThreshold float64 + func DefaultMergePolicy() MergePolicy + func (p MergePolicy) Decide(verified bool, calibrated float64) Decision + type MergeResult struct + AutoMerged int + Conflicts []SemConflict + Merged []byte + func SemanticMergeGo(base, a, b []byte) (*MergeResult, error) + func (r *MergeResult) ConflictBrief() string + type Miner struct + MaxLength int + MinLength int + MinSuccessRate float64 + MinSupport int + func NewMiner(db *sql.DB) (*Miner, error) + func (m *Miner) Mine(ctx context.Context, class TaskClass) ([]*ChainTemplate, error) + func (m *Miner) RecordSequence(ctx context.Context, ep SeqEpisode) error + func (m *Miner) ReportLive(ctx context.Context, templateID int64, success bool) error + func (m *Miner) SuggestionsFor(ctx context.Context, class TaskClass) (string, error) + type MockAgent struct + func NewMockAgent(cfg AgentConfig) *MockAgent + func (m *MockAgent) Config() AgentConfig + func (m *MockAgent) Name() string + func (m *MockAgent) Run(ctx context.Context, task *Task, scratch *Scratchpad) (string, error) + type Mutation struct + After string + Before string + File string + Killed bool + Line int + Rule string + type MutationProbe struct + MaxMutations int + TestCmd []string + Workdir string + func NewMutationProbe(workdir string, testCmd []string) *MutationProbe + func (mp *MutationProbe) Run(ctx context.Context, lines []ChangedLine) (*ProbeResult, error) + type NIMAgent = LLMAgent + func NewNIMAgent(cfg AgentConfig) *NIMAgent + func NewNIMAgentWithClient(cfg AgentConfig, client *llm.Client) *NIMAgent + type NodeRunner func(ctx context.Context, node *PlanNode) error + type NodeStatus string + const NodeGreen + const NodePending + const NodeRed + const NodeRunning + const NodeSkipped + type Orchestrator struct + Aggregator *Aggregator + Dispatcher *Dispatcher + MaxParallel int + Planner *Planner + Registry *Registry + Scratchpad *Scratchpad + func New() *Orchestrator + func NewWithAgents(extraConfigs []AgentConfig) *Orchestrator + func (o *Orchestrator) Plan(prompt string) *Plan + func (o *Orchestrator) Run(ctx context.Context, prompt string, opts ...RunOption) (*Result, error) + func (o *Orchestrator) String() string + type PkgNode struct + Dir string + GoFiles []string + ImportPath string + Imports []string + TestFiles []string + type Plan struct + Completed time.Time + Created time.Time + ID string + Intent Intent + Prompt string + Started time.Time + Success bool + Tasks []*Task + TokensUsed int + TotalCost float64 + type PlanNode struct + DependsOn []string + PathGlobs []string + Task *Task + type Planner struct + Agents []AgentConfig + Router *Router + func NewPlanner(agents []AgentConfig) *Planner + func (p *Planner) BuildPlan(prompt string) *Plan + type ProbeResult struct + Killed int + Mutations []Mutation + ObservabilityScore float64 + Survived int + func (p *ProbeResult) Diagnosis() string + type Registry struct + func NewRegistry(agents []Agent) *Registry + func NewRegistryWithDefaults(extraConfigs []AgentConfig) *Registry + func (r *Registry) ForType(tt TaskType) (Agent, bool) + func (r *Registry) Get(name string) (Agent, bool) + func (r *Registry) List() []AgentConfig + func (r *Registry) Register(a Agent) + type RepairPolicy struct + MaxAttempts int + MinImprovement float64 + func DefaultRepairPolicy() RepairPolicy + type Result struct + FailedTasks int + OKTasks int + Plan *Plan + Sections map[string]string + Summary string + TotalTasks int + type Router struct + Keywords map[Intent][]string + func NewRouter() *Router + func (r *Router) Classify(prompt string) Intent + func (r *Router) SubIntents(prompt string) []Intent + type RunOption func(*runConfig) + func WithMaxParallel(n int) RunOption + func WithTimeout(d time.Duration) RunOption + type Rung struct + Agents int + Name string + RepairRounds int + Timeout time.Duration + func DefaultLadder() []Rung + type Scratchpad struct + func NewScratchpad() *Scratchpad + func (s *Scratchpad) Merge(other *Scratchpad) + func (s *Scratchpad) Read(section string) (string, bool) + func (s *Scratchpad) ReadAll() map[string]*ScratchpadEntry + func (s *Scratchpad) Write(agent, section, content string) + type ScratchpadEntry struct + Agent string + Content string + Section string + Timestamp time.Time + Version int + type SemConflict struct + A string + B string + Base string + Key string + type SeqEpisode struct + Class TaskClass + EpisodeID int64 + Passed bool + Sequence []ToolCall + type SpecResult struct + Candidates []*Candidate + Winner *Candidate + type SpeculativeRunner struct + Checks []Check + KeepLosers bool + MaxParallel int + RepoRoot string + WorkdirBase string + func NewSpeculativeRunner(repoRoot string, checks []Check) *SpeculativeRunner + func (s *SpeculativeRunner) MergeWinner(ctx context.Context, winner *Candidate) (string, error) + func (s *SpeculativeRunner) Run(ctx context.Context, task *Task, agents []Agent, scratch *Scratchpad) (*SpecResult, error) + type Stage interface + InType func() string + Name func() string + OutType func() string + Run func(ctx context.Context, in Artifact) (Artifact, error) + func Guard(inner Stage, check func(Artifact) error) Stage + func Parallel(name, outType string, merge func([]Artifact) (Artifact, error), ...) Stage + type StageResult struct + Duration time.Duration + Err error + Output Artifact + Stage string + type Strategy string + const StratASTEdit + const StratHashline + const StratRewrite + const StratShellGen + type StrategyRouter struct + func NewStrategyRouter(db *sql.DB, seed int64) (*StrategyRouter, error) + func (r *StrategyRouter) Pick(class TaskClass, candidates []Strategy) Strategy + func (r *StrategyRouter) Posterior(class TaskClass, s Strategy) (mean float64, n int) + func (r *StrategyRouter) Report(ctx context.Context, class TaskClass, s Strategy, success bool) error + type Symbol struct + File string + Key string + Kind string + Line int + Rank float64 + Signature string + type TargetedVerifier struct + Graph *ImpactGraph + Inner *Verifier + func NewTargetedVerifier(inner *Verifier, graph *ImpactGraph) *TargetedVerifier + func (tv *TargetedVerifier) FastChecks(changedFiles []string) []Check + func (tv *TargetedVerifier) FinalChecks() []Check + func (tv *TargetedVerifier) Speedup(changedFiles []string) string + func (tv *TargetedVerifier) VerifyStaged(ctx context.Context, taskID, candidate string, changedFiles []string) *Verdict + type Task struct + AgentName string + Completed *time.Time + Cost float64 + Created time.Time + DependsOn []string + Description string + Error string + ID string + Result string + Started *time.Time + Status TaskStatus + Title string + TokensUsed int + Type TaskType + type TaskClass string + const ClassBugfix + const ClassConfig + const ClassGreenfield + const ClassRefactor + const ClassRename + const ClassUnknown + func ClassifyTask(task *Task) TaskClass + type TaskStatus string + const TaskBlocked + const TaskCancelled + const TaskCompleted + const TaskFailed + const TaskPending + const TaskRunning + type TaskType string + const TaskArchitect + const TaskCode + const TaskDocs + const TaskGeneral + const TaskReview + const TaskSecurity + const TaskTest + type ToolCall struct + ArgShape string + Tool string + type Trace struct + Chain string + Halted bool + HaltedAt string + Results []StageResult + func (t *Trace) Diagnosis() string + type Verdict struct + Candidate string + CreatedAt time.Time + Passed bool + Results []CheckResult + Score float64 + TaskID string + func BestVerdict(verdicts []*Verdict) *Verdict + func (v *Verdict) Diagnosis() string + type Verifier struct + MandatoryKinds []CheckKind + Workdir string + func NewVerifier(workdir string) *Verifier + func (vf *Verifier) Verify(ctx context.Context, taskID, candidate string, checks []Check) *Verdict + type Violation struct + Detail string + Kind string + Line int + Path string + func (v Violation) String() string