Northstar Payer-Ops Structured Determination
This skill turns a Northstar Health Plan payer-operations work item into one
correct JSON object that conforms to the supplied answer_template.json. It is
domain-generic: the same workflow covers prior-authorization determinations,
pharmacy appeals, claim repricing, peer-to-peer summaries, and finance margin
queues. Apply the process below; do not memorize or reuse values from any
specific prior case.
What you receive
Each task stages three inputs (paths are relative to the task root):
input/prompt.txt — the business request in plain language.
input/payloads/task_context.json — structured context: the target business
ID, requester role, reporting date/period, work type, environment pointer
(<TASK_ENV_BASE_URL>), and any task-specific parameters (thresholds, queue
row IDs, source tables, appeal windows, etc.).
input/payloads/answer_template.json — the binding output contract: required
top-level keys, per-field types/enums/ordering/precision, the basis_audit
sub-contract, and the additional-fields rule.
The template is the contract. Every required key, enum choice, list ordering,
numeric precision, date format, and null rule in it is binding.
Environment access — network only
Resolve access from /work/environment_access.md (the sole sanctioned source).
Do not invent endpoints, base URLs, or credentials.
- The
<TASK_ENV_BASE_URL> placeholder in task_context.json maps to the base
URL recorded in environment_access.md.
- SQL access:
POST /sql/query to the base URL with header
Authorization: Bearer <token from environment_access.md>.
- Open business endpoints (no auth), as listed in
environment_access.md:
GET /portal, GET /api/tables, GET /api/cases, GET /api/cases/{case_id},
GET /api/policies, GET /api/policies/{policy_id},
GET /api/documents/{document_id}, GET /api/rate-schedules,
GET /api/appeals.
- Prefer REST endpoints to traverse the obvious entities; use
POST /sql/query
for joins or facts the REST surface does not expose (drug-trial records,
assistance-screen facts, margin rows, line-level detail, etc.).
Hard rule: reach the environment ONLY over its HTTP/SQL interface. Do not
open, cat, sqlite3, grep, or otherwise inspect environment source files,
generated data files, SQLite/database files, manifests, setup scripts, or
construction files. The environment is a black box. Derive every value from
live network responses, never from local files or memory.
Workflow
- Load inputs. Read
prompt.txt, task_context.json, and
answer_template.json. Identify the target business ID, reporting date or
period, requester role, work type, and any task-context parameters
(thresholds, queue row IDs, source tables, appeal windows).
- Internalize the template. Note required top-level keys, each field's
type/enum/ordering/precision, the
basis_audit contract, and whether extra
fields are allowed. You will emit exactly this shape.
- Resolve environment access from
environment_access.md.
- Discover the schema.
GET /api/tables first, so you know what entities
and tables exist before querying.
- Fetch and traverse. Pull the target record, then related entities:
member/plan context, requested service/procedure lines, applicable policy
and criteria, clinical/evidence documents, the authorization record, and any
work-type-specific facts (drug trials, assistance screen, rate schedules,
P2P event, margin rows). Use REST where it fits; fall back to SQL for the
rest.
- Reconcile via source-precedence. Apply the domain's precedence rule to
resolve conflicts (current vs stale; payer appeal vs manufacturer
assistance; effective benchmark vs stale schedule; new P2P info vs prior
record; margin threshold vs charge sensitivity). Decide which records
control the result and which are exceptions/gaps/excluded.
- Evaluate criteria. Map each required criterion ID to its review result
enum from the reconciled evidence.
- Classify documents/records. Evidence relied on vs excluded
(stale/superseded/inapplicable).
- Compute the result. Determination/disposition, route/owner, next action,
dates, and numeric outputs per work type, using task-context parameters and
the template's precision rules.
- Assemble
basis_audit. Per references/basis_audit_contract.md.
- Emit. Exactly one JSON object conforming to the template.
The basis_audit contract (summary)
Every answer includes a basis_audit object with four required keys:
source_precedence — one of six fixed precedence rules (see
references/basis_audit_contract.md). Pick the rule that governs this work
type.
controlling_record_ids — environment record IDs that directly control the
result, in operational evidence order (complete list).
exception_record_ids — gap/exception records that explain exclusions,
denials, missing information, or route priority; criteria/route gaps before
stale/excluded records (complete list).
precedence_record_order — the controlling and exception records in
source-precedence order, highest priority first. This is a curated,
de-duplicated trail of the records that drive the precedence decision, not a
plain union of the two lists above: omit records that are mere operands or
supporting evidence, and list a record once even if it appears in both roles.
Full semantics, the six rules, and worked ordering logic live in
references/basis_audit_contract.md.
Output contract invariants
- Emit a single JSON object. No markdown, no prose, no comments outside the JSON.
- Enum values must exactly match the template's choices.
- Order every list per its template rule (ascending document_id, ascending CPT,
claim-line order, alphabetical, the task-context
queue_row_ids order, the
template's choices order, operational packet order, etc.).
- Currency in USD rounded to two decimals; ratios to the precision stated
(typically 4 decimals); service units as integers.
- Dates as
YYYY-MM-DD ISO calendar dates; periods as YYYY-MM. Use null
(not "") for absent modifiers and for deadlines that do not apply.
- Do not add fields beyond the template unless it explicitly permits additional
properties.
Pitfalls
- Reaching for local env/db files instead of the network — never.
- Copying values from memory or any prior case — derive every value live.
- Treating
precedence_record_order as a plain union — it is curated and
reordered by the precedence rule (see references).
- Conflating evidence documents with controlling record IDs — they overlap but
serve different fields; populate each per its own rule.
- Forgetting to explicitly exclude a stale/superseded source (it belongs in
excluded/exception, not evidence/controlling).
- Ignoring a task-context parameter (threshold, queue row IDs, appeal window) —
these drive numeric and date results.
References
references/basis_audit_contract.md — the four basis_audit keys, the six
source-precedence rules with semantics and work-type guidance, and the
ordering / curation / de-duplication logic.
references/environment_workflow.md — the detailed data-gathering workflow,
the endpoint-to-entity traversal map, per-work-type notes, and formatting
invariants.
1---2name: northstar-payer-ops-determination-33description: Produces a structured JSON determination, disposition, summary, or correction packet for a Northstar Health Plan payer-operations work item. Use whenever a task asks for a UM-nurse prior-authorization determination, pharmacy coverage appeal and/or manufacturer-assistance intake disposition, payment-integrity claim repricing packet, peer-to-peer (P2P) final summary, or UM-finance margin-queue summary — i.e. any task that supplies a prompt plus a task_context.json and an answer_template.json and expects a single JSON object back from the shared Northstar payer-operations environment. Covers reaching the environment only over the network (SQL endpoint + bearer token + open business endpoints), reconciling conflicting evidence via the domain source-precedence rule, evaluating criteria, classifying evidence vs excluded records, and assembling the basis_audit trail.4---56# Northstar Payer-Ops Structured Determination78This skill turns a Northstar Health Plan payer-operations work item into one9correct JSON object that conforms to the supplied `answer_template.json`. It is10domain-generic: the same workflow covers prior-authorization determinations,11pharmacy appeals, claim repricing, peer-to-peer summaries, and finance margin12queues. Apply the process below; do not memorize or reuse values from any13specific prior case.1415## What you receive1617Each task stages three inputs (paths are relative to the task root):1819- `input/prompt.txt` — the business request in plain language.20- `input/payloads/task_context.json` — structured context: the target business21 ID, requester role, reporting date/period, work type, environment pointer22 (`<TASK_ENV_BASE_URL>`), and any task-specific parameters (thresholds, queue23 row IDs, source tables, appeal windows, etc.).24- `input/payloads/answer_template.json` — the binding output contract: required25 top-level keys, per-field types/enums/ordering/precision, the `basis_audit`26 sub-contract, and the additional-fields rule.2728The template is the contract. Every required key, enum choice, list ordering,29numeric precision, date format, and null rule in it is binding.3031## Environment access — network only3233Resolve access from `/work/environment_access.md` (the sole sanctioned source).34Do not invent endpoints, base URLs, or credentials.3536- The `<TASK_ENV_BASE_URL>` placeholder in `task_context.json` maps to the base37 URL recorded in `environment_access.md`.38- SQL access: `POST /sql/query` to the base URL with header39 `Authorization: Bearer <token from environment_access.md>`.40- Open business endpoints (no auth), as listed in `environment_access.md`:41 `GET /portal`, `GET /api/tables`, `GET /api/cases`, `GET /api/cases/{case_id}`,42 `GET /api/policies`, `GET /api/policies/{policy_id}`,43 `GET /api/documents/{document_id}`, `GET /api/rate-schedules`,44 `GET /api/appeals`.45- Prefer REST endpoints to traverse the obvious entities; use `POST /sql/query`46 for joins or facts the REST surface does not expose (drug-trial records,47 assistance-screen facts, margin rows, line-level detail, etc.).4849**Hard rule:** reach the environment ONLY over its HTTP/SQL interface. Do not50open, `cat`, `sqlite3`, grep, or otherwise inspect environment source files,51generated data files, SQLite/database files, manifests, setup scripts, or52construction files. The environment is a black box. Derive every value from53live network responses, never from local files or memory.5455## Workflow56571. **Load inputs.** Read `prompt.txt`, `task_context.json`, and58 `answer_template.json`. Identify the target business ID, reporting date or59 period, requester role, work type, and any task-context parameters60 (thresholds, queue row IDs, source tables, appeal windows).612. **Internalize the template.** Note required top-level keys, each field's62 type/enum/ordering/precision, the `basis_audit` contract, and whether extra63 fields are allowed. You will emit exactly this shape.643. **Resolve environment access** from `environment_access.md`.654. **Discover the schema.** `GET /api/tables` first, so you know what entities66 and tables exist before querying.675. **Fetch and traverse.** Pull the target record, then related entities:68 member/plan context, requested service/procedure lines, applicable policy69 and criteria, clinical/evidence documents, the authorization record, and any70 work-type-specific facts (drug trials, assistance screen, rate schedules,71 P2P event, margin rows). Use REST where it fits; fall back to SQL for the72 rest.736. **Reconcile via source-precedence.** Apply the domain's precedence rule to74 resolve conflicts (current vs stale; payer appeal vs manufacturer75 assistance; effective benchmark vs stale schedule; new P2P info vs prior76 record; margin threshold vs charge sensitivity). Decide which records77 *control* the result and which are *exceptions/gaps/excluded*.787. **Evaluate criteria.** Map each required criterion ID to its review result79 enum from the reconciled evidence.808. **Classify documents/records.** Evidence relied on vs excluded81 (stale/superseded/inapplicable).829. **Compute the result.** Determination/disposition, route/owner, next action,83 dates, and numeric outputs per work type, using task-context parameters and84 the template's precision rules.8510. **Assemble `basis_audit`.** Per `references/basis_audit_contract.md`.8611. **Emit.** Exactly one JSON object conforming to the template.8788## The basis_audit contract (summary)8990Every answer includes a `basis_audit` object with four required keys:9192- `source_precedence` — one of six fixed precedence rules (see93 `references/basis_audit_contract.md`). Pick the rule that governs this work94 type.95- `controlling_record_ids` — environment record IDs that directly control the96 result, in operational evidence order (complete list).97- `exception_record_ids` — gap/exception records that explain exclusions,98 denials, missing information, or route priority; criteria/route gaps before99 stale/excluded records (complete list).100- `precedence_record_order` — the controlling and exception records in101 source-precedence order, highest priority first. This is a **curated,102 de-duplicated trail of the records that drive the precedence decision**, not a103 plain union of the two lists above: omit records that are mere operands or104 supporting evidence, and list a record once even if it appears in both roles.105106Full semantics, the six rules, and worked ordering logic live in107`references/basis_audit_contract.md`.108109## Output contract invariants110111- Emit a single JSON object. No markdown, no prose, no comments outside the JSON.112- Enum values must exactly match the template's choices.113- Order every list per its template rule (ascending document_id, ascending CPT,114 claim-line order, alphabetical, the task-context `queue_row_ids` order, the115 template's choices order, operational packet order, etc.).116- Currency in USD rounded to two decimals; ratios to the precision stated117 (typically 4 decimals); service units as integers.118- Dates as `YYYY-MM-DD` ISO calendar dates; periods as `YYYY-MM`. Use `null`119 (not `""`) for absent modifiers and for deadlines that do not apply.120- Do not add fields beyond the template unless it explicitly permits additional121 properties.122123## Pitfalls124125- Reaching for local env/db files instead of the network — never.126- Copying values from memory or any prior case — derive every value live.127- Treating `precedence_record_order` as a plain union — it is curated and128 reordered by the precedence rule (see references).129- Conflating evidence documents with controlling record IDs — they overlap but130 serve different fields; populate each per its own rule.131- Forgetting to explicitly exclude a stale/superseded source (it belongs in132 excluded/exception, not evidence/controlling).133- Ignoring a task-context parameter (threshold, queue row IDs, appeal window) —134 these drive numeric and date results.135136## References137138- `references/basis_audit_contract.md` — the four basis_audit keys, the six139 source-precedence rules with semantics and work-type guidance, and the140 ordering / curation / de-duplication logic.141- `references/environment_workflow.md` — the detailed data-gathering workflow,142 the endpoint-to-entity traversal map, per-work-type notes, and formatting143 invariants.