review

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package review provides PASS/FAIL signal parsing and consensus logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsDoneSignal

func ContainsDoneSignal(msgs []*bridge.Message, doneSignal string) bool

ContainsDoneSignal checks messages for the done signal.

Types

type Consensus

type Consensus struct {
	// contains filtered or unexported fields
}

Consensus determines the overall review result from multiple agents.

func NewConsensus

func NewConsensus(mode string) *Consensus

NewConsensus creates a new consensus calculator.

func (*Consensus) Calculate

func (c *Consensus) Calculate(claudeResult, codexResult *Result) *ConsensusResult

Calculate determines consensus from agent results.

type ConsensusResult

type ConsensusResult struct {
	Signal       Signal
	Reason       string
	ClaudeSignal Signal
	CodexSignal  Signal
	Unanimous    bool
}

ConsensusResult represents the consensus outcome.

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser parses review signals from agent output.

func NewParser

func NewParser(doneSignal string) *Parser

NewParser creates a new signal parser.

func (*Parser) IsDone

func (p *Parser) IsDone(text string) bool

IsDone checks if the done signal is present in text.

func (*Parser) Parse

func (p *Parser) Parse(text string) *Result

Parse extracts a signal from the given text.

func (*Parser) ParseMessage

func (p *Parser) ParseMessage(msg *bridge.Message) *Result

ParseMessage parses a signal from a bridge message.

type Result

type Result struct {
	Signal   Signal
	Reason   string
	Raw      string
	Agent    string
	Explicit bool // Whether the signal was explicitly stated
}

Result represents the result of signal parsing.

type Signal

type Signal string

Signal represents a review signal.

const (
	SignalPass    Signal = "PASS"
	SignalFail    Signal = "FAIL"
	SignalNone    Signal = ""
	SignalPending Signal = "PENDING"
)

Jump to

Keyboard shortcuts

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