Versions in this module Expand all Collapse all v1 v1.4.0 Jun 1, 2026 Changes in this version + const SignalCodexDone + const SignalCompleted + const SignalFailed + const SignalPlanDraft + const SignalPlanReady + const SignalQuestion + const SignalReviewDone + var ErrNoPlanDraftSignal = errors.New("no plan draft signal found") + var ErrNoQuestionSignal = errors.New("no question signal found") + var ErrUserAborted = errors.New("user aborted") + var ErrUserRejectedPlan = errors.New("user rejected plan") + func IsCodexDone(signal string) bool + func IsPlanReady(signal string) bool + func IsReviewDone(signal string) bool + func ParsePlanDraftPayload(output string) (string, error) + type BreakController struct + func NewBreakController(deps *Deps) *BreakController + type Config struct + AppConfig *config.Config + CodexEnabled bool + ExternalReviewToolSet bool + FinalizeEnabled bool + MaxExternalIterations int + MaxIterations int + PlanDescription string + ReviewPatience int + type Deps struct + BreakCh <-chan struct{} + Git GitChecker + InputCollector InputCollector + PauseHandler func(ctx context.Context) bool + type ExecutionResult struct + Result executor.Result + TimedOut bool + type Executor interface + Run func(ctx context.Context, prompt string) executor.Result + type ExternalReviewLogger interface + PrintAligned func(text string) + PrintSection func(section status.Section) + type ExternalReviewOutcome struct + HadFindings bool + type ExternalReviewPhase struct + func NewExternalReviewPhase(opts ExternalReviewPhaseOpts) *ExternalReviewPhase + func (p *ExternalReviewPhase) Run(ctx context.Context) (ExternalReviewOutcome, error) + func (p *ExternalReviewPhase) Tool() string + type ExternalReviewPhaseOpts struct + Breaks *BreakController + Cfg Config + Custom *executor.CustomExecutor + External Executor + Git *GitState + IterationDelay time.Duration + Log ExternalReviewLogger + PhaseHolder *status.PhaseHolder + Policy Policy + Prompts ExternalReviewPrompts + Review Executor + type ExternalReviewPrompts interface + CodexEvaluationPrompt func(codexOutput string) string + CodexReviewPrompt func(isFirst bool, claudeResponse string) string + CustomEvaluationPrompt func(customOutput string) string + CustomReviewPrompt func(isFirst bool, claudeResponse string) string + type FinalizeLogger interface + PrintSection func(section status.Section) + type FinalizePhase struct + func NewFinalizePhase(opts FinalizePhaseOpts) *FinalizePhase + func (p *FinalizePhase) Run(ctx context.Context) error + type FinalizePhaseOpts struct + Cfg Config + Exec Executor + Log FinalizeLogger + PhaseHolder *status.PhaseHolder + Policy Policy + Prompts FinalizePrompts + type FinalizePrompts interface + FinalizePrompt func() string + type GitChecker interface + DiffFingerprint func() (string, error) + HeadHash func() (string, error) + type GitState struct + func NewGitState(deps *Deps, log Logger) *GitState + type InputCollector interface + AskDraftReview func(ctx context.Context, question string, planContent string) (action string, feedback string, err error) + AskQuestion func(ctx context.Context, question string, options []string) (string, error) + type Locator interface + Path func() string + type Logger interface + Print func(format string, args ...any) + type PlanCreationLogger interface + LogAnswer func(answer string) + LogDraftReview func(action string, feedback string) + LogQuestion func(question string, options []string) + PrintRaw func(format string, args ...any) + PrintSection func(section status.Section) + type PlanCreationPhase struct + func NewPlanCreationPhase(opts PlanCreationPhaseOpts) *PlanCreationPhase + func (p *PlanCreationPhase) Run(ctx context.Context) error + type PlanCreationPhaseOpts struct + Cfg Config + Deps *Deps + Exec Executor + IterationDelay time.Duration + Log PlanCreationLogger + PhaseHolder *status.PhaseHolder + Policy Policy + Prompts PlanCreationPrompts + type PlanCreationPrompts interface + PlanPrompt func() string + type Policy interface + HandlePatternMatchError func(err error, tool string) error + Run func(ctx context.Context, run func(context.Context, string) executor.Result, ...) ExecutionResult + Sleep func(ctx context.Context, d time.Duration) error + type QuestionPayload struct + Context string + Options []string + Question string + func ParseQuestionPayload(output string) (*QuestionPayload, error) + type ReviewLogger interface + PrintSection func(section status.Section) + type ReviewPhase struct + func NewReviewPhase(opts ReviewPhaseOpts) *ReviewPhase + func (p *ReviewPhase) First(ctx context.Context) error + func (p *ReviewPhase) Loop(ctx context.Context, prefix string) error + type ReviewPhaseOpts struct + Cfg Config + Exec Executor + Git *GitState + IterationDelay time.Duration + Log ReviewLogger + PhaseHolder *status.PhaseHolder + Policy Policy + Prompts ReviewPrompts + type ReviewPrompts interface + FirstReviewPrompt func() string + SecondReviewPrompt func(prefix string) string + type TaskLogger interface + PrintRaw func(format string, args ...any) + PrintSection func(section status.Section) + type TaskPhase struct + func NewTaskPhase(opts TaskPhaseOpts) *TaskPhase + func (p *TaskPhase) HasUncompletedTasks() bool + func (p *TaskPhase) NextPlanTaskPosition() int + func (p *TaskPhase) Run(ctx context.Context) error + func (p *TaskPhase) ValidatePlanHasTasks() error + type TaskPhaseOpts struct + Breaks *BreakController + Cfg Config + Deps *Deps + Exec Executor + IterationDelay time.Duration + Locator Locator + Log TaskLogger + Policy Policy + Prompts TaskPrompts + RetryCount int + type TaskPrompts interface + TaskPrompt func() string