report

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package report defines the two agent-written report contracts — the classification report and the remediation report — as YAML frontmatter schemas with strict, validated parsing. The prompts promise these exact shapes; unknown keys, missing required fields, and out-of-range values are errors, because everything downstream (labels, routing, budgets) is derived from these files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Classification

type Classification struct {
	Recommendation Recommendation `yaml:"recommendation"`
	Priority       Level          `yaml:"priority"`
	Severity       Level          `yaml:"severity"`
	// Confidence is the likelihood the recommendation is right — for
	// remediate, the likelihood of full remediation without breaking
	// functionality. Pointer so absence is detectable.
	Confidence *float64 `yaml:"confidence"`
	// BreakingChangeAvailable marks that a better fix exists but would
	// break external callers; the pipeline then holds for /approve.
	BreakingChangeAvailable bool `yaml:"breaking_change_available"`
	// Model, MaxTurns and TokenBudget are required iff Recommendation is
	// remediate; the caller clamps them against its ceilings/allowlist.
	Model       string `yaml:"model"`
	MaxTurns    int    `yaml:"max_turns"`
	TokenBudget int    `yaml:"token_budget"`
	// Body is the markdown analysis following the frontmatter.
	Body string `yaml:"-"`
}

Classification is the parsed classification report.

func ParseClassification

func ParseClassification(data []byte) (*Classification, error)

ParseClassification parses and validates a classification report.

type Level

type Level string

Level is a priority or severity value.

type Recommendation

type Recommendation string

Recommendation is the classifier's verdict, in the agent-facing vocabulary. "intervention" is what the labels call "manual"; the mapping happens where labels are written.

const (
	RecommendIgnore       Recommendation = "ignore"
	RecommendRemediate    Recommendation = "remediate"
	RecommendIntervention Recommendation = "intervention"
)

The classification verdicts.

type Remediation

type Remediation struct {
	// Success reports whether the agent believes the finding is fully
	// remediated. Pointer so absence is detectable; the runner verifies the
	// repository state regardless and may downgrade a claimed success.
	Success *bool `yaml:"success"`
	// Confidence is how confident the agent is that the issue is
	// remediated without breaking functionality.
	Confidence *float64 `yaml:"confidence"`
	// Body is the markdown summary following the frontmatter.
	Body string `yaml:"-"`
}

Remediation is the parsed remediation report.

func ParseRemediation

func ParseRemediation(data []byte) (*Remediation, error)

ParseRemediation parses and validates a remediation report.

Jump to

Keyboard shortcuts

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