Litigation Planner suite — extract Fristenrechner/Verfahrensablauf into a Go package for paliad + youpc.org reuse (inventor) #124
Open
opened 2026-05-26 07:56:08 +00:00 by mAi
·
4 comments
No Branch/Tag Specified
main
mai/planck/coder-b5-b6-train-share
mai/archimedes/fixer-port-engine
mai/maxwell/coder-b4-akte-mode
mai/lorenz/coder-b3-event-triggered
mai/euler/fixer-builder-add
mai/brunel/fixer-prod-500s-after-b1
mai/galileo/coder-b1-b2-mvp-train
mai/pasteur/fixer-pkg-litigationplann
mai/newton/coder-b0-scenario-db
mai/edison/inventor-prd-columnar
mai/knuth/coder-workflow-tracker
mai/atlas/inventor-extend-tools
mai/cronus/inventor-unified
mai/atlas/inventor-deadline-system
mai/atlas/inventor-followup-rules
mai/athena/consultant-deadline
mai/brunel/fixer-dark-mode-support
mai/knuth/coder-cronus-fristenrechn
mai/ritchie/coder-mig-153-proceeding
mai/atlas/inventor-proceeding
mai/cronus/inventor-fristenrechner
mai/curie/coder-mig152-clone-dedupe
mai/darwin/researcher-lexy-draft
mai/knuth/coder-dedupe-null
mai/cronus/coder-composer-slice-f
mai/cronus/coder-composer-slice-e
mai/cronus/coder-composer-slice-d
mai/curie/coder-slice-b6-url-rename
mai/curie/coder-slice-b5-go-rename
mai/cronus/coder-composer-slice-c
mai/curie/coder-slice-b4-destructive-drop
mai/cronus/coder-composer-slice-b
mai/cronus/coder-composer-slice-a
mai/cronus/inventor-prd-for
mai/knuth/coder-verfahrensablauf
mai/ritchie/coder-make-backup
mai/diesel/fixer-dark-mode-css
mai/curie/coder-slice-b3-read-cutover
mai/diesel/fixer-verfahrensablauf
mai/curie/coder-slice-b2-dual-write
mai/cronus/coder-slice-d-scenarios
mai/knuth/coder-backfill-applies
mai/hermes/gitster-verfahrensablauf
mai/cronus/coder-berufung-labels-refactor
mai/diesel/hotfix-2-mig-134-missing
mai/curie/coder-slice-b1-procedural-events
mai/cronus/coder-slice-c-upc-snapshot
mai/brunel/hotfix-rename-upc-apl
mai/cronus/coder-slice-b3-primary-party
mai/cronus/coder-slice-b2-catalog-query
mai/cronus/inventor-litigation-slice-b
mai/curie/researcher-slice-b-zero
mai/cronus/inventor-litigation
mai/artemis/gitster-remove-admin
mai/ritchie/coder-sort-post-trigger
mai/knuth/coder-conditional-label
mai/hermes/coder-verfahrensablauf
mai/brunel/rebase-121-conditional
mai/knuth/coder-conditional-rule
mai/hermes/gitster-dark-mode-fix
mai/ritchie/coder-submission-form
mai/artemis/gitster-re-surface
mai/brunel/fixer-views-any-filters
mai/cronus/coder-cicd-slice-a
mai/knuth/coder-wave-1-tier-1-rule
mai/ritchie/coder-upc-damages-add
mai/cronus/inventor-ci-cd-pre
mai/brunel/rebase-108-language
mai/hermes/gitster-admin-rules-list
mai/artemis/gitster-submission
mai/icarus/gitster-verfahrensablauf
mai/orpheus/gitster-search-input
mai/atlas/coder-event-card-choices-slice-ab
mai/hermes/gitster-date-range
mai/demeter/gitster-submission
mai/knuth/coder-hl-patents-style
mai/hermes/gitster-draft-editor
mai/atlas/inventor-per-event-card
mai/knuth/coder-deadline-rule-tier
mai/cronus/coder-procedural-events-slice-a
mai/hermes/gitster-deadline-form
mai/artemis/gitster-add-missing-i18n
mai/demeter/gitster-paliadin-chat
mai/brunel/wave0-tier0-deadline-fixes
mai/artemis/coder-docker-compose-yml
mai/icarus/coder-inbox-overhaul-slice-a
mai/atlas/coder-date-range-picker-slice-a
mai/brunel/fixer-de-inf-lg-cfi
mai/cronus/inventor-procedural
mai/hermes/gitster-event-type-modal
mai/cronus/coder-backup-mode
mai/curie/researcher-bulletproof
mai/hermes/gitster-draft-editor-focus-jump
mai/cronus/inventor-backup-mode
mai/hermes/gitster-submissions
mai/artemis/gitster-deadline-form
mai/brunel/fixer-submission-preview
mai/brunel/fixer-test-data-reset
mai/artemis/gitster-approval-withdraw
mai/demeter/gitster-events
mai/hermes/gitster-sidebar-loses
mai/hermes/gitster-browse-a
mai/brunel/fixer-submissions-demo
mai/icarus/inventor-inbox-overhaul
mai/atlas/inventor-symmetric-date
mai/artemis/gitster-demote-daten
mai/hermes/gitster-team-view-mailto
mai/knuth/coder-global-schriftsatze
mai/knuth/coder-schriftsatze
mai/ritchie/coder-author-demo-docx
mai/knuth/coder-add-schriftsatze
mai/knuth/coder-add-checklist
mai/knuth/coder-anchor-lookup-must
mai/tesla/dashboard-resize-clamp
mai/knuth/coder-demote-projekt
mai/knuth/coder-paliadin-chat
mai/knuth/coder-print-views
mai/knuth/coder-add-proceeding
mai/knuth/coder-submission
mai/ritchie/coder-extend-team-email
mai/knuth/coder-changelog-catch-up
mai/tesla/dashboard-overlap
mai/pasteur/fixercoder-dashboard
mai/newton/inventor-configurable
mai/dirac/inventorcoder-user
mai/gauss/inventorcoder-team-admin
mai/kepler/inventorcoder-project
mai/darwin/roadmap-ccr-en
mai/euler/coder-small-ux-polish
mai/darwin/fristenrechner-cleanup
mai/darwin/fixercoder-priority-bug
mai/leibniz/inventor-caldav-multi
mai/hertz/inventor-unified-modal
mai/archimedes/inventor-excel-data
mai/boltzmann/inventor-gap-tolerant
mai/copernicus/submission-slice-1
mai/fermi/interactive-session
mai/hertz/inventor-suggest-changes
mai/copernicus/inventor-submission
mai/mendel/test-strategy-slice-1
mai/mendel/inventor-test-strategy
mai/ampere/custom-views-improvements
mai/joule/mig-097-apply-huygens-s
mai/ohm/workstream-b-rename
mai/huygens/workstream-a-backfill
mai/kelvin/t-204-phase-2-proceeding
mai/bohr/ingest-t-paliad-203-rule
mai/curie/fristenrechner-gap
mai/maxwell/inbox-grey-out
mai/rutherford/slice-9-follow-up-b-re
mai/dirac/slice-9-follow-up-a
mai/bose/determinator-cascade-slice-3
mai/bose/determinator-cascade-slice-2
mai/bose/determinator-row-cascade
mai/lorenz/fristen-phase-3-slice-9
mai/curie/fristen-phase-3-slice-12
mai/planck/aichat-phase-b-paliad
mai/young/fristen-phase-3-slice-11b
mai/lorenz/fristen-phase-3-slice-11a
mai/lorenz/fristen-phase-3-slice-10
mai/lorenz/fristen-phase-3-slice-8
mai/lorenz/fristen-phase-3-slice-7
mai/lorenz/fristen-phase-3-slice-6
mai/lorenz/fristen-phase-3-slice-5
mai/lorenz/fristen-phase-3-slice-4
mai/lorenz/fristen-phase-3-slice-3
mai/lorenz/fristen-phase-3-slice-2
mai/lorenz/fristen-phase-3-slice-1
mai/pauli/fristen-phase2-design
mai/tesla/project-timeline-chart
mai/pauli/fristen-logic-audit
mai/pauli/determinator-b1-row-by
mai/noether/tools-cleanup-slice-1
mai/kelvin/inventor-tools-surface
mai/planck/paliadin-per-user-rls
mai/maxwell/bug-bundle-filterbar
mai/faraday/project-timeline-chart
mai/schroedinger/smarttimeline-slice-4
mai/bohr/smarttimeline-slice-3
mai/gauss/smarttimeline-slice-2
mai/riemann/filterbar-phase-2-slice
mai/lagrange/smarttimeline-design-the
mai/curie/researcher-determinator
mai/noether/collapse-regel-typ-on
mai/riemann/inventor-universal
mai/minkowski/project-level-our-side
mai/dirac/inventor-inline-paliadin
mai/feynman/fristenrechner
mai/minkowski/navbar-dashboard-reorg
mai/shannon/approval-rework
mai/einstein/consultant-deadline-data
mai/curie/researcher-upc-rop-audit
mai/noether/paliadin-real-claude
mai/noether/inventor-paliadin
mai/hilbert/inventor-approval-policy
mai/shannon/bug-frist-due-date
mai/fritz/bug-fristen-termine
mai/godel/inventor-projects-page
mai/fritz/bug-paliadin-chat
mai/kepler/inventor-profession-vs
mai/noether/inventor-paliadin-in-app
mai/fritz/bulk-team-email-send-to
mai/noether/inventor-local-chat-for
mai/noether/inventor-data-display
mai/fritz/bug-derived-team-members
mai/fritz/bug-sidebar-visibly
mai/noether/inventor-project
mai/shannon/bug-project-team-add
mai/cronus/inventor-dual-control
mai/fritz/bug-edit-mode-on
mai/cronus/inventor-holidays-per
mai/ritchie/phase-h-ai-deadline
No results found.
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: m/paliad#124
Reference in New Issue
Block a user
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.
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?
m's vision (2026-05-26 09:46)
m's direction (2026-05-26 09:55)
Reuse strategy locked: package-within-project (option 1). No API integration path; no separate service. paliad owns the package; youpc.org imports it as a library.
Phase: inventor design (READ-ONLY)
Inventor → coder gate per project CLAUDE.md.
Scope — design the litigation planner suite
Today's surfaces converging into the suite
/tools/fristenrechner) — manual deadline calculation, project-aware/tools/verfahrensablauf) — abstract browse-a-proceeding, side+appellant+per-card-choicesdeadline_rules+ anchors +project_event_choicesAll three already share
internal/services/fristenrechner.go+projection_service.go. The package extraction formalises that shared core.The package design
Target shape:
Key contract: NO database imports inside
pkg/litigationplanner/calc.go. The calculator takes rules + anchors + choices as Go values. Persistence (Postgres) lives in the catalog implementation. youpc.org provides its OWN catalog impl (likely an in-memory snapshot of the UPC rule subset, pinned to a paliad release).Open design questions
Q1 — Scenarios storage
A. Per-project named scenarios in paliad.project_event_choices: extend the table with
scenario_name+is_active. One project can have N scenarios, switch with a chip. (R) — simplest, no new table.B. New
paliad.scenariostable keyed on project_id + name + achoices jsonbblob. Cleaner separation but duplicates data.C. No persistence — URL-only scenarios, identical to today's per-card-choices URL state. Shareable, ephemeral.
Q2 — User-authored rules (m's 'add proceeding types or specific submissions')
A. Per-project draft rules:
paliad.deadline_rulesgains aproject_idnullable column. NULL = global catalog (current behavior); non-NULL = scoped to that project. Visible only on that project; calculator merges global + project-scoped. (R) — minimal schema change, clean visibility.B. Separate
paliad.project_deadline_rulestable linking projects to ad-hoc rules. More schema but cleaner separation.C. Defer entirely — out of scope for v1 of the planner.
m's framing strongly implies (A) or (B). The lawyer needs to add 'we filed an unusual motion X with deadline Y for a response' on top of the standard catalog.
Q3 — Package boundary for youpc.org
A. Go package within m/paliad (
pkg/litigationplanner). youpc imports via Go module dependency (require mgit.msbls.de/m/paliad/pkg/litigationplanner). Pull paliad as a submodule OR a versioned tag.B. Separate repo
m/litigationplanner, paliad imports it, youpc imports it. Cleaner ownership; more release-coordination overhead.m's pick: A (within paliad). Locked.
Sub-question: how does youpc get a SNAPSHOT of UPC rules without paliad's full DB?
go:embeda JSON snapshot of the UPC rule subset into the package. Refresh via a generator script. youpc gets a static copy; updates ship as paliad releases.(R) = A.1 — embed + generator. youpc.org has zero runtime dependency on paliad; updates are explicit + versioned. The generator script (
scripts/snapshot-upc-rules/main.goor similar) refreshes the embedded JSON on demand.Q4 — Coexistence with current shared core
internal/services/fristenrechner.gois paliad-internal today. Migration options:A. Extract from internal/services into pkg/litigationplanner all at once. paliad's services re-import; youpc imports the same package. Single source of truth.
B. Duplicate the calc into pkg/litigationplanner first, prove youpc can use it, then DRY paliad to also use it. Two-step migration.
(R) = A (atomic move). The current shared core IS the package's reason to exist. Duplicating creates a drift risk.
Q5 — Versioning
If the rule data shape changes (Wave 2 primitives, Tier 3 schema work, future), youpc's embedded snapshot drifts from paliad's runtime. How do we handle version skew?
A. Strict version pinning: every paliad release publishes a
litigationplanner@vN.M.Ktag; youpc updates Go module version on its own cadence. Stale snapshots are tolerated; new rule shapes break the build at youpc update time.B. Backward-compatible package API: the package versions ITS API explicitly; rule additions are forward-compatible; only breaking shape changes bump a major.
(R) = B with semver discipline. The package's API stays stable; the embedded snapshot is what changes.
Deliverable
docs/design-litigation-planner-2026-05-26.mdon branchmai/<inventor>/litigation-planner-design. Sections:pkg/litigationplanner/...)Hard rules
mai instruct head. Default to (R) per the questions above; escalate Q1/Q2 material picks.internal/services/fristenrechner.go+projection_service.go+deadline_calculator.gocarefully — they're the body to extract.paliad.deadline_rulescolumns,paliad.proceeding_typescolumns) so the package's RuleStub type matches.When done
Push design doc +
mai report completedwith 'DESIGN READY FOR REVIEW'. Inventor parked. Head gates coder shift to Slice A.Out of scope
Addendum from m (2026-05-26 10:14)
Reinforces the existing project CLAUDE.md language convention. Specifically for the new
pkg/litigationplanner/extraction (Slice A):litigationplanner, notfristenrechner.Frist→Deadline,Verfahrensschritt→ProceduralEvent,Klägerseite→ClaimantSide,Gegnerseite→OpposingSide,Träger→Carrieror similar.internal/services/fristenrechner.gocarries some German-flavoured identifiers — those move into the new package as the rename target. Slice A's atomic-move is the cleanest time to rename.Klageerhebung,Schriftsatz) — those are product/legal vocabulary, not code names. But: code identifiers should still use English equivalents (statement_of_claim_code, notklageerhebung_code).Fold this into Slice A's coder instructions. The renaming work IS part of Slice A; not deferred.
Slice A landed (atomic extract →
pkg/litigationplanner)docs/design-litigation-planner-2026-05-26.md(commits 8240717, 6e58595 — m's AskUserQuestion picks folded in:paliad.scenariosjsonb table + abstract scenarios, no user-authored rules).internal/servicesinto newpkg/litigationplanner. Net diff: +3 277 / −1 914 lines across 18 files.youpc.orgreuse.pkg/litigationplanner.Slices B-F still open. Slice B (catalog interface + Berufung unification) is next — m approved 2026-05-26 12:32: the 4-5 parallel Berufung proceeding_types (UPC_APP / UPC_COST_APPEAL / UPC_APP_ORDERS / Schadensbemessung / Bucheinsicht) get unified into one
Berufungproceeding_type +appeal_targetfield; system derives the correct frist sequence from the target. cronus parked on Slice A coder mode awaiting Slice B greenlight.Slice B landed (catalog interface + 3 unifications)
Three sub-slices, three reviewable merges:
upc.apl.merits7 rules,upc.apl.cost2,upc.apl.order7) into oneupc.apl+appeal_targetdiscriminator. 5 chip targets in the Verfahrensablauf picker: Endentscheidung, Kostenentscheidung, Anordnung, Schadensbemessung, Bucheinsicht. Schadensbemessung + Bucheinsicht are enum-defined and return empty timelines pending rule seeding (follow-up). Obsolete proceeding_types archived viais_active=false, never dropped.Catalog.LookupEvents(ctx, axes, depth)with 5 optional axes (jurisdiction, proceeding_type_id, party, event_category_id, appeal_target) and depth toggle (next/all-following). No schema delta — reuses existingparent_id+sequence_ordergraph. 5 test cases (live-DB skipped withoutTEST_DATABASE_URL). HTTP endpoint deferred to a future slice.RAISE NOTICElisting dirty rows +RAISE EXCEPTIONif any). Constraint:primary_party IS NULL OR primary_party IN ('claimant','defendant','court','both'). Package:PrimaryParty*constants +PrimaryParties[]+IsValidPrimaryParty(). Rule-editor pre-validates with user-friendly 400 before DB CHECK fires.pkg/litigationplanner/primary_party_test.goadds the first unit tests in the package.Migrations: 134 (Berufung), 135 (primary_party CHECK) — both purely additive, both audit-first where data changes, no destructive drops. Down-migrations preserve safety.
Open follow-ups in this issue's scope:
/admin/rules.LookupEvents— when a frontend surface needs it.Suite complete — Slices A → F all landed today (2026-05-26)
pkg/litigationplanner: Merge d1d0cf9upc.apl.unified+appeal_targetdiscriminator. (3 hotfixes applied: code-shape #130, audit_reason #131, updated_at column.)Catalog.LookupEvents(ctx, axes, depth), 5 optional axes.primary_partyCHECK constraint: Merge 932b177 — mig 135 audit-first.cmd/gen-upc-snapshot/,pkg/litigationplanner/embedded/upc/.paliad.scenariosjsonb table + Catalog API + engine adapter: Merge 3b601f1 — mig 145 additive; 6 REST endpoints + RLS.mai/cronus/coder-slice-f-paliad-snapshot-integrationon the youpc.org repo (offe0e4e407); local-replace dev wiring, awaiting paliad release tag for the cutover.Companion landings unrelated to a specific slice but on the same surface:
applies_to_targetbackfill for Schadensbemessung + Bucheinsicht — Merge 727e01cOpen follow-ups (not blockers, not closing this issue — m closes):
/admin/rulesif needed)./api/upc/*endpoints.