# phoe/portable-condition-system architecture

> Architecture diagram of the GitHub repository phoe/portable-condition-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/phoe/portable-condition-system
- Repository: https://github.com/phoe/portable-condition-system

## Overview

##### Main Components Identification

a. Core Condition System Components:
- Condition Hierarchy
- Signal Handling
- Restart System
- Debugger Interface
- Integration Layer

##### Specific Component Relationships to Highlight

a. Integration Flow:
**Host CL System <-> Integration Layer <-> Portable Condition System**

b. Core Component Interactions:
**Condition Hierarchy -> Signal Handling -> Handlers -> Restarts -> Debugger**

##### Implementation Details to Note

- Inheritance relationships
- Runtime dependencies
- Integration points
- Test coverage paths

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef core fill:#b3d1ff,stroke:#333,stroke-width:2px
    classDef integration fill:#90EE90,stroke:#333,stroke-width:2px
    classDef support fill:#FFE5B4,stroke:#333,stroke-width:2px
    classDef test fill:#FFB6C1,stroke:#333,stroke-width:2px
    
    subgraph Integration
        HostCL["Host Common Lisp System"]
        IntLayer["Integration Layer"]:::integration
        PackSys["Package System"]:::integration
    end

    subgraph Core["Core Components"]
        CondHier["Condition Hierarchy"]:::core
        SigHandle["Signal Handling System"]:::core
        RestartSys["Restart System"]:::core
        HandlerSys["Handler System"]:::core
    end

    subgraph Support["Supporting Components"]
        CoerceSys["Coercion System"]:::support
        AssertSys["Assertion System"]:::support
        DebugInt["Debugger Interface"]:::support
    end

    subgraph Testing["Testing Framework"]
        ANSITest["ANSI Test Suite"]:::test
        IntTests["Integration Tests"]:::test
        DebugTest["Debugger Tests"]:::test
    end

    %% Relationships
    HostCL <--> IntLayer
    IntLayer --> PackSys
    PackSys --> CondHier
    
    CondHier --> SigHandle
    SigHandle --> HandlerSys
    HandlerSys --> RestartSys
    RestartSys --> DebugInt
    
    CoerceSys --> CondHier
    AssertSys --> SigHandle
    
    ANSITest --> IntLayer
    IntTests --> IntLayer
    DebugTest --> DebugInt

    %% Click events
    click CondHier "https://github.com/phoe/portable-condition-system/blob/master/src/condition-hierarchy.lisp"
    click SigHandle "https://github.com/phoe/portable-condition-system/blob/master/src/signaling.lisp"
    click RestartSys "https://github.com/phoe/portable-condition-system/blob/master/src/restarts.lisp"
    click HandlerSys "https://github.com/phoe/portable-condition-system/blob/master/src/handlers.lisp"
    click DebugInt "https://github.com/phoe/portable-condition-system/blob/master/src/debugger.lisp"
    click IntLayer "https://github.com/phoe/portable-condition-system/blob/master/integration/integration.lisp"
    click CoerceSys "https://github.com/phoe/portable-condition-system/blob/master/src/coerce-to-condition.lisp"
    click AssertSys "https://github.com/phoe/portable-condition-system/blob/master/src/assertions.lisp"
    click PackSys "https://github.com/phoe/portable-condition-system/blob/master/src/package.lisp"
    click ANSITest "https://github.com/phoe/portable-condition-system/tree/master/t/ansi-test/"
    click IntTests "https://github.com/phoe/portable-condition-system/blob/master/integration/test.lisp"
    click DebugTest "https://github.com/phoe/portable-condition-system/blob/master/t/debugger.lisp"

    %% Legend
    subgraph Legend
        CoreComp["Core Component"]:::core
        IntComp["Integration Component"]:::integration
        SuppComp["Support Component"]:::support
        TestComp["Test Component"]:::test
    end
```
