All notable changes to this project will be documented in this file.
- TaxDiagnosticResult — 3-layer structured diagnostic model (agent message / developer fields / proof ref) with tri-state status (VERIFIED / UNVERIFIABLE / BLOCKED). Closes #39.
to_diagnostic()on all 12 guards — every guard now converts its legacy dict return into aTaxDiagnosticResultwith cryptographicproof_ref. Closes #47.- Audit trace —
build_trace()+RuleRefentries for all 12 guards, covering IRS, CBDT, CBIC, FEMA, and OECD statutory references. - 15 new RuleRef constants in
audit.py— CG (112A, 111A, 50AA), Speculation (43(5), 73), Inter-head (71, 74), VDA (115BBH), PoEM (6(3), CBDT 6/2017), FEMA (LRS, Schedule I, 206CR), IRS (Common Law, Pub 505), SAFE conversion. trace_proof_ref()— deterministic SHA-256 hash over audit trace, binds VERIFIED verdicts to specific evidence.TaxAdvisoryCheck— non-proof-bearing advisory metadata model withadvisory_only=Trueinvariant.
- #16 — Fail-closed on unknown/unmodeled tax rules across all guards. Unknown services, states, asset types, and source strings now return
verified=Falseinstead of silently passing. - #17, #18 — Classification guard fail-closed on ambiguous facts + claim comparison. Mixed employee/contractor indicators no longer default to contractor.
- #19, #40 — Middleware success label narrowed + ReciprocityGuard Z3 removed.
ARITHMETIC_VERIFIEDis a pre-conformance status, not a verification pass. Z3 solver replaced with deterministic lookup. - #20, #21, #22 — Input strictness: exact paise comparison (no tolerance), edge-case validation (negative amounts, zero values, discount=1),
extra="forbid"on all 8 Pydantic input models. - #34, #31 — README repositioned as verification layer, not tax platform. "Production Ready" claims removed, non-goals section added, comparison table promoted to top.
- CryptoTaxGuard —
TaxResultpydantic model now includes optionalaudit_tracefield. - PoEMGuard —
_unverifiable()helper now emitsaudit_tracewithINPUT_VALIDATION_FAILEDoutcome. TaxDiagnosticResult.__post_init__— hardened withisinstancetype checks forstatus,agent_message, anddeveloper_fields.TaxDiagnosticResult.from_dict— validatesstatustype (str → enum) anddeveloper_fieldstype before construction.to_diagnostic()fail-closed — all 12 guards raiseValueErrorwhenverified=Truebutaudit_trace is None.- BLOCKED vs UNVERIFIABLE —
to_diagnostic()now differentiates based onaudit_trace["outcome"]: insufficient evidence/unknown rule → UNVERIFIABLE, claim wrong/invalid input → BLOCKED.
- 270 tests (up from 83 in v0.1.0).
- 50 new tests for
to_diagnostic()conversions covering VERIFIED, BLOCKED, UNVERIFIABLE, fail-closed, and serialization round-trip paths. - 32 tests for
TaxDiagnosticResultmodel, factory methods,TaxAdvisoryCheck, andfrom_dict/to_dict.
- Initial release of
qwed-taxverification engine. - US Jurisdiction: PayrollGuard (FICA), ClassificationGuard (1099 vs W2).
- India Jurisdiction: CryptoTaxGuard (Sec 115BBH), RemittanceGuard (LRS).
examples/directory with demo scripts.- GitHub Marketplace integration support.