# dotnetdork/labyrinth architecture

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

- Interactive diagram: https://gitdiagram.com/dotnetdork/labyrinth
- Repository: https://github.com/dotnetdork/labyrinth

## Overview

Labyrinth is a cross-platform host-hardening and incident-response runner. An operator invokes its plan, apply, keep, rollback, runs, or probe commands; the documented core supplies logging, run manifests, safety gates, and scoring-style probes. The README describes a Lock out → Observe → Deceive → Sustain strategy, but says no hardening modules exist yet, and the phase directories contain only placeholders. No source excerpts were provided, so internal call paths are not verified; dashed edges mark the documented-but-unsampled command-to-core relationships.

Main entry points: [`labyrinth.sh`](https://github.com/dotnetdork/labyrinth/blob/main/labyrinth.sh) (CLI commands), [`labyrinth.ps1`](https://github.com/dotnetdork/labyrinth/blob/main/labyrinth.ps1) (PowerShell CLI), [`core/log/log.sh`](https://github.com/dotnetdork/labyrinth/blob/main/core/log/log.sh) (Logging), [`core/manifest/manifest.sh`](https://github.com/dotnetdork/labyrinth/blob/main/core/manifest/manifest.sh) (Run manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Command interface"]
  node_cli["CLI commands<br/>[labyrinth.sh]"]
  node_powershell["PowerShell CLI<br/>[labyrinth.ps1]"]
end

subgraph group_core["Cross-platform core"]
  node_logging["Logging<br/>[log.sh]"]
  node_manifest["Run manifest<br/>[manifest.sh]"]
  node_safety["Safety gates<br/>[safety.sh]"]
  node_probes["Scoring probes<br/>[probe.sh]"]
  node_configuration["Configuration<br/>[config.sh]"]
end

node_operator(("Operator"))
node_host["Managed host"]

node_operator -->|"runs commands"| node_cli
node_operator -->|"runs commands"| node_powershell
node_cli -.->|"uses core"| node_logging
node_cli -.->|"uses core"| node_manifest
node_cli -.->|"uses core"| node_safety
node_cli -.->|"runs probes"| node_probes
node_powershell -.->|"uses core"| node_logging
node_powershell -.->|"uses core"| node_manifest
node_powershell -.->|"uses core"| node_safety
node_powershell -.->|"runs probes"| node_probes
node_cli -->|"deploys posture"| node_host
node_powershell -->|"deploys posture"| node_host

click node_cli "https://github.com/dotnetdork/labyrinth/blob/main/labyrinth.sh"
click node_powershell "https://github.com/dotnetdork/labyrinth/blob/main/labyrinth.ps1"
click node_logging "https://github.com/dotnetdork/labyrinth/blob/main/core/log/log.sh"
click node_manifest "https://github.com/dotnetdork/labyrinth/blob/main/core/manifest/manifest.sh"
click node_safety "https://github.com/dotnetdork/labyrinth/blob/main/core/safety/safety.sh"
click node_probes "https://github.com/dotnetdork/labyrinth/blob/main/core/probe/probe.sh"
click node_configuration "https://github.com/dotnetdork/labyrinth/blob/main/core/config/config.sh"

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_powershell toneBlue
class node_logging,node_manifest,node_safety,node_probes,node_configuration toneAmber
class node_operator,node_host toneIndigo
```

## Components

### Command interface

- [CLI commands](https://github.com/dotnetdork/labyrinth/blob/main/labyrinth.sh): `labyrinth.sh`
- [PowerShell CLI](https://github.com/dotnetdork/labyrinth/blob/main/labyrinth.ps1): `labyrinth.ps1`

### Cross-platform core

- [Logging](https://github.com/dotnetdork/labyrinth/blob/main/core/log/log.sh): `core/log/log.sh`
- [Run manifest](https://github.com/dotnetdork/labyrinth/blob/main/core/manifest/manifest.sh): `core/manifest/manifest.sh`
- [Safety gates](https://github.com/dotnetdork/labyrinth/blob/main/core/safety/safety.sh): `core/safety/safety.sh`
- [Scoring probes](https://github.com/dotnetdork/labyrinth/blob/main/core/probe/probe.sh): `core/probe/probe.sh`
- [Configuration](https://github.com/dotnetdork/labyrinth/blob/main/core/config/config.sh): `core/config/config.sh`

### Other components

- **Operator**
- **Managed host**

## Connections

- Operator → CLI commands: runs commands (evidence: `README.md`)
- Operator → PowerShell CLI: runs commands (evidence: `README.md`)
- CLI commands → Logging: uses core
- CLI commands → Run manifest: uses core
- CLI commands → Safety gates: uses core
- CLI commands → Scoring probes: runs probes
- PowerShell CLI → Logging: uses core
- PowerShell CLI → Run manifest: uses core
- PowerShell CLI → Safety gates: uses core
- PowerShell CLI → Scoring probes: runs probes
- CLI commands → Managed host: deploys posture (evidence: `README.md`)
- PowerShell CLI → Managed host: deploys posture (evidence: `README.md`)
