# mramazing-h/writeurrobo architecture

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

- Interactive diagram: https://gitdiagram.com/mramazing-h/writeurrobo
- Repository: https://github.com/mramazing-h/writeurrobo

## Overview

WriteUrRobo is a Python robotics-simulation product with two distinct writing demos: configurable DexMate contact writing and G1 + Inspire contact writing, plus a retained kinematic DexMate demo. The main user journey is text or a demo command → layout/reference and robot simulation → recorded contact or trajectory → evaluation and rendered output. The graph preserves those branches and the documented model-fetch and legacy capabilities. Some G1 and fetch internals were not sampled, so their documented relationships are cited to the README rather than inferred from unsampled code.

Main entry points: [`src/dexmate_writing/contact/cli.py`](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/cli.py) (Contact CLI), [`src/dexmate_writing/cli.py`](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/cli.py) (Legacy CLI), [`src/dexmate_writing/contact/fetch_station.py`](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/fetch_station.py) (Station Fetch), [`src/dexmate_writing/g1/fetch.py`](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/g1/fetch.py) (G1 Model Fetch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dexmate["DexMate Contact"]
  node_contact_cli["Contact CLI<br/>[cli.py]"]
  node_text_layout["ASCII Layout<br/>[text_layout.py]"]
  node_reference["Reference Planning<br/>[contact_writing.py]"]
  node_smoothing["Reference Smoothing"]
  node_rollout["Contact Rollout<br/>[contact_writing.py]"]
  node_contact_eval["Contact Evaluation"]
  node_contact_render["Contact Renderer<br/>[render_contact.py]"]
  node_station_fetch["Station Fetch<br/>[fetch_station.py]"]
end

subgraph group_g1["G1 Contact"]
  node_g1_fetch["G1 Model Fetch<br/>[fetch.py]"]
  node_g1_write["G1 Writing Run<br/>[write.py]"]
  node_g1_render["G1 Renderer<br/>[render.py]"]
end

subgraph group_legacy["Kinematic Demo"]
  node_legacy_cli["Legacy CLI<br/>[cli.py]"]
  node_legacy_write["Kinematic Writing<br/>[handwriting.py]"]
  node_legacy_validate["Trajectory Validation<br/>[validation.py]"]
end

subgraph group_shared["Shared Runtime"]
  node_model_contract["Model Contract<br/>[model_contract.py]"]
end

node_user(("User"))
node_model_service["Model Release"]

node_user -->|"submits text"| node_contact_cli
node_contact_cli -->|"lays out"| node_text_layout
node_contact_cli -->|"runs planning"| node_reference
node_contact_cli -->|"runs smoothing"| node_smoothing
node_contact_cli -->|"runs simulation"| node_rollout
node_contact_cli -->|"runs evaluation"| node_contact_eval
node_contact_cli -->|"runs rendering"| node_contact_render
node_user -->|"requests station"| node_station_fetch
node_station_fetch -.->|"fetches assets"| node_model_service
node_user -->|"requests model"| node_g1_fetch
node_g1_fetch -.->|"fetches assets"| node_model_service
node_user -->|"submits text"| node_g1_write
node_g1_write -->|"uses layout"| node_text_layout
node_user -->|"requests rendering"| node_g1_render
node_user -->|"selects demo"| node_legacy_cli
node_legacy_cli -->|"builds or solves"| node_legacy_write
node_legacy_cli -->|"validates trajectory"| node_legacy_validate
node_legacy_cli -->|"checks model"| node_model_contract
node_legacy_validate -->|"checks model"| node_model_contract

click node_contact_cli "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/cli.py"
click node_text_layout "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/text_layout.py"
click node_reference "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/contact_writing.py"
click node_smoothing "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/smooth_reference.py"
click node_rollout "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/contact_writing.py"
click node_contact_eval "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/evaluate_contact.py"
click node_contact_render "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/render_contact.py"
click node_station_fetch "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/fetch_station.py"
click node_g1_fetch "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/g1/fetch.py"
click node_g1_write "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/g1/write.py"
click node_g1_render "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/g1/render.py"
click node_legacy_cli "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/cli.py"
click node_legacy_write "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/handwriting.py"
click node_legacy_validate "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/validation.py"
click node_model_contract "https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/model_contract.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_contact_cli,node_text_layout,node_reference,node_smoothing,node_rollout,node_contact_eval,node_contact_render,node_station_fetch,node_user toneBlue
class node_g1_fetch,node_g1_write,node_g1_render toneAmber
class node_legacy_cli,node_legacy_write,node_legacy_validate toneMint
class node_model_contract toneRose
class node_model_service toneIndigo
```

## Components

### DexMate Contact

- [Contact CLI](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/cli.py): `src/dexmate_writing/contact/cli.py`
- [ASCII Layout](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/text_layout.py): `src/dexmate_writing/contact/text_layout.py`
- [Reference Planning](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/contact_writing.py): `src/dexmate_writing/contact/contact_writing.py`
- [Reference Smoothing](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/smooth_reference.py): `src/dexmate_writing/contact/smooth_reference.py`
- [Contact Rollout](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/contact_writing.py): `src/dexmate_writing/contact/contact_writing.py`
- [Contact Evaluation](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/evaluate_contact.py): `src/dexmate_writing/contact/evaluate_contact.py`
- [Contact Renderer](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/render_contact.py): `src/dexmate_writing/contact/render_contact.py`
- [Station Fetch](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/contact/fetch_station.py): `src/dexmate_writing/contact/fetch_station.py`

### G1 Contact

- [G1 Model Fetch](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/g1/fetch.py): `src/dexmate_writing/g1/fetch.py`
- [G1 Writing Run](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/g1/write.py): `src/dexmate_writing/g1/write.py`
- [G1 Renderer](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/g1/render.py): `src/dexmate_writing/g1/render.py`

### Kinematic Demo

- [Legacy CLI](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/cli.py): `src/dexmate_writing/cli.py`
- [Kinematic Writing](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/handwriting.py): `src/dexmate_writing/handwriting.py`
- [Trajectory Validation](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/validation.py): `src/dexmate_writing/validation.py`

### Shared Runtime

- [Model Contract](https://github.com/mramazing-h/writeurrobo/blob/main/src/dexmate_writing/model_contract.py): `src/dexmate_writing/model_contract.py`

### Other components

- **User**
- **Model Release**

## Connections

- User → Contact CLI: submits text (evidence: `README.md`)
- Contact CLI → ASCII Layout: lays out (evidence: `src/dexmate_writing/contact/cli.py`)
- Contact CLI → Reference Planning: runs planning (evidence: `src/dexmate_writing/contact/cli.py`)
- Contact CLI → Reference Smoothing: runs smoothing (evidence: `src/dexmate_writing/contact/cli.py`)
- Contact CLI → Contact Rollout: runs simulation (evidence: `src/dexmate_writing/contact/cli.py`)
- Contact CLI → Contact Evaluation: runs evaluation (evidence: `src/dexmate_writing/contact/cli.py`)
- Contact CLI → Contact Renderer: runs rendering (evidence: `src/dexmate_writing/contact/cli.py`)
- User → Station Fetch: requests station (evidence: `README.md`)
- Station Fetch → Model Release: fetches assets (evidence: `README.md`)
- User → G1 Model Fetch: requests model (evidence: `README.md`)
- G1 Model Fetch → Model Release: fetches assets (evidence: `README.md`)
- User → G1 Writing Run: submits text (evidence: `README.md`)
- G1 Writing Run → ASCII Layout: uses layout (evidence: `src/dexmate_writing/g1/write.py`)
- User → G1 Renderer: requests rendering (evidence: `README.md`)
- User → Legacy CLI: selects demo (evidence: `README.md`)
- Legacy CLI → Kinematic Writing: builds or solves (evidence: `src/dexmate_writing/cli.py`)
- Legacy CLI → Trajectory Validation: validates trajectory (evidence: `src/dexmate_writing/cli.py`)
- Legacy CLI → Model Contract: checks model (evidence: `src/dexmate_writing/cli.py`)
- Trajectory Validation → Model Contract: checks model (evidence: `src/dexmate_writing/validation.py`)
