Commit Graph

179 Commits

Author SHA1 Message Date
Dave
40d96008c9 feat(story-200): auto-prune worktrees when stories are archived
- Add `prune_worktree_sync` to worktree.rs: removes a story's worktree
  if it exists, delegating to `remove_worktree_sync` (best-effort,
  failures logged internally)
- Update `sweep_done_to_archived` to accept `git_root` and call
  `prune_worktree_sync` after promoting a story from 5_done to 6_archived
- Add Part 2 to the sweep: scan 6_archived and prune any stale worktrees
  for stories already there (catches items archived before this feature)
- All worktree removal failures are logged but never block file moves
- Add 5 new tests: prune noop, prune real worktree, sweep-on-promote,
  sweep-stale-archived, sweep-not-blocked-by-removal-failure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 14:58:52 +00:00
Dave
81065a3ada fix: replace fast-forward with cherry-pick in mergemaster squash-merge
The mergemaster pipeline used git merge --ff-only to apply the squash
commit from a merge-queue branch onto master. This raced with the
filesystem watcher which auto-commits pipeline file moves to master,
causing the fast-forward to fail. The mergemaster agent would then
improvise by manually moving stories to done without the code merge.

- Replace --ff-only with cherry-pick so concurrent watcher commits
  don't block the merge
- Add report_merge_failure MCP tool for explicit failure handling
- Update mergemaster prompt to forbid manual file moves
- Fix cleanup_merge_workspace to handle stale directories

Squash merge of feature/story-205

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:16:35 +00:00
Dave
819b72523f story-kit: merge 203_story_move_story_to_current_before_checking_agent_availability_in_start_agent 2026-02-26 12:41:12 +00:00
Dave
77547972c4 feat(story-193): clickable code references in frontend 2026-02-26 12:34:57 +00:00
Dave
2dbfd42c6e story-kit: done 199_story_web_ui_submits_all_queued_items_at_once 2026-02-26 12:16:07 +00:00
Dave
08e23e3830 feat: enable Matrix E2EE with cross-signing verification on bot
Add end-to-end encryption support to the Matrix bot using the matrix-sdk
crypto features. The bot now:
- Enables E2EE on the Matrix client with cross-signing bootstrapping
- Auto-verifies its own cross-signing identity on startup
- Handles key verification requests from other users automatically
- Sends encrypted messages in E2EE-enabled rooms
- Adds MATRIX_STORE_PATH config for persistent crypto store

Squash merge of feature/story-194_story_enable_matrix_e2ee_with_cross_signing_verification_on_bot

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 10:41:29 +00:00
Dave
d20f9b8018 Fixed up @ mentions on the bot 2026-02-25 17:00:29 +00:00
Dave
0361322361 story-kit: merge 192_bug_code_fences_lose_newlines_when_pasted_from_agent_output 2026-02-25 16:47:34 +00:00
Dave
ae4fb3ae2c feat(matrix): bot only responds when directly addressed
Story 191: Matrix bot should only respond when directly addressed.
The bot now checks if it was mentioned by name or replied to before
responding, preventing it from answering every message in a room.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:33:30 +00:00
Dave
411653ab15 story-kit: merge 190_story_auto_select_available_agent_for_stage_in_start_agent 2026-02-25 16:17:38 +00:00
Dave
d4f23051aa feat(matrix): render bot messages with HTML formatting
Add HTML formatted_body to Matrix bot messages so that markdown-style
formatting (code blocks, bold, italic, lists) renders properly in Matrix
clients. Uses the pulldown-cmark crate to convert markdown to HTML and
sets the message format to org.matrix.custom.html.

Story: 188_story_render_matrix_bot_messages_with_html_formatting
2026-02-25 16:08:57 +00:00
Dave
4b4d221d6c story-kit: merge 182_story_matrix_bot_conversation_context_and_multi_room 2026-02-25 15:25:13 +00:00
Dave
ebcd627a45 Fix: remove agent from pool immediately on completion and add Matrix bot user allowlist 2026-02-25 14:59:20 +00:00
Dave
e682b64890 Stream Matrix bot responses on double-newline paragraph boundaries
Instead of waiting for the full LLM response and sending it as a single
message, stream bot responses to Matrix as they are generated. Paragraphs
are delimited by double-newline boundaries, giving users incremental
feedback while the model is still thinking.

Story: 184_story_stream_bot_responses_to_matrix_on_double_newline_boundaries
2026-02-25 14:17:55 +00:00
Dave
23e1830da2 Adding some Matrix bot debug code 2026-02-25 13:46:20 +00:00
Dave
a1d25d756b story-kit: merge 183_story_refactor_matrix_bot_to_use_claude_code_provider_instead_of_direct_anthropic_api 2026-02-25 12:42:11 +00:00
Dave
aa423cae22 story-kit: merge 177_bug_no_mcp_tool_to_edit_story_acceptance_criteria 2026-02-25 11:34:37 +00:00
Dave
073ec03afe story-kit: merge 171_story_persist_test_results_to_story_files 2026-02-25 09:50:31 +00:00
Dave
42c40209d2 story-kit: merge 174_story_constrain_thinking_traces_in_chat_panel 2026-02-25 09:32:48 +00:00
Dave
d70285adda story-kit: merge 176_bug_stories_moved_to_current_get_supervisor_instead_of_coder 2026-02-25 09:30:15 +00:00
Dave
51fad34a6a story-kit: merge 173_bug_pipeline_board_lozenges_dont_update_on_agent_state_changes 2026-02-24 23:57:07 +00:00
Dave
150f654e04 story-kit: merge 166_story_add_done_column_to_pipeline_board
Add Done column to pipeline board. Adds the 'done' stage to
PipelineState, exposes it via the WebSocket and REST API, and
renders a Done column in the frontend pipeline board view.

