prompt

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BoundaryMarker = "--- session context ---"

BoundaryMarker separates the static cacheable prefix from the dynamic per-turn suffix. Plain text (no markdown) so it serves as a deterministic prefix terminator for any caching layer.

Variables

View Source
var Instructions string
View Source
var Planning string

Functions

func BuildInstructions

func BuildInstructions(base string, data SectionData) string

BuildInstructions assembles the system prompt with a cacheable static prefix followed by a boundary marker and a dynamic suffix.

func ComposeSections

func ComposeSections(sections ...Section) string

Types

type Section

type Section struct {
	Title   string
	Content string
}

func RenderSections

func RenderSections(data SectionData) []Section

RenderSections returns every renderable section regardless of static/dynamic classification. Retained for tests and callers that need a flat list.

type SectionData

type SectionData struct {
	PlanMode            bool
	Date                string
	OS                  string
	Arch                string
	WorkingDir          string
	MemoryDir           string
	MemoryContent       string
	Skills              string
	ProjectInstructions string
}

Jump to

Keyboard shortcuts

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