CROVIA – Lite Tools Pack M1

This document describes the CROVIA Lite Tools Pack (M1).

M1 is for organisations that:

All examples are synthetic and for illustration only.


1. Scope

The Lite Tools Pack covers:

  1. Receipt QA – quick checks on sums, negatives, ordering.
  2. Schema + business validation – enforcing the royalty_receipt.v1 contract and basic policy constraints.
  3. AI Act record-keeping helper – generating a compliance summary and a “compliance pack”.
  4. Hashchain integrity – writing and verifying hashchains over NDJSON logs.

The pack is intentionally CLI-first and can be embedded in CI pipelines or batch jobs.


2. Prerequisites

We assume a working directory like:

/opt/crovia
  ├── qa_receipts.py
  ├── crovia_validate.py
  ├── compliance_ai_act.py
  ├── hashchain_writer.py
  ├── verify_hashchain.py
  └── data/
       └── your_royalty_logs.ndjson

3. Quickstart with your own receipts

Assume your log is at:

data/royalty_yourlog.ndjson

3.1. Receipt QA

python3 qa_receipts.py data/royalty_yourlog.ndjson

The script reports:

Exit code 0 means “no hard errors found”.


3.2. Schema + business validation

python3 crovia_validate.py \
  --input data/royalty_yourlog.ndjson \
  --out-report validate_report.md \
  --out-bad validate_sample_bad.jsonl

Outputs:

You can plug this step in CI and fail a build if:


3.3. AI Act compliance helper

python3 compliance_ai_act.py \
  --input data/royalty_yourlog.ndjson \
  --out-summary compliance_summary.md \
  --out-gaps data/compliance_gaps.csv \
  --out-pack data/compliance_pack.json

Outputs:

The pack is meant to support EU AI Act record-keeping for training data usage.


3.4. Hashchain write

python3 hashchain_writer.py \
  --source data/royalty_yourlog.ndjson \
  --chunk 1000 \
  --out proofs/hashchain_royalty_yourlog__chunk1000.txt

This writes a hashchain file with one line per chunk, each line containing:

The exact format is documented in comments inside hashchain_writer.py.


3.5. Hashchain verify

python3 verify_hashchain.py \
  --source data/royalty_yourlog.ndjson \
  --chain proofs/hashchain_royalty_yourlog__chunk1000.txt \
  --chunk 1000

If all chunks match, you should see an OK message and exit code 0.

This allows auditors or regulators to:


4. Typical CI pipeline (example)

A minimal CI job for a training run could be:

set -euo pipefail

RECEIPTS="data/royalty_${RUN_ID}.ndjson"

python3 qa_receipts.py "$RECEIPTS"

python3 crovia_validate.py \
  --input "$RECEIPTS" \
  --out-report "reports/validate_${RUN_ID}.md" \
  --out-bad "reports/validate_${RUN_ID}_bad.jsonl"

python3 compliance_ai_act.py \
  --input "$RECEIPTS" \
  --out-summary "reports/compliance_${RUN_ID}.md" \
  --out-gaps "reports/compliance_${RUN_ID}_gaps.csv" \
  --out-pack "reports/compliance_${RUN_ID}_pack.json"

python3 hashchain_writer.py \
  --source "$RECEIPTS" \
  --chunk 1000 \
  --out "proofs/hashchain_${RUN_ID}__chunk1000.txt"

You can then store:

in your long-term evidence archive.


5. Relation to Profile M0 and Enterprise engine (M2)

Profile M0 defines the objects:

Lite Tools M1 define a minimal operational layer:

The enterprise engine (M2) extends M1 with:

The tools in M1 are deliberately engine-agnostic: any implementation that emits royalty_receipt.v1 logs can use them.


6. Version and feedback

This document describes CROVIA Lite Tools Pack M1 – version 1.0.0.

Future versions may:

For questions or proposals you can contact:

info@croviatrust.com