# faizxmak/audityard architecture

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

- Interactive diagram: https://gitdiagram.com/faizxmak/audityard
- Repository: https://github.com/faizxmak/audityard

## Overview

Audityard is a human-directed audit workflow configured as four agents sharing a Mattermost room through Switch. The lead delegates evidence extraction, payment reconciliation, and investigation, then an independent reviewer checks the work before the lead delivers a report and order register. The repository contains the workflow template, case inputs, and one completed run, not the agent runtime itself. Relationships below follow the README’s workflow description; the template and agent instructions were not sampled, so implementation-level dispatch details are not inferred.

Main entry points: [`audityard.template.yaml`](https://github.com/faizxmak/audityard/blob/main/audityard.template.yaml) (Audit manager), [`agent-pack/START_HERE.md`](https://github.com/faizxmak/audityard/blob/main/agent-pack/START_HERE.md) (Scope and policies), [`agent-pack/work_orders.jsonl`](https://github.com/faizxmak/audityard/blob/main/agent-pack/work_orders.jsonl) (Work orders), [`agent-pack/evidence.jsonl`](https://github.com/faizxmak/audityard/blob/main/agent-pack/evidence.jsonl) (Evidence extracts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["Room coordination"]
  node_switch["Switch room"]
  node_mattermost["Mattermost"]
  node_manager["Audit manager"]
end

subgraph group_case["Audit case"]
  node_policies["Scope and policies<br/>[START_HERE.md]"]
  node_orders[("Work orders<br/>[work_orders.jsonl]")]
  node_evidence_records[("Evidence extracts<br/>[evidence.jsonl]")]
  node_payments[("Payment records<br/>[payments.jsonl]")]
end

subgraph group_analysis["Audit and review"]
  node_evidence["Evidence controller"]
  node_investigator["Reconciliation investigator"]
  node_reviewer["Independent reviewer"]
end

subgraph group_deliverables["Final deliverables"]
  node_report["Final report<br/>[final_report.md]"]
  node_register["Disposition register"]
  node_reconciliation["Reconciliation results"]
end

node_human(("Human audit lead"))

node_human -->|"provides scope"| node_manager
node_manager -->|"assigns tasks"| node_switch
node_switch -->|"displays room"| node_mattermost
node_switch -->|"routes work"| node_evidence
node_switch -->|"routes work"| node_investigator
node_switch -->|"routes work"| node_reviewer
node_policies -->|"guides audit"| node_manager
node_orders -->|"shared case files"| node_evidence
node_evidence_records -->|"extracts support"| node_evidence
node_payments -->|"reconciles payments"| node_investigator
node_evidence -->|"returns findings"| node_manager
node_investigator -->|"returns analysis"| node_manager
node_manager -->|"requests review"| node_reviewer
node_reviewer -->|"returns review"| node_manager
node_manager -->|"delivers findings"| node_report
node_manager -->|"delivers decisions"| node_register
node_manager -->|"delivers totals"| node_reconciliation
node_manager -->|"presents results"| node_human

click node_manager "https://github.com/faizxmak/audityard/blob/main/audityard.template.yaml"
click node_evidence "https://github.com/faizxmak/audityard/blob/main/audityard.template.yaml"
click node_investigator "https://github.com/faizxmak/audityard/blob/main/audityard.template.yaml"
click node_reviewer "https://github.com/faizxmak/audityard/blob/main/audityard.template.yaml"
click node_policies "https://github.com/faizxmak/audityard/blob/main/agent-pack/START_HERE.md"
click node_orders "https://github.com/faizxmak/audityard/blob/main/agent-pack/work_orders.jsonl"
click node_evidence_records "https://github.com/faizxmak/audityard/blob/main/agent-pack/evidence.jsonl"
click node_payments "https://github.com/faizxmak/audityard/blob/main/agent-pack/payments.jsonl"
click node_report "https://github.com/faizxmak/audityard/blob/main/example-run/final_report.md"
click node_register "https://github.com/faizxmak/audityard/blob/main/example-run/disposition_register.csv"
click node_reconciliation "https://github.com/faizxmak/audityard/blob/main/example-run/reconciliation.json"

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_switch,node_mattermost,node_manager toneBlue
class node_policies,node_orders,node_evidence_records,node_payments toneAmber
class node_evidence,node_investigator,node_reviewer toneMint
class node_report,node_register,node_reconciliation toneRose
class node_human toneIndigo
```

## Components

### Room coordination

- **Switch room**
- **Mattermost**
- [Audit manager](https://github.com/faizxmak/audityard/blob/main/audityard.template.yaml): `audityard.template.yaml`

### Audit case

- [Scope and policies](https://github.com/faizxmak/audityard/blob/main/agent-pack/START_HERE.md): `agent-pack/START_HERE.md`
- [Work orders](https://github.com/faizxmak/audityard/blob/main/agent-pack/work_orders.jsonl): `agent-pack/work_orders.jsonl`
- [Evidence extracts](https://github.com/faizxmak/audityard/blob/main/agent-pack/evidence.jsonl): `agent-pack/evidence.jsonl`
- [Payment records](https://github.com/faizxmak/audityard/blob/main/agent-pack/payments.jsonl): `agent-pack/payments.jsonl`

### Audit and review

- [Evidence controller](https://github.com/faizxmak/audityard/blob/main/audityard.template.yaml): `audityard.template.yaml`
- [Reconciliation investigator](https://github.com/faizxmak/audityard/blob/main/audityard.template.yaml): `audityard.template.yaml`
- [Independent reviewer](https://github.com/faizxmak/audityard/blob/main/audityard.template.yaml): `audityard.template.yaml`

### Final deliverables

- [Final report](https://github.com/faizxmak/audityard/blob/main/example-run/final_report.md): `example-run/final_report.md`
- [Disposition register](https://github.com/faizxmak/audityard/blob/main/example-run/disposition_register.csv): `example-run/disposition_register.csv`
- [Reconciliation results](https://github.com/faizxmak/audityard/blob/main/example-run/reconciliation.json): `example-run/reconciliation.json`

### Other components

- **Human audit lead**

## Connections

- Human audit lead → Audit manager: provides scope (evidence: `README.md`)
- Audit manager → Switch room: assigns tasks (evidence: `README.md`)
- Switch room → Mattermost: displays room (evidence: `README.md`)
- Switch room → Evidence controller: routes work (evidence: `README.md`)
- Switch room → Reconciliation investigator: routes work (evidence: `README.md`)
- Switch room → Independent reviewer: routes work (evidence: `README.md`)
- Scope and policies → Audit manager: guides audit (evidence: `README.md`)
- Work orders → Evidence controller: shared case files (evidence: `README.md`)
- Evidence extracts → Evidence controller: extracts support (evidence: `README.md`)
- Payment records → Reconciliation investigator: reconciles payments (evidence: `README.md`)
- Evidence controller → Audit manager: returns findings (evidence: `README.md`)
- Reconciliation investigator → Audit manager: returns analysis (evidence: `README.md`)
- Audit manager → Independent reviewer: requests review (evidence: `README.md`)
- Independent reviewer → Audit manager: returns review (evidence: `README.md`)
- Audit manager → Final report: delivers findings (evidence: `README.md`)
- Audit manager → Disposition register: delivers decisions (evidence: `README.md`)
- Audit manager → Reconciliation results: delivers totals (evidence: `README.md`)
- Audit manager → Human audit lead: presents results (evidence: `README.md`)
