# fairladyz625/harness-anything architecture

> Architecture diagram of the GitHub repository fairladyz625/harness-anything, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fairladyz625/harness-anything
- Repository: https://github.com/fairladyz625/harness-anything

## Overview

Harness Anything is an agent-work accountability system: it turns repository work into durable decisions, facts, task evidence, reviews, and gated completion. The main user workflow is issuing work through the CLI or GUI, recording and reviewing its outcomes, and retaining project memory for later runs. The graph includes the documented preset and GUI capabilities, plus the daemon, application, and kernel layers. Relationships are limited to README statements and SOURCE INDEX references; unsampled wiring is not asserted.

Main entry points: [`packages/daemon/src/daemon-host.ts`](https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/daemon-host.ts) (Daemon host), [`packages/application/src/task-lifecycle-service.ts`](https://github.com/fairladyz625/harness-anything/blob/main/packages/application/src/task-lifecycle-service.ts) (Task lifecycle), [`packages/cli/src/cli/thin-command-router.ts`](https://github.com/fairladyz625/harness-anything/blob/main/packages/cli/src/cli/thin-command-router.ts) (CLI commands), [`packages/cli/src/daemon/client.ts`](https://github.com/fairladyz625/harness-anything/blob/main/packages/cli/src/daemon/client.ts) (Daemon client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI commands"]
  node_daemonclient["Daemon client<br/>[client.ts]"]
  node_gui["Desktop workspace<br/>[App.tsx]"]
end

subgraph group_services["Domain services"]
  node_tasklife["Task lifecycle"]
  node_artifact["Artifact entities"]
end

subgraph group_runtime["Daemon runtime"]
  node_daemon["Daemon host<br/>[daemon-host.ts]"]
  node_runtimeinstances["Agent runtime setup"]
  node_dispatch["Task dispatch"]
  node_review["Decision review"]
  node_squads["Squad coordination"]
  node_schedules["Scheduled work"]
  node_docsync["Document sync"]
  node_fleet["Fleet operations<br/>[edge.ts]"]
end

subgraph group_kernel["Kernel and storage"]
  node_domain["Task and relations<br/>[task.ts]"]
  node_projection["Task projections"]
  node_projectiondb[("Projection database")]
  node_eventstore[("Event store")]
end

subgraph group_extensions["Presets and integrations"]
  node_preset["Preset processing"]
  node_localadapter["Local adapter<br/>[index.ts]"]
  node_multica["Multica adapter<br/>[index.ts]"]
end

node_user(("Repository user"))
node_agent(("Coding agent"))

node_user -->|"issues commands"| node_cli
node_user -->|"uses workspace"| node_gui
node_cli -.->|"routes commands"| node_daemonclient
node_daemonclient -.->|"connects to"| node_daemon
node_tasklife -->|"uses kernel"| node_domain
node_artifact -->|"uses kernel"| node_domain
node_projection -->|"queries through"| node_projectiondb
node_projectiondb -->|"builds reads"| node_projection
node_preset -.->|"runs preset scripts"| node_agent
node_agent -->|"records work"| node_tasklife
node_agent -->|"submits for review"| node_review
node_review -->|"gates completion"| node_tasklife
node_agent -.->|"uses configured runtime"| node_runtimeinstances
node_daemon -.->|"admits dispatch"| node_dispatch
node_daemon -.->|"coordinates squads"| node_squads
node_daemon -.->|"runs schedules"| node_schedules
node_daemon -.->|"handles document sync"| node_docsync
node_daemon -.->|"supports fleet work"| node_fleet
node_daemon -.->|"persists events"| node_eventstore
node_localadapter -.->|"adapts locally"| node_daemon
node_multica -.->|"provides integration"| node_daemon

click node_cli "https://github.com/fairladyz625/harness-anything/blob/main/packages/cli/src/cli/thin-command-router.ts"
click node_daemonclient "https://github.com/fairladyz625/harness-anything/blob/main/packages/cli/src/daemon/client.ts"
click node_gui "https://github.com/fairladyz625/harness-anything/blob/main/packages/gui/src/renderer/App.tsx"
click node_tasklife "https://github.com/fairladyz625/harness-anything/blob/main/packages/application/src/task-lifecycle-service.ts"
click node_artifact "https://github.com/fairladyz625/harness-anything/blob/main/packages/application/src/artifact-entity-service.ts"
click node_preset "https://github.com/fairladyz625/harness-anything/blob/main/packages/preset/src/preset-process-service.ts"
click node_daemon "https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/daemon-host.ts"
click node_runtimeinstances "https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/agent-runtime-instance-storage.ts"
click node_dispatch "https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/task-dispatch-admission.ts"
click node_review "https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/decision-review-read.ts"
click node_squads "https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/squad-coordinator.ts"
click node_schedules "https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/schedule-scheduler.ts"
click node_docsync "https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/doc-sync-actions.ts"
click node_fleet "https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/fleet/edge.ts"
click node_domain "https://github.com/fairladyz625/harness-anything/blob/main/packages/kernel/src/domain/task.ts"
click node_projection "https://github.com/fairladyz625/harness-anything/blob/main/packages/kernel/src/projection/task-query-projection.ts"
click node_projectiondb "https://github.com/fairladyz625/harness-anything/blob/main/packages/kernel/src/projection/rebuildable-task-projection-database.ts"
click node_eventstore "https://github.com/fairladyz625/harness-anything/blob/main/packages/kernel/src/store/sqlite-event-store.ts"
click node_localadapter "https://github.com/fairladyz625/harness-anything/blob/main/packages/adapters/local/src/index.ts"
click node_multica "https://github.com/fairladyz625/harness-anything/blob/main/packages/adapters/multica/src/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_daemonclient,node_gui,node_user toneBlue
class node_tasklife,node_artifact toneAmber
class node_daemon,node_runtimeinstances,node_dispatch,node_review,node_squads,node_schedules,node_docsync,node_fleet toneMint
class node_domain,node_projection,node_projectiondb,node_eventstore toneRose
class node_preset,node_localadapter,node_multica,node_agent toneIndigo
```

## Components

### User interfaces

- [CLI commands](https://github.com/fairladyz625/harness-anything/blob/main/packages/cli/src/cli/thin-command-router.ts): `packages/cli/src/cli/thin-command-router.ts`
- [Daemon client](https://github.com/fairladyz625/harness-anything/blob/main/packages/cli/src/daemon/client.ts): `packages/cli/src/daemon/client.ts`
- [Desktop workspace](https://github.com/fairladyz625/harness-anything/blob/main/packages/gui/src/renderer/App.tsx): `packages/gui/src/renderer/App.tsx`

### Domain services

- [Task lifecycle](https://github.com/fairladyz625/harness-anything/blob/main/packages/application/src/task-lifecycle-service.ts): `packages/application/src/task-lifecycle-service.ts`
- [Artifact entities](https://github.com/fairladyz625/harness-anything/blob/main/packages/application/src/artifact-entity-service.ts): `packages/application/src/artifact-entity-service.ts`

### Daemon runtime

- [Daemon host](https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/daemon-host.ts): `packages/daemon/src/daemon-host.ts`
- [Agent runtime setup](https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/agent-runtime-instance-storage.ts): `packages/daemon/src/agent-runtime-instance-storage.ts`
- [Task dispatch](https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/task-dispatch-admission.ts): `packages/daemon/src/task-dispatch-admission.ts`
- [Decision review](https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/decision-review-read.ts): `packages/daemon/src/decision-review-read.ts`
- [Squad coordination](https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/squad-coordinator.ts): `packages/daemon/src/squad-coordinator.ts`
- [Scheduled work](https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/schedule-scheduler.ts): `packages/daemon/src/schedule-scheduler.ts`
- [Document sync](https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/doc-sync-actions.ts): `packages/daemon/src/doc-sync-actions.ts`
- [Fleet operations](https://github.com/fairladyz625/harness-anything/blob/main/packages/daemon/src/fleet/edge.ts): `packages/daemon/src/fleet/edge.ts`

### Kernel and storage

- [Task and relations](https://github.com/fairladyz625/harness-anything/blob/main/packages/kernel/src/domain/task.ts): `packages/kernel/src/domain/task.ts`
- [Task projections](https://github.com/fairladyz625/harness-anything/blob/main/packages/kernel/src/projection/task-query-projection.ts): `packages/kernel/src/projection/task-query-projection.ts`
- [Projection database](https://github.com/fairladyz625/harness-anything/blob/main/packages/kernel/src/projection/rebuildable-task-projection-database.ts): `packages/kernel/src/projection/rebuildable-task-projection-database.ts`
- [Event store](https://github.com/fairladyz625/harness-anything/blob/main/packages/kernel/src/store/sqlite-event-store.ts): `packages/kernel/src/store/sqlite-event-store.ts`

### Presets and integrations

- [Preset processing](https://github.com/fairladyz625/harness-anything/blob/main/packages/preset/src/preset-process-service.ts): `packages/preset/src/preset-process-service.ts`
- [Local adapter](https://github.com/fairladyz625/harness-anything/blob/main/packages/adapters/local/src/index.ts): `packages/adapters/local/src/index.ts`
- [Multica adapter](https://github.com/fairladyz625/harness-anything/blob/main/packages/adapters/multica/src/index.ts): `packages/adapters/multica/src/index.ts`

### Other components

- **Repository user**
- **Coding agent**

## Connections

- Repository user → CLI commands: issues commands (evidence: `README.md`)
- Repository user → Desktop workspace: uses workspace (evidence: `README.md`)
- CLI commands → Daemon client: routes commands
- Daemon client → Daemon host: connects to
- Task lifecycle → Task and relations: uses kernel (evidence: `packages/application/src/task-lifecycle-service.ts`)
- Artifact entities → Task and relations: uses kernel (evidence: `packages/application/src/artifact-entity-service.ts`)
- Task projections → Projection database: queries through (evidence: `packages/kernel/src/projection/task-query-projection.ts`)
- Projection database → Task projections: builds reads (evidence: `packages/kernel/src/projection/rebuildable-task-projection-database.ts`)
- Preset processing → Coding agent: runs preset scripts
- Coding agent → Task lifecycle: records work (evidence: `README.md`)
- Coding agent → Decision review: submits for review (evidence: `README.md`)
- Decision review → Task lifecycle: gates completion (evidence: `README.md`)
- Coding agent → Agent runtime setup: uses configured runtime
- Daemon host → Task dispatch: admits dispatch
- Daemon host → Squad coordination: coordinates squads
- Daemon host → Scheduled work: runs schedules
- Daemon host → Document sync: handles document sync
- Daemon host → Fleet operations: supports fleet work
- Daemon host → Event store: persists events
- Local adapter → Daemon host: adapts locally
- Multica adapter → Daemon host: provides integration
