UPC briefs parenthesise the patent kind code ("EP 1 234 567 (B1)")
where the DE convention runs it inline ("EP 1 234 567 B1"). Slice 2
adds the {{project.patent_number_upc}} placeholder for the new UPC
templates (Q-S2-4 locked at 'all yes' on 2026-05-20).
Pure function alongside legalSourcePretty. Trailing single-letter +
single-digit kind code regex; everything else preserved. Pass-through
on unrecognised shapes — the lawyer's draft never sees a number worse
than the source value.
Wired into addProjectVars so every render exposes both forms
({{project.patent_number}} and {{project.patent_number_upc}}). UPC
templates pull the parenthesised form; DE templates ignore it.
8 test cases (more than the 6 in the brief) covering:
- EP B1 / EP A1 — common case
- DE national with kind code
- No kind code → pass-through
- Whitespace trimming
- Empty input
- WO publication number (no kind-code shape) → pass-through
- Two-digit kind code (B12) → pass-through (intentional — real EP
kind codes are single-letter + single-digit)
No schema change, no migration, no var-bag namespace additions
beyond the one new placeholder.
Appended §19–§28 to docs/design-submission-generator-2026-05-19.md
covering the Slice 2 scope per the head's 2026-05-20 brief. NO code
changes; doc only. NO AskUserQuestion fired — head batches the six
m-decision items (Q-S2-1..Q-S2-6) across four inventors today.
Inventor picks (defaults):
- Q-S2-1: 5 templates (3 DE-LG: klage/replik/anzeige, 2 UPC-CFI:
soc/sod) + 2 family-tier skeletons (de.inf.lg.docx,
upc.inf.cfi.docx).
- Q-S2-2: render {{upc.language_of_proceedings}} as missing marker;
defer paliad.projects.upc_language column to Slice 3.
- Q-S2-3: ship both family-tier skeletons — exercises the fallback
chain's third tier (wired in Slice 1, never tested).
- Q-S2-4: ship a {{project.patent_number_upc}} pretty-print helper
(~40 LoC + 6 tests). Pure function, no schema change.
- Q-S2-5: I author bootstrap .docx via python-docx (Slice 1 pattern),
HLC legal team replaces with polished versions in a follow-up.
- Q-S2-6: defer EPO + DPMA to Slice 3 (different party model needs
separate var namespace).
Net code change if picks land as recommended: ~40 LoC + 6 tests, no
migration, no new bag entries. The work is template authoring.
Live-verified premises (2026-05-20):
- Slice 1 merged at defa516; Schriftsätze tab live on paliad.de.
- Corpus = 100 published filing rules across 20 active proceedings;
top by count: upc.inf.cfi (15), upc.rev.cfi (14), de.inf.lg (7).
- legalSourcePretty covers every UPC.RoP.* citation in the corpus —
no code change needed for Tier-B templates.
- {family}.docx fallback tier is wired in Slice 1 but unexercised;
Slice 2 is the moment to test it.
Inventor parks; awaiting head's batched picks before any coder shift.
2026-05-20 12:54:36 +02:00
3 changed files with 448 additions and 0 deletions
@@ -782,3 +782,365 @@ go/no-go before any coder is hired. After m approves:
- Phase 11 (AI-drafted body) is a SEPARATE task — not auto-spawned.
Inventor parks here.
---
# Slice 2 brief — 3-5 next templates
**Status:** brief (no AskUserQuestion per head's instruction
2026-05-20; decisions batched with three other inventors).
**Author:** copernicus (inventor → continued)
**Branch:**`mai/copernicus/submission-slice-1` (appended on top of
the merged Slice 1).
**Slice 1 merge:**`defa516` on 2026-05-19, live on paliad.de.
## §19 What this brief is
Slice 1 shipped the engine + template registry + one template
(`de.inf.lg.erwidg` Klageerwiderung) end-to-end on the project detail
page. Slice 2 expands the template roster to 3–5 more submissions
without touching the engine — the question is *which* and *what
new variables, if any*. This brief surfaces the inventor's ranking
and a short list of decisions m needs to weigh in on; no
AskUserQuestion is fired (head's batch path).
## §20 Premises verified live (2026-05-20)
| Claim | Verification |
|---|---|
| Slice 1 merged at `defa516` | `git log origin/main` shows `defa516`-ancestor commits + Schriftsätze tab live on paliad.de. |
| Engine, registry, vars bag from Slice 1 unchanged | No commits to `internal/services/submission_*.go` since `ad7b705` (Slice 1 frontend). |
| Submission corpus is **100 published filing rules** across **20 active proceedings** | `SELECT COUNT(*) FROM paliad.deadline_rules WHERE event_type='filing' AND lifecycle_state='published' AND submission_code IS NOT NULL` = 100. Top by filing count: `upc.inf.cfi` (15), `upc.rev.cfi` (14), `de.inf.lg` (7), `de.null.bpatg` (7), `epa.opp.opd` (7), `de.inf.bgh` (6), `epa.opp.boa` (6). |
| Klageerwiderung template still resolves on the live `templates/_base/de.inf.lg.erwidg.docx` path | Live registry `HasTemplate("de.inf.lg.erwidg")` returns true; SHA `7f97b7f9` from Slice 1's upload. |
| `{family}.docx` fallback tier is wired but unexercised | `services/submission_templates.go::candidates()` emits 4 candidates including the family tier; no `_base/{family}.docx` file exists in mWorkRepo yet. Slice 2 is the moment to author one. |
| `legalSourcePretty` already covers `UPC.RoP.*` | Slice 1 test table includes `UPC.RoP.23.1` → "Regel 23.1 VerfO UPC" / "Rule 23.1 RoP UPC". Sampling the corpus: every UPC.RoP.* citation is two- or three-segment, all hit the existing patterns. No code change needed for Tier-B templates. |
## §21 Candidate templates
Ranked by (HLC usage frequency × engine-stress diversity × var-bag
overlap with Slice 1). The 100-row corpus and the proceeding-frequency
table both inform this; the cluster of 7+ DE-LG, UPC-CFI, BPatG, EPO
submissions hints at the practice's gravity centre.
These map onto the existing ~30-placeholder bag with **zero** new
variables. Authoring is the only work; engine + registry are
sufficient.
| # | submission_code | Name (DE / EN) | Party | Legal source | Notes |
|---|---|---|---|---|---|
| 1 | `de.inf.lg.klage` | Klageerhebung / Filing of Action | claimant | DE.ZPO.253 | The *other side* of Klageerwiderung. Symmetric counterpart; HLC represents claimants in a non-trivial fraction of patent disputes. Same vars as the shipped template. |
| 2 | `de.inf.lg.replik` | Replik / Reply | claimant | (none) | Claimant's response to the Klageerwiderung. Rounds out the LG pleading exchange. Same vars. |
| 3 | `de.inf.lg.anzeige` | Anzeige der Verteidigungsbereitschaft / Notice of Intent to Defend | defendant | DE.ZPO.276.1 | Short, frequent, mechanical. Tests the engine on the lighter end (one-paragraph notice). Same vars. |
### §21.2 Tier B — UPC-specific (stress the var bag)
UPC pleadings are HLC's growth surface and the place where the
variable bag needs to flex. Tier B templates expose:
- UPC-specific party labels (parties.{claimant,defendant} still work
— UPC uses Claimant/Defendant in English) but with local-division
context that DE doesn't have.
- UPC.RoP.* citation density: every UPC filing cites at least one
Rule, often three.
- A different patent-number convention (UPC briefs typically
parenthesise the kind code: "EP 1 234 567 (B1)" vs the DE form
"EP 1 234 567 B1").
| # | submission_code | Name (DE / EN) | Party | Legal source | Notes |
- **UPC revocation (`upc.rev.cfi.*`):** structurally close to UPC
infringement but with reversed our_side semantics — claimant
attacks the patent. Mostly works with current vars, but the
template body needs different prose. Slice 3 candidate.
- **Appellate DE (`de.inf.olg.*`, `de.null.bgh.*`):** appeal-tier
templates need `{{prior_instance.judgment_date}}` and
`{{prior_instance.case_number}}` references — new var namespace.
Slice 4 candidate when the project-tree appeal model lands.
## §22 Variable bag delta
Slice 1's bag (~30 placeholders, see §6.2 of the original brief)
covers Tier A drop-in templates **with no additions to
`services/submission_vars.go`**. The work is entirely in the .docx
files.
Tier B (`upc.inf.cfi.*`) wants 3-4 UPC-specific placeholders.
Inventor recommends shipping the minimum:
| Placeholder | Source | Slice 2 plan |
|---|---|---|
| `{{upc.local_division}}` | derive from `project.court` (strip "Local Division" suffix; for v1, render `project.court` directly) | **No new var.** Templates use the existing `{{project.court}}` placeholder. Pretty-print helper deferred. |
| `{{upc.language_of_proceedings}}` | not on `paliad.projects` today | **Decision Q-S2-2**: ship missing marker, or add `paliad.projects.upc_language` (mig 107)? Inventor leans missing-marker — adding a column for one cluster of templates is premature; promote if Slice 3 demands it. |
| Multi-claimant / multi-defendant blocks | `paliad.parties` has multiple rows per role | **No change.** Slice 1 §13.6 noted multi-party as Phase 2 work via `lukasjarosch/go-docx`'s loop syntax. Slice 2 stays single-party; templates that want multi-party use static numbered placeholders (`{{parties.claimant.1.name}}`, etc., if m wants to ship this). Deferred. |
Net code change for Slice 2: **0 LoC if Q-S2-2 = missing-marker AND
Q-S2-4 = no helper. ~40 LoC + 6 tests if Q-S2-4 = helper.**
The variable contract surface stays additive — every Slice 2
placeholder either reuses Slice 1's bag or renders the missing
marker on unbound keys, so lawyers see explicit gaps in Word rather
than silent omissions.
## §23 Generic vs jurisdiction-specific split
The fallback chain (§5 of the original brief) has four tiers:
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.