Documentation
¶
Overview ¶
Package verify generates and runs AI-produced shell verification scripts after each PM task completes. The script checks observable artifacts—new files, successful command exit codes, expected output—to confirm the task was genuinely accomplished rather than merely claimed done.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateScriptPrompt ¶
GenerateScriptPrompt builds the prompt sent to the AI to produce the verification script. Exported so it can be tested independently.
func ParseScript ¶
ParseScript extracts the shell script from the AI response. It looks for a ```bash ... ``` block. If none is found it attempts to use the entire response as-is (trimmed).
Types ¶
type Result ¶
type Result struct {
Script string // the shell script that was generated
Output string // combined stdout+stderr from the script
ExitCode int // 0 = pass
Passed bool // true when ExitCode == 0
}
Result holds the outcome of a verification run.
func GenerateAndRun ¶
func GenerateAndRun( ctx context.Context, p provider.Provider, model string, timeout time.Duration, workDir string, task *pm.Task, taskOutput string, ) (*Result, error)
GenerateAndRun asks the provider to generate a verification script for the given task, writes it to a temp file, executes it in workDir, and returns the result. The caller is responsible for persisting the result as an artifact and for triggering failure diagnosis when Passed == false.