# azalith-9/hermes-the-firm architecture

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

- Interactive diagram: https://gitdiagram.com/azalith-9/hermes-the-firm
- Repository: https://github.com/azalith-9/hermes-the-firm

## Overview

Hermes the Firm is a local legal-assistant plugin for Hermes Agent. A user opens the firm roster or a practice-area command, selects relevant skills, and receives drafting or procedural support; the README stresses that the user remains the decision-maker. The graph preserves the documented practice, state-court, research, law-vault, and governance branches. Some subsystem links rely on README descriptions because individual skill implementations were not sampled; those branches are represented at directory level.

Main entry points: [`commands.py`](https://github.com/azalith-9/hermes-the-firm/blob/main/commands.py) (Roster and routing), [`skills`](https://github.com/azalith-9/hermes-the-firm/tree/main/skills) (State civil practice), [`__init__.py`](https://github.com/azalith-9/hermes-the-firm/blob/main/__init__.py) (Plugin registration), [`skills/draft`](https://github.com/azalith-9/hermes-the-firm/tree/main/skills/draft) (Legal drafting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Plugin entry"]
  node_plugin["Plugin registration<br/>[__init__.py]"]
  node_commands["Roster and routing<br/>[commands.py]"]
  node_skill_catalog["Skill catalog"]
end

subgraph group_practice["Legal practice"]
  node_departments["Practice departments"]
  node_state_practice["State civil practice"]
  node_case_workflow["Case procedures"]
  node_document_work["Legal drafting"]
  node_consumer_credit["Consumer credit"]
  node_louis["Louis skill library"]
  node_governance["Firm AI governance"]
end

subgraph group_research["Research and law"]
  node_federal_connectors["Federal research connectors"]
  node_law_vault_skills["Primary-law skills"]
  node_law_corpus[("Statute corpus")]
  node_corpus_check["Corpus verification<br/>[verify-corpus.py]"]
end

subgraph group_operations["Practice utilities"]
  node_deadline_tool["Michigan deadline calculator<br/>[case-calendar.py]"]
  node_format_tool["Michigan document checker<br/>[format-check.py]"]
end

node_user(("Legal user"))

node_user -->|"invokes commands"| node_plugin
node_plugin -->|"registers handlers"| node_commands
node_plugin -->|"registers skills"| node_skill_catalog
node_commands -->|"lists and routes"| node_skill_catalog
node_user -->|"selects area"| node_commands
node_commands -->|"lists skills"| node_departments
node_commands -->|"lists skills"| node_state_practice
node_commands -->|"lists categories"| node_louis
node_commands -->|"lists skills"| node_governance
node_commands -->|"lists skills"| node_federal_connectors
node_commands -->|"lists skills"| node_law_vault_skills
node_departments -.->|"supports drafting"| node_document_work
node_state_practice -.->|"covers procedures"| node_case_workflow
node_state_practice -.->|"covers court documents"| node_document_work
node_state_practice -.->|"includes subject bundle"| node_consumer_credit
node_law_vault_skills -.->|"reads statutes"| node_law_corpus
node_federal_connectors -.->|"researches live sources"| node_user
node_corpus_check -->|"verifies files"| node_law_corpus
node_case_workflow -.->|"calculates deadlines"| node_deadline_tool
node_document_work -.->|"checks formatting"| node_format_tool

click node_plugin "https://github.com/azalith-9/hermes-the-firm/blob/main/__init__.py"
click node_commands "https://github.com/azalith-9/hermes-the-firm/blob/main/commands.py"
click node_skill_catalog "https://github.com/azalith-9/hermes-the-firm/tree/main/skills"
click node_departments "https://github.com/azalith-9/hermes-the-firm/tree/main/skills"
click node_state_practice "https://github.com/azalith-9/hermes-the-firm/tree/main/skills"
click node_case_workflow "https://github.com/azalith-9/hermes-the-firm/tree/main/skills/mi-deadlines"
click node_document_work "https://github.com/azalith-9/hermes-the-firm/tree/main/skills/draft"
click node_consumer_credit "https://github.com/azalith-9/hermes-the-firm/tree/main/skills/consumer-credit-disputes"
click node_louis "https://github.com/azalith-9/hermes-the-firm/tree/main/skills"
click node_governance "https://github.com/azalith-9/hermes-the-firm/tree/main/skills/aigov-customize"
click node_federal_connectors "https://github.com/azalith-9/hermes-the-firm/tree/main/skills"
click node_law_vault_skills "https://github.com/azalith-9/hermes-the-firm/tree/main/skills"
click node_law_corpus "https://github.com/azalith-9/hermes-the-firm/tree/main/references"
click node_corpus_check "https://github.com/azalith-9/hermes-the-firm/blob/main/tools/verify-corpus.py"
click node_deadline_tool "https://github.com/azalith-9/hermes-the-firm/blob/main/tools/mi/case-calendar.py"
click node_format_tool "https://github.com/azalith-9/hermes-the-firm/blob/main/tools/mi/format-check.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_plugin,node_commands,node_skill_catalog,node_user toneBlue
class node_departments,node_state_practice,node_case_workflow,node_document_work,node_consumer_credit,node_louis,node_governance toneAmber
class node_federal_connectors,node_law_vault_skills,node_law_corpus,node_corpus_check toneMint
class node_deadline_tool,node_format_tool toneRose
```

## Components

### Plugin entry

- [Plugin registration](https://github.com/azalith-9/hermes-the-firm/blob/main/__init__.py): `__init__.py`
- [Roster and routing](https://github.com/azalith-9/hermes-the-firm/blob/main/commands.py): `commands.py`
- [Skill catalog](https://github.com/azalith-9/hermes-the-firm/tree/main/skills): `skills`

### Legal practice

- [Practice departments](https://github.com/azalith-9/hermes-the-firm/tree/main/skills): `skills`
- [State civil practice](https://github.com/azalith-9/hermes-the-firm/tree/main/skills): `skills`
- [Case procedures](https://github.com/azalith-9/hermes-the-firm/tree/main/skills/mi-deadlines): `skills/mi-deadlines`
- [Legal drafting](https://github.com/azalith-9/hermes-the-firm/tree/main/skills/draft): `skills/draft`
- [Consumer credit](https://github.com/azalith-9/hermes-the-firm/tree/main/skills/consumer-credit-disputes): `skills/consumer-credit-disputes`
- [Louis skill library](https://github.com/azalith-9/hermes-the-firm/tree/main/skills): `skills`
- [Firm AI governance](https://github.com/azalith-9/hermes-the-firm/tree/main/skills/aigov-customize): `skills/aigov-customize`

### Research and law

- [Federal research connectors](https://github.com/azalith-9/hermes-the-firm/tree/main/skills): `skills`
- [Primary-law skills](https://github.com/azalith-9/hermes-the-firm/tree/main/skills): `skills`
- [Statute corpus](https://github.com/azalith-9/hermes-the-firm/tree/main/references): `references`
- [Corpus verification](https://github.com/azalith-9/hermes-the-firm/blob/main/tools/verify-corpus.py): `tools/verify-corpus.py`

### Practice utilities

- [Michigan deadline calculator](https://github.com/azalith-9/hermes-the-firm/blob/main/tools/mi/case-calendar.py): `tools/mi/case-calendar.py`
- [Michigan document checker](https://github.com/azalith-9/hermes-the-firm/blob/main/tools/mi/format-check.py): `tools/mi/format-check.py`

### Other components

- **Legal user**

## Connections

- Legal user → Plugin registration: invokes commands (evidence: `__init__.py`)
- Plugin registration → Roster and routing: registers handlers (evidence: `__init__.py`)
- Plugin registration → Skill catalog: registers skills (evidence: `__init__.py`)
- Roster and routing → Skill catalog: lists and routes (evidence: `commands.py`)
- Legal user → Roster and routing: selects area (evidence: `commands.py`)
- Roster and routing → Practice departments: lists skills (evidence: `commands.py`)
- Roster and routing → State civil practice: lists skills (evidence: `commands.py`)
- Roster and routing → Louis skill library: lists categories (evidence: `commands.py`)
- Roster and routing → Firm AI governance: lists skills (evidence: `commands.py`)
- Roster and routing → Federal research connectors: lists skills (evidence: `commands.py`)
- Roster and routing → Primary-law skills: lists skills (evidence: `commands.py`)
- Practice departments → Legal drafting: supports drafting (evidence: `README.md`)
- State civil practice → Case procedures: covers procedures (evidence: `README.md`)
- State civil practice → Legal drafting: covers court documents (evidence: `README.md`)
- State civil practice → Consumer credit: includes subject bundle (evidence: `README.md`)
- Primary-law skills → Statute corpus: reads statutes
- Federal research connectors → Legal user: researches live sources (evidence: `README.md`)
- Corpus verification → Statute corpus: verifies files (evidence: `tools/verify-corpus.py`)
- Case procedures → Michigan deadline calculator: calculates deadlines (evidence: `README.md`)
- Legal drafting → Michigan document checker: checks formatting (evidence: `README.md`)
