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 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.