Commit Graph

787 Commits

Author SHA1 Message Date
semantic-release-bot
0e5e68dfff chore(release): 1.1.0 [skip ci]
# [1.1.0](https://gitlab.com/carealytix/tools/codewalkers/compare/v1.0.0...v1.1.0) (2026-03-07)

### Bug Fixes

* add missing HQWaitingForInputSection component to fix broken test import ([89f74ef](89f74efdb5))
* allow re-detailing phases after all tasks are deleted ([bc61e65](bc61e658dc))
* errand baseBranch defaults to project.defaultBranch instead of 'main' ([a613768](a61376812a))
* errand output race condition + require commit before signal ([3ceb991](3ceb991200))
* prevent phase stuck in_progress when merge fails ([c3fb000](c3fb000f92))
* resolve all failing frontend tests ([40ec85d](40ec85deb8))
* resolve errand worktree path for sendMessage instead of using agent-workdirs ([b17c0a2](b17c0a2b4f))
* resolve integration issues after phase branch merges ([753b2e9](753b2e9fb8))
* self-healing stale worktree recovery in SimpleGitWorktreeManager ([40900a5](40900a5641))
* skip standalone worktree when errand provides cwd ([e7c95af](e7c95af1ca))
* stabilize useQuery mock reference to prevent infinite re-render loop in AgentOutputViewer test ([4a657d6](4a657d6b96))
* strengthen signal.json prompt to prevent premature writes ([3885a96](3885a96c9d))

### Features

* `cw task add` CLI command + `{AGENT_ID}` prompt placeholder ([e199188](e199188670))
* add context panel, logs section, and task name fix to InboxDetailPanel ([b708977](b708977ef1))
* add listInitiatives sort-order tests and qualityReview persistence ([1dc908a](1dc908a8ab))
* add quality_review task status and qualityReview initiative flag ([5137a60](5137a60e70))
* add quality-review dispatch hook to intercept agent:stopped events ([c3cace7](c3cace7604))
* add quality-review service with qualifying file detection and agent spawning ([9200891](9200891a5d))
* default statusFilter to active with sessionStorage persistence ([7c35f26](7c35f262cf))
* enrich listWaitingAgents with task/phase/initiative context via DB joins ([7e6921f](7e6921f01e))
* errand review & request changes ([6482960](6482960c6f))
* expose qualityReview via updateInitiativeConfig tRPC mutation ([bb77040](bb770407db))
* rewrite InitiativeCard to single-row compact layout with tests ([61aa0f9](61aa0f9dd4))
* wire quality review into orchestrator handleAgentStopped ([4bc65bf](4bc65bfe3d))

### Performance Improvements

* speed up slow git tests from ~18s to ~5.5s ([5778457](57784576e4))
2026-03-07 08:45:52 +00:00
Lukas May
43e53e7b6a Merge branch 'main' of gitlab.com:carealytix/tools/codewalkers 2026-03-07 09:45:00 +01:00
Lukas May
ce991fd8a4 Merge branch 'cw/improve-initiatives-ui' into cw-merge-1772872758746 2026-03-07 09:39:19 +01:00
Lukas May
59e710bc31 test: re-record full-flow cassettes 2026-03-07 01:09:30 +01:00
Lukas May
57784576e4 perf: speed up slow git tests from ~18s to ~5.5s
- branch-manager: beforeEach→beforeAll (all 12 tests are read-only)
- worktree manager: clone template repo per test instead of full init
- signal-manager: reduce setTimeout delay from 100ms to 30ms
2026-03-07 01:07:43 +01:00
Lukas May
4a657d6b96 fix: stabilize useQuery mock reference to prevent infinite re-render loop in AgentOutputViewer test 2026-03-07 01:01:37 +01:00
Lukas May
bf4a55f2f2 refactor: rewrite errand prompts with structured XML sections
Bring buildErrandPrompt() and buildErrandRevisionPrompt() in line with
the codebase pattern used by execute, plan, detail, etc. Import shared
DEVIATION_RULES and GIT_WORKFLOW constants. Add session_startup (pwd,
git status, CLAUDE.md, expected-pwd.txt), execution_rules, and
anti_patterns sections. Keep signal format inline since errands use
result.message instead of the standard questions format.
2026-03-07 01:00:36 +01:00
Lukas May
89f74efdb5 fix: add missing HQWaitingForInputSection component to fix broken test import
The HQSections.test.tsx imported HQWaitingForInputSection which was missing
after phase branch merges. The component was referenced in tests but never
created, causing the entire test file to fail with an import resolution error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 00:53:58 +01:00
Lukas May
3885a96c9d fix: strengthen signal.json prompt to prevent premature writes
Agents sometimes write signal.json before finishing output files,
causing work to be silently discarded. Replace weak "As your final
action" with explicit CRITICAL warning explaining the completion
trigger mechanism.
2026-03-07 00:51:25 +01:00
Lukas May
c3fb000f92 fix: prevent phase stuck in_progress when merge fails
In YOLO mode, if mergePhaseIntoInitiative() threw (e.g., branch
doesn't exist, merge conflict), the error propagated and completePhase()
was never called — leaving the phase permanently stuck at in_progress.

Also wrap per-phase recovery in try-catch so one failing phase doesn't
abort the entire recoverDispatchQueues() loop.
2026-03-07 00:44:46 +01:00
Lukas May
4298a8f4a6 Merge branch 'cw/improve-initiatives-ui-phase-default-filter-and-sessionstorage-persistence' into cw-merge-1772840051793 2026-03-07 00:34:11 +01:00
Lukas May
1dc908a8ab feat: add listInitiatives sort-order tests and qualityReview persistence
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 00:34:07 +01:00
Lukas May
1acc0b297e Merge branch 'cw/improve-initiatives-ui-phase-default-filter-and-sessionstorage-persistence' into cw-merge-1772840034224 2026-03-07 00:33:54 +01:00
Lukas May
7c35f262cf feat: default statusFilter to active with sessionStorage persistence
- Export DashboardPage for testability
- Initialize statusFilter from sessionStorage (key: initiatives.statusFilter),
  falling back to "active" when absent or invalid
- Write new filter value to sessionStorage on every change via
  handleStatusFilterChange, enabling same-session navigation persistence
- Add aria-label="Status" to the status select for accessible querying
- Add Vitest unit tests covering all 8 scenarios (default, read, write, fallback)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 00:33:26 +01:00
Lukas May
ed9184e0f1 Merge branch 'cw/improve-inbox-ui-on-hq' into cw-merge-1772839945283 2026-03-07 00:32:25 +01:00
Lukas May
b708977ef1 feat: add context panel, logs section, and task name fix to InboxDetailPanel
Enriches the HQ inbox detail view so users can answer agent questions
without navigating away from the inbox:

- Replace raw task UUID in header with human-readable task name
  (falls back to UUID, then em dash when both null)
- Add related context panel showing initiative link, task name,
  truncated/HTML-stripped description, and phase name; shows skeleton
  while loading, "No task context available" when agent has no task
- Add collapsible agent logs section using AgentOutputViewer;
  hidden when no output exists, resets on agent change
- Wire new props (taskName, phaseName, initiativeName, initiativeId,
  taskDescription, isLoadingContext) in hq.tsx from listWaitingAgents
- Add 11 tests covering all new behaviors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 00:31:32 +01:00
Lukas May
61aa0f9dd4 feat: rewrite InitiativeCard to single-row compact layout with tests
Replaces the two-row card layout with a single horizontal flex row that
fits within 48-56px height. Adds project badge overflow (max 2 + chip),
hover-reveal menu (opacity-0/group-hover), phase counter (X / Y),
active phase name with separator, and StatusDot pulse behavior.

Removes ProgressBar, status label text, and second row entirely.
Adds Vitest unit tests covering all 6 test groups from the spec.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 00:21:53 +01:00
Lukas May
40ec85deb8 fix: resolve all failing frontend tests
- Fix vitest.config.ts React alias to point to local node_modules
  instead of nonexistent ancestor path (../../../../node_modules/react)
- Remove stale HQWaitingForInputSection tests (component was deleted
  in e8d332e0 but test cases were left behind)
2026-03-07 00:14:44 +01:00
Lukas May
40900a5641 fix: self-healing stale worktree recovery in SimpleGitWorktreeManager
When git worktree add fails with "branch already used by worktree at
<path>", parse the stale path, force-remove it, and retry once. Fixes
blocked task retries where the old agent-workdirs directory still exists
on disk and git worktree prune alone can't clear the reference.
2026-03-07 00:13:24 +01:00
Lukas May
c52fa86542 refactor: unify errand worktree paths to use agent-workdirs/<alias>/
Errands now create worktrees via ProcessManager.createWorktreesForProjects()
into agent-workdirs/<alias>/<project.name>/ instead of repos/<project>/.cw-worktrees/<errandId>.
This makes getAgentWorkdir + resolveAgentCwd work correctly for all agent types.

Key changes:
- Extract createWorktreesForProjects() from createProjectWorktrees() in ProcessManager
- Add resolveAgentCwd() to ProcessManager (probes for .cw/output in subdirs)
- Add projectId to SpawnAgentOptions for single-project agents (errands)
- Skip auto-cleanup for errand agents (worktrees persist for merge/abandon)
- Errand router uses agentManager.delete() for cleanup instead of SimpleGitWorktreeManager
- Remove cwd parameter from sendUserMessage (resolves via worktreeId)
- Add pruneProjectRepos() to CleanupManager for errand worktree refs
2026-03-07 00:02:27 +01:00
Lukas May
7e6921f01e feat: enrich listWaitingAgents with task/phase/initiative context via DB joins
Replaces the in-memory filter (agentManager.list() + filter) with a direct
repository query that LEFT JOINs tasks, phases, and initiatives to return
taskName, phaseName, initiativeName, and taskDescription alongside agent fields.

- Adds AgentWithContext interface and findWaitingWithContext() to AgentRepository port
- Implements findWaitingWithContext() in DrizzleAgentRepository using getTableColumns
- Wires agentRepository into TRPCContext, CreateContextOptions, and TrpcAdapterOptions
- Adds requireAgentRepository() helper following existing pattern
- Updates listWaitingAgents to use repository query instead of agentManager
- Adds 5 unit tests for findWaitingWithContext() covering all FK join edge cases
- Updates existing AgentRepository mocks to satisfy updated interface

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 23:29:49 +01:00
Lukas May
b17c0a2b4f fix: resolve errand worktree path for sendMessage instead of using agent-workdirs
Errand agents are spawned in the errand's git worktree (managed by
SimpleGitWorktreeManager), not in agent-workdirs/<alias>/.
sendUserMessage was deriving the cwd from worktreeId which pointed to
the non-existent agent-workdirs path. Now the errand.sendMessage
procedure resolves the actual worktree path and passes it through.
2026-03-06 23:11:55 +01:00
Lukas May
bc61e658dc fix: allow re-detailing phases after all tasks are deleted
The "Detail Tasks" button was hidden when an idle detail agent from a
previous run was still associated with the phase. The frontend gate
blocked any re-detail while a detail agent existed, even if it was idle
(i.e. done). The backend already auto-dismisses stale idle agents, so
the frontend just needed to allow idle agents through the gate.
2026-03-06 22:43:56 +01:00
Lukas May
e7c95af1ca fix: skip standalone worktree when errand provides cwd
When spawn() receives an explicit cwd (errands), the manager was still
creating a standalone worktree at agent-workdirs/<alias>/ and injecting
its path into the workspace layout prompt. The agent then edited files
in the wrong directory — on a different branch than the errand's.

