Brief content generator: caption-first, expand to full document scaffolding #42
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
HLC patent attorneys start every brief (Schriftsatz) from a static Word template (
HL Patents Style.dotm). The template gives the visual frame — typography, numbering, ribbon helpers — but not the content layer: the right caption for the chosen court, the right party block in the right language, default phrases that recur in 90 % of briefs of a given type, and the metadata that already lives in the PaLiAd DB (Client, Litigation, Patent, Case, parties, case number, court).Today every brief begins with re-typing facts PaLiAd already knows. The brief generator removes that step.
Vision
A wizard-driven generator inside PaLiAd. The user picks:
…and gets back a ready-to-edit
.docx(HL Patents Style typography) with everything PaLiAd already knows filled in:MVP — Briefkopf only
First slice ships the caption / Briefkopf for one document type (generic brief, no Klage-spezifika), three courts (UPC LD München, UPC CD Paris, BPatG), both languages. Outputs
.docx.Wizard route:
Cases/<id>/new-brief→ 3-step form (doc type, court, language) →.docxdownload.Demonstrates the full data-pull → render → download pipeline at the smallest surface that still proves the architecture.
Architecture
Pure server-side
.docxrendering — no Word required at render time. Master templates with placeholders ({{ court_name }},{% if language == "de" %}…{% endif %}) live intemplates/brief/in this repo, version-controlled alongside the code.Candidate engines (decision in a follow-up issue):
docxtpl(Python, Jinja2 syntax inside Word docs, MIT) — recommended starting point, isolatable as a small sidecar called from the Go backenddocxtemplater(Node.js, mature, license check needed for commercial use)Integration shape: Go handler receives form payload → assembles render context from DB → invokes templater → streams resulting
.docxto the browser.Data model touchpoints
Already in PaLiAd (per project goal: Client → Litigation → Patent → Case):
May need to add or extend:
Schema additions for any of these get their own follow-up issues; MVP is read-only on the current schema and falls back to manual input for fields not yet captured.
Future scope (not MVP)
.dotmwith PA-specific BuildingBlocks pre-loadedOpen questions
docxtpl) vs Node sidecar (docxtemplater) vs pure Go. Recommend Python for MVP unless someone objects..docx? Likely the same workflow as HL Patents Style: m authors in Word, commits, deploy picks up..docxshould inherit HL Patents Style typography so subsequent editing in Word feels native. Either embed the styles in the master template or attach the.dotmglobally on render.Out of scope (this issue)
HL Patents Styletemplate changes (lives in HL/mWorkRepo)Done when
.docxwith caption + parties + Aktenzeichen + standard letterhead filled in.docxopens cleanly in Word and inherits HL Patents Style typography