# ninja-ops-guy/adversarial-clothing-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/ninja-ops-guy/adversarial-clothing-pipeline
- Repository: https://github.com/ninja-ops-guy/adversarial-clothing-pipeline

## Overview

RAC is a research and production platform for designing adversarial textiles and testing whether digital results survive controlled physical trials. Its documented workflow moves from pattern exploration through surrogate screening, simulation and digital evaluation, fail-closed evidence gates, vendor-bound production, and matched physical testing; measured evidence can then inform certification. The browser platform is the operator control plane, with named jobs dispatched to a loopback-only runtime. README documentation supports the overall stages; sampled source confirms runtime dispatch and selected validation/binding behavior, but not every subsystem’s internal wiring.

Main entry points: [`tools/p1_production_release.py`](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/tools/p1_production_release.py) (Production Release), [`ruthless_pipeline/certification/physical.py`](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/physical.py) (Physical Analysis), [`ruthless_pipeline/certification/evidence.py`](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/evidence.py) (Evidence And Provenance), [`ruthless_pipeline/certification/p1_session_binding.py`](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/p1_session_binding.py) (P1 Session Binding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Operator Control"]
  node_console["Research Console<br/>[console.js]"]
  node_runtime["Local Runtime"]
end

subgraph group_research["Design And Research"]
  node_patternlab["Pattern Lab"]
  node_genome["Pattern Genome"]
  node_optimizer["Surrogate Optimizer"]
  node_deformation["Deformation And EOT<br/>[deformation.py]"]
  node_physics["Physics Simulation<br/>[physics.py]"]
  node_evaluators["Evaluator Adapters<br/>[evaluators.py]"]
  node_digital["Digital Evaluation"]
end

subgraph group_evidence["Certification And Evidence"]
  node_contracts["Frozen Contracts<br/>[contracts.py]"]
  node_governance["Promotion Gates"]
  node_certification["Certification"]
  node_evidence_store["Evidence And Provenance<br/>[evidence.py]"]
end

subgraph group_production["Production And Trials"]
  node_release["Production Release"]
  node_schedule["Frozen Trial Authority<br/>[authority.py]"]
  node_capture["Capture Lab<br/>[capture-lab.js]"]
  node_binding["P1 Session Binding"]
  node_physical_analysis["Physical Analysis<br/>[physical.py]"]
  node_manufacturing["Manufacturing Evidence<br/>[manufacturing.py]"]
end

node_operator(("Operator"))
node_vendor["Printful"]

node_operator -->|"operates"| node_console
node_console -->|"submits named jobs"| node_runtime
node_runtime -.->|"dispatches research"| node_patternlab
node_patternlab -->|"encodes patterns"| node_genome
node_genome -->|"supplies candidates"| node_optimizer
node_optimizer -->|"screens candidates"| node_deformation
node_deformation -->|"models deformation"| node_physics
node_physics -->|"renders simulations"| node_evaluators
node_evaluators -->|"evaluates outputs"| node_digital
node_digital -->|"checks claims against"| node_contracts
node_contracts -->|"constrains promotion"| node_governance
node_governance -->|"gates evidence"| node_certification
node_certification -->|"records evidence"| node_evidence_store
node_evidence_store -->|"supports release review"| node_release
node_release -->|"validates vendor inputs"| node_vendor
node_release -->|"prepares trial lineage"| node_schedule
node_operator -->|"records physical trials"| node_capture
node_schedule -->|"binds frozen trials"| node_binding
node_capture -->|"provides session data"| node_binding
node_binding -->|"validates trial scope"| node_physical_analysis
node_physical_analysis -->|"produces trial findings"| node_manufacturing
node_physical_analysis -->|"returns measured evidence"| node_evidence_store

click node_console "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/research_console/console.js"
click node_runtime "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/platform_runtime.py"
click node_patternlab "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/patterns"
click node_genome "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/pattern_genome"
click node_optimizer "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/optimization"
click node_deformation "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/deformation.py"
click node_physics "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/physics.py"
click node_evaluators "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/evaluators.py"
click node_digital "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/ctm"
click node_contracts "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/ctm/contracts.py"
click node_governance "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/governance"
click node_certification "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/certification"
click node_evidence_store "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/evidence.py"
click node_release "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/tools/p1_production_release.py"
click node_schedule "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/rac_prc/authority.py"
click node_capture "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/capture-lab.js"
click node_binding "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/p1_session_binding.py"
click node_physical_analysis "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/physical.py"
click node_manufacturing "https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/manufacturing.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_console,node_runtime toneBlue
class node_patternlab,node_genome,node_optimizer,node_deformation,node_physics,node_evaluators,node_digital toneAmber
class node_contracts,node_governance,node_certification,node_evidence_store toneMint
class node_release,node_schedule,node_capture,node_binding,node_physical_analysis,node_manufacturing toneRose
class node_operator,node_vendor toneIndigo
```

## Components

### Operator Control

- [Research Console](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/research_console/console.js): `research_console/console.js`
- [Local Runtime](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/platform_runtime.py): `ruthless_pipeline/platform_runtime.py`

### Design And Research

- [Pattern Lab](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/patterns): `ruthless_pipeline/patterns`
- [Pattern Genome](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/pattern_genome): `ruthless_pipeline/pattern_genome`
- [Surrogate Optimizer](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/optimization): `ruthless_pipeline/optimization`
- [Deformation And EOT](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/deformation.py): `ruthless_pipeline/deformation.py`
- [Physics Simulation](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/physics.py): `ruthless_pipeline/physics.py`
- [Evaluator Adapters](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/evaluators.py): `ruthless_pipeline/evaluators.py`
- [Digital Evaluation](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/ctm): `ruthless_pipeline/ctm`

### Certification And Evidence

- [Frozen Contracts](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/ctm/contracts.py): `ruthless_pipeline/ctm/contracts.py`
- [Promotion Gates](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/governance): `ruthless_pipeline/governance`
- [Certification](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/tree/main/ruthless_pipeline/certification): `ruthless_pipeline/certification`
- [Evidence And Provenance](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/evidence.py): `ruthless_pipeline/certification/evidence.py`

### Production And Trials

- [Production Release](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/tools/p1_production_release.py): `tools/p1_production_release.py`
- [Frozen Trial Authority](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/rac_prc/authority.py): `rac_prc/authority.py`
- [Capture Lab](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/capture-lab.js): `capture-lab.js`
- [P1 Session Binding](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/p1_session_binding.py): `ruthless_pipeline/certification/p1_session_binding.py`
- [Physical Analysis](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/physical.py): `ruthless_pipeline/certification/physical.py`
- [Manufacturing Evidence](https://github.com/ninja-ops-guy/adversarial-clothing-pipeline/blob/main/ruthless_pipeline/certification/manufacturing.py): `ruthless_pipeline/certification/manufacturing.py`

### Other components

- **Operator**
- **Printful**

## Connections

- Operator → Research Console: operates
- Research Console → Local Runtime: submits named jobs
- Local Runtime → Pattern Lab: dispatches research
- Pattern Lab → Pattern Genome: encodes patterns
- Pattern Genome → Surrogate Optimizer: supplies candidates
- Surrogate Optimizer → Deformation And EOT: screens candidates
- Deformation And EOT → Physics Simulation: models deformation
- Physics Simulation → Evaluator Adapters: renders simulations
- Evaluator Adapters → Digital Evaluation: evaluates outputs
- Digital Evaluation → Frozen Contracts: checks claims against
- Frozen Contracts → Promotion Gates: constrains promotion
- Promotion Gates → Certification: gates evidence
- Certification → Evidence And Provenance: records evidence
- Evidence And Provenance → Production Release: supports release review
- Production Release → Printful: validates vendor inputs
- Production Release → Frozen Trial Authority: prepares trial lineage
- Operator → Capture Lab: records physical trials
- Frozen Trial Authority → P1 Session Binding: binds frozen trials
- Capture Lab → P1 Session Binding: provides session data
- P1 Session Binding → Physical Analysis: validates trial scope
- Physical Analysis → Manufacturing Evidence: produces trial findings
- Physical Analysis → Evidence And Provenance: returns measured evidence
