Skip to content

Add DocMind legal risk analysis for investigation documents #4

@stuckvgn

Description

@stuckvgn

Integrate legal risk analysis patterns from DocMind into the document processing pipeline.

Purpose

After OCR and basic classification, documents need legal risk scoring:

  • Is this document from an ag-gag jurisdiction? Flag for legal review before use.
  • Does it contain witness-identifying information that should be redacted?
  • What is the litigation risk if this document is disclosed to coalition partners?

Scope

  • src/documents/legal_analyzer.py — legal risk analysis module
  • Inputs: document text, jurisdiction metadata
  • Outputs: risk score (low/medium/high/critical), risk factors, recommended handling
  • Integrate with src/documents/ingester.py — add legal analysis step after classification
  • Add risk score to evidence index database
  • Dashboard: add legal risk column to evidence view

Model

Follow DocMind's pattern: parallel clause classification, plain-English explanations,
risk distribution chart. Adapt for advocacy domain:

  • Ag-gag exposure (source jurisdiction)
  • Witness identity exposure (names, contact details in document)
  • Chain of custody gaps
  • Attorney-client privilege markers

Provider

Use zero-retention or local model only — see docs/security.md §AI Provider Routing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions