Documentation
¶
Overview ¶
Package report renders the final research report (design doc §14 Phase 3: "Markdown Renderer", "Citation Coverage", "Artifact Store"). The writer agent already produces the structured report document and the citation validator stamps the verdict; this package turns the persisted record into the deliverable Markdown artifact and hands back the content-addressed artifact reference of §5.
Index ¶
Constants ¶
const ( MediaTypeMarkdown = "text/markdown" MediaTypeJSON = "application/json" )
Media types of the stored artifacts.
Variables ¶
This section is empty.
Functions ¶
func RenderMarkdown ¶
RenderMarkdown renders the final deliverable (§14 "Markdown Renderer"). Every citation appears in a References section so the report is traceable back to its evidence IDs (§18 "Report Traceable to Evidence").
func Store ¶
func Store(ctx context.Context, store *artifact.Filesystem, tenantID string, mediaType string, content []byte) (string, error)
Store persists one deliverable into the content-addressed artifact store and returns the artifactRef URI. Storing is idempotent: identical content addresses to the same digest.
Types ¶
type Citation ¶
type Citation struct {
Marker string `json:"marker"`
EvidenceID string `json:"evidenceId"`
SourceID string `json:"sourceId,omitempty"`
Quote string `json:"quote"`
}
Citation binds one in-body marker to one evidence ID with a verbatim quote, per the validator's 1:1 marker binding rule.
type Document ¶
type Document struct {
Title string `json:"title"`
Summary string `json:"summary"`
Sections []Section `json:"sections"`
Citations []Citation `json:"citations"`
InsufficientEvidence bool `json:"insufficientEvidence,omitempty"`
}
Document mirrors the writer agent's report record.
type Verdict ¶
type Verdict struct {
Valid bool `json:"valid"`
CitationCoverage float64 `json:"citationCoverage"`
UnsupportedClaims int `json:"unsupportedClaims"`
Retries int `json:"retries"`
InsufficientEvidence bool `json:"insufficientEvidence,omitempty"`
MarkerIssues []string `json:"markerIssues,omitempty"`
}
Verdict mirrors the citation validator's validation record.
func DecodeVerdict ¶
DecodeVerdict parses the persisted validator verdict.