Documentation
¶
Overview ¶
Package report generates and parses completion reports from prompt execution.
Index ¶
Constants ¶
const ( // MarkerStart is the opening delimiter for completion report blocks. MarkerStart = "<!-- DARK-FACTORY-REPORT" // MarkerEnd is the closing delimiter for completion report blocks. MarkerEnd = "DARK-FACTORY-REPORT -->" )
Variables ¶
This section is empty.
Functions ¶
func ChangelogSuffix ¶ added in v0.23.0
func ChangelogSuffix() string
ChangelogSuffix returns instructions for the YOLO agent to write a descriptive changelog entry. It is appended to the prompt only when the project has a CHANGELOG.md.
func Suffix ¶
func Suffix() string
Suffix returns the markdown text that dark-factory appends to every prompt. It instructs the AI agent to output a structured completion report.
func ValidationPromptSuffix ¶ added in v0.57.0
ValidationPromptSuffix returns the markdown text injected when a project-level validation prompt is configured. It instructs the agent to evaluate each criterion against its changes and report unmet criteria as blockers with "partial" status. Evaluation runs only after validationCommand passes (if one is configured).
func ValidationSuffix ¶ added in v0.27.0
ValidationSuffix returns the markdown text injected when a project-level validation command is configured. It instructs the agent to treat the command's exit code as the authoritative success/failure signal, overriding any <verification> section in the prompt.
Types ¶
type CompletionReport ¶
type CompletionReport struct {
Status string `json:"status"` // "success", "partial", "failed"
Summary string `json:"summary"` // one-line description of what was done
Blockers []string `json:"blockers"` // why it's not success (empty on success)
Verification *Verification `json:"verification,omitempty"` // optional verification command result
}
CompletionReport is the structured output the AI agent must produce at the end of every prompt execution.
func ParseFromLog ¶ added in v0.11.7
func ParseFromLog(ctx context.Context, logFile string) (*CompletionReport, error)
ParseFromLog reads the last N bytes of a log file and extracts the CompletionReport. Returns nil if no report found (graceful — old prompts won't have one).
func (*CompletionReport) ValidateConsistency ¶ added in v0.15.0
func (r *CompletionReport) ValidateConsistency() (correctedStatus string, overridden bool)
ValidateConsistency checks if the reported status is consistent with verification results. Returns the corrected status and true if it was overridden.
type Verification ¶ added in v0.15.0
Verification records the result of a verification command.