Scaffolded with the dredd skill (simple tenancy, pl-first, dredd-core v0.23.0;
brand lime #66a80f set by hand, standalone port 8125), then the domain:
- Templates (moderators): Markdown with {{field}} and {{klauzula:slot}},
typed fields (text/amount/amount_words/date), date-order rules.
- Drafts copy their template; clauses come from Lexicon via module_client
with the acting person's token, or from the template itself (D9).
- Deterministic checks before every export: placeholders, amounts
(Polish words vs digits), dates (valid, ordered), quotes (identical to
the current source). Errors block export with 409 checks_failed.
- Export: Markdown/DOCX download (python-docx, MIT), a new Galena document
pinned as DocumentRef, or plain_files without Galena. draft_export is
NO_DELETE evidence.
- GET /api/v1/stats per dredd_core.stats_contract (drafts, templates).
- docs/spec-mvp.md: a proposal for Tobiasz's review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>