# controlcore-project/concore architecture

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

- Interactive diagram: https://gitdiagram.com/controlcore-project/concore
- Repository: https://github.com/controlcore-project/concore

## Overview

CONTROL-CORE is a closed-loop neuromodulation study environment built around concore, a language-spanning protocol for exchanging data between simulation nodes. The main workflow is to create or edit a study, validate and build its workflow, then run its nodes, which communicate through file-based sharing; distributed studies can use the Mediator’s REST APIs. The CLI also supports setup and readiness checks, inspection, and runtime monitoring and stopping. The graph reflects documented capabilities and indexed imports; unsampled implementation details and uncertain runtime wiring are omitted.

Main entry points: [`concore_cli/cli.py`](https://github.com/controlcore-project/concore/blob/main/concore_cli/cli.py) (CLI entry), [`concore_cli/commands/editor.py`](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/editor.py) (Visual editor), [`concore_cli/commands/build.py`](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/build.py) (Workflow build), [`concore.py`](https://github.com/controlcore-project/concore/blob/main/concore.py) (Python protocol)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Study workflow"]
  node_editor["Visual editor<br/>[editor.py]"]
  node_cli["CLI entry<br/>[cli.py]"]
  node_init["Project creation<br/>[init.py]"]
  node_validate["Workflow validation<br/>[validate.py]"]
  node_build["Workflow build<br/>[build.py]"]
  node_metadata["Study metadata<br/>[metadata.py]"]
end

subgraph group_runtime["Concore runtime"]
  node_study["Study nodes"]
  node_python["Python protocol<br/>[concore.py]"]
  node_runtimebase["Shared runtime base<br/>[concore_base.py]"]
  node_cpp["C++ protocol<br/>[concore.hpp]"]
  node_java["Java protocol<br/>[concore.java]"]
  node_sharedfiles[("Shared study files")]
  node_mediator["Mediator service"]
end

subgraph group_operations["Run operations"]
  node_doctor["Readiness checks<br/>[doctor.py]"]
  node_setup["Tool setup<br/>[setup.py]"]
  node_inspect["Study inspection<br/>[inspect.py]"]
  node_status["Process status<br/>[status.py]"]
  node_watch["Live monitoring<br/>[watch.py]"]
  node_stop["Stop processes<br/>[stop.py]"]
end

subgraph group_examples["Study examples"]
  node_cardiac["Cardiac model"]
  node_controller["Example controller"]
end

node_user(("Study author"))

node_user -->|"runs commands"| node_cli
node_user -->|"designs study"| node_editor
node_cli -->|"dispatches"| node_init
node_cli -->|"dispatches"| node_validate
node_cli -->|"dispatches"| node_build
node_cli -->|"uses metadata"| node_metadata
node_build -->|"uses metadata"| node_metadata
node_cli -->|"dispatches"| node_doctor
node_cli -->|"dispatches"| node_setup
node_cli -->|"dispatches"| node_inspect
node_cli -->|"dispatches"| node_status
node_cli -->|"dispatches"| node_watch
node_cli -->|"dispatches"| node_stop
node_editor -->|"designs"| node_study
node_study -->|"uses protocol"| node_python
node_study -->|"uses protocol"| node_cpp
node_study -->|"uses protocol"| node_java
node_python -->|"delegates"| node_runtimebase
node_study -->|"shares data"| node_sharedfiles
node_mediator -.->|"connects distributed parts"| node_sharedfiles
node_cli -.->|"runs study code"| node_cardiac
node_cli -.->|"runs study code"| node_controller

click node_editor "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/editor.py"
click node_cli "https://github.com/controlcore-project/concore/blob/main/concore_cli/cli.py"
click node_init "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/init.py"
click node_validate "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/validate.py"
click node_build "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/build.py"
click node_metadata "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/metadata.py"
click node_python "https://github.com/controlcore-project/concore/blob/main/concore.py"
click node_runtimebase "https://github.com/controlcore-project/concore/blob/main/concore_base.py"
click node_cpp "https://github.com/controlcore-project/concore/blob/main/concore.hpp"
click node_java "https://github.com/controlcore-project/concore/blob/main/concore.java"
click node_doctor "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/doctor.py"
click node_setup "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/setup.py"
click node_inspect "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/inspect.py"
click node_status "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/status.py"
click node_watch "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/watch.py"
click node_stop "https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/stop.py"
click node_cardiac "https://github.com/controlcore-project/concore/blob/main/tools/cardiac_pm.dir/pulsatile_model_functions.py"
click node_controller "https://github.com/controlcore-project/concore/blob/main/humanc/dummy_controller.py"

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_editor,node_cli,node_init,node_validate,node_build,node_metadata toneBlue
class node_study,node_python,node_runtimebase,node_cpp,node_java,node_sharedfiles,node_mediator toneAmber
class node_doctor,node_setup,node_inspect,node_status,node_watch,node_stop toneMint
class node_cardiac,node_controller toneRose
class node_user toneIndigo
```

## Components

### Study workflow

- [Visual editor](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/editor.py): `concore_cli/commands/editor.py`
- [CLI entry](https://github.com/controlcore-project/concore/blob/main/concore_cli/cli.py): `concore_cli/cli.py`
- [Project creation](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/init.py): `concore_cli/commands/init.py`
- [Workflow validation](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/validate.py): `concore_cli/commands/validate.py`
- [Workflow build](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/build.py): `concore_cli/commands/build.py`
- [Study metadata](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/metadata.py): `concore_cli/commands/metadata.py`

### Concore runtime

- **Study nodes**
- [Python protocol](https://github.com/controlcore-project/concore/blob/main/concore.py): `concore.py`
- [Shared runtime base](https://github.com/controlcore-project/concore/blob/main/concore_base.py): `concore_base.py`
- [C++ protocol](https://github.com/controlcore-project/concore/blob/main/concore.hpp): `concore.hpp`
- [Java protocol](https://github.com/controlcore-project/concore/blob/main/concore.java): `concore.java`
- **Shared study files**
- **Mediator service**

### Run operations

- [Readiness checks](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/doctor.py): `concore_cli/commands/doctor.py`
- [Tool setup](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/setup.py): `concore_cli/commands/setup.py`
- [Study inspection](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/inspect.py): `concore_cli/commands/inspect.py`
- [Process status](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/status.py): `concore_cli/commands/status.py`
- [Live monitoring](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/watch.py): `concore_cli/commands/watch.py`
- [Stop processes](https://github.com/controlcore-project/concore/blob/main/concore_cli/commands/stop.py): `concore_cli/commands/stop.py`

### Study examples

- [Cardiac model](https://github.com/controlcore-project/concore/blob/main/tools/cardiac_pm.dir/pulsatile_model_functions.py): `tools/cardiac_pm.dir/pulsatile_model_functions.py`
- [Example controller](https://github.com/controlcore-project/concore/blob/main/humanc/dummy_controller.py): `humanc/dummy_controller.py`

### Other components

- **Study author**

## Connections

- Study author → CLI entry: runs commands (evidence: `README.md`)
- Study author → Visual editor: designs study (evidence: `README.md`)
- CLI entry → Project creation: dispatches (evidence: `concore_cli/cli.py`)
- CLI entry → Workflow validation: dispatches (evidence: `concore_cli/cli.py`)
- CLI entry → Workflow build: dispatches (evidence: `concore_cli/cli.py`)
- CLI entry → Study metadata: uses metadata
- Workflow build → Study metadata: uses metadata (evidence: `concore_cli/commands/build.py`)
- CLI entry → Readiness checks: dispatches (evidence: `concore_cli/cli.py`)
- CLI entry → Tool setup: dispatches (evidence: `concore_cli/cli.py`)
- CLI entry → Study inspection: dispatches (evidence: `concore_cli/cli.py`)
- CLI entry → Process status: dispatches (evidence: `concore_cli/cli.py`)
- CLI entry → Live monitoring: dispatches (evidence: `concore_cli/cli.py`)
- CLI entry → Stop processes: dispatches (evidence: `concore_cli/cli.py`)
- Visual editor → Study nodes: designs (evidence: `README.md`)
- Study nodes → Python protocol: uses protocol (evidence: `README.md`)
- Study nodes → C++ protocol: uses protocol (evidence: `README.md`)
- Study nodes → Java protocol: uses protocol (evidence: `README.md`)
- Python protocol → Shared runtime base: delegates (evidence: `concore.py`)
- Study nodes → Shared study files: shares data (evidence: `README.md`)
- Mediator service → Shared study files: connects distributed parts (evidence: `README.md`)
- CLI entry → Cardiac model: runs study code
- CLI entry → Example controller: runs study code
