|
1 | 1 | # proof-first-normalizer |
2 | 2 |
|
3 | | -Deterministic CSV normalizer + validator. |
| 3 | +Deterministic CSV normalizer + validator (schema-driven). |
4 | 4 |
|
5 | | -## What it does (v0.1.0) |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +> **Book:** *The Deterministic Finance Toolkit* |
| 9 | +> This repo is **Project 3 of 4**. The exact code referenced in the manuscript is tagged **[`book-v1`](https://github.com/nicholaskarlson/proof-first-normalizer/tree/book-v1)**. |
| 10 | +
|
| 11 | +## Toolkit navigation |
| 12 | + |
| 13 | +- **[proof-first-recon](https://github.com/nicholaskarlson/proof-first-recon)** — deterministic CSV reconciliation (matched/unmatched + summary JSON) |
| 14 | +- **[proof-first-auditpack](https://github.com/nicholaskarlson/proof-first-auditpack)** — deterministic audit packs (manifest.json + sha256 + verify) |
| 15 | +- **[proof-first-normalizer](https://github.com/nicholaskarlson/proof-first-normalizer)** — deterministic CSV normalize + validate (schema → normalized.csv/errors.csv/report.json) |
| 16 | +- **[proof-first-finance-calc](https://github.com/nicholaskarlson/proof-first-finance-calc)** — proof-first finance calc service (Amortization v1 API + demo) |
| 17 | + |
| 18 | +## What it does |
6 | 19 |
|
7 | 20 | - Validates CSVs against a simple JSON schema |
8 | 21 | - Produces deterministic outputs: |
9 | 22 | - `normalized.csv` |
10 | 23 | - `errors.csv` |
11 | 24 | - `report.json` |
12 | 25 |
|
13 | | -## Canonical commands |
| 26 | +## Quick start |
| 27 | + |
| 28 | +Requirements: |
| 29 | +- Go **1.22+** |
| 30 | +- GNU Make (optional, but recommended) |
14 | 31 |
|
15 | 32 | ```bash |
16 | | -# Proof gate (one command) |
| 33 | +# One-command proof gate |
17 | 34 | make verify |
18 | 35 |
|
19 | | -# Proof gates (portable, no Makefile) |
| 36 | +# Portable proof gate (no Makefile) |
20 | 37 | go test -count=1 ./... |
21 | 38 | go run ./cmd/normalizer demo --out ./out |
22 | 39 | ``` |
23 | 40 |
|
24 | | -## Quickstart |
25 | 41 |
|
26 | | -```bash |
27 | | -go test -count=1 ./... |
| 42 | +## Usage |
28 | 43 |
|
| 44 | +```bash |
| 45 | +# Print version |
29 | 46 | go run ./cmd/normalizer version |
| 47 | + |
| 48 | +# Demo: recomputes fixture cases and verifies outputs match goldens |
30 | 49 | go run ./cmd/normalizer demo --out ./out |
31 | 50 | ``` |
32 | 51 |
|
33 | | -## Handoff |
| 52 | +## Output artifacts (high level) |
| 53 | + |
| 54 | +- `normalized.csv` — canonicalized headers + normalized fields |
| 55 | +- `errors.csv` — row-level validation failures (if any) |
| 56 | +- `report.json` — counts, schema name, and deterministic summary stats |
| 57 | + |
| 58 | +## Determinism contract |
| 59 | + |
| 60 | +This project is intentionally “boring” in the best way: the same inputs must produce the same outputs. |
| 61 | + |
| 62 | +See: **[`docs/CONVENTIONS.md`](docs/CONVENTIONS.md)** (rounding, ordering, LF, atomic writes, stable JSON, etc.). |
| 63 | + |
| 64 | + |
| 65 | +## Handoff / maintenance |
| 66 | + |
| 67 | +See: **[`docs/HANDOFF.md`](docs/HANDOFF.md)** (acceptance gates, troubleshooting, and “what to change (and what not to)”). |
| 68 | + |
| 69 | + |
| 70 | +## License |
| 71 | + |
| 72 | +MIT (see `LICENSE`). |
34 | 73 |
|
35 | | -See [docs/HANDOFF.md](docs/HANDOFF.md). |
|
0 commit comments