# rpamis/comet architecture

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

- Interactive diagram: https://gitdiagram.com/rpamis/comet
- Repository: https://github.com/rpamis/comet

## Overview

Comet is a coding-agent workflow and Skill platform. A user invokes the CLI, which routes work into either the resumable Native workflow or the separately governed Classic workflow; both provide status and Dashboard visibility. Alongside those workflows, Comet supports Skill authoring and evaluation, Personal Memory, Project Knowledge, and multi-agent Supervisor Changes. The graph preserves these documented product branches; several implementation links are documented in the README rather than shown in the sampled source, so those edges cite the README.

Main entry points: [`app/cli/index.ts`](https://github.com/rpamis/comet/blob/master/app/cli/index.ts) (Comet CLI), [`domains/comet-entry/entry-runtime.ts`](https://github.com/rpamis/comet/blob/master/domains/comet-entry/entry-runtime.ts) (Workflow selector), [`domains/comet-native/native-loop-runtime.ts`](https://github.com/rpamis/comet/blob/master/domains/comet-native/native-loop-runtime.ts) (Native runtime), [`domains/comet-classic/classic-runtime-run.ts`](https://github.com/rpamis/comet/blob/master/domains/comet-classic/classic-runtime-run.ts) (Classic workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and configuration"]
  node_cli["Comet CLI<br/>[index.ts]"]
  node_config["Project configuration"]
  node_entrypoint["Workflow selector<br/>[entry-runtime.ts]"]
end

subgraph group_workflows["Task workflows"]
  node_native["Native runtime"]
  node_native_state[("Native task state<br/>[native-types.ts]")]
  node_classic["Classic workflow"]
  node_classic_state[("Classic task state<br/>[classic-store.ts]")]
  node_hooks["Workflow hook router<br/>[hook-router.ts]"]
end

subgraph group_insight["Visibility and context"]
  node_dashboard_server["Dashboard server<br/>[server.ts]"]
  node_dashboard_ui["Dashboard interface<br/>[main.jsx]"]
  node_personal_memory["Personal Memory<br/>[personal-memory.ts]"]
  node_project_knowledge["Project Knowledge<br/>[query.ts]"]
end

subgraph group_skills["Skill lifecycle"]
  node_skill_authoring["Skill authoring<br/>[authoring.ts]"]
  node_bundle["Bundle packaging<br/>[bundle-platform.ts]"]
  node_evaluation["Skill evaluation<br/>[eval.ts]"]
end

subgraph group_coordination["Parallel delivery"]
  node_supervisor["Supervisor Changes"]
  node_worktrees["Isolated worktrees"]
end

node_user(("Coding agent user"))

node_user -->|"invokes"| node_cli
node_cli -.->|"starts workflow"| node_entrypoint
node_entrypoint -->|"reads config"| node_config
node_entrypoint -->|"selects Native"| node_native
node_entrypoint -->|"selects Classic"| node_classic
node_native -->|"persists task state"| node_native_state
node_classic -.->|"persists task state"| node_classic_state
node_user -.->|"triggers hooks"| node_hooks
node_hooks -->|"reads config"| node_config
node_cli -->|"starts Dashboard"| node_dashboard_server
node_dashboard_ui -->|"requests data"| node_dashboard_server
node_cli -->|"manages memory"| node_personal_memory
node_cli -->|"manages knowledge"| node_project_knowledge
node_cli -->|"authors Skills"| node_skill_authoring
node_skill_authoring -->|"packages Skills"| node_bundle
node_cli -->|"runs evaluations"| node_evaluation
node_native -->|"coordinates Changes"| node_supervisor
node_supervisor -->|"creates worktrees"| node_worktrees

click node_cli "https://github.com/rpamis/comet/blob/master/app/cli/index.ts"
click node_config "https://github.com/rpamis/comet/blob/master/domains/workflow-contract/project-config-reader.ts"
click node_entrypoint "https://github.com/rpamis/comet/blob/master/domains/comet-entry/entry-runtime.ts"
click node_native "https://github.com/rpamis/comet/blob/master/domains/comet-native/native-loop-runtime.ts"
click node_native_state "https://github.com/rpamis/comet/blob/master/domains/comet-native/native-types.ts"
click node_classic "https://github.com/rpamis/comet/blob/master/domains/comet-classic/classic-runtime-run.ts"
click node_classic_state "https://github.com/rpamis/comet/blob/master/domains/comet-classic/classic-store.ts"
click node_hooks "https://github.com/rpamis/comet/blob/master/domains/comet-entry/hook-router.ts"
click node_dashboard_server "https://github.com/rpamis/comet/blob/master/domains/dashboard/server.ts"
click node_dashboard_ui "https://github.com/rpamis/comet/blob/master/domains/dashboard/web/src/main.jsx"
click node_personal_memory "https://github.com/rpamis/comet/blob/master/domains/comet-memory/personal-memory.ts"
click node_project_knowledge "https://github.com/rpamis/comet/blob/master/domains/project-knowledge/query.ts"
click node_skill_authoring "https://github.com/rpamis/comet/blob/master/domains/bundle/authoring.ts"
click node_bundle "https://github.com/rpamis/comet/blob/master/domains/bundle/bundle-platform.ts"
click node_evaluation "https://github.com/rpamis/comet/blob/master/domains/bundle/eval.ts"
click node_supervisor "https://github.com/rpamis/comet/blob/master/domains/comet-native/native-supervisor.ts"
click node_worktrees "https://github.com/rpamis/comet/blob/master/domains/comet-native/native-portable-storage.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_config,node_entrypoint,node_user toneBlue
class node_native,node_native_state,node_classic,node_classic_state,node_hooks toneAmber
class node_dashboard_server,node_dashboard_ui,node_personal_memory,node_project_knowledge toneMint
class node_skill_authoring,node_bundle,node_evaluation toneRose
class node_supervisor,node_worktrees toneIndigo
```

## Components

### Entry and configuration

- [Comet CLI](https://github.com/rpamis/comet/blob/master/app/cli/index.ts): `app/cli/index.ts`
- [Project configuration](https://github.com/rpamis/comet/blob/master/domains/workflow-contract/project-config-reader.ts): `domains/workflow-contract/project-config-reader.ts`
- [Workflow selector](https://github.com/rpamis/comet/blob/master/domains/comet-entry/entry-runtime.ts): `domains/comet-entry/entry-runtime.ts`

### Task workflows

- [Native runtime](https://github.com/rpamis/comet/blob/master/domains/comet-native/native-loop-runtime.ts): `domains/comet-native/native-loop-runtime.ts`
- [Native task state](https://github.com/rpamis/comet/blob/master/domains/comet-native/native-types.ts): `domains/comet-native/native-types.ts`
- [Classic workflow](https://github.com/rpamis/comet/blob/master/domains/comet-classic/classic-runtime-run.ts): `domains/comet-classic/classic-runtime-run.ts`
- [Classic task state](https://github.com/rpamis/comet/blob/master/domains/comet-classic/classic-store.ts): `domains/comet-classic/classic-store.ts`
- [Workflow hook router](https://github.com/rpamis/comet/blob/master/domains/comet-entry/hook-router.ts): `domains/comet-entry/hook-router.ts`

### Visibility and context

- [Dashboard server](https://github.com/rpamis/comet/blob/master/domains/dashboard/server.ts): `domains/dashboard/server.ts`
- [Dashboard interface](https://github.com/rpamis/comet/blob/master/domains/dashboard/web/src/main.jsx): `domains/dashboard/web/src/main.jsx`
- [Personal Memory](https://github.com/rpamis/comet/blob/master/domains/comet-memory/personal-memory.ts): `domains/comet-memory/personal-memory.ts`
- [Project Knowledge](https://github.com/rpamis/comet/blob/master/domains/project-knowledge/query.ts): `domains/project-knowledge/query.ts`

### Skill lifecycle

- [Skill authoring](https://github.com/rpamis/comet/blob/master/domains/bundle/authoring.ts): `domains/bundle/authoring.ts`
- [Bundle packaging](https://github.com/rpamis/comet/blob/master/domains/bundle/bundle-platform.ts): `domains/bundle/bundle-platform.ts`
- [Skill evaluation](https://github.com/rpamis/comet/blob/master/domains/bundle/eval.ts): `domains/bundle/eval.ts`

### Parallel delivery

- [Supervisor Changes](https://github.com/rpamis/comet/blob/master/domains/comet-native/native-supervisor.ts): `domains/comet-native/native-supervisor.ts`
- [Isolated worktrees](https://github.com/rpamis/comet/blob/master/domains/comet-native/native-portable-storage.ts): `domains/comet-native/native-portable-storage.ts`

### Other components

- **Coding agent user**

## Connections

- Coding agent user → Comet CLI: invokes (evidence: `README.md`)
- Comet CLI → Workflow selector: starts workflow
- Workflow selector → Project configuration: reads config
- Workflow selector → Native runtime: selects Native (evidence: `README.md`)
- Workflow selector → Classic workflow: selects Classic (evidence: `README.md`)
- Native runtime → Native task state: persists task state (evidence: `README.md`)
- Classic workflow → Classic task state: persists task state
- Coding agent user → Workflow hook router: triggers hooks
- Workflow hook router → Project configuration: reads config (evidence: `domains/comet-entry/hook-router.ts`)
- Comet CLI → Dashboard server: starts Dashboard (evidence: `README.md`)
- Dashboard interface → Dashboard server: requests data (evidence: `README.md`)
- Comet CLI → Personal Memory: manages memory (evidence: `README.md`)
- Comet CLI → Project Knowledge: manages knowledge (evidence: `README.md`)
- Comet CLI → Skill authoring: authors Skills (evidence: `README.md`)
- Skill authoring → Bundle packaging: packages Skills (evidence: `README.md`)
- Comet CLI → Skill evaluation: runs evaluations (evidence: `README.md`)
- Native runtime → Supervisor Changes: coordinates Changes (evidence: `README.md`)
- Supervisor Changes → Isolated worktrees: creates worktrees (evidence: `README.md`)
