templates

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package templates renders every piece of markdown patchy writes — issue bodies, comments, pull-request bodies, and the agent-facing handoff files — from embedded text/templates, so the artifacts stay consistent across the estate.

The issue body carries a machine-readable manifest block (an HTML comment holding JSON) that is the authoritative record of the alerts accumulated into the issue; the human-readable body is re-rendered from the manifest on every accumulation, never string-edited. The accumulator (source-controller) owns the body; everyone else appends comments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindingIssueTitle added in v0.4.0

func FindingIssueTitle(f *v1alpha1.Finding) string

FindingIssueTitle is the tracking-issue title projected from a Finding.

func PRBody

func PRBody(issue int, report string) (string, error)

PRBody renders the pull-request body for a remediation branch; issue is the tracking issue number ("Fixes #issue" auto-links and auto-closes).

func RenderEnrichmentProjection added in v0.4.0

func RenderEnrichmentProjection(e v1alpha1.Enrichment) string

RenderEnrichmentProjection renders one enhancer enrichment as a tracking-issue comment.

func RenderFindingIssue added in v0.4.0

func RenderFindingIssue(f *v1alpha1.Finding) (string, error)

RenderFindingIssue renders the tracking-issue body from the Finding — a pure human-facing projection (the CR is the state; the body carries only a finding-name marker comment for debugging).

func RenderInvestigatePrompt added in v0.4.0

func RenderInvestigatePrompt(p InvestigatePrompt) (string, error)

RenderInvestigatePrompt renders the investigation prompt.

func RenderRemediatePrompt

func RenderRemediatePrompt(p RemediatePrompt) (string, error)

RenderRemediatePrompt renders the remediation prompt.

func RenderStageReportComment added in v0.4.0

func RenderStageReportComment(stage string, attempt int32, report string) string

RenderStageReportComment renders an agent report as a tracking-issue comment, headed by the stage name and attempt so re-projection can dedup.

Types

type InvestigatePrompt added in v0.4.0

type InvestigatePrompt struct {
	IssuePath          string
	ReportPath         string
	AllowedModels      []string
	MaxTurnsCeiling    int
	TokenBudgetCeiling int
}

InvestigatePrompt is the data for the analysis-stage prompt (stage 1: exploitability/likelihood/impact plus the verdict).

type RemediatePrompt

type RemediatePrompt struct {
	IssuePath         string
	InvestigationPath string
	ReportPath        string
	CommitScriptPath  string
}

RemediatePrompt is the data for the stage-2 (remediation) prompt.

Jump to

Keyboard shortcuts

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