feat: implement Crosscheck Work experiment
Add the 'Crosscheck Work' experiment to the Agents settings. When enabled, a reviewer sub-agent is spawned after the main agent finishes a turn (with no pending tool calls). The reviewer critiques the output using a dedicated system prompt focused on correctness, simplicity, and code quality. If the reviewer does not respond with 'LGTM!', its feedback is injected as a synthetic user query back to the main agent, which must address it. This loop continues until the reviewer approves or max iterations is reached. Components: - Feature flag: CrosscheckWork (enabled in DOGFOOD_FLAGS) - Settings: agents.experiments.crosscheck_enabled, agents.experiments.crosscheck_model_id, agents.experiments.crosscheck_max_iterations - Settings UI: new 'Experiments' subpage under Agents - Crosscheck module: app/src/ai/crosscheck/ with prompt, reviewer model - Controller integration: hooks into AfterStreamFinished when no actions are queued, triggers reviewer, handles feedback injection - Provider support: OpenAI-compatible and Bedrock direct invocation - Safety: max iteration guard, error handling, reset on new user query
This commit is contained in:
@@ -22,6 +22,7 @@ pub mod bedrock;
|
||||
pub(crate) mod bedrock_credentials;
|
||||
pub(crate) mod block_context;
|
||||
pub(crate) mod blocklist;
|
||||
pub(crate) mod crosscheck;
|
||||
#[cfg(any(feature = "local_fs", not(target_family = "wasm")))]
|
||||
pub(crate) mod codebase_auto_indexing;
|
||||
pub mod control_code_parser;
|
||||
|
||||
Reference in New Issue
Block a user