1. Core Objective
Build a zero-cost, modular web application that automates civil legal claim filing end-to-end across U.S. federal and state courts. The system handles evidence ingestion, document generation, electronic signing, filing submission (where jurisdiction permits), service of process packet generation, and correspondence. The user's only manual action is appearing at the hearing. Additionally, build an IP Infringement Sentinel module that monitors the web for trademark/copyright infringement, generates cease-and-desist letters and DMCA takedowns, and prepares infringement claim packages for filing where jurisdiction permits.
Hard Constraints:
- User manual action = court appearance only. The system handles every step up to and including document generation, signature block insertion, and submission preparation.
- National coverage across federal and state jurisdictions, with per-jurisdiction automation capability flags.
- Zero cost to the user for system operation. Court fees handled via automated fee waiver generation where applicable.
- All software components open source, permissively licensed, or free-tier. No paid API dependencies for core functionality.
2. Automation Capability Levels (Per Jurisdiction)
| Level | Description | User Action Required |
|---|---|---|
| Level A: Full Automation | Court accepts electronic filing from pro se litigants; service executed electronically or via integrated service. | Court appearance only. |
| Level B: Generate + Assisted Submit | Court accepts e-filing but requires user account/EFSP login; system generates upload-ready package and guides submission. | Upload + court appearance. |
| Level C: Generate + Physical Delivery Required | Court prohibits pro se e-filing of new cases; physical delivery to clerk required. | Mail/deliver + court appearance. |
3. System Architecture (Component Stack)
| Layer | Component | License/Cost | Modifiable |
|---|---|---|---|
| Guided Interview | Docassemble + AssemblyLine + ALWeaver | Open source | Yes |
| OCR/Transcription | SnapOtter (AGPLv3) or filewizard | Open source | Yes |
| Document Generation | docxtpl + LibreOffice | Open source | Yes |
| Federal Court Data | CourtListener API v3 | Free, no auth | N/A (API) |
| Trademark Data | patent-client-agents (USPTO TSDR) | Free API key | Yes |
| IP Monitoring | CommonGuard (AGPL) or SheriffMark (AGPL-3.0) | Open source | Yes |
| Scheduling | n8n self-hosted | Open source | Yes |
| E-filing | SuffolkLITLab Efile Proxy Server + docassemble-EFSPIntegration | Open source | Yes |
| Mail/Service | @mailsnail/gateway (MIT) + Shippo/Lob/USPS Web Tools | MIT, pay-per-piece | Yes |
| LLM | Groq / Gemini Flash free tier or BYOK | Free tier / BYOK | Yes |
| Jurisdiction Database | jurisdictions/ (JSON/YAML) | Self-built | Yes |
4. TODO CHECKLIST
Phase 0: Claim Classifier + National Jurisdiction Router
- 0.1 Deploy Docassemble instance with AssemblyLine extensions
- 0.2 Build free-text intake interview using AssemblyLine Weaver
- 0.3 Integrate LLM classification of claim type + target court (federal vs. state, specific jurisdiction)
- 0.4 Populate
jurisdictions/for all 50 states + federal districts. Each entry records: e-filing permission for pro se new cases (Y/N); filing method (portal URL, EFSP required, paper only); fees (amount, waiver available); service methods accepted; automation capability level (A/B/C) - 0.5 Build deadline calculator (claim type + jurisdiction)
- 0.6 Route user to appropriate automation flow based on capability level
Phase 1: Universal Evidence Ingestor
- 1.1 Multi-format upload UI (images, PDFs, text, audio)
- 1.2 OCR pipeline: Tesseract.js (browser) or pytesseract (server) + SnapOtter (AGPL, self-hosted) for batch processing
- 1.3 Audio transcription: SnapOtter built-in or filewizard (faster-whisper)
- 1.4 LLM extraction prompt: "Extract every date, time, person, and action from this document"
- 1.5 Contradiction detector: flag inconsistencies (e.g., rejection timestamp within 24 hours of interview)
- 1.6 Output: standardized Statement of Facts (Markdown/PDF)
Phase 2: Document Generation Engine (National Template Library)
- 2.1 Federal court pro se complaint templates (formatting per circuit/district)
- 2.2 State court complaint templates (minimum: CA, TX, FL, NY, IL, PA, OH, GA, NC, MI)
- 2.3 Agency complaint forms (IDHR, EEOC, HUD, state civil rights agencies)
- 2.4 Automated signature block generation:
/s/ {{ claimant_name }}where accepted - 2.5 Generate submission instruction packet for Level B/C jurisdictions
- 2.6 Integrate docxtpl templates with Docassemble interview data binding
Phase 3: Automated Filing Layer
- 3.1 Deploy Efile Proxy Server from SuffolkLITLab
- 3.2 Integrate
docassemble-EFSPIntegrationwith proxy server endpoint - 3.3 Configure EFSP credentials and global fee waiver IDs per jurisdiction
- 3.4 For Level B: generate upload-ready PDFs with pre-filled metadata + step-by-step submission guide
- 3.5 For Level A: build submission automation through EFSPIntegration
- 3.6 Fee waiver automator: generate In Forma Pauperis applications; auto-file where permitted
- 3.7 CourtListener integration: query defendant litigation history, validate case number formats
Phase 4: Automated Service of Process
- 4.1 Generate service packets (summons, complaint, certified mail forms)
- 4.2 Deploy
@mailsnail/gateway(MIT) as mailing abstraction layer; configure provider credentials (Shippo, Lob, or Click2Mail) - 4.3 Integrate USPS Web Tools API for tracking and Proof of Delivery (free API access)
- 4.4 For jurisdictions accepting electronic service: integrate email-based service generation
- 4.5 For physical service: generate service execution package with pre-filled certified mail forms
- 4.6 Implement automated mail dispatch through gateway for jurisdictions where certified mail is required
Phase 5: IP Infringement Sentinel
- 5.1 Deploy CommonGuard (AGPL) or SheriffMark (AGPL-3.0) for trademark/domain monitoring
- 5.2 Integrate
patent-client-agentsormcp-usptofor USPTO TSDR queries (free API key from developer.uspto.gov) - 5.3 Configure n8n (self-hosted) for scheduled monitoring workflows
- 5.4 Evidence capture: screenshots, timestamps, URL archiving, hash generation
- 5.5 Auto-generate C&D letters using docxtpl templates
- 5.6 Auto-generate DMCA takedown notices per platform format (Google, Amazon, etc.)
- 5.7 Auto-generate federal court copyright/trademark infringement complaint drafts
- 5.8 CourtListener integration for defendant litigation history
- 5.9 Route to Phase 3 filing flow for Level A/B jurisdictions
Phase 6: Legal Aid Router + Hearing Preparation
- 6.1 Populate legal aid organization database by jurisdiction (JSON mapping)
- 6.2 Build Docassemble branching logic to route to appropriate organization
- 6.3 Auto-generate Equip for Equality (IL) or equivalent intake email with case summary
- 6.4 Generate hearing preparation packet: evidence summary, anticipated questions, statement script
- 6.5 Generate IHRC/agency hearing documents if applicable
Phase 7: Deployment & Documentation
- 7.1 Write
README.mdwith Vercel/Render/Docker deployment instructions - 7.2 Write user manual with per-jurisdiction automation level disclosure
- 7.3 UPL compliance disclaimer: document automation tool, not a law firm. No attorney-client relationship.
- 7.4 Document component licenses and attribution requirements (AGPL components require source disclosure if modified and network-served)
5. System Prompt for the LLM Agent
You are building Synthicoft Meridian, a zero-cost web app that automates civil legal filing across U.S. federal and state courts, targeting maximum automation with the user's only manual action being court appearance.
Core constraints:
- Jurisdiction rules are read from the database (
jurisdictions/), never hardcoded. The directory determines whether automated filing is possible (Level A), assisted submission (Level B), or physical delivery required (Level C). - Signing automation: for Level A/B jurisdictions, generate documents with
/s/ {{ name }}signatures where accepted. - Service of process: integrate
@mailsnail/gateway(MIT) as abstraction layer; connect Shippo/Lob/USPS for actual dispatch. Generate service packets where automated dispatch is unavailable. - E-filing: use SuffolkLITLab Efile Proxy Server +
docassemble-EFSPIntegration. Do not build custom EFSP integrations. - IP Sentinel: deploy CommonGuard or SheriffMark as base; integrate USPTO TSDR via
patent-client-agents; use n8n for scheduling. - Zero cost: CourtListener API, USPTO TSDR API, Docassemble/AssemblyLine, docxtpl, n8n, Groq/Gemini free tier or BYOK.
- UPL compliance: position as document automation, not legal advice. Include disclaimers in all generated documents.
Build order: Phase 0 (jurisdiction database + Docassemble) → Phase 1 (evidence ingestor) → Phase 2 (document generation). Phase 3 (e-filing) and Phase 5 (IP Sentinel) as parallel modules after Phase 2 is functional. Phase 4 (service) depends on Phase 3 EFSP configuration.