<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/src/server/handlers/mesh_chat.rs, branch remove-llm</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=remove-llm</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=remove-llm'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-05-17T20:22:34+00:00</updated>
<entry>
<title>chore: remove LLM module + all dependent surfaces</title>
<updated>2026-05-17T20:22:34+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-17T20:22:34+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=857e717e6343fa5c2ae96664bdc64741d5ba6830'/>
<id>urn:sha1:857e717e6343fa5c2ae96664bdc64741d5ba6830</id>
<content type='text'>
Wholesale removal of the LLM integration layer. ~14,200 LOC deleted
across backend and frontend. All chat-driven UIs go with it.

## Backend
- Delete `src/llm/` (7,400 LOC): claude/groq clients, contract_tools,
  contract_evaluator, discuss_tools, mesh_tools, phase_guidance,
  task_output, templates, markdown round-trip, tools, transcript_analyzer.
- Delete handlers wholly dependent on LLM:
  - `chat.rs` (file-level LLM chat at /files/{id}/chat)
  - `mesh_chat.rs` (mesh &amp; task LLM chat + history)
  - `templates.rs` (/contract-types listing)
- Strip LLM uses from `mesh_daemon.rs`:
  - `compute_action_directive` (used phase_guidance::check_deliverables_met
    to nudge supervisors with "all tasks done" messages). The auto-PR
    path below still fires when all tasks finish, so no behaviour lost.
  - `crate::llm::markdown_to_body` → inline 1-line replacement that
    wraps markdown content in a single BodyElement::Markdown. The
    editor re-parses on display, so round-trip is preserved.
- Drop routes: /files/{id}/chat, /mesh/chat, /mesh/chat/history,
  /mesh/tasks/{id}/chat, /contract-types.
- Drop the matching openapi registrations.

## Frontend
- Delete components that were LLM-only:
  - `mesh/UnifiedMeshChatInput.tsx`
  - `listen/DiscussContractModal.tsx`
  - `listen/TranscriptAnalysisPanel.tsx`
  - `listen/ContractPickerModal.tsx`
  - `files/CliInput.tsx`
- Delete the entire /listen page (its primary value-add was
  voice → LLM analysis → contract creation; without LLM the page is
  just a transcript display with no obvious user purpose).
- Delete `hooks/useMeshChatHistory.ts` and `lib/listenApi.ts`
  (transcript-analysis API client to the already-Phase-5-removed
  listen handlers).
- Strip api.ts of LLM exports: LlmModel, ChatMessage/Request/Response,
  UserQuestion/Answer, chatWithFile, MeshChat* types &amp; functions,
  getMeshChatHistory, clearMeshChatHistory, chatWithMeshContext,
  ContractTypeTemplate, listContractTypes, chatWithContract,
  getContractChatHistory, clearContractChatHistory, discussContract,
  PhaseDefinition, DeliverableDefinition.
- mesh.tsx: drop UnifiedMeshChatInput render + the chatContext memo +
  handleTaskUpdatedFromCli (only consumer was the input).
- files.tsx: drop CliInput render + handleGenerateFromElement +
  handleBodyUpdate + handleClearFocus + suggestedPrompt state (all
  CliInput-only).
- NavStrip: drop the /listen link.
- main.tsx: drop the /listen route.

## Net diff: 37 files changed, 58 insertions, 14,281 deletions.

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Set directive env vars correctly for daemon</title>
<updated>2026-02-09T15:55:01+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-09T15:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=339c1769379a851c4126021132573bd4b7994cf2'/>
<id>urn:sha1:339c1769379a851c4126021132573bd4b7994cf2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add new directive mechanism v3</title>
<updated>2026-02-09T00:11:51+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-09T00:11:51+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=8c23b3ab6f7fabca01b0468911bae073aa5ced32'/>
<id>urn:sha1:8c23b3ab6f7fabca01b0468911bae073aa5ced32</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make makima more opinionated and structured</title>
<updated>2026-02-02T02:34:50+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-02T02:34:50+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=151e9d87e117b7980e6aad522ac8f3633eeca87a'/>
<id>urn:sha1:151e9d87e117b7980e6aad522ac8f3633eeca87a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add auto_merge_local option for local-only contracts (#50)</title>
<updated>2026-01-31T22:17:09+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-31T22:17:09+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=3ea2c72e2c50c0d73614d9ac82f41508b6ab1ce4'/>
<id>urn:sha1:3ea2c72e2c50c0d73614d9ac82f41508b6ab1ce4</id>
<content type='text'>
When local_only=true on a contract, all completion actions are skipped.
This adds a new option auto_merge_local that, when enabled along with
local_only, will automatically merge completed task changes to the
master/main branch locally (without pushing or creating PRs).

Changes:
- Add auto_merge_local column to contracts table (migration)
- Add auto_merge_local field to Contract model and summary
- Update CreateContractRequest and UpdateContractRequest structs
- Update contract repository create/update functions
- Add auto_merge_local to WebSocket protocol StartTask command
- Pass auto_merge_local through spawn_task and run_task functions
- Modify task manager completion logic: if local_only=true AND
  auto_merge_local=true, execute 'merge' completion action locally
- Update all server handlers to retrieve and pass auto_merge_local
- Add TypeScript types to frontend components

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Fix worktree cleanup to not run for shared worktrees</title>
<updated>2026-01-29T02:30:16+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-29T02:30:16+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=7af8561677cfdcfd23d099a25783c7fef51d1ba6'/>
<id>urn:sha1:7af8561677cfdcfd23d099a25783c7fef51d1ba6</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>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>Add patch checkpointing</title>
<updated>2026-01-23T01:03:04+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-22T22:32:46+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=1ed362424dafec690f919154f5116471951cda9c'/>
<id>urn:sha1:1ed362424dafec690f919154f5116471951cda9c</id>
<content type='text'>
</content>
</entry>
</feed>
