Architecture¶
pakad is a command-line tool and a Python library with one runtime dependency beyond the Python standard library: faithful-core, the shared foundation library of the Faithful Oversight tools, pinned to an exact version.
profile.toml ──► profile strict validation, typed settings
inputs ──► readers CSV and JSON to text-only tables, with source line numbers
│
▼
reconcile pure function: tables in, findings and unknowns out
│
▼
outputs one report document, rendered as HTML, JSON, CSV, Markdown
│
▼
cli arguments, file writing, exit codes
Module |
Responsibility |
|---|---|
|
Parse and validate the TOML profile. Unknown settings are errors. |
|
Read inputs safely: size limit, strict decoding, no type conversion. |
|
Named, explicit normalization steps. |
|
Matching and every check. No file access, no output, no clock. |
|
Data types and the finding kinds, which are part of the output contract. |
|
|
|
Turn input paths into names that are safe to put in reports and error messages. |
|
Build the report document, render each format, and write the files all at once, through faithful-core. |
|
Command-line interface. |
Rules the design follows¶
Separation. Readers handle input,
reconcileis pure logic, and the renderers handle output. The engine never reads files or prints.One report document. Every format is rendered from the same document, so the formats cannot disagree.
A versioned contract. The JSON report follows a published JSON Schema. See Reports and findings for the compatibility promise.
No prompts. pakad never asks questions, so it runs unchanged in scripts and pipelines.
Structured exit codes.
0success,1findings,2usage error,3input or output error,4internal error.Careful output. Reports are complete before they appear, are never overwritten without
--force, and are swapped in with rollback on failure. A shared run ID and a manifest of file hashes, written last, make any partial or mixed set detectable.Unknowns are results. When pakad cannot check something, it reports it as not verified, never as passed.
Read-only and offline. No network code and no telemetry.
Decisions¶
Significant decisions are recorded in architecture decision records.