Court Operations Closeout & Reconciliation Skill
Purpose
Perform court-clerk closeout tasks: reconcile hearing notes, finance extracts, and petition data against the Court Operations Portal, resolve audit conflicts, compute fee and payment schedules, and produce a structured JSON answer matching the supplied answer template.
Environment Access
The Court Operations Portal is reached over the network using the details in environment_access.md at the repository root. Read that file for the base URL, credentials, and allowed endpoint list. Never attempt to read server-side files; use only the documented HTTP GET endpoints.
Procedure
Step 1 — Read all input payloads
Read every file inside input/payloads/ without exception. Typical payloads include:
- answer_template.json — the JSON schema the final answer must match. It defines required top-level keys, field types, enum values, ordering rules, currency precision, and date format. Treat it as the authoritative contract.
- Hearing / bench notes (
.md) — clerk or judge notes from the courtroom session. May contain shorthand, carry-forward values, or draft figures that need verification.
- Finance / queue extracts (
.json, .csv) — financial import data that often contains stale, draft, or erroneous carry-forward values requiring reconciliation.
- Audit memos (
.md) — pre-identified exceptions listing specific fields that are known to be wrong in the finance queue.
- Petition summaries (
.json) — defendant payment-petition intake data including budget, requested payment amounts, and balances.
- Sentencing / probation notes (
.json) — conviction details, sentence terms, probation referral info, and missing-identifier lists.
- Local form excerpts (
.md, .json) — form field definitions, placeholder rules, and form-label metadata.
- Form field excerpts (
.json) — structured form family definitions (e.g., CC-1375, CC-1379) with field groups and placeholder rules.
Each task may use a different subset of these payload types. Read them all; ignore only those that are absent.
Step 2 — Identify target cases/citations
Extract the list of target case numbers or citation numbers from input/prompt.txt. These are the matters the closeout must cover.
Step 3 — Query the Court Operations Portal
For every target case, query the relevant portal endpoints to obtain authoritative records. Typical endpoint usage:
| Endpoint |
Used for |
GET /api/jurisdictions |
Confirm jurisdiction codes |
GET /api/cases |
Case records, defendant identity, status |
GET /api/charges |
Charge details, offense codes, dispositions |
GET /api/docket-entries |
Docket history and entry types |
GET /api/citations |
Traffic citation details |
GET /api/fee-schedules |
Current fee amounts (resolves stale/archived figures) |
GET /api/payment-policies |
Payment plan rules, policy bands, return-to-court triggers |
GET /api/forms |
Form IDs, labels, revision metadata |
GET /api/financial-petitions |
Petition records, balances, classification |
GET /api/search |
General lookup when other endpoints don't cover the need |
Use query parameters (e.g., ?case_number=..., ?jurisdiction_code=...) to scope responses when the endpoint supports them.
Portal data is authoritative over local payload values when they conflict, unless the answer template or audit memo instructs otherwise (e.g., "use hearing notes" as a resolution source).
Step 4 — Reconcile conflicts
For every field where local materials disagree with portal data or where the audit memo flags an exception:
- Identify the issue type (identity, counsel, status, fee_schedule, departure, etc.) using the enum from the answer template.
- Record the conflicted value (the stale/wrong value from local materials).
- Determine the corrected value using the authoritative source.
- Assign a resolution source (e.g.,
use_cms, use_hearing_notes, use_corrob_memo, use_fee_schedule, hold_unsigned_order, verify_before_entry, exclude_pending).
Common reconciliation patterns:
| Issue |
Typical resolution |
| Defendant name/DOB mismatch |
CMS/portal record overrides local unless hearing notes provide a courtroom correction |
| Counsel mislabeled (e.g., "PD" vs. appointed private) |
Hearing notes or corroboration memo overrides calendar abbreviation |
| Stale fee amount (archived schedule) |
Current fee schedule from portal |
| Draft departure on worksheet |
Hearing notes or judge's stated intent controls |
| Unsigned order / continued status |
Hold or exclude from financial posting; no disposition entry |
Step 5 — Determine disposition and status for each matter
For each target case/citation:
- If a signed sentencing order or final disposition exists → enter disposition (status:
disposed, disposed_enter, etc.).
- If the order is unsigned, the matter was continued, or no plea was accepted → hold or exclude (status:
deferred, pending, pending_exclude; fee status: hold or do_not_post_pending).
- Set the closeout action or register action accordingly.
- Set disposition date to the hearing/signing date when disposed; use
null when no disposition date exists.
- Classify the primary outcome (guilty_plea, no_contest_guilty, bench_trial_guilty, continued_pending, etc.).
Step 6 — Compute financial entries
For each disposed case, compute fee items using current portal fee schedules, not stale local amounts:
- Include only fees supported by the fee schedule or a specific order.
- Exclude public defender user fees when counsel is classified as appointed private (not a PD office attorney).
- Include crime/drug/lab assessment fees when triggered by the conviction type and confirmed by the current schedule.
- For held/deferred cases, set all financial amounts to zero and fee status to hold/do-not-post.
For payment plans:
- Use the petition's requested monthly amount, but validate against the payment policy band (minimum/maximum).
- Classify support as
supported_by_budget, supportable, below_policy_minimum, above_policy_maximum, or unsupported_by_budget based on disposable income and policy limits.
- Compute schedule:
full_installment_count = floor(total_due / installment_amount), final_payment_amount = total_due - (full_installment_count × installment_amount), total_installments = full_installment_count + (1 if final_payment_amount > 0 else 0).
- Set first due date from petition or policy; compute final due date by advancing months.
- Set return-to-court date from policy (typically 2 months after final due date).
Step 7 — Handle placeholders
When a required form field cannot be completed from available materials:
- Set the value to "TBD from case file" (the standard placeholder).
- Catalog each placeholder with the field name, placeholder value, and reason code (e.g.,
missing_identifier, missing_contact, missing_office_detail, missing_party_detail).
- Sort placeholder entries by field name ascending.
Never invent identifiers, SSNs, addresses, phone numbers, driver license numbers, or contact details.
Step 8 — Exclude unsupported financial items
Identify and list any financial items that appear in local worksheets but lack support from an order, policy, or current fee schedule:
- Common exclusions: restitution (when no order), account-management fees, late fees, DMV fees, court-appointed-attorney fees, court-reporter fees, collection fees, traffic-school fees, stale schedule amounts.
- For each, record the item name, the amount (0.00 if not actually assessed), and the reason code (e.g.,
no_order_or_policy_support, not_part_of_balance, not_current_policy, no_triggering_event, not_in_hearing_order, stale_schedule, unsupported_post_disposition).
Step 9 — Compile docket/register entries
For each disposed case, create a docket entry or register action:
- Entry type:
sentencing_order / SENTENCING_ORDER_ENTERED for disposed cases; disposition_hold / CONTINUED_NO_DISPOSITION for held/excluded cases.
- Assign a summary code reflecting the disposition (e.g.,
conviction_no_departure, conviction_no_pd_fee, conviction_drug_assessment, hold_unsigned_order).
- Set the financial total equal to the case's total fees (zero for held cases).
Step 10 — Compute batch/register totals
Aggregate across all target matters:
- Count of disposed/assessed cases and held/excluded cases.
- Sum of each fee category (fine total, court cost total, assessment total, user fee total, etc.).
- Grand total = sum of all assessed fee amounts.
- For traffic closeouts: combined amount due, matter count, unsupported charge total included.
Step 11 — Assemble and format the final answer
- Build the JSON object with all required top-level keys from the answer template.
- Sort every list according to the ordering rules in the answer template (typically by
case_number ascending, then by sub-fields).
- Currency: all monetary values as numbers rounded to two decimal places.
- Dates: ISO
YYYY-MM-DD. Datetimes: ISO YYYY-MM-DDTHH:MM:SS. Use null for absent dates where the template allows it.
- Enums: use only the exact values listed in the answer template's enum definitions. Never substitute prose for an enum value.
- Return a single JSON object with no markdown formatting.
Output Checklist
Before finalizing, verify:
1---2name: fewshot-attempt-02-123description: Court Operations Closeout & Reconciliation Skill4---5# Court Operations Closeout & Reconciliation Skill67## Purpose89Perform court-clerk closeout tasks: reconcile hearing notes, finance extracts, and petition data against the Court Operations Portal, resolve audit conflicts, compute fee and payment schedules, and produce a structured JSON answer matching the supplied answer template.1011## Environment Access1213The Court Operations Portal is reached over the network using the details in `environment_access.md` at the repository root. Read that file for the base URL, credentials, and allowed endpoint list. **Never** attempt to read server-side files; use only the documented HTTP GET endpoints.1415## Procedure1617### Step 1 — Read all input payloads1819Read every file inside `input/payloads/` without exception. Typical payloads include:2021- **answer_template.json** — the JSON schema the final answer must match. It defines required top-level keys, field types, enum values, ordering rules, currency precision, and date format. Treat it as the authoritative contract.22- **Hearing / bench notes** (`.md`) — clerk or judge notes from the courtroom session. May contain shorthand, carry-forward values, or draft figures that need verification.23- **Finance / queue extracts** (`.json`, `.csv`) — financial import data that often contains stale, draft, or erroneous carry-forward values requiring reconciliation.24- **Audit memos** (`.md`) — pre-identified exceptions listing specific fields that are known to be wrong in the finance queue.25- **Petition summaries** (`.json`) — defendant payment-petition intake data including budget, requested payment amounts, and balances.26- **Sentencing / probation notes** (`.json`) — conviction details, sentence terms, probation referral info, and missing-identifier lists.27- **Local form excerpts** (`.md`, `.json`) — form field definitions, placeholder rules, and form-label metadata.28- **Form field excerpts** (`.json`) — structured form family definitions (e.g., CC-1375, CC-1379) with field groups and placeholder rules.2930Each task may use a different subset of these payload types. Read them all; ignore only those that are absent.3132### Step 2 — Identify target cases/citations3334Extract the list of target case numbers or citation numbers from `input/prompt.txt`. These are the matters the closeout must cover.3536### Step 3 — Query the Court Operations Portal3738For every target case, query the relevant portal endpoints to obtain authoritative records. Typical endpoint usage:3940| Endpoint | Used for |41|---|---|42| `GET /api/jurisdictions` | Confirm jurisdiction codes |43| `GET /api/cases` | Case records, defendant identity, status |44| `GET /api/charges` | Charge details, offense codes, dispositions |45| `GET /api/docket-entries` | Docket history and entry types |46| `GET /api/citations` | Traffic citation details |47| `GET /api/fee-schedules` | Current fee amounts (resolves stale/archived figures) |48| `GET /api/payment-policies` | Payment plan rules, policy bands, return-to-court triggers |49| `GET /api/forms` | Form IDs, labels, revision metadata |50| `GET /api/financial-petitions` | Petition records, balances, classification |51| `GET /api/search` | General lookup when other endpoints don't cover the need |5253Use query parameters (e.g., `?case_number=...`, `?jurisdiction_code=...`) to scope responses when the endpoint supports them.5455**Portal data is authoritative** over local payload values when they conflict, unless the answer template or audit memo instructs otherwise (e.g., "use hearing notes" as a resolution source).5657### Step 4 — Reconcile conflicts5859For every field where local materials disagree with portal data or where the audit memo flags an exception:60611. Identify the **issue type** (identity, counsel, status, fee_schedule, departure, etc.) using the enum from the answer template.622. Record the **conflicted value** (the stale/wrong value from local materials).633. Determine the **corrected value** using the authoritative source.644. Assign a **resolution source** (e.g., `use_cms`, `use_hearing_notes`, `use_corrob_memo`, `use_fee_schedule`, `hold_unsigned_order`, `verify_before_entry`, `exclude_pending`).6566Common reconciliation patterns:6768| Issue | Typical resolution |69|---|---|70| Defendant name/DOB mismatch | CMS/portal record overrides local unless hearing notes provide a courtroom correction |71| Counsel mislabeled (e.g., "PD" vs. appointed private) | Hearing notes or corroboration memo overrides calendar abbreviation |72| Stale fee amount (archived schedule) | Current fee schedule from portal |73| Draft departure on worksheet | Hearing notes or judge's stated intent controls |74| Unsigned order / continued status | Hold or exclude from financial posting; no disposition entry |7576### Step 5 — Determine disposition and status for each matter7778For each target case/citation:7980- If a signed sentencing order or final disposition exists → **enter disposition** (status: `disposed`, `disposed_enter`, etc.).81- If the order is unsigned, the matter was continued, or no plea was accepted → **hold or exclude** (status: `deferred`, `pending`, `pending_exclude`; fee status: `hold` or `do_not_post_pending`).82- Set the **closeout action** or **register action** accordingly.83- Set disposition date to the hearing/signing date when disposed; use `null` when no disposition date exists.84- Classify the primary outcome (guilty_plea, no_contest_guilty, bench_trial_guilty, continued_pending, etc.).8586### Step 6 — Compute financial entries8788For each disposed case, compute fee items using **current** portal fee schedules, not stale local amounts:8990- Include only fees supported by the fee schedule or a specific order.91- Exclude public defender user fees when counsel is classified as appointed private (not a PD office attorney).92- Include crime/drug/lab assessment fees when triggered by the conviction type and confirmed by the current schedule.93- For held/deferred cases, set all financial amounts to zero and fee status to hold/do-not-post.9495For payment plans:9697- Use the petition's requested monthly amount, but validate against the payment policy band (minimum/maximum).98- Classify support as `supported_by_budget`, `supportable`, `below_policy_minimum`, `above_policy_maximum`, or `unsupported_by_budget` based on disposable income and policy limits.99- Compute schedule: `full_installment_count = floor(total_due / installment_amount)`, `final_payment_amount = total_due - (full_installment_count × installment_amount)`, `total_installments = full_installment_count + (1 if final_payment_amount > 0 else 0)`.100- Set first due date from petition or policy; compute final due date by advancing months.101- Set return-to-court date from policy (typically 2 months after final due date).102103### Step 7 — Handle placeholders104105When a required form field cannot be completed from available materials:106107- Set the value to **"TBD from case file"** (the standard placeholder).108- Catalog each placeholder with the field name, placeholder value, and reason code (e.g., `missing_identifier`, `missing_contact`, `missing_office_detail`, `missing_party_detail`).109- Sort placeholder entries by field name ascending.110111**Never invent** identifiers, SSNs, addresses, phone numbers, driver license numbers, or contact details.112113### Step 8 — Exclude unsupported financial items114115Identify and list any financial items that appear in local worksheets but lack support from an order, policy, or current fee schedule:116117- Common exclusions: restitution (when no order), account-management fees, late fees, DMV fees, court-appointed-attorney fees, court-reporter fees, collection fees, traffic-school fees, stale schedule amounts.118- For each, record the item name, the amount (0.00 if not actually assessed), and the reason code (e.g., `no_order_or_policy_support`, `not_part_of_balance`, `not_current_policy`, `no_triggering_event`, `not_in_hearing_order`, `stale_schedule`, `unsupported_post_disposition`).119120### Step 9 — Compile docket/register entries121122For each disposed case, create a docket entry or register action:123124- Entry type: `sentencing_order` / `SENTENCING_ORDER_ENTERED` for disposed cases; `disposition_hold` / `CONTINUED_NO_DISPOSITION` for held/excluded cases.125- Assign a summary code reflecting the disposition (e.g., `conviction_no_departure`, `conviction_no_pd_fee`, `conviction_drug_assessment`, `hold_unsigned_order`).126- Set the financial total equal to the case's total fees (zero for held cases).127128### Step 10 — Compute batch/register totals129130Aggregate across all target matters:131132- Count of disposed/assessed cases and held/excluded cases.133- Sum of each fee category (fine total, court cost total, assessment total, user fee total, etc.).134- Grand total = sum of all assessed fee amounts.135- For traffic closeouts: combined amount due, matter count, unsupported charge total included.136137### Step 11 — Assemble and format the final answer1381391. Build the JSON object with all required top-level keys from the answer template.1402. **Sort** every list according to the ordering rules in the answer template (typically by `case_number` ascending, then by sub-fields).1413. **Currency**: all monetary values as numbers rounded to two decimal places.1424. **Dates**: ISO `YYYY-MM-DD`. Datetimes: ISO `YYYY-MM-DDTHH:MM:SS`. Use `null` for absent dates where the template allows it.1435. **Enums**: use only the exact values listed in the answer template's enum definitions. Never substitute prose for an enum value.1446. Return a single JSON object with no markdown formatting.145146## Output Checklist147148Before finalizing, verify:149150- [ ] Every required top-level key from the answer template is present.151- [ ] All lists are sorted per the template's ordering rules.152- [ ] All currency values have exactly two decimal places.153- [ ] All dates use ISO format; null used where no date should be entered.154- [ ] All enum values match the template's allowed set exactly.155- [ ] No invented identifiers or contact details — missing values use the designated placeholder.156- [ ] Unsupported fees are excluded from balances and listed in the exclusion section.157- [ ] Held/deferred cases have zero financial entries and appropriate hold/exclude status.158- [ ] Batch totals are the arithmetic sum of the individual case entries.159- [ ] The answer is valid JSON with no markdown wrappers.