conductor(checkpoint): Phase 1: Research and Investigation complete

This commit is contained in:
2026-02-25 08:45:41 -05:00
parent 4a74487e06
commit cf3de845fb
5 changed files with 108 additions and 9 deletions

View File

@@ -2,14 +2,25 @@ param(
[Parameter(Mandatory=$true)]
[string]$Prompt,
[string]$Model = "gemini-3-flash-preview"
[ValidateSet("Worker", "QA", "Utility")]
[string]$Role = "Utility",
[string]$Model = "flash"
)
# Ensure the session has the API key loaded
. C:\projects\misc\setup_gemini.ps1
if (Test-Path "C:\projects\misc\setup_gemini.ps1") {
. C:\projects\misc\setup_gemini.ps1
}
# Prepend a strict system instruction to the prompt to prevent the model from entering a tool-usage loop
$SafePrompt = "STRICT SYSTEM DIRECTIVE: You are a stateless utility function. DO NOT USE ANY TOOLS (no write_file, no run_shell_command, etc.). ONLY output the exact requested text, code, or JSON.`n`nUSER PROMPT:`n$Prompt"
$SystemPrompts = @{
"Worker" = "STRICT SYSTEM DIRECTIVE: You are a stateless Tier 3 Worker (Contributor). Your goal is to generate high-quality code or diffs based on the provided ticket. DO NOT USE ANY TOOLS (no write_file, no run_shell_command, etc.). ONLY output the clean code or the requested diff inside XML-style tags if requested, otherwise just the code. No pleasantries."
"QA" = "STRICT SYSTEM DIRECTIVE: You are a stateless Tier 4 QA Agent. Your goal is to analyze the provided error trace and compress it into a surgical, 20-word fix. DO NOT USE ANY TOOLS. ONLY output the compressed fix. No explanations."
"Utility" = "STRICT SYSTEM DIRECTIVE: You are a stateless utility function. DO NOT USE ANY TOOLS. ONLY output the exact requested text, code, or JSON."
}
$SelectedPrompt = $SystemPrompts[$Role]
$SafePrompt = "$SelectedPrompt`n`nUSER PROMPT:`n$Prompt"
# Execute headless Gemini using -p, suppressing stderr noise
$jsonOutput = gemini -p $SafePrompt --model $Model --output-format json 2>$null