What this project delivers
This is the recommendation and design package for a demonstrable Snowflake capability in a legal-services context. It is deliberately scoped to be built and shown quickly, while exercising the Snowflake features that matter to a compliance audience: governed access, data protection, and auditability.
Everything here is a starting point for discussion. The board is asked to confirm scope, the data-sourcing approach, and the security posture before we build.
Four things the demo proves
1. Governed ingestion
Real contract text and CUAD clause annotations are loaded and joined to synthetic clients, matters, and staff with validated foreign-key relationships.
2. Matter-level confidentiality
Attorneys see only the matters they are authorized for. Snowflake row access policies and masking enforce the wall at query time, not in application code.
3. Contract-risk analytics
CUAD clause categories feed a transparent, rule-based risk rubric that flags termination, indemnification, liability, and governing-law exposure.
4. Verifiable audit
We run the same query under multiple roles, capture allowed and denied access, and reconstruct it from Snowflake's own query and access history.
Working POC and interactive demo
The board asked for a simple login experience, an examination of the CUAD sample, and Python scaffolding adaptable to Snowflake. All three are built and staged here.
Interactive demo
Sign in as a hypothetical attorney and see only your documents; sign in as admin to review who accessed which files. Includes a simulated Snowflake console and risk register. Open the demo →
Python + SQLite POC
A real enforcement layer (poc/access.py),
a shared risk engine (poc/risk.py), the simulated Snowflake engine, and an
evidence pack. POC & CUAD findings →
30 CUAD documents
Extracted, analyzed, and modeled. Two assumptions in the original plan needed correcting. See the findings →
Why CUAD plus synthetic records
Fabricated clause text produces a demo that feels fake and can misrepresent the strength of the platform. The Contract Understanding Atticus Dataset gives us 510 real commercial contracts with 41 expert-annotated clause categories — genuine language and genuine labels.
CUAD is public research data released under CC BY 4.0. We attach fictional matters and confidentiality labels strictly to demonstrate the mechanics. We will never present these documents as genuinely privileged, and we will carry the license attribution wherever the data appears.
Proposed architecture
A single demo database landing RAW → CORE →
MARTS, with a dedicated SECURITY schema for policies and a
GOV schema for the audit/reporting views.
CUAD JSON + Faker seeds
|
v
RAW raw_cuad_contracts, raw_cuad_clauses, raw_synthetic_*
|
v
CORE dim_client, dim_employee, dim_matter, dim_contract, fact_clause,
bridge_matter_contract, matter_authorization, ref_*
|
v
MARTS mart_matter_risk, mart_high_risk_register <-- board-facing queries
|
SECURITY matter_access_policy (row access), pii masks, classification tags
GOV audit_summary, denied_access_log, query_history views
Ten recommendations
- Use CUAD as the factual spine. 20–30 contracts for the demo core, with the option to scale to all 510.
- Synthesize the business layer, not the legal text. Faker generates clients, matters, staff, assignments, and approvals.
- Model matters as the confidentiality boundary. Every access decision keys off
matter_id. - Enforce with row access policies on a mapping table. No matter-based filtering in application SQL.
- Centralize policy in a
SECURITYschema owned by a compliance role, applied consistently across tables. - Mask sensitive metadata by role (client PII, deal values) with dynamic data masking and classification tags.
- Keep the risk rubric transparent and editable. Rules live as data in a reference table, so thresholds are reviewable — and clearly labeled simulated.
- Prove governance through Snowflake's own logs. Query history, access history, and policy references are the evidence.
- Ship the review site from this repo. GitHub Pages from
mainis the board's staging surface. - Keep costs near zero. X-Small warehouses with aggressive auto-suspend, and a small data footprint.
Delivery phases
Enablement
Snowflake account/trial, roles, database skeleton, CI for this Pages site. Architecture →
Ingest & organize
Load 20–30 CUAD contracts + annotations, generate synthetic records, validate relationships. Data foundation →
Enforce matter confidentiality
Attorney/compliance roles, row access policies, masking, classification tags. Confidentiality →
Analyze contractual risk
Clause-category analytics and the rule-based risk rubric. Risk analysis →
Verify & audit
Multi-role access tests, query-history evidence, high-risk register. Audit →
Board review
Publish this site, walk the demo, collect decisions. Roadmap →
Board decisions
| Decision | Resolution |
|---|---|
| Scope of the demo | Full four phases against the full CUAD dataset |
| Data sourcing | CUAD + synthetic, with full attribution |
| Snowflake component | Real trial account (2026-10-16) |
| Hosting of this review site | This repo (main auto-deploys) |
| Risk rubric framing | Simulated and prominently disclaimed |
| Web application | Streamlit in Snowflake first |