report

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MarkerStart = "<!-- DARK-FACTORY-REPORT"
	MarkerEnd   = "DARK-FACTORY-REPORT -->"
)

Variables

This section is empty.

Functions

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.

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

type Verification struct {
	Command  string `json:"command"`
	ExitCode int    `json:"exitCode"`
}

Verification records the result of a verification command.

Jump to

Keyboard shortcuts

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