# btrauch/poa-hr-compliance architecture

> Architecture diagram of the GitHub repository btrauch/poa-hr-compliance, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/btrauch/poa-hr-compliance
- Repository: https://github.com/btrauch/poa-hr-compliance

## Overview

This repository is primarily a finance and compliance document library, with a Python utility that builds a searchable policy index. The principal workflow is to scan documents, extract text from supported formats, and emit a structured index; the excerpts also show chunking and topic-classification logic. The README describes an HR question-answering skill, but its search and answer runtime is not present in the supplied tree, so that capability is not mapped as implemented here. The available excerpt is partial, so internal call links are limited to relationships it directly shows.

Main entry points: [`build_policy_index.py`](https://github.com/btrauch/poa-hr-compliance/blob/main/build_policy_index.py) (Index builder), [`Finance Policies & Procedures`](https://github.com/btrauch/poa-hr-compliance/tree/main/Finance%20Policies%20%26%20Procedures) (Finance documents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_indexing["Document indexing"]
  node_finance_docs["Finance documents"]
  node_index_builder["Index builder"]
  node_extractor_registry["Format extractors"]
  node_text_processing["Text processing"]
  node_policy_index["Policy index"]
end

node_finance_docs -->|"scans files"| node_index_builder
node_extractor_registry -->|"maps extractors"| node_index_builder
node_index_builder -.->|"emits index"| node_policy_index

click node_finance_docs "https://github.com/btrauch/poa-hr-compliance/tree/main/Finance%20Policies%20%26%20Procedures"
click node_index_builder "https://github.com/btrauch/poa-hr-compliance/blob/main/build_policy_index.py"
click node_extractor_registry "https://github.com/btrauch/poa-hr-compliance/blob/main/build_policy_index.py"
click node_text_processing "https://github.com/btrauch/poa-hr-compliance/blob/main/build_policy_index.py"
click node_policy_index "https://github.com/btrauch/poa-hr-compliance/blob/main/build_policy_index.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_finance_docs,node_index_builder,node_extractor_registry,node_text_processing,node_policy_index toneBlue
```

## Components

### Document indexing

- [Finance documents](https://github.com/btrauch/poa-hr-compliance/tree/main/Finance%20Policies%20%26%20Procedures): `Finance Policies & Procedures`
- [Index builder](https://github.com/btrauch/poa-hr-compliance/blob/main/build_policy_index.py): `build_policy_index.py`
- [Format extractors](https://github.com/btrauch/poa-hr-compliance/blob/main/build_policy_index.py): `build_policy_index.py`
- [Text processing](https://github.com/btrauch/poa-hr-compliance/blob/main/build_policy_index.py): `build_policy_index.py`
- [Policy index](https://github.com/btrauch/poa-hr-compliance/blob/main/build_policy_index.py): `build_policy_index.py`

## Connections

- Finance documents → Index builder: scans files (evidence: `build_policy_index.py`)
- Format extractors → Index builder: maps extractors (evidence: `build_policy_index.py`)
- Index builder → Policy index: emits index (evidence: `build_policy_index.py`)
