Northstar Payer-Operations Determination Skill
This skill solves Northstar Health Plan payer-operations tasks. Each task asks for one JSON
object that conforms to a provided answer_template.json. The work is: read the task inputs,
query the shared environment for the relevant records, apply the business rules and policy
criteria, and emit the structured result with a basis_audit trail.
When to use
Use this skill when a task matches this shape:
- It names Northstar Health Plan and a business/case ID (prior-authorization case, appeal,
claim, P2P case, or margin queue).
- It points at a shared payer-operations environment and gives SQL + business-endpoint access.
- It requires JSON conforming to an
answer_template.json, including a basis_audit object.
The five task families this covers:
- UM nurse prior-authorization determination (physical therapy, etc.)
- Pharmacy coverage appeal + manufacturer-assistance intake (specialty drug)
- Payment-integrity claim repricing (imaging claim against a rate benchmark)
- Peer-to-peer (P2P) final authorization summary (with appeal deadline if adverse)
- Therapy margin-queue summary (finance margin analysis by payer segment)
Inputs to read first
Read these in order before querying anything:
prompt.txt — the request, the target business ID, and the "as-of" date.
payloads/task_context.json — target IDs, requester role, reporting date, finance/rule
definitions, and an environment block with base URL + SQL endpoint + bearer token.
payloads/answer_template.json — the exact required top-level fields, nested object
shapes, enum choices, list-ordering rules, and numeric precision. This is the contract.
environment_access.md — the allowed endpoints and the SQL bearer token.
Treat the template as authoritative: every enum value, ordering rule, precision rule, and
"additional_fields_allowed" flag comes from it. Do not invent fields; do not add fields when
additional_fields_allowed is false.
The environment
The shared payer-operations environment is a read-only data store. Access it only through
the endpoints listed in environment_access.md and the task's environment block — get the
base URL, SQL path, and bearer token from there (do not assume they are fixed).
- SQL endpoint (
POST /sql/query, bearer token required): accepts a JSON body
{"sql": "<SELECT ...>", "params": {...}} (the request field is sql, not query).
It returns {"columns": [...], "rows": [...], "row_count": N, "max_rows": 500, "limited": bool}.
Filter with WHERE on the target IDs; results cap at 500 rows. Use it to join and filter
across tables. Inline string literals work; params is optional.
- Business GET endpoints (open, no auth):
GET /api/tables (schema), /api/cases,
/api/cases/{id}, /api/policies, /api/policies/{id}, /api/documents/{id},
/api/rate-schedules, /api/appeals. Use these for quick single-record lookups.
Do not inspect environment source files, SQLite files, manifests, or setup scripts — only
the HTTP endpoints. The full table schema is in schema_reference.md.
Core workflow
- Identify the target. Pull the target business ID(s) and the "as-of" date from
task_context. Note the requester role and service domain — they pick the task family.
- Load the schema. Skim
schema_reference.md so you know which tables hold which facts.
- Gather the records for the target ID. Always pull the case row plus the records the
template's fields imply. A typical gather set:
cases (case row: stage, status, policy_id, service_domain, urgency, due_date)
- The line table for the family:
request_lines (PA/P2P), claim_lines (claim repricing),
service_margin (margin queue).
policies + policy_criteria (criterion IDs, text, approval_required, result_if_missing)
case_criteria (the per-case criterion results — usually maps directly to
criteria_results; note gap_description and reviewer_scope)
documents + document_facts (evidence; is_current flags current vs stale)
- The decision/event table for the family:
authorizations (PA/claim), p2p_events (P2P),
appeals + assistance_screen + drug_trials (pharmacy appeal), payment_benchmarks
(claim repricing), service_margin (margin queue).
members + plans (plan_type, product, state — needed for benchmark selection and appeal
rules) and providers when relevant.
- Apply the business rules / criteria. Map each criterion to met/not_met/partial/unclear
from
case_criteria; derive the recommendation, route, and letter from the criteria +
result_if_missing + case stage + the decision record. See task_patterns.md.
- Compute derived numbers with the template's precision: currency to 2 decimals (cents),
ratios to 4 decimals, integers as integers. Re-check each line and the totals reconcile.
- Build the
basis_audit. Pick the one source_precedence rule that matches the task,
then list controlling_record_ids, exception_record_ids, and precedence_record_order.
This is the most error-prone field — read basis_audit_guide.md before filling it.
- Emit exactly one JSON object matching the template. No markdown, no prose, no comments
outside the JSON. Respect every enum, ordering, precision, and null rule.
Output rules (apply to every task)
- One JSON object only. No surrounding text, no code fences, no trailing prose.
- Enums exact. Use the exact string from the template's
choices (lowercase, underscores).
- Ordering. Lists with an ordering rule must follow it: ascending document_id / CPT code /
criterion ID; queue rows in
task_context row order; claim lines in claim-line order;
alphabetical enum lists; payer-appeal items before assistance items; etc.
- Precision. Currency → 2 decimals (dollars rounded to cents). Ratios → 4 decimals.
Counts/units → integers.
- Null, not empty. Use JSON
null (never "") for an absent modifier or a field that is
"null only when no ... applies." Use an empty list [] only where the template allows it
(e.g., unresolved_criteria when none remain, exception_record_ids when none exist).
- No extra fields when
additional_fields_allowed is false.
- Reconcile totals. Line
recovery_amount sum must equal the claim-level recovery_amount;
correct_allowed_total must equal the sum of line correct_allowed_amounts; margin
below_threshold/charge_sensitive lists must match the per-row flags.
Test-time solving
Solve directly from the environment and the template. There is no scoring, feedback, or
"judge" endpoint available at solve time — do not attempt to call one and do not rely on any.
Produce the single best JSON answer from the gathered records and the rules below.
Supporting files
schema_reference.md — the full environment table schema and the SQL request/response shape.
basis_audit_guide.md — basis_audit semantics: the six source_precedence rules, what goes
in controlling_record_ids vs exception_record_ids, and the ordering rules.
task_patterns.md — per-task-family field-derivation rules (how each output field is derived
from environment records). These are general rules, not specific answers.
1---2name: northstar-payer-ops-113description: Solve Northstar Health Plan payer-operations structured-output tasks — UM prior-authorization determinations, pharmacy appeals + manufacturer-assistance intake, payment-integrity claim repricing, peer-to-peer (P2P) final summaries, and therapy margin-queue summaries — by querying the shared payer-operations environment and returning exactly one JSON object that matches the task's answer_template. Use when a task names Northstar Health Plan, gives a prior-auth / appeal / claim / P2P / margin-queue business ID, points at a shared payer-operations environment, and asks for JSON matching an answer_template.4---56# Northstar Payer-Operations Determination Skill78This skill solves Northstar Health Plan payer-operations tasks. Each task asks for **one JSON9object** that conforms to a provided `answer_template.json`. The work is: read the task inputs,10query the shared environment for the relevant records, apply the business rules and policy11criteria, and emit the structured result with a `basis_audit` trail.1213## When to use1415Use this skill when a task matches this shape:16- It names **Northstar Health Plan** and a business/case ID (prior-authorization case, appeal,17 claim, P2P case, or margin queue).18- It points at a shared payer-operations environment and gives SQL + business-endpoint access.19- It requires JSON conforming to an `answer_template.json`, including a `basis_audit` object.2021The five task families this covers:221. **UM nurse prior-authorization determination** (physical therapy, etc.)232. **Pharmacy coverage appeal + manufacturer-assistance intake** (specialty drug)243. **Payment-integrity claim repricing** (imaging claim against a rate benchmark)254. **Peer-to-peer (P2P) final authorization summary** (with appeal deadline if adverse)265. **Therapy margin-queue summary** (finance margin analysis by payer segment)2728## Inputs to read first2930Read these in order before querying anything:311. `prompt.txt` — the request, the target business ID, and the "as-of" date.322. `payloads/task_context.json` — target IDs, requester role, reporting date, finance/rule33 definitions, and an `environment` block with base URL + SQL endpoint + bearer token.343. `payloads/answer_template.json` — the **exact** required top-level fields, nested object35 shapes, enum choices, list-ordering rules, and numeric precision. This is the contract.364. `environment_access.md` — the allowed endpoints and the SQL bearer token.3738Treat the template as authoritative: every enum value, ordering rule, precision rule, and39"additional_fields_allowed" flag comes from it. Do not invent fields; do not add fields when40`additional_fields_allowed` is false.4142## The environment4344The shared payer-operations environment is a read-only data store. Access it **only** through45the endpoints listed in `environment_access.md` and the task's `environment` block — get the46base URL, SQL path, and bearer token from there (do not assume they are fixed).4748- **SQL endpoint** (`POST /sql/query`, bearer token required): accepts a JSON body49 `{"sql": "<SELECT ...>", "params": {...}}` (the request field is `sql`, not `query`).50 It returns `{"columns": [...], "rows": [...], "row_count": N, "max_rows": 500, "limited": bool}`.51 Filter with `WHERE` on the target IDs; results cap at 500 rows. Use it to join and filter52 across tables. Inline string literals work; `params` is optional.53- **Business GET endpoints** (open, no auth): `GET /api/tables` (schema), `/api/cases`,54 `/api/cases/{id}`, `/api/policies`, `/api/policies/{id}`, `/api/documents/{id}`,55 `/api/rate-schedules`, `/api/appeals`. Use these for quick single-record lookups.5657Do **not** inspect environment source files, SQLite files, manifests, or setup scripts — only58the HTTP endpoints. The full table schema is in `schema_reference.md`.5960## Core workflow61621. **Identify the target.** Pull the target business ID(s) and the "as-of" date from63 `task_context`. Note the requester role and service domain — they pick the task family.642. **Load the schema.** Skim `schema_reference.md` so you know which tables hold which facts.653. **Gather the records** for the target ID. Always pull the case row plus the records the66 template's fields imply. A typical gather set:67 - `cases` (case row: stage, status, policy_id, service_domain, urgency, due_date)68 - The line table for the family: `request_lines` (PA/P2P), `claim_lines` (claim repricing),69 `service_margin` (margin queue).70 - `policies` + `policy_criteria` (criterion IDs, text, `approval_required`, `result_if_missing`)71 - `case_criteria` (the **per-case criterion results** — usually maps directly to72 `criteria_results`; note `gap_description` and `reviewer_scope`)73 - `documents` + `document_facts` (evidence; `is_current` flags current vs stale)74 - The decision/event table for the family: `authorizations` (PA/claim), `p2p_events` (P2P),75 `appeals` + `assistance_screen` + `drug_trials` (pharmacy appeal), `payment_benchmarks`76 (claim repricing), `service_margin` (margin queue).77 - `members` + `plans` (plan_type, product, state — needed for benchmark selection and appeal78 rules) and `providers` when relevant.794. **Apply the business rules / criteria.** Map each criterion to met/not_met/partial/unclear80 from `case_criteria`; derive the recommendation, route, and letter from the criteria +81 `result_if_missing` + case stage + the decision record. See `task_patterns.md`.825. **Compute derived numbers** with the template's precision: currency to 2 decimals (cents),83 ratios to 4 decimals, integers as integers. Re-check each line and the totals reconcile.846. **Build the `basis_audit`.** Pick the one `source_precedence` rule that matches the task,85 then list `controlling_record_ids`, `exception_record_ids`, and `precedence_record_order`.86 This is the most error-prone field — read `basis_audit_guide.md` before filling it.877. **Emit exactly one JSON object** matching the template. No markdown, no prose, no comments88 outside the JSON. Respect every enum, ordering, precision, and null rule.8990## Output rules (apply to every task)9192- **One JSON object only.** No surrounding text, no code fences, no trailing prose.93- **Enums exact.** Use the exact string from the template's `choices` (lowercase, underscores).94- **Ordering.** Lists with an ordering rule must follow it: ascending document_id / CPT code /95 criterion ID; queue rows in `task_context` row order; claim lines in claim-line order;96 alphabetical enum lists; payer-appeal items before assistance items; etc.97- **Precision.** Currency → 2 decimals (dollars rounded to cents). Ratios → 4 decimals.98 Counts/units → integers.99- **Null, not empty.** Use JSON `null` (never `""`) for an absent modifier or a field that is100 "null only when no ... applies." Use an empty list `[]` only where the template allows it101 (e.g., `unresolved_criteria` when none remain, `exception_record_ids` when none exist).102- **No extra fields** when `additional_fields_allowed` is false.103- **Reconcile totals.** Line `recovery_amount` sum must equal the claim-level `recovery_amount`;104 `correct_allowed_total` must equal the sum of line `correct_allowed_amount`s; margin105 `below_threshold`/`charge_sensitive` lists must match the per-row flags.106107## Test-time solving108109Solve directly from the environment and the template. There is **no** scoring, feedback, or110"judge" endpoint available at solve time — do not attempt to call one and do not rely on any.111Produce the single best JSON answer from the gathered records and the rules below.112113## Supporting files114115- `schema_reference.md` — the full environment table schema and the SQL request/response shape.116- `basis_audit_guide.md` — `basis_audit` semantics: the six `source_precedence` rules, what goes117 in `controlling_record_ids` vs `exception_record_ids`, and the ordering rules.118- `task_patterns.md` — per-task-family field-derivation rules (how each output field is derived119 from environment records). These are general rules, not specific answers.