Court Closeout & Post-Disposition Reconciliation
What these tasks are
A deputy-clerk task. You are handed local paper-trail materials (bench/hearing
notes, a finance queue or clerk worksheet, a financial petition + budget, form
excerpts, an audit memo) that are known to be noisy — they contain draft
values, stale carry-forwards, bench shorthand, ambiguous counsel labels, and
sticky-note "should we add X fee?" questions. Your job is to reconcile them
against the authoritative Court Operations Portal and produce one JSON object
that a clerk could post to the register.
The output shape, keys, enums, ordering, and rounding are dictated by the task's
input/payloads/answer_template.json. That template is the contract — read it
first and last. Field names and enum vocabularies differ from task to task; this
skill teaches the method, and you map the method's results onto whatever names
the template uses.
Inputs you will get
input/prompt.txt — the jurisdiction, target case/citation/petition IDs, the
hearing/closeout date, and which output sections are wanted.
input/payloads/answer_template.json — the required schema (keys, enums,
ordering rules, currency/date formats). Obey it exactly.
input/payloads/* — the noisy local materials (.md, .json, .csv).
environment_access.md (repo root) — the portal base URL and allowed endpoints.
Step 1 — Read the contract and the materials
- Read
answer_template.json end to end. Note the top-level keys, every
nested object's required keys, the enum lists, the ordering_rules,
and the currency/date/datetime formats. Build the output to match this exactly.
- Read
prompt.txt for the target IDs, jurisdiction, and the governing date
(hearing date / disposition date / petition submitted date).
- Read every payload. Treat their numbers and labels as candidates to verify,
not facts.
Step 2 — Query the portal (authoritative source)
Get the base URL from environment_access.md (GDPEVO_ENV_BASE_URL=…). Do not
hardcode it — it can change per task. All endpoints answer GET, return
{"count": N, "results": [ … ]}, and accept exact-match filters by field name,
e.g. ?case_number=…, ?citation_number=…, ?jurisdiction_code=…,
?petition_id=…. The search endpoint takes ?q=….
Helper: scripts/portal.sh <endpoint> [key=value ...] (reads the base URL from
environment_access.md / $GDPEVO_ENV_BASE_URL). Example:
scripts/portal.sh cases case_number=<TARGET_CASE_NUMBER>.
Endpoint roles (full field list in reference/portal_endpoints.md):
| Endpoint |
Authoritative for |
/api/jurisdictions |
jurisdiction_code, county, policy_ref, timezone |
/api/cases |
identity (defendant_first/last, defendant_dob), counsel_type, attorney_name, case status, disposition_date |
/api/charges |
count-level offense/statute/severity, plea, disposition, fine, jail days, probation months, departure, assessment_code — but may be a stale screen; see Step 3 |
/api/citations |
traffic disposition, violation_code, speed/zone, approved plan values, first_due_date |
/api/fee-schedules |
current fee amounts by jurisdiction & type/violation_code |
/api/payment-policies |
installment band, first_due_days, return_to_court_offset_days, account_fee, restitution_priority |
/api/forms |
form_id, label, required_fields, placeholder_instruction |
/api/financial-petitions |
petition balances, petition_sequence, default_status, budget figures |
/api/search?q= |
fuzzy lookup — look-alikes; never borrow identity from it |
Always fetch the record for each target ID plus the jurisdiction's fee schedules,
payment policy, and relevant forms.
Step 3 — Reconcile by source precedence
This is the heart of the task. Conflicts are deliberate. Resolve them with these
rules (full trap catalog in reference/reconciliation_rules.md):
- Identity (name, DOB): the CMS
/api/cases (or /api/citations) record wins.
If the CMS defendant_dob is null/absent and no reliable source supplies it,
use the placeholder string the materials require (e.g. TBD from case file) and
the "verify" identity action. Never copy a DOB from an /api/search
look-alike hit.
- Actual disposition (plea, finding, convicted vs amended/dismissed counts,
fine, jail, probation, departure): the signed order / on-the-record hearing note
for that hearing date wins over a stale CMS charge screen or a draft worksheet.
A CMS charge row can still show a superseded count, a departure, or an
assessment that the amended conviction removed — trust the hearing note.
- Counsel classification: reconcile ambiguous raw labels (
APD, PD C. Hill,
APPT PRIVATE, RET) against the on-record clarification in the note/memo.
"Appointed private counsel, county pay" = appointed_private, not
public_defender — and it suppresses the public-defender user fee.
- Fee amounts: the current portal fee schedule wins over any worksheet number.
Current = the row for that jurisdiction/type whose
end_date is null and whose
effective_date is on/before the disposition date. A row with a past end_date
is stale — exclude it.
- Departure: an on-the-record "top of range / no separate departure finding"
means no departure, even if a draft/CMS screen shows one. Misdemeanors are
typically "not evaluated"; pending matters "not entered".
- Unsigned / continued / deferred: if no final order was entered, do not post
financials. Set the hold/pending status, empty/zero the fees, use the hold /
"no disposition" docket code, and add the matter to the exclusions list with the
next status-check date from the note and posting-allowed = false.
Record each resolved conflict in the audit/audit_findings section using the
template's issue_type / resolution_source (or audit_flag /
recommended_resolution) enums — pick the enum value, never free prose.
Step 4 — Fees, balances, and exclusions
Post a fee only if (a) it is on the current portal fee schedule for the
jurisdiction as mandatory/applicable, or (b) a signed order/hearing note
directly imposes it. Otherwise exclude it.
- Discretionary fees (e.g. public-defender user fee) post only when their
trigger holds (counsel is public defender). Account/maintenance fee posts
only when
payment-policies.account_fee > 0 for the jurisdiction.
- Never invent account-management, collection/collections-referral,
late-payment, DMV/reinstatement, returned-check, traffic-school, copy,
certification, restitution, court-appointed-attorney, or court-reporter fees.
Each unsupported item goes in the exclusions list with the template's reason
enum. Map the cause to the reason vocabulary the template provides, e.g.:
stale/expired schedule →
stale_schedule / not_current_policy; requires an
event that never happened → no_triggering_event / no_order_or_policy_support;
not in the signed order → not_in_hearing_order; unsupported substitution →
unsupported_post_disposition; not part of the collectible balance →
not_part_of_balance.
- Total due = sum of supported balances: fines & costs + restitution (if a
balance exists) + surcharge (traffic) + current-schedule mandatory fees, minus
everything excluded. Restitution is included in the balance when present; the
policy's
restitution_priority sets the payment_application_order.
- Traffic fine tier: take
violation_code from the citation record, then read
the matching current standard_fine (and county_surcharge) from the fee
schedule. Tiers like "100 mph or greater" are keyed by the code, not by
amount-over-limit alone.
Step 5 — Payment / installment plans
When a plan is approved, compute it with the policy, not by guessing. Helper:
scripts/installments.py (see --help). The mechanics:
remaining = total_due − down_payment. Working in cents:
regular_count = remaining // monthly full installments of monthly, and a
final_payment_amount = remaining − regular_count·monthly if it doesn't divide
evenly; total_installments = regular_count + 1. (If it divides evenly, the last
full payment is the final one.) Map these three quantities onto whatever names
the template uses (full_payment_count/full_installment_count/payment_count,
final_payment_amount, total_installments).
- Validate the requested monthly against the policy band
min_monthly..max_monthly
and against disposable income (income − obligations). Classify support with the
template's enum (supported / below-minimum / above-maximum / needs-review).
- first_due_date: use the explicitly approved date if the note/citation states
one; otherwise
submitted_date + first_due_days. Validate any candidate date in
the payload against this rule.
- final_due_date =
first_due_date + (total_installments − 1) calendar months
(same day-of-month).
- return_to_court_date =
final_due_date + return_to_court_offset_days. Its
time/trigger come from the policy/notes; absent a stated time, use the docket-call
time evident in the materials.
Step 6 — Forms, probation, license, placeholders
- Form selection: pick the
/api/forms row for the jurisdiction and form
family; use its label/form_id for the template's enum. Traffic account
reference = the citation number when no separate account exists (per the form's
placeholder_instruction).
- Probation referral (CC-1375-style): if supervised probation was ordered,
"prepare referral" with conviction date, term months, and report datetime from
the notes. If no referral order was signed, mark "not ordered", term 0, report
datetime null.
- License order (CC-1379-style): suspension months from the sentence/worksheet;
start basis is the conviction date (a release-from-confinement date does
not replace it);
end = start + months (calendar months). DL number →
placeholder if unknown; DUI conviction → basis dui_conviction.
- Placeholders: use the exact required placeholder string only for
form-required fields genuinely absent from all materials (SSN, driver license #,
address, phone, probation officer/office). Never invent identifiers or contacts.
Collect them into the placeholder list with the right reason enum
(
missing_identifier / missing_contact / missing_office_detail /
missing_party_detail), sorted as the template instructs (and any missing_fields
arrays sorted alphabetically).
Step 7 — Totals, then format and self-check
- Recompute every total/count from the items you actually posted (assessed vs held
counts, per-category fee sums, grand/batch totals). They must tie out to the
line items.
- Emit JSON only if the template says so — no markdown, no commentary.
- Enforce the template's formats: ISO
YYYY-MM-DD dates, YYYY-MM-DDTHH:MM:SS
datetimes, money as JSON numbers rounded to two decimals, integers as integers,
null exactly where allowed.
- Enum discipline: every enum-typed field must be a verbatim value from the
template's list. Never substitute prose; use
verify_before_entry-style values
only when the template offers them and the fact is genuinely unresolved.
- Apply every ordering rule (sort arrays by the specified key, ascending).
- Final pass: for each required top-level and nested key in the template, confirm
it is present, correctly typed, and sourced from the authoritative record or a
reconciliation rule above — not from an unverified payload value.
Reference files
reference/portal_endpoints.md — every endpoint's fields and how to query them.
reference/reconciliation_rules.md — the full conflict/trap catalog with the
reasoning behind each resolution.
scripts/portal.sh — curl wrapper for the portal.
scripts/installments.py — installment schedule + date calculator.
1---2name: court-closeout-reconciliation-53description: Reconcile a court clerk closeout / post-disposition packet against the Court Operations Portal and emit the exact JSON required by answer_template.json. Use when a task gives you local court payloads (hearing/bench notes, finance queue or worksheet, financial petition + budget, form excerpts, audit memo) plus a Court Operations Portal base URL, and asks for a structured closeout: disposition register, identity/counsel audit, fee reconciliation, installment / extended payment plan, probation & license orders, or a post-sentencing field packet. Handles the AR criminal, OR traffic, and VA post-sentencing variants of these tasks.4---56# Court Closeout & Post-Disposition Reconciliation78## What these tasks are910A deputy-clerk task. You are handed **local paper-trail materials** (bench/hearing11notes, a finance queue or clerk worksheet, a financial petition + budget, form12excerpts, an audit memo) that are **known to be noisy** — they contain draft13values, stale carry-forwards, bench shorthand, ambiguous counsel labels, and14sticky-note "should we add X fee?" questions. Your job is to **reconcile them15against the authoritative Court Operations Portal** and produce one JSON object16that a clerk could post to the register.1718The output shape, keys, enums, ordering, and rounding are dictated by the task's19`input/payloads/answer_template.json`. **That template is the contract** — read it20first and last. Field names and enum vocabularies differ from task to task; this21skill teaches the *method*, and you map the method's results onto whatever names22the template uses.2324## Inputs you will get2526- `input/prompt.txt` — the jurisdiction, target case/citation/petition IDs, the27 hearing/closeout date, and which output sections are wanted.28- `input/payloads/answer_template.json` — the required schema (keys, enums,29 ordering rules, currency/date formats). **Obey it exactly.**30- `input/payloads/*` — the noisy local materials (`.md`, `.json`, `.csv`).31- `environment_access.md` (repo root) — the portal base URL and allowed endpoints.3233## Step 1 — Read the contract and the materials34351. Read `answer_template.json` end to end. Note the **top-level keys**, every36 nested object's **required keys**, the **enum lists**, the **ordering_rules**,37 and the currency/date/datetime formats. Build the output to match this exactly.382. Read `prompt.txt` for the target IDs, jurisdiction, and the governing date39 (hearing date / disposition date / petition submitted date).403. Read every payload. Treat their numbers and labels as **candidates to verify**,41 not facts.4243## Step 2 — Query the portal (authoritative source)4445Get the base URL from `environment_access.md` (`GDPEVO_ENV_BASE_URL=…`). Do **not**46hardcode it — it can change per task. All endpoints answer `GET`, return47`{"count": N, "results": [ … ]}`, and accept **exact-match filters by field name**,48e.g. `?case_number=…`, `?citation_number=…`, `?jurisdiction_code=…`,49`?petition_id=…`. The search endpoint takes `?q=…`.5051Helper: `scripts/portal.sh <endpoint> [key=value ...]` (reads the base URL from52`environment_access.md` / `$GDPEVO_ENV_BASE_URL`). Example:53`scripts/portal.sh cases case_number=<TARGET_CASE_NUMBER>`.5455Endpoint roles (full field list in `reference/portal_endpoints.md`):5657| Endpoint | Authoritative for |58| --- | --- |59| `/api/jurisdictions` | jurisdiction_code, county, `policy_ref`, timezone |60| `/api/cases` | **identity** (defendant_first/last, `defendant_dob`), `counsel_type`, `attorney_name`, case `status`, `disposition_date` |61| `/api/charges` | count-level offense/statute/severity, plea, disposition, fine, jail days, probation months, departure, `assessment_code` — **but may be a stale screen; see Step 3** |62| `/api/citations` | traffic disposition, `violation_code`, speed/zone, approved plan values, `first_due_date` |63| `/api/fee-schedules` | **current** fee amounts by jurisdiction & type/violation_code |64| `/api/payment-policies` | installment band, `first_due_days`, `return_to_court_offset_days`, `account_fee`, `restitution_priority` |65| `/api/forms` | form_id, label, required_fields, `placeholder_instruction` |66| `/api/financial-petitions` | petition balances, `petition_sequence`, `default_status`, budget figures |67| `/api/search?q=` | fuzzy lookup — **look-alikes; never borrow identity from it** |6869Always fetch the record for each target ID plus the jurisdiction's fee schedules,70payment policy, and relevant forms.7172## Step 3 — Reconcile by source precedence7374This is the heart of the task. Conflicts are deliberate. Resolve them with these75rules (full trap catalog in `reference/reconciliation_rules.md`):7677- **Identity (name, DOB): the CMS `/api/cases` (or `/api/citations`) record wins.**78 If the CMS `defendant_dob` is `null`/absent and no reliable source supplies it,79 use the placeholder string the materials require (e.g. `TBD from case file`) and80 the "verify" identity action. **Never** copy a DOB from an `/api/search`81 look-alike hit.82- **Actual disposition (plea, finding, convicted vs amended/dismissed counts,83 fine, jail, probation, departure): the signed order / on-the-record hearing note84 for that hearing date wins over a stale CMS charge screen or a draft worksheet.**85 A CMS charge row can still show a superseded count, a departure, or an86 assessment that the amended conviction removed — trust the hearing note.87- **Counsel classification:** reconcile ambiguous raw labels (`APD`, `PD C. Hill`,88 `APPT PRIVATE`, `RET`) against the on-record clarification in the note/memo.89 "Appointed private counsel, county pay" = `appointed_private`, **not**90 `public_defender` — and it **suppresses the public-defender user fee**.91- **Fee amounts: the current portal fee schedule wins over any worksheet number.**92 Current = the row for that jurisdiction/type whose `end_date` is `null` and whose93 `effective_date` is on/before the disposition date. A row with a past `end_date`94 is stale — exclude it.95- **Departure:** an on-the-record "top of range / no separate departure finding"96 means no departure, even if a draft/CMS screen shows one. Misdemeanors are97 typically "not evaluated"; pending matters "not entered".98- **Unsigned / continued / deferred:** if no final order was entered, **do not post99 financials**. Set the hold/pending status, empty/zero the fees, use the hold /100 "no disposition" docket code, and add the matter to the exclusions list with the101 next status-check date from the note and posting-allowed = false.102103Record each resolved conflict in the audit/`audit_findings` section using the104template's `issue_type` / `resolution_source` (or `audit_flag` /105`recommended_resolution`) enums — pick the enum value, never free prose.106107## Step 4 — Fees, balances, and exclusions108109Post a fee **only** if (a) it is on the current portal fee schedule for the110jurisdiction as mandatory/applicable, **or** (b) a signed order/hearing note111directly imposes it. Otherwise exclude it.112113- **Discretionary fees** (e.g. public-defender user fee) post only when their114 trigger holds (counsel is public defender). **Account/maintenance fee** posts115 only when `payment-policies.account_fee > 0` for the jurisdiction.116- **Never invent** account-management, collection/collections-referral,117 late-payment, DMV/reinstatement, returned-check, traffic-school, copy,118 certification, restitution, court-appointed-attorney, or court-reporter fees.119 Each unsupported item goes in the exclusions list with the template's reason120 enum. Map the cause to the reason vocabulary the template provides, e.g.:121 stale/expired schedule → `stale_schedule` / `not_current_policy`; requires an122 event that never happened → `no_triggering_event` / `no_order_or_policy_support`;123 not in the signed order → `not_in_hearing_order`; unsupported substitution →124 `unsupported_post_disposition`; not part of the collectible balance →125 `not_part_of_balance`.126- **Total due** = sum of supported balances: fines & costs + restitution (if a127 balance exists) + surcharge (traffic) + current-schedule mandatory fees, minus128 everything excluded. Restitution is included in the balance when present; the129 policy's `restitution_priority` sets the `payment_application_order`.130- **Traffic fine tier**: take `violation_code` from the citation record, then read131 the matching current `standard_fine` (and `county_surcharge`) from the fee132 schedule. Tiers like "100 mph or greater" are keyed by the code, not by133 amount-over-limit alone.134135## Step 5 — Payment / installment plans136137When a plan is approved, compute it with the policy, not by guessing. Helper:138`scripts/installments.py` (see `--help`). The mechanics:139140- `remaining = total_due − down_payment`. Working in cents:141 `regular_count = remaining // monthly` full installments of `monthly`, and a142 `final_payment_amount = remaining − regular_count·monthly` if it doesn't divide143 evenly; `total_installments = regular_count + 1`. (If it divides evenly, the last144 full payment is the final one.) Map these three quantities onto whatever names145 the template uses (`full_payment_count`/`full_installment_count`/`payment_count`,146 `final_payment_amount`, `total_installments`).147- **Validate the requested monthly against the policy band** `min_monthly..max_monthly`148 and against disposable income (`income − obligations`). Classify support with the149 template's enum (supported / below-minimum / above-maximum / needs-review).150- **first_due_date**: use the explicitly approved date if the note/citation states151 one; otherwise `submitted_date + first_due_days`. Validate any candidate date in152 the payload against this rule.153- **final_due_date** = `first_due_date` + `(total_installments − 1)` calendar months154 (same day-of-month).155- **return_to_court_date** = `final_due_date + return_to_court_offset_days`. Its156 time/trigger come from the policy/notes; absent a stated time, use the docket-call157 time evident in the materials.158159## Step 6 — Forms, probation, license, placeholders160161- **Form selection**: pick the `/api/forms` row for the jurisdiction and form162 family; use its `label`/`form_id` for the template's enum. Traffic account163 reference = the citation number when no separate account exists (per the form's164 `placeholder_instruction`).165- **Probation referral (CC-1375-style)**: if supervised probation was ordered,166 "prepare referral" with conviction date, term months, and report datetime from167 the notes. If no referral order was signed, mark "not ordered", term 0, report168 datetime null.169- **License order (CC-1379-style)**: suspension months from the sentence/worksheet;170 start basis is the **conviction date** (a release-from-confinement date does171 **not** replace it); `end = start + months` (calendar months). DL number →172 placeholder if unknown; DUI conviction → basis `dui_conviction`.173- **Placeholders**: use the exact required placeholder string **only** for174 form-required fields genuinely absent from all materials (SSN, driver license #,175 address, phone, probation officer/office). Never invent identifiers or contacts.176 Collect them into the placeholder list with the right reason enum177 (`missing_identifier` / `missing_contact` / `missing_office_detail` /178 `missing_party_detail`), sorted as the template instructs (and any `missing_fields`179 arrays sorted alphabetically).180181## Step 7 — Totals, then format and self-check182183- Recompute every total/count from the items you actually posted (assessed vs held184 counts, per-category fee sums, grand/batch totals). They must tie out to the185 line items.186- Emit **JSON only** if the template says so — no markdown, no commentary.187- Enforce the template's formats: ISO `YYYY-MM-DD` dates, `YYYY-MM-DDTHH:MM:SS`188 datetimes, money as JSON numbers rounded to two decimals, integers as integers,189 `null` exactly where allowed.190- **Enum discipline**: every enum-typed field must be a verbatim value from the191 template's list. Never substitute prose; use `verify_before_entry`-style values192 only when the template offers them and the fact is genuinely unresolved.193- **Apply every ordering rule** (sort arrays by the specified key, ascending).194- Final pass: for each required top-level and nested key in the template, confirm195 it is present, correctly typed, and sourced from the authoritative record or a196 reconciliation rule above — not from an unverified payload value.197198## Reference files199200- `reference/portal_endpoints.md` — every endpoint's fields and how to query them.201- `reference/reconciliation_rules.md` — the full conflict/trap catalog with the202 reasoning behind each resolution.203- `scripts/portal.sh` — curl wrapper for the portal.204- `scripts/installments.py` — installment schedule + date calculator.