Now when cwd is provided, we skip worktree creation entirely and use
the caller's cwd for workspace layout, .cw/output/, and all paths.
2026-03-06 22:39:56 +01:00
Lukas May
79a0bd0a74 Merge branch 'cw/continuous-code-quality' into cw-merge-1772833031033 2026-03-06 22:37:11 +01:00
Lukas May
b21d32fd91 Merge branch 'main' into cw/continuous-code-quality-conflict-1772832123778
# Conflicts:
#	apps/server/drizzle/meta/0037_snapshot.json
#	apps/server/drizzle/meta/_journal.json
2026-03-06 22:30:21 +01:00
Lukas May
a61376812a fix: errand baseBranch defaults to project.defaultBranch instead of 'main' 2026-03-06 22:27:12 +01:00
Lukas May
3ceb991200 fix: errand output race condition + require commit before signal
Merge two useEffects in AgentOutputViewer into one to fix race where
agentId reset clears messages after data effect sets them on remount.

Add "commit before signaling" instruction to errand prompts so
Changes tab shows diff after completion.
2026-03-06 22:23:50 +01:00
Lukas May
e199188670 feat: cw task add CLI command + {AGENT_ID} prompt placeholder
- Add `createTaskForAgent` tRPC mutation: resolves agent → task → phase, creates sibling task
- Add `cw task add <name> --agent-id <id>` CLI command
- Replace `{AGENT_ID}` and `{AGENT_NAME}` placeholders in writeInputFiles() before flushing
- Update docs/agent.md and docs/cli-config.md
2026-03-06 22:22:49 +01:00
Lukas May
753b2e9fb8 fix: resolve integration issues after phase branch merges
- Register errandProcedures in appRouter (was defined but never spread)
- Fix nullable projectId guard in errand delete/abandon procedures
- Add sendUserMessage stub to MockAgentManager in headquarters and
  radar-procedures tests (AgentManager interface gained this method)
- Add missing qualityReview field to Initiative fixture in file-io test
  (schema gained this column from the quality-review phase)
- Cast conflictFiles access in CLI errand resolve command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 22:16:53 +01:00
Lukas May
0211cdb8a6 Merge branch 'cw/continuous-code-quality-phase-quality-review-dispatch-hook' into cw-merge-1772831549281 2026-03-06 22:12:29 +01:00
Lukas May
425728205c chore: resolve merge conflicts — wire quality review into orchestrator handleAgentStopped
Resolved conflicts between cw/continuous-code-quality-phase-quality-review-dispatch-hook
and cw/continuous-code-quality-task-Cjc9jRT48MqxIZSQG3ypl.

- orchestrator.ts: adopted tryQualityReview() helper (incoming) over inline
  shouldRunQualityReview() call (HEAD); fixed duplicate agentManager constructor
  param; reordered optional params to agentRepository?, agentManager?
- orchestrator.test.ts: merged import blocks, used incoming mock defaults with
  .mockResolvedValue(), removed duplicate agentManager/agentRepository in
  createMocks(), used incoming createOrchestrator opts pattern; added missing
  project mock so HEAD's integration test works with tryQualityReview() flow
- docs/dispatch-events.md: kept HEAD's more explicit agent:stopped description
- container.ts: removed duplicate agentManager arg; reordered to match new
  constructor signature (agentRepository, agentManager)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 22:12:13 +01:00
Lukas May
30dcb8340a test: add error resilience case to orchestrator quality review hook tests
Adds the fourth test case from the spec: when shouldRunQualityReview
throws, the orchestrator must not crash, must log a warning (verified
implicitly by the catch block), and must still call scheduleDispatch()
so dispatch continuity is maintained.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 22:10:15 +01:00
Lukas May
6482960c6f feat: errand review & request changes
Add errand.requestChanges procedure that re-spawns an agent in the
existing worktree with user feedback. Replace raw <pre> diff blocks
with syntax-highlighted ErrandDiffView using FileCard components.
Add Output/Changes tabs to the active errand view.
2026-03-06 22:09:01 +01:00
Lukas May
953fe2e295 docs: update dispatch-events.md to reflect quality review on agent:stopped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 22:06:00 +01:00
Lukas May
4bc65bfe3d feat: wire quality review into orchestrator handleAgentStopped
When an agent stops, check whether a quality review should run before
auto-completing the task. If shouldRunQualityReview returns run:true,
delegate to runQualityReview (which transitions task to quality_review
and spawns a review agent) instead of calling completeTask directly.

