Court Closeout Reconciliation
What this skill does
Produces a clerk-ready, schema-conformant closeout JSON for a court disposition / financial / payment-plan batch by reconciling local payload materials (hearing notes, audit memos, finance worksheets, form excerpts, petition summaries, intake facts) against the Court Operations Portal and against the per-task answer template that ships with each batch.
The skill is domain-specific to court-clerk work: criminal sentencing closeouts, traffic-violation closeouts with payment plans, post-sentencing field packets (CC-1375 probation referral / CC-1379 license-and-installment order), and financial-counter petition packets. The procedure is the same across all of them — only the schemas and endpoints differ.
When to use it
Use this skill when a task asks you to:
- Produce a JSON answer that must match an
input/payloads/answer_template.json describing required top-level keys, enums, ordering rules, currency precision, and date format.
- Reconcile conflicting values between local court materials (bench notes, audit memos, clerk worksheets, intake sheets) and the portal record.
- Compute financial totals, fee reconciliation, payment schedules, docket/register actions, and batch totals.
- Apply placeholder and exclusion rules (what to carry as
TBD from case file, what fees to omit, which matters to exclude from the disposed register).
Do not use it for tasks that have no answer template and no portal — the value of this skill is the reconciliation loop between local materials + portal + schema.
Inputs you will be given
input/prompt.txt — the dispatch: which court, which date, which target case/citation/petition numbers, and which portal endpoints are relevant.
input/payloads/answer_template.json — the contract. This file is authoritative for required keys, allowed enum values, ordering rules, currency precision, and date format. Read it first and treat it as ground truth for output shape.
input/payloads/* — one or more local materials (markdown notes, JSON extracts, CSV worksheets). These are raw clerk work product, often containing carry-forward errors, stale amounts, draft values, and nickname/typo identity issues.
environment_access.md — the base URL and the exact allowed endpoints for the Court Operations Portal.
The procedure (follow in order)
1. Read the contract first
Read answer_template.json before touching any local material. Extract:
- required top-level keys and their item shapes
- the full enumeration of every allowed enum value — output strings must come from these sets verbatim
- ordering rules per array (almost always
sort by case_number / citation_number / petition_id ascending; some require alphabetical sub-sorts)
- currency precision (
two decimals), date format (ISO YYYY-MM-DD; datetimes YYYY-MM-DDTHH:MM:SS)
- where
null is the prescribed value vs an actual date
Do not paraphrase enum values into prose. If a field is an enum, emit one of the listed tokens exactly.
2. Index the local materials
Read every payload file. Build a per-matter (per case / citation / petition) working record capturing, for each matter:
- identity (name spellings, DOB variants)
- counsel label as written locally vs what the bench/audio/corroboration memo says
- disposition posture (plea / finding / outcome / whether a final order was signed)
- financial lines as queued locally (fee types, labels, amounts, totals) — these are candidates, not answers
- sentence terms (jail imposed/suspended, probation months, fine, license suspension months)
- payment plan terms requested/approved (monthly amount, first due date, return date)
- explicit placeholder gaps (SSN, DL#, addresses, phone, probation officer/office)
- any "do not add" / supervisor notes flagging stale or unsupported items
Local materials regularly contain errors on purpose (carry-forward worksheet amounts, old fee schedules, draft disposition sheets, nickname/typo identities, APD-vs-public-defender confusion, unsigned orders). Your job is to catch and correct these, not transcribe them.
3. Query the portal to establish authoritative values
Use only the endpoints listed in environment_access.md (base URL + the allowed GET paths). Reach them over the network from within the environment. Do not attempt to read server-side files.
The portal is the source of truth for:
- canonical case/citation/petition records (correct identity, counsel classification, status)
- the current fee schedule and amounts effective on the relevant date (use this to reject stale local amounts — e.g. an archived/
OLD schedule amount is never the answer)
- payment policy per jurisdiction (min/max monthly band, account-fee treatment, restitution priority, return-to-court offset, first-due-days)
- form metadata (form_id, label, required fields, placeholder instruction)
See references/portal_endpoints.md for the endpoint contract, supported query parameters, and field shapes. When a target matter is not surfaced by a list endpoint, fall back to /api/search with a query term.
4. Reconcile each conflict explicitly
For every place where the local material disagrees with the portal, the bench notes, or a corroboration memo, decide a resolution and (where the schema asks for it) record the conflict. Resolution precedence, most-authoritative first:
- The signed final order / hearing notes as transcribed (what happened in court) — controls disposition, plea, outcome, sentence terms, and whether the case is actually disposed vs deferred/continued.
- The portal CMS record — controls canonical identity (correct DOB, correct name spelling) and current fee-schedule amounts.
- A corroboration/defense memo — controls counsel classification when the queue label is ambiguous (e.g. "APD" or "PD" that is actually appointed-private, not the public defender office).
- The current fee schedule — controls assessment/fee amounts; reject amounts from archived (
OLD) or prior-year schedules.
Patterns to flag and resolve:
- Carry-forward / stale amounts (archived fee schedule, prior-year fine) → replace with the current schedule amount; record as a
fee_schedule/stale_schedule conflict where the schema supports it.
- Counsel mislabel ("PD"/"APD" that is actually appointed-private) → correct the classification; an appointed-private case is not public-defender-user-fee eligible.
- Identity typo (misspelled name / DOB off by one day) → use the CMS value.
- Departure mislabeled (legacy worksheet says "departure" but the judge called it top-of-range) → set
no_departure.
- Unsigned / deferred / continued matter → do not create a sentencing financial register entry. Set status to deferred/continued,
fee_status to hold/exclude/do-not-post, and exclude from disposed totals (count goes in the held/excluded counter, not assessed/disposed).
- Unsupported fees (account-management, collection, late, DMV, restitution, copy, certification, traffic-school, returned-check, court-reporter, court-appointed-attorney) → exclude unless the portal record or current policy directly supports them and a triggering event exists. List them in the schema's exclusion section with the appropriate reason code.
5. Compute financials and schedules
- Sum fee items per matter to a
case_total / total_due. Verify it matches the corrected line items, not the queued total (the queued total is often wrong because it was built from stale lines).
- Determine batch/register totals by summing posted matters only. Held/excluded matters contribute
0.00 and increment the held/excluded counter, not the assessed/disposed counter.
- For payment plans / installment orders, derive the schedule from the approved monthly amount and the (corrected) total balance:
full_payment_count = number of full monthly installments
final_payment_amount = the remainder when the balance does not divide evenly by the monthly amount
total_installments = full_payment_count + 1 (when there is a remainder) else full_payment_count
final_due_date = first due date advanced by total_installments - 1 intervals
Where the schema captures a return-to-court date, derive it from the policy's return-to-court offset (or the candidate/policy-specified date), not by invention.
- For budget-driven installments, classify the requested monthly amount against the policy band: below minimum →
below_policy_minimum; above max → above_policy_maximum; otherwise supportable (or supported_by_budget). Disposable income = monthly income − monthly obligations.
- Payment application order follows policy (e.g. restitution-before-fines-costs when restitution exists and policy prioritizes it).
6. Handle placeholders and exclusions faithfully
- For any field that is required by a form / schema but genuinely absent from the local materials and the portal (SSN, DL#, mailing/residence address, phone, probation officer/office), emit the exact placeholder text the materials prescribe (
TBD from case file) and — if the schema has a placeholder/exclusion section — list the field with the matching reason code.
- Never invent identifiers, contact details, attorney names, dates, or amounts. If a value is unknown, it is either the placeholder or
null/verify-before-entry per the enum.
- Sort every array per the template's ordering rule before finalizing.
7. Assemble and self-check the output
Emit one JSON object matching the template's shape — no markdown, no commentary, no extra keys beyond those the template implies. Then run the checklist in references/closeout_checklist.md:
- every required top-level key present
- every array sorted per its ordering rule
- every enum field is a token from the template's allowed set, verbatim
- currency to two decimals; dates ISO
YYYY-MM-DD; datetimes ISO local; null only where prescribed
- totals reconcile (posted-only sums; held/excluded counters correct)
- no stale/local amount survived into the output
- no invented values; placeholders used exactly as specified
See references/reconciliation_field_guide.md for the recurring field categories (identity, counsel, status, fee, departure, schedule, placeholder, exclusion), their enums, and the canonical resolution for each conflict class across the batch types.
What to emit
The final closeout JSON only — conforming to the task's answer_template.json. Keep all reasoning inside the procedure; the deliverable is the structured object.
Scope note
This skill encodes the procedure. It does not carry any specific case numbers, names, DOBs, amounts, dates, or answers from any training batch — every value in a real output must be re-derived from the live task's local materials and portal records.
1---2name: fewshot-attempt-03-103description: Court Closeout Reconciliation4---5# Court Closeout Reconciliation67## What this skill does89Produces a clerk-ready, schema-conformant **closeout JSON** for a court disposition / financial / payment-plan batch by reconciling *local payload materials* (hearing notes, audit memos, finance worksheets, form excerpts, petition summaries, intake facts) against the **Court Operations Portal** and against the per-task **answer template** that ships with each batch.1011The skill is domain-specific to court-clerk work: criminal sentencing closeouts, traffic-violation closeouts with payment plans, post-sentencing field packets (CC-1375 probation referral / CC-1379 license-and-installment order), and financial-counter petition packets. The procedure is the same across all of them — only the schemas and endpoints differ.1213## When to use it1415Use this skill when a task asks you to:1617- Produce a JSON answer that must match an `input/payloads/answer_template.json` describing required top-level keys, enums, ordering rules, currency precision, and date format.18- Reconcile conflicting values between local court materials (bench notes, audit memos, clerk worksheets, intake sheets) and the portal record.19- Compute financial totals, fee reconciliation, payment schedules, docket/register actions, and batch totals.20- Apply placeholder and exclusion rules (what to carry as `TBD from case file`, what fees to omit, which matters to exclude from the disposed register).2122Do **not** use it for tasks that have no answer template and no portal — the value of this skill is the reconciliation loop between local materials + portal + schema.2324## Inputs you will be given25261. `input/prompt.txt` — the dispatch: which court, which date, which target case/citation/petition numbers, and which portal endpoints are relevant.272. `input/payloads/answer_template.json` — **the contract.** This file is authoritative for required keys, allowed enum values, ordering rules, currency precision, and date format. Read it first and treat it as ground truth for output shape.283. `input/payloads/*` — one or more local materials (markdown notes, JSON extracts, CSV worksheets). These are raw clerk work product, often containing carry-forward errors, stale amounts, draft values, and nickname/typo identity issues.294. `environment_access.md` — the base URL and the exact allowed endpoints for the Court Operations Portal.3031## The procedure (follow in order)3233### 1. Read the contract first34Read `answer_template.json` before touching any local material. Extract:35- required top-level keys and their item shapes36- the full enumeration of every allowed enum value — output strings must come from these sets verbatim37- ordering rules per array (almost always `sort by case_number` / `citation_number` / `petition_id` ascending; some require alphabetical sub-sorts)38- currency precision (`two decimals`), date format (`ISO YYYY-MM-DD`; datetimes `YYYY-MM-DDTHH:MM:SS`)39- where `null` is the prescribed value vs an actual date4041Do not paraphrase enum values into prose. If a field is an enum, emit one of the listed tokens exactly.4243### 2. Index the local materials44Read every payload file. Build a per-matter (per case / citation / petition) working record capturing, for each matter:45- identity (name spellings, DOB variants)46- counsel label as written locally vs what the bench/audio/corroboration memo says47- disposition posture (plea / finding / outcome / whether a final order was signed)48- financial lines as queued locally (fee types, labels, amounts, totals) — these are candidates, not answers49- sentence terms (jail imposed/suspended, probation months, fine, license suspension months)50- payment plan terms requested/approved (monthly amount, first due date, return date)51- explicit placeholder gaps (SSN, DL#, addresses, phone, probation officer/office)52- any "do not add" / supervisor notes flagging stale or unsupported items5354Local materials regularly contain **errors on purpose** (carry-forward worksheet amounts, old fee schedules, draft disposition sheets, nickname/typo identities, APD-vs-public-defender confusion, unsigned orders). Your job is to catch and correct these, not transcribe them.5556### 3. Query the portal to establish authoritative values57Use only the endpoints listed in `environment_access.md` (base URL + the allowed `GET` paths). Reach them over the network from within the environment. Do **not** attempt to read server-side files.5859The portal is the source of truth for:60- canonical case/citation/petition records (correct identity, counsel classification, status)61- the **current** fee schedule and amounts effective on the relevant date (use this to reject stale local amounts — e.g. an archived/`OLD` schedule amount is never the answer)62- payment policy per jurisdiction (min/max monthly band, account-fee treatment, restitution priority, return-to-court offset, first-due-days)63- form metadata (form_id, label, required fields, placeholder instruction)6465See `references/portal_endpoints.md` for the endpoint contract, supported query parameters, and field shapes. When a target matter is not surfaced by a list endpoint, fall back to `/api/search` with a query term.6667### 4. Reconcile each conflict explicitly68For every place where the local material disagrees with the portal, the bench notes, or a corroboration memo, decide a resolution and (where the schema asks for it) record the conflict. Resolution precedence, most-authoritative first:691. The signed final order / hearing notes as transcribed (what happened in court) — controls disposition, plea, outcome, sentence terms, and whether the case is actually disposed vs deferred/continued.702. The portal CMS record — controls canonical identity (correct DOB, correct name spelling) and current fee-schedule amounts.713. A corroboration/defense memo — controls counsel classification when the queue label is ambiguous (e.g. "APD" or "PD" that is actually appointed-private, not the public defender office).724. The current fee schedule — controls assessment/fee amounts; reject amounts from archived (`OLD`) or prior-year schedules.7374Patterns to flag and resolve:75- **Carry-forward / stale amounts** (archived fee schedule, prior-year fine) → replace with the current schedule amount; record as a `fee_schedule`/`stale_schedule` conflict where the schema supports it.76- **Counsel mislabel** ("PD"/"APD" that is actually appointed-private) → correct the classification; an appointed-private case is **not** public-defender-user-fee eligible.77- **Identity typo** (misspelled name / DOB off by one day) → use the CMS value.78- **Departure mislabeled** (legacy worksheet says "departure" but the judge called it top-of-range) → set `no_departure`.79- **Unsigned / deferred / continued matter** → do **not** create a sentencing financial register entry. Set status to deferred/continued, `fee_status` to hold/exclude/do-not-post, and exclude from disposed totals (count goes in the held/excluded counter, not assessed/disposed).80- **Unsupported fees** (account-management, collection, late, DMV, restitution, copy, certification, traffic-school, returned-check, court-reporter, court-appointed-attorney) → exclude unless the portal record or current policy directly supports them and a triggering event exists. List them in the schema's exclusion section with the appropriate reason code.8182### 5. Compute financials and schedules83- Sum fee items per matter to a `case_total` / `total_due`. Verify it matches the corrected line items, not the queued total (the queued total is often wrong because it was built from stale lines).84- Determine batch/register totals by summing **posted** matters only. Held/excluded matters contribute `0.00` and increment the held/excluded counter, not the assessed/disposed counter.85- For payment plans / installment orders, derive the schedule from the approved monthly amount and the (corrected) total balance:86 - `full_payment_count` = number of full monthly installments87 - `final_payment_amount` = the remainder when the balance does not divide evenly by the monthly amount88 - `total_installments` = `full_payment_count + 1` (when there is a remainder) else `full_payment_count`89 - `final_due_date` = first due date advanced by `total_installments - 1` intervals90 Where the schema captures a return-to-court date, derive it from the policy's return-to-court offset (or the candidate/policy-specified date), not by invention.91- For budget-driven installments, classify the requested monthly amount against the policy band: below minimum → `below_policy_minimum`; above max → `above_policy_maximum`; otherwise `supportable` (or `supported_by_budget`). Disposable income = monthly income − monthly obligations.92- Payment application order follows policy (e.g. restitution-before-fines-costs when restitution exists and policy prioritizes it).9394### 6. Handle placeholders and exclusions faithfully95- For any field that is required by a form / schema but genuinely absent from the local materials **and** the portal (SSN, DL#, mailing/residence address, phone, probation officer/office), emit the exact placeholder text the materials prescribe (`TBD from case file`) and — if the schema has a placeholder/exclusion section — list the field with the matching reason code.96- **Never invent** identifiers, contact details, attorney names, dates, or amounts. If a value is unknown, it is either the placeholder or `null`/verify-before-entry per the enum.97- Sort every array per the template's ordering rule before finalizing.9899### 7. Assemble and self-check the output100Emit one JSON object matching the template's shape — no markdown, no commentary, no extra keys beyond those the template implies. Then run the checklist in `references/closeout_checklist.md`:101- every required top-level key present102- every array sorted per its ordering rule103- every enum field is a token from the template's allowed set, verbatim104- currency to two decimals; dates ISO `YYYY-MM-DD`; datetimes ISO local; `null` only where prescribed105- totals reconcile (posted-only sums; held/excluded counters correct)106- no stale/local amount survived into the output107- no invented values; placeholders used exactly as specified108109See `references/reconciliation_field_guide.md` for the recurring field categories (identity, counsel, status, fee, departure, schedule, placeholder, exclusion), their enums, and the canonical resolution for each conflict class across the batch types.110111## What to emit112113The final closeout JSON only — conforming to the task's `answer_template.json`. Keep all reasoning inside the procedure; the deliverable is the structured object.114115## Scope note116117This skill encodes the *procedure*. It does not carry any specific case numbers, names, DOBs, amounts, dates, or answers from any training batch — every value in a real output must be re-derived from the live task's local materials and portal records.