Squash merge from feature/story-166_story_add_done_column_to_pipeline_board.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:42:59 +00:00
Dave
ba8dde1aa8 story-kit: merge 172_bug_setup_command_failure_prevents_agent_from_starting_creating_unrecoverable_deadlock 2026-02-24 23:29:56 +00:00
Dave
dc631d1933 story-kit: merge 149_bug_web_ui_does_not_update_when_agents_are_started_or_stopped 2026-02-24 23:09:13 +00:00
Dave
2b5766aaf3 story-kit: merge 167_bug_thinking_trace_height_constraint_not_working_in_web_ui 2026-02-24 19:35:06 +00:00
Dave
7b3853bad0 story-kit: merge 165_bug_pipeline_log_message_says_archived_instead_of_done 2026-02-24 18:38:13 +00:00
Dave
d62f679fed story-kit: merge 164_bug_dev_process_readme_documents_wrong_pipeline_stages 2026-02-24 18:21:32 +00:00
Dave
464b1e5530 story-kit: merge 160_story_constrain_thinking_trace_height_in_agent_stream_ui 2026-02-24 18:03:08 +00:00
Dave
e6662c8f8e story-kit: merge 159_bug_server_restart_leaves_orphaned_claude_code_pty_processes_running 2026-02-24 17:56:40 +00:00
Dave
e4ce7f7202 story-kit: merge 162_story_colored_server_terminal_log_output 2026-02-24 17:43:35 +00:00
Dave
fb91096b09 story-kit: merge 161_bug_auto_assign_only_triggers_on_agent_completion_not_on_failure_or_periodically 2026-02-24 17:28:45 +00:00
Dave
aef022c74c story-kit: merge 151_story_split_archived_into_done_and_archived_with_time_based_promotion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:01:57 +00:00
Dave
68af8c5ba9 story-kit: merge 157_story_make_start_agent_non_blocking_by_deferring_worktree_creation
Make start_agent non-blocking by deferring worktree creation. The agent
spawn now returns immediately while worktree setup happens asynchronously,
improving responsiveness of the start_agent MCP call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:50:56 +00:00
Dave
8583f2389f story-kit: merge 158_bug_pty_debug_log_panics_on_multi_byte_utf_8_characters 2026-02-24 16:31:43 +00:00
Dave
b621727f48 story-kit: merge 156_bug_onboarding_welcome_screen_triggers_on_already_configured_projects 2026-02-24 16:13:39 +00:00
Dave
a6d084be31 story-kit: create 155_story_queue_messages_while_agent_is_busy 2026-02-24 15:55:36 +00:00
Dave
774548c04c story-kit: merge 153_bug_auto_assign_broken_after_stage_field_was_added_to_agent_config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:50:34 +00:00
Dave
5567cdf480 story-kit: merge 148_story_interactive_onboarding_guides_user_through_project_setup_after_init
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:34:31 +00:00
Dave
03ca8624cd story-kit: start 147_bug_activity_indicator_still_only_shows_thinking_despite_bug_140_fix 2026-02-24 15:26:39 +00:00
Dave
d66334ee29 fix: return empty Ollama model list instead of error when Ollama unreachable
When Ollama is not running, /api/ollama/models now returns [] instead of
HTTP 400. This prevents the UI from breaking when the Ollama service is
unavailable. The frontend already handles an empty list gracefully.

Updated the test to assert success with an empty list rather than an error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 15:11:33 +00:00
Dave
57430d73bd story-kit: merge 146_bug_permission_approval_still_returns_wrong_format_needs_updatedinput_not_behavior_allow 2026-02-24 14:06:00 +00:00
Dave
834a0361a1 story-kit: merge 142_bug_quality_gates_run_after_fast_forward_to_master_instead_of_before 2026-02-24 13:56:11 +00:00
Dave
73614fe5e8 story-kit: merge 141_story_improve_server_logging_with_timestamps_and_error_visibility 2026-02-24 13:48:25 +00:00
Dave
c8efe2059f Fix merge conflict resolution artifacts in agents.rs
- Add missing closing brace for spawn_watchdog function
- Remove leftover <<<<<<< HEAD conflict marker in test module
- Restore conflict marker test data that was incorrectly stripped
- Add missing completed_at field in inject_test_agent_with_handle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:24:39 +00:00
Dave
518d5335d2 story-kit: merge 133_story_clean_up_agent_state_on_story_archive_and_add_ttl_for_completed_entries 2026-02-24 13:22:15 +00:00
Dave
580bac22fa Fix unclosed delimiter from merge conflict resolution in agents.rs
Remove leftover conflict markers and add missing closing brace for
watchdog_detects_orphaned_running_agent test function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:22:11 +00:00
Dave
6170a7d984 story-kit: merge 133_story_clean_up_agent_state_on_story_archive_and_add_ttl_for_completed_entries 2026-02-24 13:20:59 +00:00
Dave
560c731869 story-kit: merge 134_story_add_process_health_monitoring_and_timeout_to_agent_pty_sessions 2026-02-24 13:13:16 +00:00
Dave
5226438b16 story-kit: merge 138_bug_no_heartbeat_to_detect_stale_websocket_connections 2026-02-24 13:05:30 +00:00
Dave
c5ddd15273 story-kit: merge 132_story_fix_toctou_race_in_agent_check_and_insert 2026-02-24 12:49:29 +00:00