Falls back to completeTask when agentRepository or agentManager are
not injected, or when the task lacks phaseId/initiativeId context.

- Add agentManager optional param to ExecutionOrchestrator constructor
- Extract tryQualityReview() private method to compute branch names and
  repo path before delegating to the quality-review service
- Pass agentManager to ExecutionOrchestrator in container.ts
- Add orchestrator integration tests for the agent:stopped quality hook

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 22:05:42 +01:00
Lukas May
b6a01e5748 Merge branch 'cw/continuous-code-quality-task-_Om84Be00WJgnctOvmkyo' into cw/continuous-code-quality-phase-quality-review-dispatch-hook
# Conflicts:
#	apps/server/execution/quality-review.test.ts
#	apps/server/execution/quality-review.ts
2026-03-06 22:04:50 +01:00
Lukas May
c3cace7604 feat: add quality-review dispatch hook to intercept agent:stopped events
When an execute-mode agent stops with task_complete and the initiative has
qualityReview=true, the orchestrator now spawns a fresh execute-mode agent
to run /simplify on changed .ts/.tsx/.js files before marking the task
completed. The task transitions through quality_review status as a recursion
guard so the review agent's stop event is handled normally.

- Add apps/server/execution/quality-review.ts with three exported functions:
  computeQualifyingFiles, shouldRunQualityReview, runQualityReview
- Add apps/server/execution/quality-review.test.ts (28 tests)
- Update ExecutionOrchestrator to accept agentManager, replace
  handleAgentStopped with quality-review-aware logic, add getRepoPathForTask
- Update orchestrator.test.ts with 3 quality-review integration tests
- Update container.ts to pass agentManager to ExecutionOrchestrator
- Update docs/dispatch-events.md to reflect new agent:stopped behavior

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 22:01:02 +01:00
semantic-release-bot
d29d375bba chore(release): 1.0.0 [skip ci]
# 1.0.0 (2026-03-06)

### Bug Fixes

