# prohibitedtv/nightgrid-afterhours architecture

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

- Interactive diagram: https://gitdiagram.com/prohibitedtv/nightgrid-afterhours
- Repository: https://github.com/prohibitedtv/nightgrid-afterhours

## Overview

NightGrid is a neon-noir open-world game, but the supplied tree contains its production tools rather than game-runtime source. The visible workflows create and review assets, music, and voice; other README-described gameplay systems cannot be mapped to implementation nodes from this evidence. Edges reflect sampled imports or explicit README statements, so they show tool dependencies, not a complete content pipeline.

Main entry points: [`tools/voice/chapter.py`](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/chapter.py) (Chapter planning), [`tools/voice/production.py`](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/production.py) (Dialogue production), [`tools/voice/qc.py`](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/qc.py) (Speech QC), [`tools/voice/studio.py`](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/studio.py) (Voice auditions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_asset["Asset refinement"]
  node_refine["Asset refinement<br/>[refine.py]"]
  node_review_queue["Review queue<br/>[review_queue.py]"]
  node_previews["Asset previews<br/>[previews.py]"]
  node_review_packet["Review packets<br/>[review_packet.py]"]
  node_verify_packet["Packet verification"]
  node_telemetry["Resource telemetry<br/>[telemetry.py]"]
end

subgraph group_audio["Audio production"]
  node_music_batch["Music batch"]
  node_music_intake["Music intake"]
  node_music_pcm["PCM utilities<br/>[music_pcm.py]"]
  node_music_ledger["Music review ledger"]
  node_gpu_guard["GPU guard<br/>[music_gpu_guard.py]"]
end

subgraph group_voice["Voice production"]
  node_voice_studio["Voice auditions<br/>[studio.py]"]
  node_voice_chapter["Chapter planning<br/>[chapter.py]"]
  node_voice_production["Dialogue production<br/>[production.py]"]
  node_voice_qc["Speech QC<br/>[qc.py]"]
end

subgraph group_content["Content authoring"]
  node_visual_batch["Visual batch<br/>[batch.py]"]
  node_visual_worker["Visual worker<br/>[worker.py]"]
  node_visual_prompts["Prompt catalog<br/>[prompts.py]"]
  node_vehicle_author["Vehicle authoring"]
  node_bezier_surface["Surface geometry<br/>[bezier_surface.py]"]
  node_body_surface["Body geometry"]
  node_wardrobe_author["Garment authoring<br/>[author.py]"]
  node_wardrobe_release["Wardrobe release<br/>[release.py]"]
end

node_creator(("Content creator"))

node_creator -.->|"submits jobs"| node_visual_batch
node_visual_worker -->|"uses batch logic"| node_visual_batch
node_visual_worker -->|"uses prompts"| node_visual_prompts
node_previews -->|"loads assets"| node_refine
node_previews -->|"scans candidates"| node_review_queue
node_review_queue -->|"uses refinement"| node_refine
node_verify_packet -->|"verifies packet"| node_review_packet
node_music_batch -->|"uses PCM tools"| node_music_pcm
node_music_batch -->|"checks GPU"| node_gpu_guard
node_music_intake -->|"uses PCM tools"| node_music_pcm
node_music_ledger -->|"validates candidates"| node_music_intake
node_gpu_guard -->|"uses telemetry"| node_telemetry
node_voice_chapter -->|"uses studio"| node_voice_studio
node_voice_chapter -->|"checks production"| node_voice_production
node_voice_chapter -->|"checks QC"| node_voice_qc
node_voice_production -->|"uses studio"| node_voice_studio
node_voice_production -->|"checks QC"| node_voice_qc
node_voice_qc -->|"uses studio"| node_voice_studio
node_vehicle_author -->|"tessellates surfaces"| node_bezier_surface
node_vehicle_author -->|"uses body geometry"| node_body_surface
node_wardrobe_release -->|"uses authoring"| node_wardrobe_author

click node_refine "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/refine.py"
click node_review_queue "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/review_queue.py"
click node_previews "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/previews.py"
click node_review_packet "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/review_packet.py"
click node_verify_packet "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/verify_review_packet.py"
click node_visual_batch "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/visual_studio/batch.py"
click node_visual_worker "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/visual_studio/worker.py"
click node_visual_prompts "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/visual_studio/prompts.py"
click node_music_batch "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/nightgrid_music_batch.py"
click node_music_intake "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/music_candidate_intake.py"
click node_music_pcm "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/music_pcm.py"
click node_music_ledger "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/music_review_ledger.py"
click node_gpu_guard "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/music_gpu_guard.py"
click node_telemetry "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/telemetry.py"
click node_voice_studio "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/studio.py"
click node_voice_chapter "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/chapter.py"
click node_voice_production "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/production.py"
click node_voice_qc "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/qc.py"
click node_vehicle_author "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/vehicles/author_vesper_v2_blender.py"
click node_bezier_surface "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/vehicles/bezier_surface.py"
click node_body_surface "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/vehicles/vehicle_body_surface.py"
click node_wardrobe_author "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/wardrobe/author.py"
click node_wardrobe_release "https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/wardrobe/release.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_refine,node_review_queue,node_previews,node_review_packet,node_verify_packet,node_telemetry toneBlue
class node_music_batch,node_music_intake,node_music_pcm,node_music_ledger,node_gpu_guard toneAmber
class node_voice_studio,node_voice_chapter,node_voice_production,node_voice_qc toneMint
class node_visual_batch,node_visual_worker,node_visual_prompts,node_vehicle_author,node_bezier_surface,node_body_surface,node_wardrobe_author,node_wardrobe_release toneRose
class node_creator toneIndigo
```

## Components

### Asset refinement

- [Asset refinement](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/refine.py): `tools/asset_refinement/refine.py`
- [Review queue](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/review_queue.py): `tools/asset_refinement/review_queue.py`
- [Asset previews](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/previews.py): `tools/asset_refinement/previews.py`
- [Review packets](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/review_packet.py): `tools/asset_refinement/review_packet.py`
- [Packet verification](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/verify_review_packet.py): `tools/asset_refinement/verify_review_packet.py`
- [Resource telemetry](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/asset_refinement/telemetry.py): `tools/asset_refinement/telemetry.py`

### Audio production

- [Music batch](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/nightgrid_music_batch.py): `tools/audio/nightgrid_music_batch.py`
- [Music intake](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/music_candidate_intake.py): `tools/audio/music_candidate_intake.py`
- [PCM utilities](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/music_pcm.py): `tools/audio/music_pcm.py`
- [Music review ledger](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/music_review_ledger.py): `tools/audio/music_review_ledger.py`
- [GPU guard](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/audio/music_gpu_guard.py): `tools/audio/music_gpu_guard.py`

### Voice production

- [Voice auditions](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/studio.py): `tools/voice/studio.py`
- [Chapter planning](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/chapter.py): `tools/voice/chapter.py`
- [Dialogue production](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/production.py): `tools/voice/production.py`
- [Speech QC](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/voice/qc.py): `tools/voice/qc.py`

### Content authoring

- [Visual batch](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/visual_studio/batch.py): `tools/visual_studio/batch.py`
- [Visual worker](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/visual_studio/worker.py): `tools/visual_studio/worker.py`
- [Prompt catalog](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/visual_studio/prompts.py): `tools/visual_studio/prompts.py`
- [Vehicle authoring](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/vehicles/author_vesper_v2_blender.py): `tools/vehicles/author_vesper_v2_blender.py`
- [Surface geometry](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/vehicles/bezier_surface.py): `tools/vehicles/bezier_surface.py`
- [Body geometry](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/vehicles/vehicle_body_surface.py): `tools/vehicles/vehicle_body_surface.py`
- [Garment authoring](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/wardrobe/author.py): `tools/wardrobe/author.py`
- [Wardrobe release](https://github.com/prohibitedtv/nightgrid-afterhours/blob/main/tools/wardrobe/release.py): `tools/wardrobe/release.py`

### Other components

- **Content creator**

## Connections

- Content creator → Visual batch: submits jobs
- Visual worker → Visual batch: uses batch logic (evidence: `tools/visual_studio/worker.py`)
- Visual worker → Prompt catalog: uses prompts (evidence: `tools/visual_studio/worker.py`)
- Asset previews → Asset refinement: loads assets (evidence: `tools/asset_refinement/previews.py`)
- Asset previews → Review queue: scans candidates (evidence: `tools/asset_refinement/previews.py`)
- Review queue → Asset refinement: uses refinement (evidence: `tools/asset_refinement/review_queue.py`)
- Packet verification → Review packets: verifies packet (evidence: `tools/asset_refinement/verify_review_packet.py`)
- Music batch → PCM utilities: uses PCM tools (evidence: `tools/audio/nightgrid_music_batch.py`)
- Music batch → GPU guard: checks GPU (evidence: `tools/audio/nightgrid_music_batch.py`)
- Music intake → PCM utilities: uses PCM tools (evidence: `tools/audio/music_candidate_intake.py`)
- Music review ledger → Music intake: validates candidates (evidence: `tools/audio/music_review_ledger.py`)
- GPU guard → Resource telemetry: uses telemetry (evidence: `tools/audio/music_gpu_guard.py`)
- Chapter planning → Voice auditions: uses studio (evidence: `tools/voice/chapter.py`)
- Chapter planning → Dialogue production: checks production (evidence: `tools/voice/chapter.py`)
- Chapter planning → Speech QC: checks QC (evidence: `tools/voice/chapter.py`)
- Dialogue production → Voice auditions: uses studio (evidence: `tools/voice/production.py`)
- Dialogue production → Speech QC: checks QC (evidence: `tools/voice/production.py`)
- Speech QC → Voice auditions: uses studio (evidence: `tools/voice/qc.py`)
- Vehicle authoring → Surface geometry: tessellates surfaces (evidence: `tools/vehicles/author_vesper_v2_blender.py`)
- Vehicle authoring → Body geometry: uses body geometry (evidence: `tools/vehicles/author_vesper_v2_blender.py`)
- Wardrobe release → Garment authoring: uses authoring (evidence: `tools/wardrobe/release.py`)
