internal/core/reviewcontext
import "github.com/nilstate/scafld/v2/internal/core/reviewcontext"
Package reviewcontext models the exact context packet given to review providers.
Variables
ErrRequiredContextTooLarge is returned when required provider context cannot fit the configured packet budget.
Source: internal/core/reviewcontext/model.go:20
var ErrRequiredContextTooLarge = errors.New("required context exceeds budget")Functions
func RenderMarkdown(packet Packet, opts Options) string
Source: internal/core/reviewcontext/model.go:80
RenderMarkdown renders a packet into deterministic provider-readable Markdown.
func RenderMarkdownStrict(packet Packet, opts Options) (string, error)
Source: internal/core/reviewcontext/model.go:88
RenderMarkdownStrict renders a provider packet after validating that the full required context fits the configured packet budget.
func SourceForContent(kind string, path string, content []byte) Source
Source: internal/core/reviewcontext/model.go:56
SourceForContent returns stable provenance for source text.
func SourceMarkdownSection(key string, title string, order int, path string, content []byte) Section
Source: internal/core/reviewcontext/model.go:68
SourceMarkdownSection returns the canonical source-contract section for agent-facing packets. Required sections must render in full.
Types
type Options
Source: internal/core/reviewcontext/model.go:49
Options controls packet rendering.
type Options struct {
MaxBytes int
RequiredMaxBytes int
Title string
}Fields
MaxBytes intRequiredMaxBytes intTitle string
type Packet
Source: internal/core/reviewcontext/model.go:23
Packet is the deterministic reviewer brief before provider-specific transport.
type Packet struct {
TaskID string
Title string
Status string
Sections []Section
}Fields
TaskID stringTitle stringStatus stringSections []Section
type Section
Source: internal/core/reviewcontext/model.go:31
Section is one ordered part of the reviewer brief.
type Section struct {
Key string
Title string
Order int
Body string
Required bool
Sources []Source
}Fields
Key stringTitle stringOrder intBody stringRequired boolSources []Source
type Source
Source: internal/core/reviewcontext/model.go:41
Source identifies material used to construct a section.
type Source struct {
Kind string
Path string
SHA256 string
Bytes int
}Fields
Kind stringPath stringSHA256 stringBytes int
