mika kuns d094a21e09 feat(planning): prevent orphaned subtasks via guards + startup repair
Three coordinated guards close the orphan-creation paths:

- CreateChildAsync refuses when the parent is not in a planning phase.
- DiscardPlanningAsync now returns a structured DiscardPlanningOutcome
  and refuses when children are queued or running; callers can opt into
  auto-dequeuing queued kids via dequeueQueuedChildren=true. Terminal
  children (Done/Failed/Cancelled) are promoted to top-level instead of
  becoming orphans when the parent's PlanningPhase is reset.
- OrphanRecovery hosted service clears ParentTaskId on any rows whose
  parent is missing or no longer in a planning phase on worker startup,
  mirroring the StaleTaskRecovery pattern.

UI surfaces the block reason: a confirm dialog offers to dequeue queued
children and retry; a running-children block is shown as a hard error
asking the user to cancel first.

WorkerClient now negotiates the JsonStringEnumConverter so the
DiscardPlanningResult enum round-trips correctly over SignalR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 16:02:15 +02:00
2026-04-15 14:23:26 +02:00
2026-04-21 15:31:26 +02:00

ClaudeDo

A desktop task management app that executes tasks autonomously via Claude CLI in isolated git worktrees.

Queue up coding tasks, and ClaudeDo picks them up one by one — each running in its own worktree so your main branch stays clean.

Architecture

Two-process system communicating over SignalR:

Project Role
ClaudeDo.App Avalonia desktop entry point, DI container setup
ClaudeDo.Ui Views, ViewModels, SignalR client (MVVM)
ClaudeDo.Data SQLite data layer, repositories, models, GitService
ClaudeDo.Worker ASP.NET Core hosted service, task queue, Claude CLI runner
┌────────────────┐  SignalR    ┌────────────────┐
│  ClaudeDo.App  │◄───────────►│ ClaudeDo.Worker │
│  (Avalonia)    │ 127.0.0.1  │ (ASP.NET Core) │
│                │  :47821     │                │
│  ┌────────────┐│             │ ┌────────────┐ │
│  │    Ui      ││             │ │ TaskQueue  │ │
│  │(ViewModels)││             │ │ Claude CLI │ │
│  └────────────┘│             │ └────────────┘ │
└───────┬────────┘             └───────┬────────┘
        │                              │
        └──────────────┬───────────────┘
                       │
               ┌───────┴───────┐
               │ ClaudeDo.Data │
               │   (SQLite)    │
               └───────────────┘

Tech Stack

  • .NET 8.0
  • Avalonia 12.0.0 (Fluent theme)
  • SQLite (WAL mode) via Entity Framework Core (EF Core + Migrations)
  • SignalR for real-time IPC between UI and Worker
  • CommunityToolkit.Mvvm for source-generated MVVM
  • Git worktrees for task isolation

Prerequisites

Getting Started

# Build
dotnet build src/ClaudeDo.App
dotnet build src/ClaudeDo.Worker

# Run tests
dotnet test tests/ClaudeDo.Worker.Tests

# Run the app
dotnet run --project src/ClaudeDo.App

How It Works

  1. Create a task in the UI and tag it with "agent" to mark it for automated execution.
  2. The Worker picks up queued tasks and runs each one via Claude CLI in an isolated git worktree.
  3. When done, the worktree can be merged, kept for review, or discarded.

Task status flow: Manual | Queued → Running → Done | Failed

Worktree state flow: Active → Merged | Discarded | Kept

Configuration

All data and config lives under ~/.todo-app/:

File Purpose
todo.db SQLite database
ui.config.json UI settings
worker.config.json Worker settings (worktree strategy, etc.)
logs/ Application logs

Project Structure

ClaudeDo.slnx
├── src/
│   ├── ClaudeDo.App/        # Desktop entry point
│   ├── ClaudeDo.Ui/         # Views & ViewModels
│   ├── ClaudeDo.Data/       # Data access layer
│   └── ClaudeDo.Worker/     # Background task runner
├── tests/
│   └── ClaudeDo.Worker.Tests/
├── schema/
│   └── schema.sql           # Database schema
└── docs/
    ├── plan.md              # Architecture & design spec
    ├── open.md              # Verification checklist & backlog
    └── improvement-plan.md  # Prioritized improvements

License

Private — not licensed for redistribution.

Description
a todo list and Task orchestrator using claude code CLI
Readme 7 MiB
v1.9.0 Latest
2026-06-19 11:24:13 +00:00
Languages
C# 98%
HTML 2%