feat: request detailed reviewer guidance from cycle 3

When a run is about to start its 3rd cycle, the host review bundle asks
Codex to supply a step-by-step implementation plan via the new decision
field implementationGuidance, which is injected into the executor fix
prompt (with re-sent plan context) so the executor can converge faster.

- Add DETAILED_GUIDANCE_CYCLE_THRESHOLD and bundle signal in reviewWorkflow
- Add optional detailedGuidanceRequested/reviewerInstructions to the bundle
- Add optional implementationGuidance to HostDecisionV1 (validated, <=20000 chars)
- Inject guidance section and re-send plan/criteria on marked fix cycles
- Cover with integration, executor, and config validation tests
This commit is contained in:
liujing
2026-07-21 18:01:43 +08:00
parent 925d34aeb7
commit b5618e1b0c
8 changed files with 190 additions and 2 deletions
+8 -1
View File
@@ -314,8 +314,15 @@ ${plan.verificationCommands.map((cmd) => ` ${cmd.join(" ")}`).join("\n")}
${getSafetyConstraints(opts.vcsKind)}`;
}
return `# Fix Request: ${plan.title}
const hasDetailedGuidance = acceptedFindings.includes("## Detailed Implementation Guidance");
const planContext = hasDetailedGuidance
? `\n## Plan\n\n${plan.planMarkdown}\n\n## Acceptance Criteria\n\n${plan.acceptanceCriteria
.map((c, i) => ` ${i + 1}. ${c}`)
.join("\n")}\n`
: "";
return `# Fix Request: ${plan.title}
${planContext}
The code review found the following issues that must be fixed:
${acceptedFindings}