# formalism-labs/classico architecture

> Architecture diagram of the GitHub repository formalism-labs/classico, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/formalism-labs/classico
- Repository: https://github.com/formalism-labs/classico

## Overview

##### Main Components Structure

a) Core Libraries Layer (Bottom):
- Paella (Python)
- Shibumi (Bash)
- Cetara (C/C++)
- Golani (Go)
- WD40 (Rust)
- Jasmine (JavaScript/TypeScript)
- Posh (PowerShell)
- Bento (Ruby)

b) Build Tools Layer (Middle):
- mk (GNU Make framework)
- cmake modules

c) Executable Scripts Layer (Top):
- bin/ (utility scripts)
- sbin/ (administrative scripts)

##### Component Relationships

- Dependency flows between components
- Script interaction patterns
- Platform-specific variations

##### Key Architectural Elements

a) Platform Abstraction:
- osnick (OS/platform identification)
- Architecture detection
- System capability detection

b) Automation Facilities:
- Build automation
- Testing frameworks
- Package management
- CI/CD integration

##### Specific Details

Annotations for:
- Cross-language interoperability
- Platform-specific behaviors
- Environment variable handling
- Script argument conventions

##### Integration Points

Highlight:
- CI/CD integration (.github/workflows)
- Container support (Dockerfile related components)
- Build system integration points

##### Build system flexibility

Key Relationships to Show:
- How scripts in bin/ utilize the various libraries
- How build tools (mk, cmake) interact with core libraries
- Platform detection and adaptation flow
- Cross-language communication patterns

- Component types
- Connection types
- Platform indicators
- Special symbols

Remember to indicate the extensibility points where new automation tools can be added and how they integrate with the existing infrastructure.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef core fill:#b3d9ff,stroke:#333,stroke-width:2px
    classDef build fill:#90EE90,stroke:#333,stroke-width:2px
    classDef exec fill:#FFB366,stroke:#333,stroke-width:2px
    classDef platform fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef cicd fill:#A9A9A9,stroke:#333,stroke-width:2px
    classDef docs fill:#F0E68C,stroke:#333,stroke-width:2px
    classDef tests fill:#20B2AA,stroke:#333,stroke-width:2px

    %% Platform Layer
    subgraph Platform
        PD["Platform Detection"]:::platform
        OD["OS Detection"]:::platform
        PT["Platform Tests"]:::platform
    end
    click PD "https://github.com/formalism-labs/classico/blob/master/mk/platform.defs"
    click OD "https://github.com/formalism-labs/classico/blob/master/mk/osnick.defs"
    click PT "https://github.com/formalism-labs/classico/tree/master/tests/platforms/"

    %% Core Libraries Layer
    subgraph CoreLibs
        Paella["Paella (Python)"]:::core
        Shibumi["Shibumi (Bash)"]:::core
        Cetara["Cetara (C/C++)"]:::core
        Golani["Golani (Go)"]:::core
        WD40["WD40 (Rust)"]:::core
        Posh["Posh (PowerShell)"]:::core
    end
    click Paella "https://github.com/formalism-labs/classico/tree/master/paella/"
    click Shibumi "https://github.com/formalism-labs/classico/tree/master/shibumi/"
    click Cetara "https://github.com/formalism-labs/classico/tree/master/cetara/"
    click Golani "https://github.com/formalism-labs/classico/tree/master/golani/"
    click WD40 "https://github.com/formalism-labs/classico/tree/master/wd40/"
    click Posh "https://github.com/formalism-labs/classico/tree/master/posh/"

    %% Build Tools Layer
    subgraph BuildTools
        MK["Make Framework"]:::build
        CMAKE["CMake Modules"]:::build
        MKRules["Make Rules"]:::build
        MKDefs["Make Definitions"]:::build
        CMakeCommon["CMake Common"]:::build
    end
    click MK "https://github.com/formalism-labs/classico/tree/master/mk/"
    click CMAKE "https://github.com/formalism-labs/classico/tree/master/cmake/"
    click MKRules "https://github.com/formalism-labs/classico/tree/master/mk/rules"
    click MKDefs "https://github.com/formalism-labs/classico/tree/master/mk/defs"
    click CMakeCommon "https://github.com/formalism-labs/classico/tree/master/cmake/common/"

    %% Executable Scripts Layer
    subgraph Scripts
        BIN["Utility Scripts"]:::exec
        SBIN["Administrative Scripts"]:::exec
    end
    click BIN "https://github.com/formalism-labs/classico/tree/master/bin/"
    click SBIN "https://github.com/formalism-labs/classico/tree/master/sbin/"

    %% CI/CD Layer
    subgraph CICD
        GHWorkflows["GitHub Workflows"]:::cicd
        DebianCI["Debian CI"]:::cicd
        LinuxCI["Linux CI"]:::cicd
        MacOSCI["MacOS CI"]:::cicd
    end
    click GHWorkflows "https://github.com/formalism-labs/classico/tree/master/.github/workflows/"
    click DebianCI "https://github.com/formalism-labs/classico/blob/master/.github/workflows/debian-compat.yml"
    click LinuxCI "https://github.com/formalism-labs/classico/blob/master/.github/workflows/linux-other.yml"
    click MacOSCI "https://github.com/formalism-labs/classico/blob/master/.github/workflows/macos.yml"

    %% Documentation Layer
    subgraph Docs
        LibDocs["Library Documentation"]:::docs
        CompDocs["Component Documentation"]:::docs
    end
    click LibDocs "https://github.com/formalism-labs/classico/tree/master/docs/"
    click CompDocs "https://github.com/formalism-labs/classico/tree/master/docs/"

    %% Testing Layer
    subgraph Testing
        TestDir["Test Directory"]:::tests
        MKTests["Make Tests"]:::tests
    end
    click TestDir "https://github.com/formalism-labs/classico/tree/master/tests/"
    click MKTests "https://github.com/formalism-labs/classico/tree/master/tests/mk/"

    %% Relationships
    Platform --> CoreLibs
    Platform --> BuildTools
    CoreLibs --> BuildTools
    BuildTools --> Scripts
    BuildTools --> CICD
    Scripts --> Testing
    CoreLibs --> Testing
    BuildTools --> Testing
    Platform --> Testing
    Docs --> CoreLibs
    Docs --> BuildTools
    Docs --> Scripts

    %% Legend
    subgraph Legend
        L1["Core Libraries"]:::core
        L2["Build Tools"]:::build
        L3["Executable Scripts"]:::exec
        L4["Platform Components"]:::platform
        L5["CI/CD"]:::cicd
        L6["Documentation"]:::docs
        L7["Testing"]:::tests
    end
```
