Licensing Examiner Skill
Reusable methodology for evaluating licensing applications, building staff review
packages, and constructing manual-review queues against a shared licensing data
environment. This skill covers contractor eligibility batches, restricted liquor
license transfers, and alcohol renewal screening — any task where you must fetch
records from the licensing API, cross-reference them against business rules, and
produce structured JSON decisions.
Phase 1 — Environment Bootstrapping
Every task begins by locating and reading the environment descriptor.
Read environment_access.md from the working directory. It contains:
base_url — the root of the licensing data service
credentials — required headers (notably X-Task-Token for SQL)
allowed_endpoints — the full set of available API routes
Replace every occurrence of <TASK_ENV_BASE_URL> in the prompt with the
base_url from environment_access.md. All GET/POST calls go to routes
under that base.
The SQL endpoint (POST /api/sql) requires the header
X-Task-Token: licensing-review-019. No other endpoints require this header.
SQL is the escape hatch — use it when the standard GET endpoints cannot
express a necessary join, filter, or aggregation. Prefer the purpose-built
GET endpoints first; they are simpler and less error-prone.
Phase 2 — Task Discovery
Every task provides two input files under input/:
| File |
Purpose |
prompt.txt |
Human-readable task description, target identifiers, applicable endpoints, and any review-date or boundary-date constants. |
payloads/answer_template.json |
The exact JSON schema the output must satisfy — top-level keys, field types, allowed enum values, ordering rules, and constraints on list lengths. |
Procedure:
Read prompt.txt fully. Extract:
- The task type (batch eligibility, staff package, or renewal queue — see
task-patterns.md for the catalog).
- The target identifiers (application IDs, license numbers, location codes).
- The review date or boundary date if one is stated.
- The list of suggested API endpoints.
Read payloads/answer_template.json fully. Internalize every constraint:
- Required top-level keys
- Enum value sets (every code, action, posture, tier)
- Ordering rules (ascending by ID, alphabetical, by date)
- Required lengths and empty-value conventions
If any suggested endpoint is absent from environment_access.md, skip
it — only call endpoints listed in the environment descriptor.
Phase 3 — Data Collection
General Strategy
Always start with GET /api/policies — it provides the current rule baseline
that may change how other records are interpreted.
Fetch the core entity collection next:
- Contractor tasks →
GET /api/contractor/applications
- Liquor tasks →
GET /api/liquor/applications
- Renewal tasks →
GET /api/alcohol/licensees
Then fetch each supporting record collection in parallel. The full set of
available GET routes is in the environment descriptor; only call those
relevant to the task type.
Use POST /api/sql when you need to:
- Join entities across collections on a shared key
- Filter by date ranges (e.g., violations before a boundary date)
- Aggregate (count, max date, group by)
- Answer a question the flat GET endpoints cannot answer alone
Domain-Specific Fetching
Contractor tasks (/api/contractor/*):
applications — applicant identity, license class, experience summary
bonds — bond amount, status (active/cancelled), effective dates
insurance — coverage amount, expiry date, binding status
license-history — prior licenses, suspensions, revocations
violations — open/closed violations, severity
correspondence — stale or unverified correspondence
inspections — document gaps, safety rechecks
Liquor tasks (/api/liquor/*):
applications — applicant, premises, license class
settlements — tax holds, board orders
privileges — special operating privileges
incidents — reported incidents at the premises
site-evidence — camera evidence, floor plans, signage, photos, police memos,
neighbor notices
Alcohol renewal tasks (/api/alcohol/* + /api/renewal/*):
licensees — license identity, facility name, status
violations — violation records with dates and IDs
renewal/rules — renewal criteria and rule parameters
Phase 4 — Decision Logic
The reasoning patterns differ by task type; see
task-patterns.md for per-type decision trees.
Below is the cross-cutting logic shared by all types.
Cross-Cutting Decision Principles
Policy-first reasoning. Every analysis starts from the current policy
baseline (GET /api/policies). A deficiency that exists only because a
policy changed is a policy-impacted finding. A deficiency that would have
existed under the prior baseline is not policy-impacted.
Financial-coverage checks (bonds & insurance). For each application:
- Is there an active bond? If no → deficiency (bond not active / cancelled).
- Does the bond amount meet the required minimum? If no → bond shortfall.
- Is insurance current (not expired as of the review date)? If no →
insurance not current / expired.
- Does insurance coverage meet the required minimum? If no → insurance shortfall.
- Is insurance still pending (not yet bound)? If yes → insurance pending.
Endorsement checks. For each application:
- Are all required specialty endorsements verified? If no → endorsement not
verified / missing / pending.
Experience checks. Does the applicant meet the minimum experience
threshold for the license class? If no → experience shortfall.
Compliance-history checks. For each application/licensee:
- Are there open serious violations? If yes → serious-violation deficiency.
- Are there open minor violations? If yes → minor-violation deficiency.
- Is there an active suspension? If yes → active-suspension deficiency.
- Are there unresolved complaints? If yes → unresolved-complaint deficiency.
Inspection checks (contractor). Are there inspection document gaps or
safety rechecks needed?
Site-evidence checks (liquor). Are there missing or conflicting site
evidence items (cameras, floor plans, signage, photos, police memos, neighbor
notices)?
Risk-tier assignment. Use the severity and count of deficiencies:
high — active suspension, open serious violations, multiple severe
financial-coverage failures, or a pattern requiring board review.
medium — curable deficiencies (bond shortfall, expired insurance, pending
endorsements, experience shortfall) without a suspension or serious pattern.
low — no material deficiencies; application is approvable.
Determination. Map deficiencies to a posture:
APPROVE / issue_restricted — no deficiencies, or deficiencies already
resolved.
HOLD / request_follow_up — curable deficiencies; applicant can resolve
them.
DENY — uncurable or severe deficiencies (active suspension, serious
unresolved violations, board-level issues).
Correspondence Staleness
When correspondence records include dates or status fields, flag any item that
is stale (older than a reasonable review window) or unverified. Include those
IDs in the summary's stale_or_unverified_correspondence_ids.
Boundary-Date Logic (Renewal Queue)
When a boundary date is given (e.g., "release boundary is 2025-04-10"):
- Violations dated on or before the boundary are in scope.
- Violations dated after the boundary are excluded and listed in
post_boundary_violation_ids_excluded.
- The
most_recent_violation_date and violation_count only reflect in-scope
violations.
Match Confidence (Renewal Queue)
When matching violation records to licensees:
exact — violation's license identifier matches exactly.
close_address — match is on address or facility name, not license number.
uncertain — match relies on partial or inferred linkage.
Phase 5 — Output Construction
Build the JSON object top-down, matching the keys and structure in
answer_template.json exactly.
Ordering rules — obey every ordering constraint in the template:
- Lists of application/license IDs: ascending lexical order.
- Code lists: the ordering rule stated in the template (alphabetical,
ascending, or "any order").
- Queue entries: by ascending rank with no gaps.
- Violation IDs: by date ascending, then ID ascending.
Empty values — use [] for empty code/ID lists, 0 for zero counts.
Never use null where the template expects a list or integer.
No extraneous output. Return only the JSON object. No prose, no
markdown fences, no citations, no commentary, no keys not shown in the
template.
Summary consistency. The summary must be mechanically consistent with
the item-level decisions:
approve_count + hold_count + deny_count = total applications.
high_risk_application_ids = every application with risk_tier: "high".
policy_impacted_application_ids = every application with
policy_impacted: true.
stale_or_unverified_correspondence_ids = every stale or unverified
correspondence ID found across all applications.
Phase 6 — Verification (Before Returning)
- Every target identifier from the prompt appears in the output exactly once.
- Every list length matches its stated constraint.
- Every enum value is from the template's allowed set.
- Summary counts sum correctly.
- Ordering rules are satisfied.
- No prose, no markdown — pure JSON.
Reference Files
- task-patterns.md — catalog of the three task
types, their API endpoints, field schemas, and decision trees.
- domain-concepts.md — glossary of every
deficiency code, risk code, verification gap code, obligation code, check
code, escalation trigger code, and action code seen across the training
distribution, with the conditions that trigger each one.
1---2name: fewshot-attempt-02-453description: Licensing Examiner Skill4---5# Licensing Examiner Skill67Reusable methodology for evaluating licensing applications, building staff review8packages, and constructing manual-review queues against a shared licensing data9environment. This skill covers contractor eligibility batches, restricted liquor10license transfers, and alcohol renewal screening — any task where you must fetch11records from the licensing API, cross-reference them against business rules, and12produce structured JSON decisions.1314---1516## Phase 1 — Environment Bootstrapping1718Every task begins by locating and reading the environment descriptor.19201. Read `environment_access.md` from the working directory. It contains:21 - `base_url` — the root of the licensing data service22 - `credentials` — required headers (notably `X-Task-Token` for SQL)23 - `allowed_endpoints` — the full set of available API routes24252. Replace every occurrence of `<TASK_ENV_BASE_URL>` in the prompt with the26 `base_url` from `environment_access.md`. All GET/POST calls go to routes27 under that base.28293. The SQL endpoint (`POST /api/sql`) requires the header30 `X-Task-Token: licensing-review-019`. No other endpoints require this header.31 SQL is the escape hatch — use it when the standard GET endpoints cannot32 express a necessary join, filter, or aggregation. Prefer the purpose-built33 GET endpoints first; they are simpler and less error-prone.3435---3637## Phase 2 — Task Discovery3839Every task provides two input files under `input/`:4041| File | Purpose |42|---|---|43| `prompt.txt` | Human-readable task description, target identifiers, applicable endpoints, and any review-date or boundary-date constants. |44| `payloads/answer_template.json` | The exact JSON schema the output must satisfy — top-level keys, field types, allowed enum values, ordering rules, and constraints on list lengths. |4546**Procedure:**47481. Read `prompt.txt` fully. Extract:49 - The **task type** (batch eligibility, staff package, or renewal queue — see50 [task-patterns.md](references/task-patterns.md) for the catalog).51 - The **target identifiers** (application IDs, license numbers, location codes).52 - The **review date** or **boundary date** if one is stated.53 - The **list of suggested API endpoints**.54552. Read `payloads/answer_template.json` fully. Internalize every constraint:56 - Required top-level keys57 - Enum value sets (every code, action, posture, tier)58 - Ordering rules (ascending by ID, alphabetical, by date)59 - Required lengths and empty-value conventions60613. If any suggested endpoint is absent from `environment_access.md`, skip62 it — only call endpoints listed in the environment descriptor.6364---6566## Phase 3 — Data Collection6768### General Strategy69701. Always start with `GET /api/policies` — it provides the current rule baseline71 that may change how other records are interpreted.72732. Fetch the core entity collection next:74 - Contractor tasks → `GET /api/contractor/applications`75 - Liquor tasks → `GET /api/liquor/applications`76 - Renewal tasks → `GET /api/alcohol/licensees`77783. Then fetch each supporting record collection in parallel. The full set of79 available GET routes is in the environment descriptor; only call those80 relevant to the task type.81824. Use `POST /api/sql` when you need to:83 - Join entities across collections on a shared key84 - Filter by date ranges (e.g., violations before a boundary date)85 - Aggregate (count, max date, group by)86 - Answer a question the flat GET endpoints cannot answer alone8788### Domain-Specific Fetching8990**Contractor tasks** (`/api/contractor/*`):91- `applications` — applicant identity, license class, experience summary92- `bonds` — bond amount, status (active/cancelled), effective dates93- `insurance` — coverage amount, expiry date, binding status94- `license-history` — prior licenses, suspensions, revocations95- `violations` — open/closed violations, severity96- `correspondence` — stale or unverified correspondence97- `inspections` — document gaps, safety rechecks9899**Liquor tasks** (`/api/liquor/*`):100- `applications` — applicant, premises, license class101- `settlements` — tax holds, board orders102- `privileges` — special operating privileges103- `incidents` — reported incidents at the premises104- `site-evidence` — camera evidence, floor plans, signage, photos, police memos,105 neighbor notices106107**Alcohol renewal tasks** (`/api/alcohol/*` + `/api/renewal/*`):108- `licensees` — license identity, facility name, status109- `violations` — violation records with dates and IDs110- `renewal/rules` — renewal criteria and rule parameters111112---113114## Phase 4 — Decision Logic115116The reasoning patterns differ by task type; see117[task-patterns.md](references/task-patterns.md) for per-type decision trees.118Below is the cross-cutting logic shared by all types.119120### Cross-Cutting Decision Principles1211221. **Policy-first reasoning.** Every analysis starts from the current policy123 baseline (`GET /api/policies`). A deficiency that exists only because a124 policy changed is a *policy-impacted* finding. A deficiency that would have125 existed under the prior baseline is not policy-impacted.1261272. **Financial-coverage checks (bonds & insurance).** For each application:128 - Is there an active bond? If no → deficiency (bond not active / cancelled).129 - Does the bond amount meet the required minimum? If no → bond shortfall.130 - Is insurance current (not expired as of the review date)? If no →131 insurance not current / expired.132 - Does insurance coverage meet the required minimum? If no → insurance shortfall.133 - Is insurance still pending (not yet bound)? If yes → insurance pending.1341353. **Endorsement checks.** For each application:136 - Are all required specialty endorsements verified? If no → endorsement not137 verified / missing / pending.1381394. **Experience checks.** Does the applicant meet the minimum experience140 threshold for the license class? If no → experience shortfall.1411425. **Compliance-history checks.** For each application/licensee:143 - Are there open serious violations? If yes → serious-violation deficiency.144 - Are there open minor violations? If yes → minor-violation deficiency.145 - Is there an active suspension? If yes → active-suspension deficiency.146 - Are there unresolved complaints? If yes → unresolved-complaint deficiency.1471486. **Inspection checks (contractor).** Are there inspection document gaps or149 safety rechecks needed?1501517. **Site-evidence checks (liquor).** Are there missing or conflicting site152 evidence items (cameras, floor plans, signage, photos, police memos, neighbor153 notices)?1541558. **Risk-tier assignment.** Use the severity and count of deficiencies:156 - `high` — active suspension, open serious violations, multiple severe157 financial-coverage failures, or a pattern requiring board review.158 - `medium` — curable deficiencies (bond shortfall, expired insurance, pending159 endorsements, experience shortfall) without a suspension or serious pattern.160 - `low` — no material deficiencies; application is approvable.1611629. **Determination.** Map deficiencies to a posture:163 - `APPROVE` / `issue_restricted` — no deficiencies, or deficiencies already164 resolved.165 - `HOLD` / `request_follow_up` — curable deficiencies; applicant can resolve166 them.167 - `DENY` — uncurable or severe deficiencies (active suspension, serious168 unresolved violations, board-level issues).169170### Correspondence Staleness171172When correspondence records include dates or status fields, flag any item that173is stale (older than a reasonable review window) or unverified. Include those174IDs in the summary's `stale_or_unverified_correspondence_ids`.175176### Boundary-Date Logic (Renewal Queue)177178When a boundary date is given (e.g., "release boundary is 2025-04-10"):179- Violations dated **on or before** the boundary are in scope.180- Violations dated **after** the boundary are excluded and listed in181 `post_boundary_violation_ids_excluded`.182- The `most_recent_violation_date` and `violation_count` only reflect in-scope183 violations.184185### Match Confidence (Renewal Queue)186187When matching violation records to licensees:188- `exact` — violation's license identifier matches exactly.189- `close_address` — match is on address or facility name, not license number.190- `uncertain` — match relies on partial or inferred linkage.191192---193194## Phase 5 — Output Construction1951961. Build the JSON object top-down, matching the keys and structure in197 `answer_template.json` exactly.1981992. **Ordering rules** — obey every ordering constraint in the template:200 - Lists of application/license IDs: ascending lexical order.201 - Code lists: the ordering rule stated in the template (alphabetical,202 ascending, or "any order").203 - Queue entries: by ascending rank with no gaps.204 - Violation IDs: by date ascending, then ID ascending.2052063. **Empty values** — use `[]` for empty code/ID lists, `0` for zero counts.207 Never use `null` where the template expects a list or integer.2082094. **No extraneous output.** Return only the JSON object. No prose, no210 markdown fences, no citations, no commentary, no keys not shown in the211 template.2122135. **Summary consistency.** The summary must be mechanically consistent with214 the item-level decisions:215 - `approve_count` + `hold_count` + `deny_count` = total applications.216 - `high_risk_application_ids` = every application with `risk_tier: "high"`.217 - `policy_impacted_application_ids` = every application with218 `policy_impacted: true`.219 - `stale_or_unverified_correspondence_ids` = every stale or unverified220 correspondence ID found across all applications.221222---223224## Phase 6 — Verification (Before Returning)2252261. Every target identifier from the prompt appears in the output exactly once.2272. Every list length matches its stated constraint.2283. Every enum value is from the template's allowed set.2294. Summary counts sum correctly.2305. Ordering rules are satisfied.2316. No prose, no markdown — pure JSON.232233---234235## Reference Files236237- [task-patterns.md](references/task-patterns.md) — catalog of the three task238 types, their API endpoints, field schemas, and decision trees.239- [domain-concepts.md](references/domain-concepts.md) — glossary of every240 deficiency code, risk code, verification gap code, obligation code, check241 code, escalation trigger code, and action code seen across the training242 distribution, with the conditions that trigger each one.