Forward-looking work that is agreed on but not yet built. Past work lives in
the Status log in MEMORY.md; this file is the other
direction — what we still owe.
Each item records the why, the concrete blockers, and a staged plan, so a future session can pick it up without re-deriving the analysis. Items move to the Status log when they ship.
Status: planned — not started. Blocked on engine gaps (see below).
Ship a browsable catalog of ready-made print profiles, keyed by court and filing type (a brief, a motion, and an appendix in the same court need not share one format), so a filer picks their court and document type and gets a document whose formatting matches that court’s local rules. Today there is exactly one generic Court Filing seeded profile; it encodes the conventions most courts share, not any specific court’s rules.
This is formatting-only, and the scope line matters. A PrintProfile
controls rendering — PrintService receives already-authored Markdown, so a
profile can set margins, spacing, fonts and page furniture, but it cannot
supply a caption block, a certificate of service, or enforce a page or word
limit. Those are document content concerns and need a separate capability
(boilerplate document templates + a limits check), tracked as item 2 below.
Until that exists, the catalog must be described to users as a formatting
starting point, never as compliance.
Local formatting rules are unforgiving and vary per court — margins, line spacing, font family and size, whether numbered pleading paper is required, caption layout, page or word limits, certificates of compliance. Getting them wrong gets filings rejected. This is the highest-leverage thing the print system could offer legal users, and it builds directly on the legal-mode work already shipped (PRs #12, #16, #19–#21).
Rough count of what “every court” means:
| Tier | Approx. count |
|---|---|
| Federal — district courts | 94 |
| Federal — courts of appeals | 13 |
| Federal — Supreme Court | 1 |
| Federal — bankruptcy + specialty (Fed. Cl., Tax, CIT, CAVC, …) | 90+ |
| State — high courts | 50 + DC + territories |
| State — intermediate appellate | ~40 |
| State — trial courts (rules often set county-by-county) | 50+ |
So 300+ templates if taken literally, and the trial-court tier is not even uniform within a state. This is not a single release.
These are prerequisites — the templates cannot be correct without them. All verified against the current code:
lib/ (grep for lineNumber/pleading finds only
comments). California and several other states require 28 numbered lines
with vertical margin rules. Without this, an entire tier of templates is
impossible, not merely approximate.print_preview_view.dart (_previewFormat, defaulting to A4). US
courts mandate Letter, some filings Legal. A court template that cannot
pin its own page size is wrong the moment it is opened.PrintProfile.marginCm is one
number applied to all edges. Courts routinely specify per-edge margins
(e.g. 1” top/bottom/right with a wider left edge for binding).legalMode hardcodes 12pt in
markdown_pdf_builder.dart. Courts that require 13pt or 14pt cannot be
expressed.PrintService.availableFonts is seven Google families (Roboto, Inter,
Lato, Open Sans, Montserrat, Merriweather, Noto Serif) with a Roboto
fallback. Times New Roman — the most commonly mandated family — and
Century Schoolbook (SCOTUS) are both absent, so those templates would
silently fall back to a non-conforming face. This one is not just a
missing field: it needs licensed or metric-compatible substitutes
(e.g. Liberation Serif / TeX Gyre Schola) embedded in the PDF, plus a
decision about shipping font binaries and their licences.PrintProfile.seeds is a
const list of three, and profiles persist as one JSON list in
shared_preferences. That mechanism does not scale to hundreds of
templates — it needs a bundled read-only asset catalog, kept separate
from the user’s own editable profiles.lineNumbers,
lineNumberCount, margin rules), per-edge margins, page size and body
font size as profile fields, and the court-required font families with
embedding. Each is independently useful and independently reviewable; ship
them as separate PRs. Gap 5 gates Phase 2 — SCOTUS and most federal
templates are unshippable until a conforming face is available, so it is
not optional cleanup.shared_preferences), entries keyed by court + filing type
so a court can carry multiple profiles/skeletons, with browse/search by
jurisdiction and “use this as a starting point” → copies into the user’s
profiles. Read-only so a rules update can replace a template without
clobbering user edits.
Copies must carry their origin — source template id + version + the
lastVerified they were taken from — because a bundled rules update
replaces only the catalog entry, leaving already-copied profiles (including
ones bound to live documents) silently stale. That provenance is what makes
a reconciliation flow possible: on catalog update, flag bound documents
whose copy is behind and offer a diff/re-pull. Without it a current
lastVerified on the catalog is decoration, not a safeguard.“Every state and federal court” is the direction, not a shippable definition of done — Phase 5 openly accepts coverage that may never be complete, so treating the whole item as one deliverable would leave it permanently open. Split it instead:
Every tier in the Scope table maps to exactly one phase: appellate federal → Phase 2, district + bankruptcy/specialty → Phase 3, state appellate → Phase 4, trial → Phase 5. Nothing in that table is unassigned.
lastVerified date surfaced in
the UI, plus a plan for who re-verifies and how often. Without this the
catalog decays silently into wrong-but-confident.Status: planned — not started. Prerequisite for the compliance half of item 1; independent of it otherwise.
Item 1 can only ever deliver formatting. The parts of a court filing that
a PrintProfile structurally cannot supply need a second capability:
<div> flex/align support in the PDF builder
(PRs #16, #19) is what makes such captions renderable, but nothing
generates them.Pairs naturally with item 1’s catalog: a court + filing-type entry would carry both a print profile and a document skeleton, so “pick your court and filing type” yields a formatted document that already has the right scaffolding. Until this ships, item 1’s catalog is described as formatting-only.