* **10-02:** update downstream code for batched answers API ([2c41e52](2c41e52029))
* **11-01:** add mode column to test database schema ([f7edac7](f7edac7a5c))
* **13-01:** parse structured_output from Claude CLI response ([5605547](5605547aea))
* **15-02:** remove Plan layer from UI hierarchy ([1156933](1156933a8e))
* **16-05:** wire eventBus into CLI server startup ([93f2b0f](93f2b0f5ee))
* **19:** gracefully handle missing agentManager in read-only agent procedures ([049810f](049810ffae))
* **19:** wire AgentManager into server tRPC context ([9d7002d](9d7002d2bd))
* **21-05:** move PlanTasksFetcher onTasks callback to useEffect ([c66d7ec](c66d7ecfb2))
* Add changeset reconciliation to deleteTask and fix missing invalidation ([39d92d5](39d92d5de9))
* Add chatSessionRepository to TrpcAdapterOptions ([e4489f8](e4489f8c7a))
* Add error toasts and optimistic messages to chat session hook ([1b5fdfd](1b5fdfde55))
* Add font-display to initiative detail header ([2653e4c](2653e4c7ad))
* Add missing await and update tests for async file-io reads ([cc72c6d](cc72c6d478))
* Add missing event routing for initiative status real-time refresh ([ebef093](ebef093d3f))
* Add missing Instrument Serif font files and [@font-face](https://gitlab.com/font-face) declarations ([d6fb1ab](d6fb1abcba))
* Add scope awareness to chat prompt so agents focus on target entities ([9c09683](9c09683029))
* **agent:** Add refresh token validation before token refresh ([4d3bd9c](4d3bd9ca90))
* **agent:** Add refresh token validation before token refresh ([265fcb1](265fcb1149))
* **agent:** Allow null refreshToken and expiresAt for setup tokens ([c204aab](c204aab403))
* **agent:** Eliminate race condition in completion handling ([43e2c8b](43e2c8b0ba))
* **agent:** Handle expired setup tokens without refresh token ([b021b96](b021b9690e))
* **agent:** Handle null refreshToken/expiresAt in credential manager ([008c783](008c783c50))
* **agent:** Handle optional OAuth fields in usage.ts credential reader ([e35927f](e35927f321))
* **agent:** Handle optional OAuth fields in usage.ts credential reader ([a59e187](a59e18710f))
* **agent:** Handle optional OAuth token fields in credential manager ([11b1378](11b1378b91))
* **agent:** Handle optional OAuth token fields in credential manager ([8930d1a](8930d1aa43))
* **agent:** Implement incremental JSONL parsing to eliminate race conditions ([6f5fd3a](6f5fd3a0af))
* **agent:** Replace hardcoded 500ms delay with robust file completion detection ([604da7c](604da7cd0d))
* Align subscription status mapping with tRPC state machine ([b74b59b](b74b59b906))
* allow errand agent to end session with questions and resume ([41c5d29](41c5d292bb))
* Auto-complete tasks when agents finish successfully ([6340021](63400211b8))
* Auto-dismiss conflict panel and re-check mergeability on completion ([9f57155](9f5715558e))
* break Vite refresh loop by ignoring __tests__ in route generation ([a41caa6](a41caa633b))
* Clean up agent worktrees, branches, and logs on dismiss and auto-cleanup ([222d73d](222d73d0d6))
* close five frontend invalidation gaps for changeset, preview, and dependency events ([fff4ce2](fff4ce2bb7))
* Conflict agent auto-dismiss fails on page load/remount ([30b27f8](30b27f8b4a))
* conflict resolution tasks now get dispatched instead of permanently blocking initiative ([d4a2871](d4a28713f6))
* Convert sync file I/O to async in agent spawn path to unblock event loop ([bd0aec4](bd0aec4499))
* Convert sync file I/O to async in credential handler and account setup ([a2afc2e](a2afc2e1fd))
* Convert sync file I/O to async in credential manager and usage module ([a0152ce](a0152ce238))
* Convert sync file I/O to async in read path to unblock event loop ([73a4c6c](73a4c6cb0c))
* Cover transparent gap above sticky header with upward box-shadow ([c87aac4](c87aac44cc))
* Cover transparent gap above sticky review header ([19cd0a2](19cd0a2cb0))
* Detach agents before initiative deletion to prevent FK constraint failure ([863117c](863117c63a))
* detect hung agent processes via defensive signal.json polling ([56efc0b](56efc0bad6))
* Disable EventEmitter maxListeners warning for SSE subscriptions ([02ca1d5](02ca1d568e))
* disambiguate CONFLICT errors in registerProject by inspecting the SQLite UNIQUE constraint column ([8f4fa2a](8f4fa2a233))
* **dispatch:** Filter planning-category tasks from dispatch pipeline and agent context ([fc3039a](fc3039a147))
* Eliminate content page flickering from layout shifts and double invalidation ([243f24a](243f24a397))
* Eliminate whitespace above sticky review header ([01f2279](01f2279735))
* Ensure agents write signal.json to the correct directory ([17f9204](17f92040c7))
* Ensure phase branches exist before task dispatch ([50aea7e](50aea7e6f1))
* Fail fast when agent worktree creation or branch setup fails ([0f1c578](0f1c578269))
* Fetch remote before merge/push in initiative approval ([2814c2d](2814c2d3b2))
* Fix review task completion bug + add initiative-level Request Changes ([65bcbf1](65bcbf1a35))
* Fix sidebar layout — sticky height constraint, padding on content only ([41cbc2c](41cbc2c76c))
* Guard worktree creation against branch === baseBranch ([f4dbaae](f4dbaae0e3))
* Handle existing branch in worktree creation ([bdc95bc](bdc95bcb26))
* Handle push to checked-out branch in local non-bare repos ([a86a373](a86a373d42))
* Handle spawn and branch failures gracefully in dispatch cycle ([da8c714](da8c714de2))
* Include dirty worktree paths in commit prompt and fix retry counter ([60f0667](60f06671e4))
* Increase dark mode border contrast for graph lines and separators ([087f694](087f6945ae))
* Increase detail agent task sizing to reduce tiny-task overhead ([f06ac95](f06ac953eb))
* Logo link navigates to HQ instead of Initiatives ([cb95ac1](cb95ac1c6e))
* make errand.list input optional so frontend query works without args ([1fd3a1a](1fd3a1ae4a))
* Make review sidebar sticky to viewport with internal scrolling ([d4b466c](d4b466ce6d))
* Merge confirmation dropdown hidden behind sticky file headers ([a3ee581](a3ee581629))
* Merge worktree conflict when target branch already checked out ([1bc3f85](1bc3f85d6a))
* Move project pills inline after initiative name ([deffdc7](deffdc7c4f))
* Move review sidebar to left side for standard editor layout ([e56bc1b](e56bc1bc77))
* Move useMemo above early returns in ReviewTab to fix hooks ordering crash ([ff398f8](ff398f84ac))
* Parse merge-tree output from stdout instead of catch block ([cc181ee](cc181ee6ba))
* Pass chatSessionRepository through createContext in trpc-adapter ([413a501](413a501570))
* Pass task with description to auto-spawned discuss agent ([b38a2ec](b38a2ec034))
* Patch full-flow test timeouts and driveToCompletion polling loop ([988160b](988160b2b7))
* Persist and expose task dependencies from detail output ([9b91ffe](9b91ffe0e5))
* Phase completion check runs regardless of branch/merge status ([14d09b1](14d09b16df))
* Polish settings pages — display font, status tokens, spacing ([2b62160](2b62160c95))
* Prevent agents page from scrolling — constrain scroll to panels ([142f67c](142f67c131))
* Prevent agents page from scrolling — lock layout to viewport ([3ff1f48](3ff1f485f1))
* Prevent commit-retry infinite loop by preserving retry count across cleanup ([91ce7dc](91ce7dc4c0))
* Prevent conflict resolution agent from destroying initiative branch ([0c04a1d](0c04a1d273))
* Prevent lost task completions after server restart ([eac0386](eac03862e3))
* prevent stale duplicate planning tasks from blocking phase completion ([346d62e](346d62ef8d))
* Prioritize polled preview status over mutation pending state ([df84a87](df84a877f2))
* Re-queue approved phases before dispatch to survive server restarts ([573e1b4](573e1b40d2))
* Re-record cassettes and exclude workdir from test discovery ([c009650](c0096503b2))
* Reconcile orphaned changesets when phases are manually deleted ([39bb03e](39bb03e30b))
* recover in_progress phases where all tasks are already completed on server restart ([afdc1c7](afdc1c7e00))
* Recover in-memory dispatch queues from DB on server startup ([47fa924](47fa924927))
* Refetch previews on start and switch to path-based routing ([4958b66](4958b6624d))
* Refine flow — optimistic UI update + instruction passthrough ([763871a](763871a2a5))
* register errand router in appRouter and fix build errors ([388befd](388befd7c3))
* Register migration 0032 in drizzle journal ([eb667dd](eb667dd3d7))
* Remove agent:output from general SSE subscriptions to prevent listener leak ([2eac5b9](2eac5b9908))
* Remove faux-bold and tracking-tight from Instrument Serif headings ([1cfe51b](1cfe51b10e))
* Remove rounded corners from sidebar icon tab ([7540562](7540562933))
* Remove upward box-shadow on ReviewHeader that covers tab bar ([a69527b](a69527b7d6))
* Repair test harness coverage, excludes, and timer overhead ([dcb855e](dcb855ede1))
* Replace getTaskAgent polling with event-driven invalidation ([05efa9c](05efa9c08e))
* Replace Instrument Serif with Playfair Display for display headings ([1db5e2d](1db5e2dc56))
* Request changes uses in-app confirmation, requires review comments ([1e2819e](1e2819eeff))
* require signal.json for all errand agent exit scenarios ([67658fb](67658fb717))
* Resolve advanceTimers return type mismatch (Promise<VitestUtils> → Promise<void>) ([ec03121](ec031211a2))
* Resolve agent workdir probing for initiative project subdirectories ([b853b28](b853b28751))
* Resolve signal.json path mismatch for standalone agents ([2aa807a](2aa807a394))
* Restore drizzle-kit generate by syncing snapshot baseline ([4656627](4656627a59))
* Restore sticky header and sidebar by simplifying layout ([5b497b8](5b497b84a0))
* Restore sticky positioning on header wrapper div ([3a01b9e](3a01b9e9ca))
* Retry blocked task button does nothing due to missing query invalidation ([c069049](c069049c35))
* Retry sends message with retry flag to avoid duplicate storage ([354950b](354950bb8a))
* Roll back merge when push fails in initiative approval ([00e426a](00e426ac00))
* Scope loading spinner to diff pane only, keep sidebar always mounted ([69d2543](69d2543995))
* Scroll to exact comment location when clicking sidebar discussions ([3fcfa61](3fcfa61914))
* Show actionable error details for account health check failures ([783a07b](783a07bfb7))
* Show commit nav for single-commit phases, remove early-exit guard ([cbb8e66](cbb8e66943))
* Show completed phase diffs in review tab ([8425095](84250955d1))
* Show conflict resolution agents in HQ dashboard ([1e16ad8](1e16ad82e8))
* Show detailing indicator by including detail tasks in listInitiativeTasks ([3e678f2](3e678f2591))
* Show individual discussion threads in review sidebar with navigation ([157fa44](157fa445c5))
* Sidebar accounts for sticky header height via ResizeObserver ([09624e9](09624e9cb7))
* Sort pipeline tasks by dependency order instead of priority+createdAt ([1aef986](1aef986127))
* Sort root-level files to bottom of sidebar file tree ([bbaee2a](bbaee2acf5))
* Stabilize full-flow cassette keys and restore output files on replay ([25360e1](25360e1711))
* Sticky file headers sit below review header using CSS variable ([f428ec0](f428ec027e))
* stop Vite refresh loop by ignoring routeTree.gen.ts from watcher ([54673a4](54673a4399))
* Surface active architect agents in initiative activity state ([3d04cb2](3d04cb2081))
* Switch auto-spawn from discuss to refine agent, surface in UI ([9e7c246](9e7c246280))
* Switch preview gateway from path-prefix to subdomain routing ([1b8e496](1b8e496d39))
* **task:** Filter out decompose container tasks from phase and initiative task lists ([118f6d0](118f6d0d51))
* Tell agents context files are on-demand, not bulk-read ([26ed9e0](26ed9e0395))
* Use absolute paths and git add -u in post-completion commit resume ([f3042ab](f3042abe04))
* Use container-internal port 80 in gateway Caddyfile ([aedf149](aedf149471))
* Use fixed-position slide-over and render markdown descriptions with tiptap ([b223427](b223427bd3))
* Use instant scroll for discussion navigation ([50043f4](50043f4c61))
* Use lowercase alphanumeric nanoid for Docker compose project names ([0e61c48](0e61c48c86))
* Use npx tsx so tsx resolves from local node_modules ([2eada07](2eada071a1))
* Use overflow-clip instead of overflow-hidden on FileCard ([49970eb](49970eb1d7))
* Use primary indigo for Approve & Merge button instead of garish green ([79966cd](79966cdf20))
* Use pseudo-element to cover all transparent space above sticky header ([4664644](4664644cda))
* Use SSE events instead of polling for preview status updates ([cdb3de3](cdb3de353d))
* use String() instead of .toISOString() for errand timestamps ([ee8c709](ee8c7097db))
* Use update-ref for fast-forward to avoid dirty working tree failures ([5d1292c](5d1292c7ad))
* **web:** Dismiss button on refine agent ChangeSetBanner now works ([d18c3c7](d18c3c7e44))
* **web:** Update PipelineTab to use renamed PlanSection component ([57a5843](57a5843324))
* Widen task slide-over panel from max-w-md to max-w-xl ([095b23a](095b23a825))
* Widen task slide-over panel to max-w-2xl (672px) ([38be28e](38be28e443))
* Wire archive button to updateInitiative mutation ([8bece70](8bece70a61))
* wire database and repositories into server startup for tRPC context ([cbf0ed2](cbf0ed28cb))
* wire errand repository through tRPC adapter ([094b7e6](094b7e6307))
* Worktree get() matches wrong agent due to ambiguous endsWith lookup ([4a7105e](4a7105eb8f))
* Write context/index.json so agents can look up tasks by phase ([5d8830d](5d8830d2d3))

### Features

* **01-02:** create CLI with commander ([bf7ba66](bf7ba668b1))
* **01-03:** create process manager with spawn/stop ([2f3df1d](2f3df1d529))
* **01-03:** create process types and registry ([40a6617](40a66175a2))
* **01-04:** create log directory management ([e64e243](e64e243407))
* **01-04:** create per-process log writer ([fc410e2](fc410e212a))
* **01-05:** add HTTP server with health endpoint and PID file ([bec46aa](bec46aa234))
* **01-05:** implement graceful shutdown with signal handlers ([59b2337](59b233792a))
* **01.1-01:** create EventBus port interface and EventEmitter adapter ([83e6adb](83e6adb0f8))
* **01.1-01:** define domain events with typed payloads and tests ([437e76e](437e76ed78))
* **01.1-02:** define tRPC procedures with Zod validation and tests ([551e516](551e5163f0))
* **01.1-03:** add event emission to ProcessManager ([3b24cf2](3b24cf2c9d))
* **01.1-04:** add event emission to ProcessLogWriter ([bac133d](bac133db7a))
* **01.1-05:** add event emission to server and shutdown handler ([1f255ee](1f255ee8e3))
* **01.1-06:** add tRPC HTTP adapter and CLI client ([9da12a8](9da12a890d))
* **01.1-06:** update CLI status command and add integration tests ([d893fc5](d893fc5ede))
* **02-01:** create database connection factory ([d7e4649](d7e4649e47))
* **02-01:** define task hierarchy schema ([b492f64](b492f64348))
* **02-02:** create Drizzle repository adapters ([14e0f6f](14e0f6f0f5))
* **02-02:** create repository port interfaces ([5e5bca3](5e5bca3d01))
* **02-02:** update exports and add cascade delete tests ([112cc23](112cc231c7))
* **03-01:** add git domain events to event system ([9d7b90b](9d7b90b238))
* **03-01:** create WorktreeManager port interface ([99e4442](99e44425a3))
* **03-02:** install simple-git and create WorktreeManager adapter with CRUD ([0cf2849](0cf2849993))
* **04-01:** add agents table to database schema ([dfaa510](dfaa51076b))
* **04-01:** create AgentRepository port interface ([eec5f13](eec5f1398e))
* **04-01:** create DrizzleAgentRepository adapter with tests ([25f98fc](25f98fcbe1))
* **04-02:** add agent lifecycle events to events module ([ddc6f3b](ddc6f3b4e7))
* **04-02:** define AgentManager port interface and domain types ([8888970](88889700c2))
* **04-03:** implement ClaudeAgentManager adapter ([8193423](81934237ca))
* **04-04:** add agent CLI commands ([4d89160](4d8916091f))
* **04-04:** add agent procedures to tRPC router ([16f85cd](16f85cd22f))
* **04-04:** add AgentManager to tRPC context ([acf3b8d](acf3b8dae3))
* **05-01:** add MessageRepository port and adapter ([19dc75c](19dc75c3f4))
* **05-01:** add messages table to schema ([f873a32](f873a32ff4))
* **05-02:** add task CLI commands ([586f7ca](586f7caa7a))
* **05-02:** add task tRPC procedures ([9f24c1f](9f24c1ffc0))
* **05-03:** add dispatch domain events ([f54ec5e](f54ec5e07e))
* **05-03:** create DispatchManager port interface ([b2e7c29](b2e7c2920f))
* **05-04:** implement DefaultDispatchManager with dependency checking ([e924fb6](e924fb655a))
* **05-05:** add message and dispatch CLI commands ([211411e](211411e795))
* **05-05:** add message and dispatch tRPC procedures ([e0e03ee](e0e03eef86))
* **06-01:** add coordination domain events for merge lifecycle ([94130a6](94130a6661))
* **06-01:** add CoordinationManager port interface ([0570d21](0570d21ad6))
* **06-02:** enhance conflict bounce-back with agent messaging ([4535707](4535707bc8))
* **06-02:** implement DefaultCoordinationManager adapter ([6d7894b](6d7894bde4))
* **06-03:** add coordination tRPC procedures ([1a4de26](1a4de26966))
* **06-03:** add merge and coordinate CLI commands ([ae8d303](ae8d303e5e))
* **07-01:** implement MockAgentManager adapter ([6148af7](6148af784e))
* **07-02:** create fixture helpers for database seeding ([ba1f7cc](ba1f7ccd62))
* **07-02:** create test harness with full system wiring ([4424a46](4424a46c80))
* **08.1-01:** define agent output schema with Zod ([41598f5](41598f577f))
* **08.1-01:** update AgentWaitingEvent with structured question data ([3a3d3f4](3a3d3f4c08))
* **08.1-01:** update ClaudeAgentManager to use structured schema ([d9673d5](d9673d54a3))
* **08.1-02:** add TestHarness convenience methods for scenarios ([8e38bd2](8e38bd298b))
* **08.1-02:** update MockAgentManager to schema-aligned scenarios ([ead4614](ead4614383))
* **10-01:** extend agent schema to multi-question array ([151a4c9](151a4c99f7))
* **10-02:** update ClaudeAgentManager for batched answers ([d012680](d012680dbe))
* **10-02:** update MockAgentManager for batched answers ([a9e46a2](a9e46a2843))
* **10-03:** add setAgentQuestion convenience helper ([185a125](185a125307))
* **11-01:** add AgentMode type and database column ([91e57c6](91e57c66eb))
* **11-01:** create mode-specific output schemas ([3f8d6d5](3f8d6d5357))
* **11-01:** update MockAgentManager for mode support ([0abf02a](0abf02ac14))
* **11-02:** add findByNumber and getNextNumber to PhaseRepository ([67cfd4d](67cfd4d201))
* **11-02:** add findByStatus method to InitiativeRepository ([768c4d2](768c4d265e))
* **11-03:** add mode field to AgentRepository ([75f8887](75f8887b53))
* **11-03:** update ClaudeAgentManager for mode-specific schemas ([937d24e](937d24eca5))
* **11-04:** add initiative and phase repositories to tRPC context ([3bf7e2c](3bf7e2c9cb))
* **11-04:** add initiative tRPC procedures ([4d42da9](4d42da9496))
* **11-04:** add phase tRPC procedures ([d865330](d865330f85))
* **11-05:** add mode parameter to spawnAgent procedure ([4843b95](4843b95a7c))
* **11-05:** add spawnArchitect tRPC procedures ([c139859](c13985909a))
* **11-05:** create comprehensive agent prompts module ([773f6f9](773f6f92ac))
* **12-01:** create decompose output schema ([8ffa54a](8ffa54a531))
* **12-01:** extend AgentMode with 'decompose' ([8da4e71](8da4e71075))
* **12-02:** add getNextNumber to PlanRepository interface ([0044fbf](0044fbfc6e))
* **12-02:** implement getNextNumber in DrizzlePlanRepository ([3187e2a](3187e2ab01))
* **12-03:** add decompose mode support to ClaudeAgentManager ([8754cde](8754cdea98))
* **12-03:** add decompose mode support to MockAgentManager ([2bd0bc5](2bd0bc52a3))
* **12-03:** extend AgentStoppedEvent reason with decompose_complete ([fe3fed0](fe3fed077e))
* **12-04:** add createTasksFromDecomposition procedure ([66ad2ec](66ad2ec6ef))
* **12-04:** add Plan tRPC procedures ([6127445](612744580e))
* **12-04:** add PlanRepository to tRPC context ([c98e9df](c98e9df486))
* **12-05:** add spawnArchitectDecompose tRPC procedure ([1fcbdf5](1fcbdf5e10))
* **12-05:** create buildDecomposePrompt function ([48336ec](48336ec39d))
* **12-05:** export buildDecomposePrompt from agent module ([7ff979b](7ff979becf))
* **12-06:** add plan CLI commands and architect decompose command ([6a2b835](6a2b835fdf))
* **12-08:** add TestHarness decompose mode helpers ([4263c08](4263c0884e))
* **14-01:** add dependency methods to PhaseRepository ([8e68a6e](8e68a6e89e))
* **14-01:** add phase_dependencies table to schema ([a55d08f](a55d08fffe))
* **14-02:** add phase domain events ([cd02439](cd02439ca9))
* **14-02:** export phase events from events module ([e8ee7f3](e8ee7f39d7))
* **14-03:** define PhaseDispatchManager port interface ([22cd82d](22cd82da40))
* **14-03:** export phase dispatch types from dispatch module ([a890df7](a890df75d5))
* **14-04:** export DefaultPhaseDispatchManager from dispatch module ([053168f](053168f6cf))
* **14-04:** implement DefaultPhaseDispatchManager adapter ([1ba9587](1ba95871f5))
* **14-05:** add phase dependency and dispatch procedures ([5e6d507](5e6d507eb8))
* **14-05:** add PhaseDispatchManager to tRPC context ([28622cb](28622cbd04))
* **14-08:** add phaseDispatchManager to TestHarness ([38ee2d1](38ee2d17c4))
* **16-01:** configure Tailwind CSS and shadcn/ui ([bb468e0](bb468e00f0))
* **16-01:** create Vite + React + TypeScript project ([99348e0](99348e0650))
* **16-02:** create shared types package ([4a37371](4a373714bd))
* **16-03:** install tRPC React Query dependencies ([603d908](603d90850b))
* **16-03:** wire tRPC React Query client with providers ([0d5645f](0d5645f9c8))
* **16-04:** add TanStack Router file-based routes and app shell layout ([6d2920d](6d2920d60f))
* **16-04:** install TanStack Router and add shadcn/ui base components ([64d751d](64d751d203))
* **17-01:** create ProgressBar component ([ff60ce0](ff60ce08bc))
* **17-01:** create StatusBadge component ([22873a0](22873a0ad9))
* **17-02:** create InitiativeCard component ([ec93835](ec93835ae5))
* **17-02:** create InitiativeList component ([895c964](895c96435c))
* **17-03:** add SpawnArchitectDropdown and ActionMenu components ([f6caa5d](f6caa5df1a))
* **17-03:** create CreateInitiativeDialog with shadcn primitives ([e5acb9f](e5acb9f214))
* **17-04:** wire initiative dashboard with filter, list, and create dialog ([24bfcfa](24bfcfa421))
* **18-01:** create InitiativeHeader component ([62409a6](62409a6302))
* **18-01:** create ProgressPanel component ([8cfc197](8cfc197378))
* **18-02:** create DependencyIndicator component ([a00b7b5](a00b7b56b3))
* **18-02:** create PhaseAccordion component ([92d4d36](92d4d36421))
* **18-02:** create TaskRow component ([4becfe8](4becfe8452))
* **18-03:** create DecisionList component for initiative detail ([3baba49](3baba49edd))
* **18-03:** create TaskDetailModal component for initiative detail ([5b17b7a](5b17b7a93b))
* **18-04:** wire Initiative Detail page with data fetching and all components ([1e26bfa](1e26bfadbd))
* **19-01:** add getAgentQuestions and listWaitingAgents tRPC procedures ([004140e](004140ea83))
* **19-01:** export PendingQuestions and QuestionItem from shared package ([47a2bb3](47a2bb38bf))
* **19-02:** create InboxList component with filter/sort controls ([bf3521e](bf3521e3dd))
* **19-02:** create MessageCard component for agent inbox ([6450e40](6450e4072a))
* **19-03:** create OptionGroup and FreeTextInput components ([f73b850](f73b85062d))
* **19-03:** create QuestionForm component ([648f9db](648f9db230))
* **19-04:** wire inbox page with data fetching, detail panel, and answer submission ([3cac453](3cac453364))
* **20-02:** add splitLink to route subscriptions to SSE httpSubscriptionLink ([eaf3f10](eaf3f10722))
* **20-02:** wire SSE subscription hooks into dashboard, detail, and inbox pages ([170ac55](170ac55afd))
* **20:** add SSE streaming support and subscription procedures ([e5d8dbb](e5d8dbb583))
* **20:** export SubscriptionEvent type from shared package ([42154d6](42154d60d4))
* **21-01:** add ErrorBoundary, Sonner toast provider, and 404 navigation ([d323e1e](d323e1ea8e))
* **21-01:** wire toast notifications into all mutation flows ([5efb4d4](5efb4d4e8b))
* **21-02:** add Skeleton component and skeleton loading states for dashboard + inbox ([11fa5f4](11fa5f4be9))
* **21-02:** add skeleton loading states to initiative detail page ([a6c2864](a6c2864b74))
* **21-03:** add cross-screen navigation links ([c52c6f1](c52c6f170f))
* **21-03:** fix mobile responsive layout for inbox detail panel ([1e1aada](1e1aadaece))
* **21-04:** add subscription error handling with toast feedback on all pages ([4ae85da](4ae85da3f6))
* **21-05:** enable route-based code splitting via TanStack Router autoCodeSplitting ([1530d7a](1530d7ab15))
* Add "New Chat" button to reset chat session in-place ([b6ac797](b6ac797644))
* Add /hq route, nav item, and update root redirect ([3c55349](3c55349c4c))
* Add addAccountByToken tRPC mutation with upsert logic ([2b06f96](2b06f9627b))
* add addAccountByToken tRPC mutation with upsert logic and tests ([9c4131c](9c4131c814))
* Add AddAccountDialog component for account management UI ([89282d3](89282d33b3))
* Add Agent Logs tab to task slide-over ([3f39546](3f3954672e))
* Add agent preview integration with auto-teardown and simplified commands ([ebe186b](ebe186bd5e))
* Add agent spawn infrastructure for errand mode ([343c6a8](343c6a83a8))
* Add agent spawn infrastructure for errand mode ([52e2389](52e238924c))
* add agent_metrics table schema and Drizzle migration ([276c342](276c342a50))
* add agent_metrics write+read path to LogChunkRepository ([6eb1f8f](6eb1f8fc2a))
* Add all 9 cw errand CLI subcommands with tests ([e86a743](e86a743c0b))
* Add Approve button for pending_approval tasks in TaskSlideOver ([3d1818d](3d1818d567))
* Add approve+execute buttons to pipeline UI ([029b5bf](029b5bf0f6))
* add backfill-metrics script and cw backfill-metrics CLI command ([db2196f](db2196f1d1))
* Add cassette support for full-flow integration test ([41b1d0e](41b1d0e986))
* Add codebase exploration to architect agent prompts ([c8f3705](c8f370583a))
* Add compact mode to TaskGraph, use in pipeline tab ([748f0c2](748f0c294a))
* add CompactionEventsDialog and SubagentSpawnsDialog with tests ([cb45194](cb4519439d))
* Add cw account extract CLI command with tests ([3c99bde](3c99bdeeb5))
* Add description field and auto-spawn discuss agent on initiative creation ([86a1912](86a1912959))
* Add Details tab to agent right-panel with metadata, input files, and prompt sections ([7088c51](7088c511a9))
* add diffBranchesStat and diffFileSingle to BranchManager ([05eb160](05eb160749))
* add diffBranchesStat and diffFileSingle to BranchManager ([9894cdd](9894cdd06f))
* Add Docker-based preview deployments for phase review ([270a5cb](270a5cb21d))
* Add Dockerfile, preview config, and seed script for self-preview deployments ([66605da](66605da30d))
* Add errand tRPC router with all 9 procedures and comprehensive tests ([377e8de](377e8de5e9))
* add ErrandDetailPanel slide-over component ([09e4e3d](09e4e3d4f0))
* add Errands nav item, /errands route, and CreateErrandDialog ([14041d0](14041d007f))
* Add errands persistence layer — repository port, Drizzle adapter, migration, and tests ([940b0f8](940b0f8ed2))
* Add errands schema, repository, and wire into tRPC context/container ([3a328d2](3a328d2b1c))
* Add errands table, errand agent mode, and push rollback on merge failure ([6a76e17](6a76e17cef))
* add Errands to header navigation ([e77be50](e77be50b04))
* Add getHeadquartersDashboard tRPC procedure for HQ action items ([89c98d3](89c98d38cc))
* Add HQ section components for Headquarters page ([30d5f68](30d5f68f91))
* add in-memory diff cache with TTL and commit-hash invalidation ([0996073](0996073deb))
* Add initiative review gate before push ([865e8bf](865e8bffa0))
* Add inter-agent conversation system (listen, ask, answer) ([a6371e1](a6371e156a))
* Add live todo strip and Task result preview to AgentOutputViewer ([f6938ae](f6938ae7e1))
* Add merge conflict detection and agent resolution in initiative review ([6cf6bd0](6cf6bd076f))
* Add page-level entrance animations using motion library ([dd86f12](dd86f12057))
* Add persistent chat sessions for iterative phase/task refinement ([fcf8223](fcf822363c))
* Add preview controls to initiative-level review ([13e009a](13e009a82d))
* Add PREVIEW_EVENT_TYPES, CONVERSATION_EVENT_TYPES, and subscription procedures ([2096292](209629241d))
* Add project filter to listInitiatives ([069eb66](069eb66acb))
* Add project icon with dark/light mode support ([427f93e](427f93e136))
* add QuestionsAskedDialog and InterAgentMessagesDialog with tests ([20d591c](20d591c51f))
* Add Radar page with nav item, filters, table, and tests ([b860bc1](b860bc100d))
* Add remote sync for project clones ([5e77bf1](5e77bf104c))
* Add remove account button to health page UI ([2f2ad6e](2f2ad6eb95))
* Add retry mechanism for blocked tasks ([d81e086](d81e0864f7))
* Add seed command support to preview deployments ([714262f](714262fb83))
* Add SSE-driven real-time refresh and last-refreshed timestamp to drilldown dialogs ([7c48c70](7c48c70d47))
* Add subagent usage guidance to refine and plan prompts ([a0574a1](a0574a1ae9))
* Add Sync All button to projects settings page with tests ([7a4d0d2](7a4d0d2582))
* Add task deletion with shift+click auto-confirm ([62a5421](62a542116d))
* Add task execution graph within phase detail panel ([af092ba](af092ba16a))
* Add theme-aware custom scrollbars ([d03b204](d03b204096))
* Add threaded review comments + agent comment responses ([7695604](7695604da2))
* Add timestamps to agent logs and fix horizontal scroll ([d52317a](d52317ac5d))
* Add tiptap editor for task descriptions in slide-over panel ([2948eb1](2948eb1139))
* Add tool correlation, toolInput metadata, and unknown-type fallbacks to parser ([ee6b0da](ee6b0da976))
* Add UpdateCredentialsDialog component for re-authenticating accounts ([575ad48](575ad48a55))
* Add VCR-style cassette testing system for agent subprocess pipeline ([0ed657b](0ed657b644))
* **agent:** Enrich breakdown/decompose agent input with full initiative context ([bf898cb](bf898cb86e))
* Allow editing review comments ([1e72361](1e723611e7))
* **architect:** Complete auth pages phase decomposition ([41c812e](41c812e4b8))
* **architect:** Complete auth pages phase decomposition ([341849d](341849d2f5))
* **architect:** Complete data display components phase decomposition ([11ddbc1](11ddbc1b13))
* **architect:** Complete Layout & Navigation phase decomposition ([83cf139](83cf1390a1))
* Auto-branch initiative system with per-project default branches ([ca548c1](ca548c1eaa))
* auto-create Integration phase for multi-leaf initiatives ([0f53930](0f53930610))
* Auto-resume idle agents for inter-agent conversations ([9edc93a](9edc93a268))
* **cli:** Add --token option to register-account command ([9799845](97998459e5))
* **cli:** add architect commands (discuss, breakdown) ([1165697](1165697e91))
* **cli:** add initiative commands (create, list, get) ([2cdc154](2cdc1544ef))
* **cli:** add initiative phases command ([173ed57](173ed57d2c))
* **cli:** add phase dependency and dispatch commands ([8ad262d](8ad262d05e))
* collapse tool_result blocks by default; restyle system messages ([752bb67](752bb67e3a))
* Connect dispatch queue to agent spawning via auto-dispatch ([1c7d6f2](1c7d6f20ee))
* embed InboxList + InboxDetailPanel inline on HQ page ([e8d332e](e8d332e04b))
* Emit account_switched event on account exhaustion in lifecycle controller ([3e2a570](3e2a570447))
* Extend AgentInfo with exitCode + add getAgentInputFiles/getAgentPrompt tRPC procedures ([269a2d2](269a2d2616))
* Harden execute agent prompt with industry best practices ([f91ed5a](f91ed5ab2d))
* implement Radar backend tRPC procedures with repository extensions ([5598e1c](5598e1c10f))
* Implement v2 design system with indigo brand, dark mode, and status tokens ([04c212d](04c212da92)), closes [#6366F1](https://gitlab.com/carealytix/tools/codewalkers/issues/6366F1)
* Improve RegisterProjectDialog UX for long-running clone ([4c99f89](4c99f89462))
* Inject agent ID into prompts, SSE-based cw listen, all flags documented ([bfc1b42](bfc1b422f9))
* Make initiative branch and execution mode editable from header ([c2d665c](c2d665c24f))
* Make inter-agent communication prompt mode-aware ([938700d](938700d45d))
* move syntax highlighting off main thread via Web Worker pool ([0608900](0608900a53))
* move waiting_for_input badge from Inbox to HQ nav, remove Inbox entry ([cfbb9b2](cfbb9b2d1a))
* Persist agent prompt in DB so getAgentPrompt survives log cleanup ([b2f4004](b2f4004191))
* Persist agents page filter in URL query params, default to questions ([1043079](1043079a08))
* Persist review comments to database ([173c7f7](173c7f7916))
* Phase schema refactor, agent lifecycle module, and log chunks ([fab7706](fab7706f5c))
* Polish pass — display font on headings, empty states, card interactivity, panel dividers ([4e04863](4e04863e32))
* Polish review tab — viewed tracking, file tree, syntax highlighting, better UX ([06b768e](06b768e358))
* pre-populate retry dialog with crashed agent's original instruction ([f5b1a3a](f5b1a3a5b9))
* Premium design overhaul — typography, atmosphere, animations, component polish ([7e60cbf](7e60cbfff9))
* Propagate task summaries and input context to execution agents ([536cdf0](536cdf08a1))
* Re-add initiative branch field and add projects settings page ([a8d3f52](a8d3f52d09))
* Redesign review tab with phase selection, commit navigation, and consolidated toolbar ([c58e0ea](c58e0ea77e))
* Redesign task and phase dependency display in plans tab ([6a9d9e3](6a9d9e3452))
* Refine pipeline UI — progress bars, status borders, collapsible tasks ([685b2cb](685b2cb4ec))
* Remove checkpoint task types — per-phase review is sufficient ([7b93cfe](7b93cfe7d7))
* Rename application from "Codewalk District" to "Codewalkers" ([0ff65b0](0ff65b0b02))
* Replace floating Execute button with pipeline summary bar ([baca008](baca008447))
* Replace horizontal commit nav with VSCode-style sidebar icon switcher ([a9832fc](a9832fc5ae))
* Replace initiative card N+1 queries with server-computed activity indicator ([96386e1](96386e1c3d))
* Replace per-preview Caddy sidecars with shared gateway architecture ([143aad5](143aad58e8))
* Replace task modal with slide-over panel and enrich task nodes ([2d15dcf](2d15dcf368))
* **shared:** Add topological sort and pipeline column grouping for phases ([47c3162](47c3162581))
* Show agent errors in chat UI with retry button ([84dcb01](84dcb0193d))
* Show detailing status in initiative overview and phase sidebar ([411700d](411700d37d))
* Show detailing status in pipeline tab phase groups ([0ab7b54](0ab7b54ad7))
* Show project pills on initiative cards in list view ([b621858](b6218584ee))
* Show resolving_conflict activity state on initiative cards ([e3246ba](e3246baf51))
* split FileDiff into metadata FileDiff + hunk-bearing FileDiffDetail ([5968a6b](5968a6ba88))
* split getPhaseReviewDiff into metadata + add getFileDiff procedure ([4890721](4890721a92))
* Swap display font from Plus Jakarta Sans to Instrument Serif ([5a5d48a](5a5d48aecc))
* Switch cw ask from polling to SSE via onConversationAnswer subscription ([bfefbc8](bfefbc85af))
* switch ReviewTab phase diff from rawDiff to metadata file list ([16565ce](16565ce42d))
* Task decomposition for Tailwind/Radix/shadcn foundation setup ([342b490](342b490fe7))
* teach errand agent how to ask questions interactively ([e2c489d](e2c489dc48))
* **test:** add TestHarness architect mode helpers and tRPC caller ([021937c](021937c28d))
* Validate default branch exists in repo when setting project defaultBranch ([771cd71](771cd71c1e))
* viewport virtualization for DiffViewer + lazy per-file hunk loading in FileCard ([f804cb1](f804cb197c))
* virtualize ReviewSidebar file list for >50 items with scroll preservation ([0323b42](0323b42667))
* **web:** Add stop button to agent detail view header ([a98c2d0](a98c2d0f6b))
* **web:** Pipeline visualization, phase content editing, and review tab ([da41522](da4152264c))
* Wire AddAccountDialog and UpdateCredentialsDialog into health page and AccountCard ([a94e72c](a94e72ccbc))
* wire conflictFiles through errand.get and add repository tests ([8139793](813979388b))
* wire drilldown dialogs into RadarPage with isAgentRunning prop ([92a95ff](92a95ffa02))
* Wire full request-changes flow for phase review ([7e0749e](7e0749ef17))
* wire phaseId + commit-view detail into DiffViewer; fix files prop ([72f8b07](72f8b07b10))
* Wire up hq.tsx with query, live updates, loading/error states, and section rendering ([2ec4ddb](2ec4ddb2fd))
* Wire up initiative deletion end-to-end ([6fa0252](6fa025251e))

### Performance Improvements

* Pre-index review comments into Map to eliminate O(n) filtering ([ec86b62](ec86b62d8d))
* Remove preview polling in favour of SSE-driven invalidation ([7bc1e7f](7bc1e7f25b))
* replace O(N·chunks) listForRadar read path with O(N·agents) metrics lookup ([4a9f38c](4a9f38c4e1))
* Speed up conflict resolution agents by trimming prompt bloat ([b419981](b419981924))
2026-03-06 20:58:55 +00:00
Lukas May
9200891a5d feat: add quality-review service with qualifying file detection and agent spawning
Adds apps/server/execution/quality-review.ts with three exported functions:
- computeQualifyingFiles: diffs task branch vs base, filters out *.gen.ts and dist/ paths
- shouldRunQualityReview: evaluates all six guard conditions (task_complete, execute mode,
  in_progress status, initiative membership, qualityReview flag, non-empty changeset)
  and returns { run, qualifyingFiles } to avoid recomputing the diff in the orchestrator
- runQualityReview: transitions task to quality_review, spawns execute-mode review agent
  on the task branch, logs the review agent ID, and falls back to completed on spawn failure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 21:56:18 +01:00
Lukas May
1416e6bf62 docs: update server-api.md to include qualityReview in updateInitiativeConfig
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 21:54:17 +01:00
Lukas May
bb770407db feat: expose qualityReview via updateInitiativeConfig tRPC mutation
Adds qualityReview: z.boolean().optional() to the updateInitiativeConfig
input schema so the field passes through to the repository layer.
Includes integration tests verifying set-true, set-false, and
omit-preserves-existing round-trip behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 21:53:58 +01:00
Lukas May
5137a60e70 feat: add quality_review task status and qualityReview initiative flag
Adds two new fields to the database and propagates them through the
repository layer:

- Task status enum gains 'quality_review' (between in_progress and
  completed), enabling a QA gate before tasks are marked complete.
- initiatives.quality_review (INTEGER DEFAULT 0) lets an initiative be
  flagged for quality-review workflow without a data migration (existing
  rows default to false).

Includes:
- Schema changes in schema.ts
- Migration 0037 (ALTER TABLE initiatives ADD quality_review)
- Snapshot chain repaired: deleted stale 0036 snapshot, fixed 0035
  prevId to create a linear chain (0032 → 0034 → 0035), then generated
  clean 0037 snapshot
- Repository adapter already uses SELECT * / spread-update pattern so
  no adapter code changes were needed
- Initiative and task repository tests extended with qualityReview /
  quality_review_status describe blocks (7 new tests)
- docs/database.md updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 21:47:34 +01:00
Lukas May
dca4224d26 Merge branch 'cw/merge-hq-inbox' into cw-merge-1772829971134 2026-03-06 21:46:11 +01:00
Lukas May
a3a9076411 Merge branch 'cw/radar-screen-performance' into cw-merge-1772829950184 2026-03-06 21:45:50 +01:00
Lukas May
e8d332e04b feat: embed InboxList + InboxDetailPanel inline on HQ page
Replaces HQWaitingForInputSection with a two-column inline panel that
lets users answer agent questions directly from HQ without navigating
to /inbox. Adds SSE invalidation for listWaitingAgents/listMessages,
useState for agent selection, and all required mutations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 21:45:26 +01:00
Lukas May
9c468f17cb chore: update generated route tree 2026-03-06 21:44:55 +01:00
Lukas May
346d62ef8d fix: prevent stale duplicate planning tasks from blocking phase completion
Three fixes for phases getting stuck when a detail task crashes and is retried:

1. detailPhase mutation (architect.ts): clean up orphaned pending/in_progress
   detail tasks before creating new ones, preventing duplicates at the source
2. orchestrator recovery: detect and complete stale duplicate planning tasks
   (same category+phase, one completed, one pending)
3. ensureBranch: catch "already exists" TOCTOU race instead of blocking phase
2026-03-06 21:44:26 +01:00
Lukas May
ee8c7097db fix: use String() instead of .toISOString() for errand timestamps
tRPC without superjson serializes Date objects as plain strings/numbers
over the wire. The .toISOString() calls crashed because the values
aren't Date instances on the client. Matches the existing pattern used
elsewhere (e.g. agents page).
2026-03-06 21:42:26 +01:00
Lukas May
f497905043 Merge branch 'cw/merge-hq-inbox-phase-nav-badge-move-questions-count-to-hq-remove-inbox-item' into cw-merge-1772829625670 2026-03-06 21:40:25 +01:00