Documentation
¶
Index ¶
- func ApplyFixes(repoRoot string, findings []Finding) ([]string, error)
- func BuildLocalAgentCLIBinary(repoRoot string) (string, error)
- func CommitIfDirty(repoRoot, msg string) (bool, error)
- func CurrentBranch(repoRoot string) string
- func EnsureBranch(repoRoot, branch string) error
- func RenderCompareMarkdown(report CompareReport) string
- func RenderDoctorMarkdown(r DoctorReport) string
- func WriteCompareOutput(repoRoot string, report CompareReport, format, outPath string) (string, error)
- func WriteRegressionBaseline(path string, baseline RegressionBaseline) error
- func WriteReports(repoRoot string, result RunResult) error
- type BehaviorCommitteeSnapshot
- type BehaviorFindingSnapshot
- type BehaviorJudgeSnapshot
- type BehaviorScenarioSnapshot
- type BehaviorSnapshot
- type BehaviorStepSnapshot
- type CommitteeMeta
- type CompareDelta
- type CompareReport
- type Config
- type DoctorReport
- type Finding
- type JudgeScore
- type RegressionBaseline
- type RegressionDrift
- type ReplayReport
- type RoleConfig
- type RoleExecution
- type RoleSpec
- type RunResult
- type Scenario
- type ScenarioResult
- type Step
- type StepResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitIfDirty ¶
func CurrentBranch ¶
func EnsureBranch ¶
func RenderCompareMarkdown ¶
func RenderCompareMarkdown(report CompareReport) string
func RenderDoctorMarkdown ¶
func RenderDoctorMarkdown(r DoctorReport) string
func WriteCompareOutput ¶
func WriteCompareOutput(repoRoot string, report CompareReport, format, outPath string) (string, error)
func WriteRegressionBaseline ¶
func WriteRegressionBaseline(path string, baseline RegressionBaseline) error
func WriteReports ¶
Types ¶
type BehaviorFindingSnapshot ¶
type BehaviorJudgeSnapshot ¶
type BehaviorScenarioSnapshot ¶
type BehaviorScenarioSnapshot struct {
Name string `json:"name"`
OK bool `json:"ok"`
Steps []BehaviorStepSnapshot `json:"steps"`
}
type BehaviorSnapshot ¶
type BehaviorSnapshot struct {
Mode string `json:"mode"`
Iterations int `json:"iterations"`
Scenario BehaviorScenarioSnapshot `json:"scenario"`
Findings []BehaviorFindingSnapshot `json:"findings"`
Judge BehaviorJudgeSnapshot `json:"judge"`
Committee *BehaviorCommitteeSnapshot `json:"committee,omitempty"`
}
func BuildBehaviorSnapshot ¶
func BuildBehaviorSnapshot(result RunResult) BehaviorSnapshot
type BehaviorStepSnapshot ¶
type CommitteeMeta ¶
type CommitteeMeta struct {
Planner RoleExecution `json:"planner"`
Fixer RoleExecution `json:"fixer"`
Judger RoleExecution `json:"judger"`
}
type CompareDelta ¶
type CompareReport ¶
type CompareReport struct {
SchemaVersion string `json:"schema_version"`
RunA RunResult `json:"run_a"`
RunB RunResult `json:"run_b"`
Delta CompareDelta `json:"delta"`
}
func CompareRuns ¶
func CompareRuns(repoRoot, runA, runB string) (CompareReport, error)
type DoctorReport ¶
type DoctorReport struct {
SchemaVersion string `json:"schema_version"`
LeanReady bool `json:"lean_ready"`
LabFeaturesReady bool `json:"lab_features_ready"`
Findings []Finding `json:"findings"`
Suggestions []string `json:"suggestions"`
ReviewPath string `json:"review_path"`
}
func LoopDoctor ¶
func LoopDoctor(repoRoot string) DoctorReport
type Finding ¶
type Finding struct {
Code string `json:"code"`
Severity string `json:"severity"`
Message string `json:"message"`
Source string `json:"source"`
}
func DetectFindings ¶
func DetectFindings(r ScenarioResult) []Finding
type JudgeScore ¶
type JudgeScore struct {
Score float64 `json:"score"`
Threshold float64 `json:"threshold"`
Pass bool `json:"pass"`
UXScore float64 `json:"ux_score"`
QualityScore float64 `json:"quality_score"`
PenaltyScore float64 `json:"penalty_score"`
PlannerScore float64 `json:"planner_score,omitempty"`
FixerScore float64 `json:"fixer_score,omitempty"`
JudgerScore float64 `json:"judger_score,omitempty"`
ScenarioPassRate float64 `json:"scenario_pass_rate"`
CounterIntuitiveFind int `json:"counter_intuitive_findings"`
HardFailures int `json:"hard_failures"`
}
func Judge ¶
func Judge(r ScenarioResult, findings []Finding, threshold float64) JudgeScore
type RegressionBaseline ¶
type RegressionBaseline struct {
SchemaVersion string `json:"schema_version"`
Kind string `json:"kind"`
Profile string `json:"profile"`
GeneratedAt time.Time `json:"generated_at"`
Snapshot BehaviorSnapshot `json:"snapshot"`
}
func ReadRegressionBaseline ¶
func ReadRegressionBaseline(path string) (RegressionBaseline, error)
type RegressionDrift ¶
type RegressionDrift struct {
Path string `json:"path"`
Expected string `json:"expected"`
Actual string `json:"actual"`
}
func CompareBehaviorSnapshot ¶
func CompareBehaviorSnapshot(expected, actual BehaviorSnapshot) []RegressionDrift
type ReplayReport ¶
type ReplayReport struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
Iteration int `json:"iteration"`
Baseline ScenarioResult `json:"baseline"`
Replay ScenarioResult `json:"replay"`
ReplayJudge JudgeScore `json:"replay_judge"`
ReplayFindings []Finding `json:"replay_findings"`
}
func ReplayIteration ¶
func ReplayIteration(repoRoot, runID string, iteration int, threshold float64) (ReplayReport, error)
type RoleConfig ¶
type RoleExecution ¶
type RoleExecution struct {
Strategy string `json:"strategy"`
Independent bool `json:"independent,omitempty"`
Command string `json:"command,omitempty"`
Artifacts string `json:"artifacts,omitempty"`
Applied []string `json:"applied,omitempty"`
Notes string `json:"notes,omitempty"`
ExitCode int `json:"exit_code,omitempty"`
StderrTail string `json:"stderr_tail,omitempty"`
}
type RunResult ¶
type RunResult struct {
SchemaVersion string `json:"schema_version"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at"`
Scenario ScenarioResult `json:"scenario"`
Findings []Finding `json:"findings"`
Judge JudgeScore `json:"judge"`
Iterations int `json:"iterations"`
Branch string `json:"branch"`
FixesApplied []string `json:"fixes_applied"`
Mode string `json:"mode,omitempty"`
RunID string `json:"run_id,omitempty"`
Committee *CommitteeMeta `json:"committee,omitempty"`
}
type Scenario ¶
type Scenario struct {
Name string `json:"name"`
Description string `json:"description"`
WorkDir string `json:"work_dir"`
Steps []Step `json:"steps"`
}
type ScenarioResult ¶
type ScenarioResult struct {
Name string `json:"name"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at"`
OK bool `json:"ok"`
Steps []StepResult `json:"steps"`
}
func RunScenario ¶
func RunScenario(s Scenario) (ScenarioResult, error)
Click to show internal directories.
Click to hide internal directories.