Documentation
¶
Index ¶
Constants ¶
const ( DeliveryArgv = "argv" DeliveryStdin = "stdin" )
const ( PromptDraft = `` /* 256-byte string literal not displayed */ PromptBaseline = `` /* 601-byte string literal not displayed */ PromptBaselineSplit = `` /* 1113-byte string literal not displayed */ PromptRefine = `` /* 367-byte string literal not displayed */ PromptRefineFeature = `` /* 622-byte string literal not displayed */ PromptApply = `` /* 361-byte string literal not displayed */ PromptApplyFeature = `` /* 399-byte string literal not displayed */ )
Built-in prompt templates. Placeholders {{prompt}} and {{spec_path}} are substituted with a plain replacer — NOT Go text/template, whose delimiters collide with the placeholder syntax.
const ( PlaceholderPrompt = "{{prompt}}" PlaceholderSpecPath = "{{spec_path}}" PlaceholderMasterSpecPath = "{{master_spec_path}}" )
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Build validates the template and returns the prepared command. In stdin delivery the returned byte slice carries the prompt; in argv delivery it is nil.
func Expand ¶
Expand substitutes placeholders in a prompt template. Replacement values are not rescanned: Expand performs a single pass, so prompt text that itself mentions template syntax is preserved verbatim. The optional masterSpecPath is used when refining or applying an individual feature spec.
Types ¶
type Adapter ¶
Adapter is a resolved agent command: argv template + delivery mode + extras.
func (Adapter) Execute ¶
Execute runs the adapter with the given instruction text. Agent stdout and stderr are captured by out, which must be safe for concurrent use (the stdout and stderr copiers both write it). Returns the exit code; a canceled context returns (-1, context.Canceled). Cancel kills the process group on Unix and the direct child on Windows. WaitDelay bounds the wait so orphaned descendants holding the output pipes cannot hang Wait forever.