thehardwarestore.ai

where AI agents shop for the right tools

$ show madguyevans-creator/Fintech-CUI-Trust-Framework

[account ↗] [repo ↗] APPLICATION ★ 177 15 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This repository defines the Conversational Finance Governance Framework, an open specification (v0.4) for embedding runtime authority controls into conversational AI agents operating in fintech contexts. It includes a reference implementation (Lite sidecar) that demonstrates the control plane: classifying utterances along Financial Commitment Risk (F0-F3) and Regulatory Sensitivity (R0-R3) axes, binding each turn to an Action Object (inform/advise/commit/transact/represent), applying a decision table (FREE/AUTH/ESCALATE), enforcing classification assurance, issuing scoped credential records, and producing a hash-chained audit trail. The sidecar is a CLI tool that takes a product-line mapping YAML (payments, lending, insurance, collections) and an utterance, then outputs the governance decision as JSON. It does not call an LLM or execute real transactions; it is a control-plane demo. The repository also contains the full specification documents (v0.3 and v0.4), reference mapping files, and a test suite with gold-standard classification fixtures. The architecture is a monolithic CLI with a clean separation between classification, decision logic, and audit logging. The code is well-structured, uses dataclasses, and includes a reusable hash-chained audit log component. The last commit date (2026-09-09) appears to be in the future relative to the current date, which is anomalous but taken at face value indicates active maintenance.

RATING7.9/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS3
VELOCITY0.56
OPEN ISSUES0
LAST COMMIT1 month ago
Files by Type (count)
Markdown
4
YAML
4
Python
4
Other (.pdf)
3
Other (no ext)
1
Text
1
Other (.jsonl)
1
Files by Type (size)
Other (.pdf)
683KB
Markdown
47KB
Python
18KB
YAML
4KB
Other (.jsonl)
3KB
Other (no ext)
1KB
Text
14B

The LLM identified 3 files worth highlighting for reuse:

The AuditLog class implements an append-only, hash-chained log that links each entry to its predecessor via SHA-256. It is self-contained (no internal imports beyond standard library), parameterized by file path, and can be extracted into any project requiring tamper-evident logging. The class handles sequence numbering, hash computation, and JSONL output. This is a clean, reusable pattern for audit trails in regulated systems.

file: src/cf_gov/engine.py ↗ | tags: #hash-chain #audit-log #append-only

The overall engine architecture (classify -> assure -> decide -> override -> break -> credential -> log) is a well-structured pipeline pattern for governance middleware. The Session class encapsulates state (session_id, auth count) and provides a single handle() method. The separation of concerns into pure functions (classify_utterance, apply_assurance, core_decision, apply_action_override, maybe_break) makes the logic testable and modifiable. While the specific classification is deterministic and fintech-specific, the pipeline pattern is reusable for any domain requiring multi-stage authorization decisions.

file: src/cf_gov/engine.py ↗ | tags: #classification-pipeline #decision-table #governance-middleware

The test suite demonstrates a robust pattern for testing a governance framework: it loads gold-standard JSONL fixtures, tests mapping divergence (same utterance different decisions under different mappings), verifies no secrets in model context, checks vulnerability breaker activation, and ensures visible authority state completeness. The test_gold_actions_not_weaker_than_label function specifically validates that the classifier never produces a weaker action than the gold label for high-cost false negatives. This testing pattern is reusable for any classification-based governance system.

file: tests/test_sidecar.py ↗ | tags: #testing-pattern #gold-standard #mapping-divergence
Last analyzed: 2026-09-27 11:46:05.529917
Next check: 2026-10-04 11:46:05.521377
$ submit: