Help us shape the future of Go! Take the 2026 Go Developer Survey

retro

package
v0.30.41 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventError            = "error"
	EventTestFailure      = "test_failure"
	EventPermissionDenied = "permission_denied"
	EventCommandOutcome   = "command_outcome"
	EventSessionCreated   = "session_created"
	EventSessionCompleted = "session_completed"
)
View Source
const (
	ProjectLocalConfig = "local_config"
	ProjectRatchetCLI  = "ratchet-cli"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

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

func NewAnalyzer

func NewAnalyzer(redactor *secrets.Redactor) *Analyzer

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(_ context.Context, input Input) Report

type Event

type Event struct {
	Timestamp  time.Time `json:"timestamp"`
	SessionID  string    `json:"session_id,omitempty"`
	Kind       string    `json:"kind"`
	Message    string    `json:"message,omitempty"`
	Command    string    `json:"command,omitempty"`
	Outcome    string    `json:"outcome,omitempty"`
	WorkingDir string    `json:"working_dir,omitempty"`
	Project    string    `json:"project,omitempty"`
}

Event is one piece of session evidence available to the retro analyzer.

type EvidenceStore added in v0.13.0

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

EvidenceStore persists local retro evidence as JSONL.

func NewEvidenceStore added in v0.13.0

func NewEvidenceStore(path string, redactor *secrets.Redactor) *EvidenceStore

func (*EvidenceStore) Append added in v0.13.0

func (s *EvidenceStore) Append(event Event) (err error)

func (*EvidenceStore) Load added in v0.13.0

func (s *EvidenceStore) Load() ([]Event, error)

type Finding

type Finding struct {
	Pattern        string
	Evidence       string
	Project        string
	LocalAction    string
	UpstreamAction string
}

Finding is a compact improvement observation.

type Input

type Input struct {
	SessionID  string
	WorkingDir string
	Events     []Event
}

Input is the bounded session context analyzed by the optional retro loop.

type Recorder added in v0.13.0

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

Recorder wraps an EvidenceStore for daemon lifecycle call sites.

func NewRecorder added in v0.13.0

func NewRecorder(store *EvidenceStore) *Recorder

func (*Recorder) Record added in v0.13.0

func (r *Recorder) Record(event Event) error

type Report

type Report struct {
	SessionID string
	Findings  []Finding
}

Report is the analyzer output.

type RoutedActions

type RoutedActions struct {
	LocalActions         []string
	UpstreamInstructions []string
}

RoutedActions separates locally actionable items from upstream PR instructions.

func RouteFindings

func RouteFindings(cfg config.RetroConfig, report Report) RoutedActions

Jump to

Keyboard shortcuts

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