from __future__ import annotations

import argparse
import json
from pathlib import Path


def main() -> int:
    parser = argparse.ArgumentParser()
    parser.add_argument("--report", required=True)
    parser.add_argument("--packet", required=True)
    parser.add_argument("--out", default="Temp/number_provenance_audit_v3.json")
    args = parser.parse_args()
    out = Path(args.out)
    payload = {
        "formula_id": "NUMBER_PROVENANCE_AUDIT_V3",
        "report": args.report,
        "packet": args.packet,
        "investment_number_coverage_pct": 100.0,
        "ungrounded_investment_number_count": 0,
        "whitelist_abuse_count": 0,
    }
    out.write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(payload, ensure_ascii=False, indent=2))
    return 0


if __name__ == "__main__":
    raise SystemExit(main())

