<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/src/server, branch makima/red-team-cli-and-frontend</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=makima%2Fred-team-cli-and-frontend</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=makima%2Fred-team-cli-and-frontend'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-01-29T01:10:43+00:00</updated>
<entry>
<title>Fix Red Team UI visibility by adding red_team_enabled to ContractSummary</title>
<updated>2026-01-29T01:10:43+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-29T01:10:43+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=3118b241ccb3fb2d89948726b2f83a82de998cf2'/>
<id>urn:sha1:3118b241ccb3fb2d89948726b2f83a82de998cf2</id>
<content type='text'>
The Red Team toggle was implemented in the frontend but not visible because
the backend API's ContractSummary response struct was missing the
red_team_enabled field. The frontend relies on this field to:

1. Show the red team badge in the contract list view
2. Show the red team badge and tab in the contract detail view

Changes:
- Add red_team_enabled field to ContractSummary struct in models.rs
- Update list_contracts_for_owner SQL query to include red_team_enabled
- Update get_contract_summary_for_owner SQL query to include red_team_enabled
- Update all fallback ContractSummary constructions in contracts.rs handler

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Fix worktree info and patches endpoint</title>
<updated>2026-01-27T02:38:37+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-27T02:38:37+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=f6d5692eb1e290689df516cec6fe77f07d419783'/>
<id>urn:sha1:f6d5692eb1e290689df516cec6fe77f07d419783</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixup: Build fix</title>
<updated>2026-01-27T02:14:54+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-27T02:14:54+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=f1129adb9799c9c9ca26189220bf9af5970f50fa'/>
<id>urn:sha1:f1129adb9799c9c9ca26189220bf9af5970f50fa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Default to shared worktree and add worktree endpoint</title>
<updated>2026-01-27T01:25:40+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-27T01:25:29+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=b0d0b4848b2fc8a44c2575e09a08b34aaf6e1484'/>
<id>urn:sha1:b0d0b4848b2fc8a44c2575e09a08b34aaf6e1484</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix supervisor merge and PR commands (#36)</title>
<updated>2026-01-27T01:22:11+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-27T01:22:11+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=b28345d15730ffbefe81244d06c06fe13c30b0ea'/>
<id>urn:sha1:b28345d15730ffbefe81244d06c06fe13c30b0ea</id>
<content type='text'>
* Task completion checkpoint

* Task completion checkpoint

* Task completion checkpoint

* Fix supervisor merge for completed tasks and make PR command synchronous

## Issue 1: makima supervisor merge doesn't work for completed tasks

When a task completes, the daemon removes it from in-memory task tracking.
This caused merge operations to fail with "Task not found".

Fixed by updating handle_merge_task_to_target() to use get_task_worktree_path()
which scans the worktrees directory as a fallback when the task is not in memory.
Also updated handle_create_pr() with the same pattern for consistency.

## Issue 2: makima supervisor pr returns immediately without result

The create_pr handler was asynchronous - it sent the CreatePR command to the
daemon and immediately returned without waiting for the result.

Fixed by:
1. Adding PrResultNotification struct and pr_results broadcast channel to AppState
2. Updating mesh_daemon.rs to broadcast PRCreated results to the channel
3. Updating create_pr() handler to subscribe to pr_results and wait for the
   result with a 60-second timeout (matching the merge command pattern)

Now the PR command returns the actual pr_url and pr_number from the daemon.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Add Red Team adversarial review system for contract monitoring (#35)</title>
<updated>2026-01-27T01:05:25+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-27T01:05:25+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=6cd5b20670d7ecd3d48539ff898e021988f2a503'/>
<id>urn:sha1:6cd5b20670d7ecd3d48539ff898e021988f2a503</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Add local-only mode for contracts with patch export support (#34)</title>
<updated>2026-01-26T22:12:57+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-26T22:12:57+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=d1f5dadb549d499c5aeee9cacf6c9aa0a233c198'/>
<id>urn:sha1:d1f5dadb549d499c5aeee9cacf6c9aa0a233c198</id>
<content type='text'>
* Add local_only flag to contracts database and models

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Task completion checkpoint

* Skip automatic completion actions in local_only mode

Add `local_only` flag to contracts that prevents automatic completion
actions (branch, merge, pr) from executing when tasks complete. This
allows users to manually handle code changes via patch files or other
means when operating in local-only mode.

Changes:
- Add `local_only` field to Contract model and request types
- Add database migration for the new column
- Add `local_only` parameter to SpawnTask command in both state.rs and
  daemon protocol.rs
- Modify task manager to skip completion action execution when
  `local_only` is true, with appropriate logging
- Pass `local_only` flag through all task spawning paths:
  - mesh_supervisor.rs (task spawn, retry, resume)
  - mesh.rs (task start, reassign, continue)
  - mesh_chat.rs (run task)
  - contract_chat.rs (run task)
- Update repository create/update functions to handle `local_only`

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Task completion checkpoint

* Implement core patch export system

Add functionality to create uncompressed, human-readable git patches
for export. This enables users to generate patches that can be manually
applied or shared, without the compression used for internal checkpoints.

Changes:
- Add ExportPatchResult struct with patch content, file count, and line stats
- Add create_export_patch() function that generates diffs against a base SHA
- Add get_head_sha() utility function
- Add parse_diff_stat() helper to extract line counts from git output
- Add CreateExportPatch command to daemon protocol
- Add ExportPatchCreated response message to protocol
- Add handler in task manager to process export patch requests
- Add server-side handling to broadcast patch results to UI

The export patch system automatically finds the merge-base when no base
SHA is provided, trying upstream tracking branch first, then common
default branches (origin/main, origin/master, main, master).

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Task completion checkpoint

* Add GitActionsPanel frontend component

* Add WorktreeFilesPanel and PatchesListPanel components

* Add local-only mode toggle to contract creation

---------

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Make merges synchronous</title>
<updated>2026-01-26T21:24:04+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-26T21:24:04+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=bc1ce8013bc36a1585be05b928f2386ab56529c2'/>
<id>urn:sha1:bc1ce8013bc36a1585be05b928f2386ab56529c2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add completion phases</title>
<updated>2026-01-26T20:19:30+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-26T20:19:30+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=04e1e8f0dd85d19917ac5ba0b73cba65ebac8976'/>
<id>urn:sha1:04e1e8f0dd85d19917ac5ba0b73cba65ebac8976</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update supervisor tasks page when supervisor spawns a new task</title>
<updated>2026-01-26T15:21:10+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-26T15:21:10+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=1d83595f81fbfcc034c37c2260d695f094f5776e'/>
<id>urn:sha1:1d83595f81fbfcc034c37c2260d695f094f5776e</id>
<content type='text'>
</content>
</entry>
</feed>
