Documentation
¶
Overview ¶
Package agent runs AI code reviewers behind a common interface.
Index ¶
Constants ¶
View Source
const OutputContract = `` /* 530-byte string literal not displayed */
OutputContract is appended to every operator prompt. It is fixed so a custom prompt cannot change what Ghost parses.
View Source
const ResultSchema = `` /* 436-byte string literal not displayed */
ResultSchema is passed to agents that support structured output.
Variables ¶
This section is empty.
Functions ¶
func BuildPrompt ¶
BuildPrompt appends Ghost's fixed sections to the operator's rendered prompt: where the review materials are, then the output contract.
Types ¶
type InlineComment ¶
type ReviewRequest ¶
type ReviewResult ¶
type ReviewResult struct {
Summary string `json:"summary"`
Verdict Verdict `json:"verdict"`
Comments []InlineComment `json:"comments"`
CostUSD float64 `json:"-"`
Raw string `json:"-"` // full agent output, for the audit trail
}
type Reviewer ¶
type Reviewer interface {
Name() string
// Review runs one review. CostUSD is set whenever the agent reported a
// cost, including when an error is returned.
Review(ctx context.Context, req ReviewRequest) (ReviewResult, error)
}
Click to show internal directories.
Click to hide internal directories.