Licensing Record Review
Use this skill to solve licensing tasks that provide a prompt, an answer template, and a read-only task environment. Work from the task's current prompt and template only. Do not reuse prior final answers or call judge endpoints.
Core Workflow
- Read the user prompt and
input/payloads/answer_template.json first. Extract target IDs, target location IDs, review dates, release boundaries, queue size, required keys, allowed enum values, and ordering rules.
- Read the task environment instructions for the base URL and any SQL token. Use only allowed read-only endpoints. Prefer
POST /api/sql with SELECT queries when it is available because it returns column names and supports targeted filtering.
- Fetch policies or renewal rules before case records. Parse any
details_json or controls_json fields as JSON.
- Build an evidence ledger per target record. Keep source row IDs, statuses, dates, amounts, severities, active flags, and any stale/conflicting notes separate from the final answer.
- Map evidence to the enum names in the current answer template. When similar templates use different labels, choose the allowed label whose meaning matches the condition.
- Sort arrays exactly as the template requires. Use empty arrays when nothing applies. Return only the JSON object with the required keys.
Useful SQL pattern:
curl -s -X POST "$TASK_ENV_BASE_URL/api/sql" \
-H "Content-Type: application/json" \
-H "X-Task-Token: $TASK_SQL_TOKEN" \
--data '{"query":"SELECT * FROM table_name WHERE id_column IN (?, ?) ORDER BY id_column","params":["ID-1","ID-2"],"limit":100}'
Contractor Eligibility Batches
Fetch:
/api/policies
/api/contractor/applications
/api/contractor/bonds
/api/contractor/insurance
/api/contractor/license-history
/api/contractor/violations
/api/contractor/correspondence
/api/contractor/inspections
Match each application to the current contractor policy by trade and requested class. Use policy thresholds for minimum bond, minimum insurance, minimum years experience, required endorsement, and serious open violation blocking. If the prompt gives a review date, use it for current financial coverage; otherwise use the task's stated context and record status/date fields consistently.
Evidence-to-condition rules:
- Bond: require a current active bond. If there is no active bond, use the template's no-active/cancelled bond code. If an active bond amount is below the policy minimum, use the shortfall code.
- Insurance: require current verified coverage through the review date. Pending status maps to pending/not-current. Expiration before the review date maps to expired/not-current. Active coverage below the minimum maps to shortfall.
- Endorsement: if policy requires an endorsement, verified status passes. Missing, pending, or unverified status maps to the matching template code. If the template has only a generic endorsement code, use it for both missing and pending.
- Experience: years below the policy minimum maps to experience shortfall.
- License history: a prior license with suspended/active-suspension status is a denial-level issue and usually requires board review or suspension clearance if those actions exist in the schema.
- Violations: open serious violations or unresolved serious complaints are denial-level issues. Open minor violations are hold-level issues when the schema has a minor/open-violation code. Resolved or dismissed violations normally do not create a deficiency.
- Inspections: use failed or conditional findings only when the template has corresponding codes.
DOC_GAP maps to document-gap actions; SAFETY_RECHECK maps to safety recheck actions. Ignore pass results unless the prompt or schema asks for them.
- Correspondence summary: include correspondence IDs that are not agency verified, are stale, conflict with registry records, or explicitly say applicant-only/unverified. Also include verified rows if their notes or assertion values state stale/conflicting evidence. Sort IDs ascending.
Decision rules:
DENY when any denial-level issue is present, especially active suspension or open serious violation/complaint.
HOLD when non-denial deficiencies remain.
APPROVE only when no deficiency codes remain.
- Risk tier is usually
high for denial-level issues, medium for holds, and low for approvals unless the template defines a different scheme.
policy_impacted is true when a current policy standard creates a deficiency or material flag that would not have existed under the prior baseline policy. Compare current thresholds and endorsement requirements to any legacy contractor policy in /api/policies.
Restricted Liquor-License Packages
Fetch:
/api/policies
/api/liquor/applications
/api/liquor/settlements
/api/liquor/privileges
/api/liquor/incidents
/api/liquor/site-evidence
Use the target application to find the license class and location. Pull settlements, incidents, and site evidence by location.
Separate three concepts:
- Standard obligations: privilege rows for the license class where
standard_required is true.
- Location-specific controls: active, unexpired controls from settlement
controls_json.
- Same-premises basis: true when settlement or history records show the same premises basis for the target location, even if an older control set is no longer active, unless the prompt says the location changed.
Risk and gap mapping:
- Covered risks should be risks that current standard obligations or active location controls actually address. Common mappings are
ID_CHECK to minor-sale risks, HOURS to after-hours risks, SECURITY/CCTV to assault or public-safety risks, FOOD_SERVICE to food-service risks, and NOISE/PATIO to noise or patio-boundary risks.
- Do not mark unresolved tax holds, missing evidence, or unsupported major incidents as covered.
- Verification gaps come from missing, stale, or conflicting site evidence; open or referred incidents needing follow-up; unresolved tax holds; missing current control signage; conflicting police memos; and late-night monitoring needs when after-hours risk lacks current supporting evidence.
- Standard obligation codes and location-specific control codes may share the same vocabulary. Keep ordinary license obligations out of the location-control list unless they are also active controls in the settlement record.
Posture and operational plan:
- Use
issue_restricted when the same-premises basis is supported, material risks are covered, and no material evidence gaps remain.
- Use
request_follow_up when evidence is missing/conflicting, an incident remains open/referred, a tax hold is unresolved, or active controls require verification.
- Use
deny only for unmanageable or policy-blocking issues.
- Build
first_90_day_plan from the remaining gaps and controls. Put identity/evidence checks in first_30_days, after-hours or late-night field visits in days_31_60, and noise/patio boundary checks in days_61_90 unless the template or prompt gives another sequence.
- Choose escalation triggers that mirror unresolved risks: after-hours service, unverified controls/signage, missing camera coverage or footage, food service unavailable, minor sale, major incident, unresolved tax hold, noise/patio breach, or ID-check failure.
Alcohol Renewal Manual-Review Queues
Fetch:
/api/alcohol/licensees
/api/alcohol/violations
/api/renewal/rules
Extract the release boundary and queue size from the prompt and confirm the matching renewal rule. Include only active target licenses in the queue unless the prompt says otherwise.
Matching and exclusion:
- Match violations by exact current
license_no.
- Also check
successor_to and old license numbers. Include former-license violations when the former and current records share the same address/facility/location context. Mark these as close_address unless the template offers a more exact successor label.
- Use
uncertain for ambiguous name/address matches that still need record review.
- Exclude all violations after the release boundary. List excluded post-boundary violation IDs in the summary sorted by violation ID.
- For each queue entry, sort
matched_violation_ids by violation date ascending, then violation ID ascending. Set most_recent_violation_date to the latest included violation date.
Queue classification:
board_review: use for serious public-safety or sale-to-minor issues that are open, pending, warning with material balance, successor/close-match serious issues, or any rule/prompt condition requiring board review.
manual_fine_check: use for unpaid-fine themes, positive material fine balances, open/pending fine-related rows, or renewal rules stating unpaid fines require hold when no stronger board-review condition applies.
manual_ALERT_check: use for alert-flagged rows when no stronger board or fine condition applies.
additional_record_check: use for uncertain identity/match issues or incomplete supporting records when no stronger condition applies.
Rank entries by next-step severity first:
board_review
manual_fine_check
manual_ALERT_check
additional_record_check
Within each group, sort by most recent included violation date descending, then violation count descending, then license number ascending. Assign ranks from 1 with no gaps and stop at the target queue size. Summary lists such as close/uncertain matches and board-review licenses should be sorted by license number ascending.
Risk tiers: use high for board-review cases, unresolved serious violations, material unpaid balances, or repeated significant violations; medium for alert-only or lesser unresolved issues; low only for minimal resolved records with no material alert/fine risk.
Final JSON Check
Before finalizing:
- Ensure every top-level key required by the template is present and no extra prose, markdown, comments, or citations are included.
- Ensure all enum values appear in the current template.
- Ensure counts match item-level decisions or queue entries.
- Ensure summary ID arrays are sorted as requested.
- Ensure booleans are actual JSON booleans, not strings.
- Validate the JSON syntax locally when possible.
1---2name: licensing-record-review-33description: Solve structured licensing review tasks against a task environment. Use for contractor eligibility batches, restricted liquor-license staff packages, and alcohol renewal manual-review queues that require reading policies/rules and endpoint records, mapping evidence to constrained JSON schemas, ranking or summarizing records, and returning strict JSON only.4metadata:5 source: https://skillmd.com/skills/prism-shadow/licensing-record-review-36---78# Licensing Record Review910Use this skill to solve licensing tasks that provide a prompt, an answer template, and a read-only task environment. Work from the task's current prompt and template only. Do not reuse prior final answers or call judge endpoints.1112## Core Workflow13141. Read the user prompt and `input/payloads/answer_template.json` first. Extract target IDs, target location IDs, review dates, release boundaries, queue size, required keys, allowed enum values, and ordering rules.152. Read the task environment instructions for the base URL and any SQL token. Use only allowed read-only endpoints. Prefer `POST /api/sql` with `SELECT` queries when it is available because it returns column names and supports targeted filtering.163. Fetch policies or renewal rules before case records. Parse any `details_json` or `controls_json` fields as JSON.174. Build an evidence ledger per target record. Keep source row IDs, statuses, dates, amounts, severities, active flags, and any stale/conflicting notes separate from the final answer.185. Map evidence to the enum names in the current answer template. When similar templates use different labels, choose the allowed label whose meaning matches the condition.196. Sort arrays exactly as the template requires. Use empty arrays when nothing applies. Return only the JSON object with the required keys.2021Useful SQL pattern:2223```bash24curl -s -X POST "$TASK_ENV_BASE_URL/api/sql" \25 -H "Content-Type: application/json" \26 -H "X-Task-Token: $TASK_SQL_TOKEN" \27 --data '{"query":"SELECT * FROM table_name WHERE id_column IN (?, ?) ORDER BY id_column","params":["ID-1","ID-2"],"limit":100}'28```2930## Contractor Eligibility Batches3132Fetch:3334- `/api/policies`35- `/api/contractor/applications`36- `/api/contractor/bonds`37- `/api/contractor/insurance`38- `/api/contractor/license-history`39- `/api/contractor/violations`40- `/api/contractor/correspondence`41- `/api/contractor/inspections`4243Match each application to the current contractor policy by trade and requested class. Use policy thresholds for minimum bond, minimum insurance, minimum years experience, required endorsement, and serious open violation blocking. If the prompt gives a review date, use it for current financial coverage; otherwise use the task's stated context and record status/date fields consistently.4445Evidence-to-condition rules:4647- Bond: require a current active bond. If there is no active bond, use the template's no-active/cancelled bond code. If an active bond amount is below the policy minimum, use the shortfall code.48- Insurance: require current verified coverage through the review date. Pending status maps to pending/not-current. Expiration before the review date maps to expired/not-current. Active coverage below the minimum maps to shortfall.49- Endorsement: if policy requires an endorsement, verified status passes. Missing, pending, or unverified status maps to the matching template code. If the template has only a generic endorsement code, use it for both missing and pending.50- Experience: years below the policy minimum maps to experience shortfall.51- License history: a prior license with suspended/active-suspension status is a denial-level issue and usually requires board review or suspension clearance if those actions exist in the schema.52- Violations: open serious violations or unresolved serious complaints are denial-level issues. Open minor violations are hold-level issues when the schema has a minor/open-violation code. Resolved or dismissed violations normally do not create a deficiency.53- Inspections: use failed or conditional findings only when the template has corresponding codes. `DOC_GAP` maps to document-gap actions; `SAFETY_RECHECK` maps to safety recheck actions. Ignore pass results unless the prompt or schema asks for them.54- Correspondence summary: include correspondence IDs that are not agency verified, are stale, conflict with registry records, or explicitly say applicant-only/unverified. Also include verified rows if their notes or assertion values state stale/conflicting evidence. Sort IDs ascending.5556Decision rules:5758- `DENY` when any denial-level issue is present, especially active suspension or open serious violation/complaint.59- `HOLD` when non-denial deficiencies remain.60- `APPROVE` only when no deficiency codes remain.61- Risk tier is usually `high` for denial-level issues, `medium` for holds, and `low` for approvals unless the template defines a different scheme.62- `policy_impacted` is true when a current policy standard creates a deficiency or material flag that would not have existed under the prior baseline policy. Compare current thresholds and endorsement requirements to any legacy contractor policy in `/api/policies`.6364## Restricted Liquor-License Packages6566Fetch:6768- `/api/policies`69- `/api/liquor/applications`70- `/api/liquor/settlements`71- `/api/liquor/privileges`72- `/api/liquor/incidents`73- `/api/liquor/site-evidence`7475Use the target application to find the license class and location. Pull settlements, incidents, and site evidence by location.7677Separate three concepts:7879- Standard obligations: privilege rows for the license class where `standard_required` is true.80- Location-specific controls: active, unexpired controls from settlement `controls_json`.81- Same-premises basis: true when settlement or history records show the same premises basis for the target location, even if an older control set is no longer active, unless the prompt says the location changed.8283Risk and gap mapping:8485- Covered risks should be risks that current standard obligations or active location controls actually address. Common mappings are `ID_CHECK` to minor-sale risks, `HOURS` to after-hours risks, `SECURITY`/`CCTV` to assault or public-safety risks, `FOOD_SERVICE` to food-service risks, and `NOISE`/`PATIO` to noise or patio-boundary risks.86- Do not mark unresolved tax holds, missing evidence, or unsupported major incidents as covered.87- Verification gaps come from missing, stale, or conflicting site evidence; open or referred incidents needing follow-up; unresolved tax holds; missing current control signage; conflicting police memos; and late-night monitoring needs when after-hours risk lacks current supporting evidence.88- Standard obligation codes and location-specific control codes may share the same vocabulary. Keep ordinary license obligations out of the location-control list unless they are also active controls in the settlement record.8990Posture and operational plan:9192- Use `issue_restricted` when the same-premises basis is supported, material risks are covered, and no material evidence gaps remain.93- Use `request_follow_up` when evidence is missing/conflicting, an incident remains open/referred, a tax hold is unresolved, or active controls require verification.94- Use `deny` only for unmanageable or policy-blocking issues.95- Build `first_90_day_plan` from the remaining gaps and controls. Put identity/evidence checks in `first_30_days`, after-hours or late-night field visits in `days_31_60`, and noise/patio boundary checks in `days_61_90` unless the template or prompt gives another sequence.96- Choose escalation triggers that mirror unresolved risks: after-hours service, unverified controls/signage, missing camera coverage or footage, food service unavailable, minor sale, major incident, unresolved tax hold, noise/patio breach, or ID-check failure.9798## Alcohol Renewal Manual-Review Queues99100Fetch:101102- `/api/alcohol/licensees`103- `/api/alcohol/violations`104- `/api/renewal/rules`105106Extract the release boundary and queue size from the prompt and confirm the matching renewal rule. Include only active target licenses in the queue unless the prompt says otherwise.107108Matching and exclusion:109110- Match violations by exact current `license_no`.111- Also check `successor_to` and old license numbers. Include former-license violations when the former and current records share the same address/facility/location context. Mark these as `close_address` unless the template offers a more exact successor label.112- Use `uncertain` for ambiguous name/address matches that still need record review.113- Exclude all violations after the release boundary. List excluded post-boundary violation IDs in the summary sorted by violation ID.114- For each queue entry, sort `matched_violation_ids` by violation date ascending, then violation ID ascending. Set `most_recent_violation_date` to the latest included violation date.115116Queue classification:117118- `board_review`: use for serious public-safety or sale-to-minor issues that are open, pending, warning with material balance, successor/close-match serious issues, or any rule/prompt condition requiring board review.119- `manual_fine_check`: use for unpaid-fine themes, positive material fine balances, open/pending fine-related rows, or renewal rules stating unpaid fines require hold when no stronger board-review condition applies.120- `manual_ALERT_check`: use for alert-flagged rows when no stronger board or fine condition applies.121- `additional_record_check`: use for uncertain identity/match issues or incomplete supporting records when no stronger condition applies.122123Rank entries by next-step severity first:1241251. `board_review`1262. `manual_fine_check`1273. `manual_ALERT_check`1284. `additional_record_check`129130Within each group, sort by most recent included violation date descending, then violation count descending, then license number ascending. Assign ranks from 1 with no gaps and stop at the target queue size. Summary lists such as close/uncertain matches and board-review licenses should be sorted by license number ascending.131132Risk tiers: use `high` for board-review cases, unresolved serious violations, material unpaid balances, or repeated significant violations; `medium` for alert-only or lesser unresolved issues; `low` only for minimal resolved records with no material alert/fine risk.133134## Final JSON Check135136Before finalizing:137138- Ensure every top-level key required by the template is present and no extra prose, markdown, comments, or citations are included.139- Ensure all enum values appear in the current template.140- Ensure counts match item-level decisions or queue entries.141- Ensure summary ID arrays are sorted as requested.142- Ensure booleans are actual JSON booleans, not strings.143- Validate the JSON syntax locally when possible.