# cmontella/purrtran architecture

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

- Interactive diagram: https://gitdiagram.com/cmontella/purrtran
- Repository: https://github.com/cmontella/purrtran

## Overview

PURRTRAN is documented as both a modernized FORTRAN-like language and a terminal-based coding environment featuring Hex, its cat-themed assistant. The documented user workflow is to write and run programs in the REPL, care for Hex through commands, and receive coding suggestions and lint feedback. The README also describes arena-style variable allocation and overflow behavior. The tree contains no implementation files, so component paths are null and the graph reflects documented behavior only; relationships cite the README.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_language["Language runtime"]
  node_repl["PURRTRAN REPL"]
  node_program["Program execution"]
end

subgraph group_hex["Hex assistant"]
  node_hex["Hex assistant"]
  node_care["Care commands"]
  node_needs[("Hex needs")]
  node_fic["Feline Inference Core"]
end

subgraph group_memory["Memory management"]
  node_litterbox[("Litterbox arena")]
  node_source["Source buffer"]
end

subgraph group_analysis["Code analysis"]
  node_linter["Built-in linter"]
  node_suggestions["Lint feedback"]
end

node_user(("Programmer"))

node_user -->|"writes and runs"| node_repl
node_repl -->|"runs programs"| node_program
node_user -->|"enters commands"| node_care
node_care -->|"changes needs"| node_needs
node_hex -->|"tracks needs"| node_needs
node_hex -->|"uses model"| node_fic
node_hex -->|"inserts suggestions"| node_source
node_program -->|"allocates variables"| node_litterbox
node_litterbox -->|"overflows into"| node_source
node_repl -->|"runs on save"| node_linter
node_linter -->|"provides feedback"| node_suggestions
node_suggestions -->|"shows warnings"| node_user

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_repl,node_program toneBlue
class node_hex,node_care,node_needs,node_fic toneAmber
class node_litterbox,node_source toneMint
class node_linter,node_suggestions toneRose
class node_user toneIndigo
```

## Components

### Language runtime

- **PURRTRAN REPL**
- **Program execution**

### Hex assistant

- **Hex assistant**
- **Care commands**
- **Hex needs**
- **Feline Inference Core**

### Memory management

- **Litterbox arena**
- **Source buffer**

### Code analysis

- **Built-in linter**
- **Lint feedback**

### Other components

- **Programmer**

## Connections

- Programmer → PURRTRAN REPL: writes and runs (evidence: `README.md`)
- PURRTRAN REPL → Program execution: runs programs (evidence: `README.md`)
- Programmer → Care commands: enters commands (evidence: `README.md`)
- Care commands → Hex needs: changes needs (evidence: `README.md`)
- Hex assistant → Hex needs: tracks needs (evidence: `README.md`)
- Hex assistant → Feline Inference Core: uses model (evidence: `README.md`)
- Hex assistant → Source buffer: inserts suggestions (evidence: `README.md`)
- Program execution → Litterbox arena: allocates variables (evidence: `README.md`)
- Litterbox arena → Source buffer: overflows into (evidence: `README.md`)
- PURRTRAN REPL → Built-in linter: runs on save (evidence: `README.md`)
- Built-in linter → Lint feedback: provides feedback (evidence: `README.md`)
- Lint feedback → Programmer: shows warnings (evidence: `README.md`)
