# joeydd032995-pixel/ctmnuum architecture

> Architecture diagram of the GitHub repository joeydd032995-pixel/ctmnuum, 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/joeydd032995-pixel/ctmnuum
- Repository: https://github.com/joeydd032995-pixel/ctmnuum

## Overview

Continuum is a persistent autonomous reasoning environment, but the repository is explicitly in its foundation phase: most application and service directories are placeholders. The concrete runtime workflow shown here validates a request, builds activity context, applies Temporal execution policies, and returns a result containing an artifact reference. The repository also includes an implementation-governance command-line tool and a derived PostgreSQL schema. README-listed API/UI, artifact-storage, telemetry, and deployment capabilities are targets, not sampled implementations; their links and runtime wiring are therefore not inferred.

Main entry points: [`services/orchestrator/temporal/runtime.py`](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/runtime.py) (Workflow runtime), [`services/orchestrator/temporal/workflows.py`](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/workflows.py) (Request and history rules), [`services/orchestrator/temporal/activities.py`](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/activities.py) (Foundation activity), [`services/orchestrator/temporal/policies.py`](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/policies.py) (Execution policies)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Temporal workflow"]
  node_runtime["Workflow runtime<br/>[runtime.py]"]
  node_workflow_rules["Request and history rules<br/>[workflows.py]"]
  node_policies["Execution policies<br/>[policies.py]"]
  node_contracts["Workflow contracts<br/>[contracts.py]"]
  node_activity["Foundation activity<br/>[activities.py]"]
  node_worker["Worker deployment<br/>[worker.py]"]
end

subgraph group_foundation["Foundation capabilities"]
  node_postgres_schema[("PostgreSQL schema")]
  node_db_bootstrap["Database bootstrap<br/>[bootstrap.sql]"]
  node_web_shell["Web control-plane shell"]
  node_cli_shell["CLI shell"]
end

subgraph group_governance["Implementation governance"]
  node_control_plane["Governance state and checks<br/>[control_plane.py]"]
  node_governance_policy["Governance policy"]
end

node_user(("Workflow caller"))
node_temporal["Temporal platform"]

node_user -.->|"submits request"| node_runtime
node_runtime -->|"validates request"| node_workflow_rules
node_runtime -->|"builds context"| node_activity
node_runtime -->|"executes activity"| node_activity
node_runtime -->|"applies policy"| node_policies
node_runtime -->|"uses request types"| node_contracts
node_activity -->|"uses result types"| node_contracts
node_workflow_rules -->|"validates request type"| node_contracts
node_workflow_rules -->|"reads continuation limits"| node_policies
node_worker -->|"uses queues and versioning"| node_policies
node_runtime -->|"registers and dispatches"| node_temporal
node_db_bootstrap -.->|"bootstraps database"| node_postgres_schema
node_governance_policy -->|"uses core state checks"| node_control_plane

click node_runtime "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/runtime.py"
click node_workflow_rules "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/workflows.py"
click node_policies "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/policies.py"
click node_contracts "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/contracts.py"
click node_activity "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/activities.py"
click node_worker "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/worker.py"
click node_postgres_schema "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/docs/spec/continuum_v1.2_core_schema.derived.sql"
click node_db_bootstrap "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/packages/continuum_db/sql/bootstrap.sql"
click node_web_shell "https://github.com/joeydd032995-pixel/ctmnuum/tree/main/apps/web"
click node_cli_shell "https://github.com/joeydd032995-pixel/ctmnuum/tree/main/apps/cli"
click node_control_plane "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/scripts/control_plane.py"
click node_governance_policy "https://github.com/joeydd032995-pixel/ctmnuum/blob/main/scripts/control_plane_policy.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_runtime,node_workflow_rules,node_policies,node_contracts,node_activity,node_worker toneBlue
class node_postgres_schema,node_db_bootstrap,node_web_shell,node_cli_shell toneAmber
class node_control_plane,node_governance_policy toneMint
class node_user,node_temporal toneIndigo
```

## Components

### Temporal workflow

- [Workflow runtime](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/runtime.py): `services/orchestrator/temporal/runtime.py`
- [Request and history rules](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/workflows.py): `services/orchestrator/temporal/workflows.py`
- [Execution policies](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/policies.py): `services/orchestrator/temporal/policies.py`
- [Workflow contracts](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/contracts.py): `services/orchestrator/temporal/contracts.py`
- [Foundation activity](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/activities.py): `services/orchestrator/temporal/activities.py`
- [Worker deployment](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/services/orchestrator/temporal/worker.py): `services/orchestrator/temporal/worker.py`

### Foundation capabilities

- [PostgreSQL schema](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/docs/spec/continuum_v1.2_core_schema.derived.sql): `docs/spec/continuum_v1.2_core_schema.derived.sql`
- [Database bootstrap](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/packages/continuum_db/sql/bootstrap.sql): `packages/continuum_db/sql/bootstrap.sql`
- [Web control-plane shell](https://github.com/joeydd032995-pixel/ctmnuum/tree/main/apps/web): `apps/web`
- [CLI shell](https://github.com/joeydd032995-pixel/ctmnuum/tree/main/apps/cli): `apps/cli`

### Implementation governance

- [Governance state and checks](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/scripts/control_plane.py): `scripts/control_plane.py`
- [Governance policy](https://github.com/joeydd032995-pixel/ctmnuum/blob/main/scripts/control_plane_policy.py): `scripts/control_plane_policy.py`

### Other components

- **Workflow caller**
- **Temporal platform**

## Connections

- Workflow caller → Workflow runtime: submits request
- Workflow runtime → Request and history rules: validates request (evidence: `services/orchestrator/temporal/runtime.py`)
- Workflow runtime → Foundation activity: builds context (evidence: `services/orchestrator/temporal/runtime.py`)
- Workflow runtime → Foundation activity: executes activity (evidence: `services/orchestrator/temporal/runtime.py`)
- Workflow runtime → Execution policies: applies policy (evidence: `services/orchestrator/temporal/runtime.py`)
- Workflow runtime → Workflow contracts: uses request types (evidence: `services/orchestrator/temporal/runtime.py`)
- Foundation activity → Workflow contracts: uses result types (evidence: `services/orchestrator/temporal/activities.py`)
- Request and history rules → Workflow contracts: validates request type (evidence: `services/orchestrator/temporal/workflows.py`)
- Request and history rules → Execution policies: reads continuation limits (evidence: `services/orchestrator/temporal/workflows.py`)
- Worker deployment → Execution policies: uses queues and versioning (evidence: `services/orchestrator/temporal/worker.py`)
- Workflow runtime → Temporal platform: registers and dispatches (evidence: `services/orchestrator/temporal/runtime.py`)
- Database bootstrap → PostgreSQL schema: bootstraps database
- Governance policy → Governance state and checks: uses core state checks (evidence: `scripts/control_plane_policy.py`)
