diff options
| author | soryu <soryu@soryu.co> | 2026-01-27 01:05:25 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-27 01:05:25 +0000 |
| commit | 6cd5b20670d7ecd3d48539ff898e021988f2a503 (patch) | |
| tree | 0232ecd8411b01db07230f8ea2003cbbcdc070a6 /makima/src/server/handlers/transcript_analysis.rs | |
| parent | 64cc98783d067625d633eea1142d114e324f76bb (diff) | |
| download | soryu-6cd5b20670d7ecd3d48539ff898e021988f2a503.tar.gz soryu-6cd5b20670d7ecd3d48539ff898e021988f2a503.zip | |
Add Red Team adversarial review system for contract monitoring (#35)
Implements a parallel "red team" task that monitors work task outputs in
real-time, verifying implementations stick to contract requirements,
repository standards, and the execution plan.
Key features:
- New `red_team_enabled` and `red_team_prompt` contract configuration
- Red team tasks auto-spawn when first work task is created
- `makima red-team notify` CLI command for alerting supervisors
- POST /api/v1/mesh/red-team/notify and /status endpoints
- Alert delivery to supervisor via SendMessage daemon command
- Notification audit trail via history_events table
Database changes:
- Add red_team_enabled/red_team_prompt columns to contracts
- Add is_red_team flag to tasks with partial index
- Create red_team_notifications table for audit logging
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/server/handlers/transcript_analysis.rs')
| -rw-r--r-- | makima/src/server/handlers/transcript_analysis.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/makima/src/server/handlers/transcript_analysis.rs b/makima/src/server/handlers/transcript_analysis.rs index 8eb50c7..3c283da 100644 --- a/makima/src/server/handlers/transcript_analysis.rs +++ b/makima/src/server/handlers/transcript_analysis.rs @@ -279,6 +279,8 @@ pub async fn create_contract_from_analysis( autonomous_loop: None, phase_guard: None, local_only: None, + red_team_enabled: None, + red_team_prompt: None, }; let contract = match repository::create_contract_for_owner(pool, auth.owner_id, contract_req).await { @@ -358,6 +360,7 @@ pub async fn create_contract_from_analysis( continue_from_task_id: None, copy_files: None, is_supervisor: false, + is_red_team: false, checkpoint_sha: None, priority: match item.priority.as_deref() { Some("high") => 10, @@ -531,6 +534,7 @@ pub async fn update_contract_from_analysis( continue_from_task_id: None, copy_files: None, is_supervisor: false, + is_red_team: false, checkpoint_sha: None, priority: 0, merge_mode: None, |
