typst-adjudication-generator
Source: .opencode/skills/typst-adjudication-generator/SKILL.md — site rebuilt 2026-09-05.
--- name: typst-adjudication-generator description: Generate formal UK statutory adjudication pleadings in Typst (Notice of Adjudication, Referral Notice, Response, Reply, Rejoinder, Surrejoinder, Rebutter) via a unified template with numbered clause engines, using a form-only exemplar library of real served pleadings. Use when asked to draft or edit an adjudication pleading or dispute-resolution document.
Typst Adjudication Pleading Suite Skill¶
MANDATORY: run typst-planner first. No pleading is drafted or compiled until a typst-planner plan for this document has been emitted and signed off.
This skill governs the drafting, structure, and formatting of formal adjudication pleadings in Typst, ranging from the initial Notice of Adjudication through to the Surrejoinder.
1. Document Variable Bindings¶
Pleadings created with this skill declare primary parties and parameters at the top of the .typ file:
#let document-type = "NOTICE OF ADJUDICATION" // Alternatively: "REFERRAL NOTICE", "RESPONSE", "REPLY", "REJOINDER", "SURREJOINDER", "REBUTTER", etc.
#let referring-party = "SCOTFRAME TIMBER ENGINEERING LTD"
#let referring-co = "SC118213"
#let referring-address = "Inverurie Business Park, Souterford Avenue, Aberdeenshire AB51 0ZJ"
#let respondent = "JAT CONSTRUCTION LIMITED"
#let respondent-co = "07904547"
#let respondent-address = "12 United Reform Church, Bangor Road, Penmaenmawr, Wales LL34 6DA"
2. Helper Functions¶
Paragraph & Clause Helpers¶
#p("1.", [Body text]): Hanging paragraph for main pleading statements (dx: -2.2cm).#cl("1.1", [Body text]): Sub-clauses indented correctly.
3. Document Sequence¶
- Cover Page:
- Uses a custom Adjudication Instance block.
- Centers
ADJUDICATIONand[DOCUMENT-TYPE]. - Right-aligns the Referring Party details.
- States
THE REFERRING PARTY(centered). - States
against(centered). - Right-aligns the Respondent details.
- States
THE RESPONDENT(centered). #pagebreak()- Body Geometry: Margin
(left: 4.5cm, right: 2.5cm, top: 3.5cm, bottom: 3.5cm). Page counter reset#counter(page).update(1). - Pleading Body: Structured using standard Typst headings
=and#p(...)paragraphs. - Sign-off Block: Right-aligned formal signature block at the end with the Date, Firm Name, Address, and "Solicitor for the [Party]".
3A. Adjudication Exemplar Layer (FORM ONLY)¶
- A library of real, served/issued adjudication pleadings lives at
resources/Adjudication_Exemplars/(indexed inCATALOG.md), covering the full sequence: notices of adjudication (01_Notices_of_Adjudication), referral notices (02_Referral_Notices), responses (03_Responses), replies (04_Replies), rejoinders (05_Rejoinders), and surrejoinders/rebutters/further responses (06_Surrejoinders_Rebutters). - FORM ONLY — zero content weight. The exemplars are patterns of layout only: instance block arrangement, party designation placement, section order and heading conventions, clause numbering style, timetable and statement-of-truth sections, appendices/productions index layout, signature blocks. Their substantive content (wording, amounts, facts, legal propositions, authority references) carries no weight whatsoever and must never be echoed, adapted, or relied on when drafting.
- Always check the exemplar library before drafting or editing any
adjudication pleading. Read the matching folder's most similar exemplar
(PDF for final layout,
.docxfor editable structure) and mirror only its formal structure with the current case's details. - Never copy exemplar content: parties, sums, dates, contract details, facts, or phrasing from an exemplar must never be taken into a new document — even rephrased — because it belongs to other matters. Substantive content comes only from the client's case, the contract, and the user's instructions.
- Exemplars are internal reference material, never client content: never send an exemplar itself (or content derived from one) to a client, respondent, adjudicator, or court.
- Sequence fidelity (per the Stein chain in
CATALOG.md): Notice → Referral → Response → Reply → Rejoinder → Surrejoinder → Rebutter → further responses. Draft only the document actually requested, and keep each later round answering the immediately preceding round's points (never reach back past the last exchange).
4. Typst Manual & Reference¶
Before drafting or when unsure of any Typst function, parameter, or syntax, consult the local, searchable mirror of the official Typst documentation at:
..\_typst-manual\
- Function/element/type reference (e.g.
#counter,#align,#block,#grid,#set,#pagebreak,#text,v,h): search the Rust doc comments under_typst-manual\typst-src\crates\typst-library\src\— every library item's full documentation and examples live there directly above its definition. - Language / syntax / scripting (
#let,#set,#show, markup, math,context):_typst-manual\typst-src\docs\content\reference\language\*.typandtutorial\. - Tutorials & guides:
_typst-manual\typst-src\docs\content\tutorial\andguides\.
See _typst-manual\README.md for lookup guidance.
Self-Learning: Runtime Environment Probe (RUN FIRST)¶
Before generating ANY document, probe the actual environment so you never ship a font or package that does not exist (Typst silently falls back, causing font discrepancies between the preview and the intended design):
powershell -ExecutionPolicy Bypass -File "..\_typst-manual\probe-fonts.ps1"
Read the output and the persisted report _typst-manual\font-probe-report.json. Then:
- Rewrite every font stack so its FIRST member is an installed font from the report
(e.g. this machine lacks
Linux Libertine/Liberation Serif, so prefer a real installed serif such asLibertinus Serif,Georgia,Cambria,Palatino Linotype, orTimes New Roman). Never leave a missing font as the leading choice. - Verify each
@preview/...import is reported as cached; if missing, note that compilation needs network or the package must be cached first. - Only after resolving fonts/packages should you compile and generate the preview.
5. Compilation & Native Preview Workflow¶
Whenever generating or editing an adjudication pleading with this skill, you MUST compile the document into high-resolution PNGs and generate an interactive Carousel Artifact so the user can preview it natively in a local previews\ folder:
Step 1: Compile to PNG in Artifact Directory
You MUST append a unique identifier (like the time or a random string) to the filename output so the UI doesn't cache previous images. For example: adjudication-v123-page-{0p}.png.
typst compile adjudication.typ "previews\adjudication-v123-page-{0p}.png" --ppi 144
Step 2: Create a Markdown Artifact (document_preview.md)
Set UserFacing: true and output a markdown preview referencing the PNGs by relative path.
# Native Document Preview
````carousel

<!-- slide -->

````