# usgpo/uslm architecture

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

- Interactive diagram: https://gitdiagram.com/usgpo/uslm
- Repository: https://github.com/usgpo/uslm

## Overview

##### Project Type and Purpose
- This is an open-source specification repository (“USLM Schema”) providing XML Schema Definition files (XSDs), CSS, documentation (PDF/Markdown), and sample XML bills.
- Its primary purpose is to define and version the United States Legislative Markup (USLM) schema, provide guides and samples, and manage proposed changes via Git branches.

##### File-Structure Analysis
- Top-level directories/files:
- Schema artifacts (uslm-*.xsd, mathml3-*.xsd, xhtml-*.xsd, xml.xsd, dc.xsd, etc.)
- Stylesheet (uslm.css, uslm-debug.css)
- Documentation (README.md, CHANGELOG.md, USLM-User-Guide.*, USLM-2_0* Review Guides, LICENSE.md, CONTRIBUTING.md)
- Sample data (bill-version-samples-september-2024/, previous/)
- Governance files (.gitignore, CODEOWNERS)
- No runtime code—this is a content/artifact repository.
- Branch strategy implied: main branch holds approved schema versions; proposed branch holds drafts.

##### README Insights
- Confirms schema versioning scheme (major.minor.point)
- Directs consumers to guides and samples
- Describes governance: how changes move from proposed → main → published on GovInfo

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% GitHub Repository and Branches
    subgraph "GitHub Repository" 
        direction TB
        Proposed["Proposed Branch"]:::blue
        Main["Main Branch"]:::blue
        subgraph "Governance Files"
            direction TB
            CODEOWNERS["CODEOWNERS"]:::blue
            CONTRIBUTING["CONTRIBUTING.md"]:::blue
            CHANGELOG["CHANGELOG.md"]:::blue
            README["README.md"]:::blue
            LICENSE["LICENSE.md"]:::blue
            GITIGNORE[".gitignore"]:::blue
            GITATTR[".gitattributes"]:::blue
        end
    end

    %% Branch Workflow
    Proposed -->|"Pull Request & Review"| Main

    %% Artifacts under Main Branch
    subgraph "Artifacts (Main)" 
        direction TB
        subgraph "Schema Modules"
            direction TB
            USLMCore["uslm-2.1.0.xsd"]:::green
            USLMComp["uslm-components-2.1.0.xsd"]:::green
            USLMTable["uslm-table-module-2.1.0.xsd"]:::green
            USLMMeta["uslm-meta-senate.xsd"]:::green
            USLMHistory["uslm-2.0.0.xsd … uslm-2.0.17.xsd"]:::green
            TableGeneric["uslm-table-module.xsd"]:::green
            subgraph "MathML Schemas"
                direction TB
                MCommon["mathml3-common.xsd"]:::green
                MContent["mathml3-content.xsd"]:::green
                MPres["mathml3-presentation.xsd"]:::green
                MStrict["mathml3-strict-content.xsd"]:::green
                MAgg["mathml3.xsd"]:::green
            end
            subgraph "XHTML Schemas"
                direction TB
                XHTMLBase["xhtml-1.0.xsd"]:::green
                XHTMLData["xhtml-datatypes-1.xsd"]:::green
            end
            subgraph "Dublin Core Schemas"
                direction TB
                DCTerms["dcterms.xsd"]:::green
                DCType["dcmitype.xsd"]:::green
                DCCore["dc.xsd"]:::green
            end
            XMLSchema["xml.xsd"]:::green
        end
        subgraph "Stylesheets"
            direction TB
            CSSProd["uslm.css"]:::green
            CSSDebug["uslm-debug.css"]:::green
        end
        subgraph "Documentation"
            direction TB
            UGMD["USLM-User-Guide.md"]:::green
            UGPDF["USLM-User-Guide.pdf"]:::green
            Rev20_17["USLM-2_0-Review-Guide-2_0_17.md/pdf"]:::green
            Rev20_12["USLM-2_0-Review-Guide-v2_0_12.md/pdf"]:::green
            Rev21["USLM-2_1-ReviewGuide.md/pdf"]:::green
        end
        subgraph "Samples"
            direction TB
            CurrentSamples["bill-version-samples-september-2024/"]:::green
            Archive["previous/"]:::green
        end
    end

    %% Publishing Pipeline
    Main -->|"On Merge"| Pipeline["Publishing Pipeline"]:::blue
    Pipeline -->|"Publishes to"| GovInfo["GovInfo Publication"]:::orange

    %% Consumers
    subgraph "Consumers & External" 
        direction TB
        GPO["GPO"]:::orange
        XMLWG["XML Working Group"]:::orange
        Devs["Developers/Publishers"]:::orange
    end

    %% Relationships from Artifacts to Consumers
    Artifacts -->|Validates & Styles| Devs
    Artifacts -->|Reviews Drafts| XMLWG
    GovInfo -->|Provides Final Artifacts| GPO

    %% Click Events for Governance
    click CODEOWNERS "https://github.com/usgpo/uslm/tree/main/CODEOWNERS"
    click CONTRIBUTING "https://github.com/usgpo/uslm/blob/main/CONTRIBUTING.md"
    click CHANGELOG "https://github.com/usgpo/uslm/blob/main/CHANGELOG.md"
    click README "https://github.com/usgpo/uslm/blob/main/README.md"
    click LICENSE "https://github.com/usgpo/uslm/blob/main/LICENSE.md"
    click GITIGNORE "https://github.com/usgpo/uslm/blob/main/.gitignore"
    click GITATTR "https://github.com/usgpo/uslm/blob/main/.gitattributes"

    %% Click Events for Core Schema Modules
    click USLMCore "https://github.com/usgpo/uslm/blob/main/uslm-2.1.0.xsd"
    click USLMComp "https://github.com/usgpo/uslm/blob/main/uslm-components-2.1.0.xsd"
    click USLMTable "https://github.com/usgpo/uslm/blob/main/uslm-table-module-2.1.0.xsd"
    click USLMMeta "https://github.com/usgpo/uslm/blob/main/uslm-meta-senate.xsd"
    click USLMHistory "https://github.com/usgpo/uslm/blob/main/uslm-2.0.0.xsd"
    click TableGeneric "https://github.com/usgpo/uslm/blob/main/uslm-table-module.xsd"
    click MCommon "https://github.com/usgpo/uslm/blob/main/mathml3-common.xsd"
    click MContent "https://github.com/usgpo/uslm/blob/main/mathml3-content.xsd"
    click MPres "https://github.com/usgpo/uslm/blob/main/mathml3-presentation.xsd"
    click MStrict "https://github.com/usgpo/uslm/blob/main/mathml3-strict-content.xsd"
    click MAgg "https://github.com/usgpo/uslm/blob/main/mathml3.xsd"
    click XHTMLBase "https://github.com/usgpo/uslm/blob/main/xhtml-1.0.xsd"
    click XHTMLData "https://github.com/usgpo/uslm/blob/main/xhtml-datatypes-1.xsd"
    click DCTerms "https://github.com/usgpo/uslm/blob/main/dcterms.xsd"
    click DCType "https://github.com/usgpo/uslm/blob/main/dcmitype.xsd"
    click DCCore "https://github.com/usgpo/uslm/blob/main/dc.xsd"
    click XMLSchema "https://github.com/usgpo/uslm/blob/main/xml.xsd"

    %% Click Events for Stylesheets
    click CSSProd "https://github.com/usgpo/uslm/blob/main/uslm.css"
    click CSSDebug "https://github.com/usgpo/uslm/blob/main/uslm-debug.css"

    %% Click Events for Documentation
    click UGMD "https://github.com/usgpo/uslm/blob/main/USLM-User-Guide.md"
    click UGPDF "https://github.com/usgpo/uslm/blob/main/USLM-User-Guide.pdf"
    click Rev20_17 "https://github.com/usgpo/uslm/blob/main/USLM-2_0-Review-Guide-2_0_17.md"
    click Rev20_12 "https://github.com/usgpo/uslm/blob/main/USLM-2_0-Review-Guide-v2_0_12.md"
    click Rev21 "https://github.com/usgpo/uslm/blob/main/USLM-2_1-ReviewGuide.md"

    %% Click Events for Samples
    click CurrentSamples "https://github.com/usgpo/uslm/tree/main/bill-version-samples-september-2024/"
    click Archive "https://github.com/usgpo/uslm/tree/main/previous/"

    classDef blue fill:#cce5ff,stroke:#004085,color:#004085,stroke-width:1px;
    classDef green fill:#d4edda,stroke:#155724,color:#155724,stroke-width:1px;
    classDef orange fill:#fff3cd,stroke:#856404,color:#856404,stroke-width:1px;
```
