Task Group 005 Finance Controls
Use this skill when the task asks for finance-risk, AP reimbursement, vendor onboarding, prepaid close, stale AP snapshot, or account-change payment-release decisions from a shared ERP/compliance API.
Core Workflow
- Read the prompt and every local payload in
input/payloads/.
- Treat
answer_template.json as the output contract: preserve required keys, enum values, order requirements, numeric precision, and ID ordering.
- Use the runner-provided API base URL as the system of record. Local snapshots and batch files define scope and context, but current API records decide the answer unless the prompt says otherwise.
- Call
/endpoints first when available. Prefer /api/... endpoints, but fall back to the non-API aliases named in the prompt or endpoint list.
- Fetch only the scoped records needed for the requested IDs/accounts/period, plus related bills, payments, vendors, compliance details, GL balances, and close logs when relevant.
- Build a scratch reconciliation table before writing final JSON. Record the source evidence for each ID, especially status, amount, vendor, payment, bank, screening, tax, license, and data-quality fields.
- Return only the requested JSON object when the prompt asks for JSON only. Do not include narrative text, citations, or extra properties.
For detailed decision rules, read references/control-rules.md. For paginated API pulls, use scripts/api_fetch.py.
API Access Pattern
Normalize the base URL, then use exact-match query parameters and pagination:
python skill/scripts/api_fetch.py --base-url "$TASK_ENV_BASE_URL" --endpoint /endpoints
python skill/scripts/api_fetch.py --base-url "$TASK_ENV_BASE_URL" --endpoint /api/claims --param claim_id=CLAIM_ID
python skill/scripts/api_fetch.py --base-url "$TASK_ENV_BASE_URL" --endpoint /api/ap/bills --param claim_id=CLAIM_ID
python skill/scripts/api_fetch.py --base-url "$TASK_ENV_BASE_URL" --endpoint /api/ap/payments --param bill_id=BILL_ID
If the runner supplies the base URL in the prompt rather than an environment variable, pass it with --base-url. If exact filters return multiple rows, disambiguate using all available fields, not just one ID.
Output Discipline
- Sort ID lists exactly as the template or prompt says, usually ascending lexical ID order.
- Preserve payload order only where the template says "same order as" a local scope file.
- Round USD amounts to two decimals unless the template asks for cents or another precision.
- Use booleans and enums exactly as allowed by the template.
- Do not copy source
review_status or status fields directly into decisions. Decisions are release-control conclusions from reconciled evidence.
- When evidence conflicts, current API records outrank stale local exports. The prompt and schema outrank example-derived heuristics.
1---2name: task-group-005-finance-controls3description: Use this skill for task_group_005 shared ERP, AP, compliance, vendor onboarding, prepaid close, reimbursement close, stale AP export, account-change release, or finance-risk JSON tasks that require calling a runner-provided task API and returning an answer_template-shaped JSON object. It guides API discovery, current-record reconciliation, close-control decisions, and strict schema output.4metadata:5 source: https://skillmd.com/skills/prism-shadow/task-group-005-finance-controls6---78# Task Group 005 Finance Controls910Use this skill when the task asks for finance-risk, AP reimbursement, vendor onboarding, prepaid close, stale AP snapshot, or account-change payment-release decisions from a shared ERP/compliance API.1112## Core Workflow13141. Read the prompt and every local payload in `input/payloads/`.152. Treat `answer_template.json` as the output contract: preserve required keys, enum values, order requirements, numeric precision, and ID ordering.163. Use the runner-provided API base URL as the system of record. Local snapshots and batch files define scope and context, but current API records decide the answer unless the prompt says otherwise.174. Call `/endpoints` first when available. Prefer `/api/...` endpoints, but fall back to the non-API aliases named in the prompt or endpoint list.185. Fetch only the scoped records needed for the requested IDs/accounts/period, plus related bills, payments, vendors, compliance details, GL balances, and close logs when relevant.196. Build a scratch reconciliation table before writing final JSON. Record the source evidence for each ID, especially status, amount, vendor, payment, bank, screening, tax, license, and data-quality fields.207. Return only the requested JSON object when the prompt asks for JSON only. Do not include narrative text, citations, or extra properties.2122For detailed decision rules, read [references/control-rules.md](references/control-rules.md). For paginated API pulls, use [scripts/api_fetch.py](scripts/api_fetch.py).2324## API Access Pattern2526Normalize the base URL, then use exact-match query parameters and pagination:2728```bash29python skill/scripts/api_fetch.py --base-url "$TASK_ENV_BASE_URL" --endpoint /endpoints30python skill/scripts/api_fetch.py --base-url "$TASK_ENV_BASE_URL" --endpoint /api/claims --param claim_id=CLAIM_ID31python skill/scripts/api_fetch.py --base-url "$TASK_ENV_BASE_URL" --endpoint /api/ap/bills --param claim_id=CLAIM_ID32python skill/scripts/api_fetch.py --base-url "$TASK_ENV_BASE_URL" --endpoint /api/ap/payments --param bill_id=BILL_ID33```3435If the runner supplies the base URL in the prompt rather than an environment variable, pass it with `--base-url`. If exact filters return multiple rows, disambiguate using all available fields, not just one ID.3637## Output Discipline3839- Sort ID lists exactly as the template or prompt says, usually ascending lexical ID order.40- Preserve payload order only where the template says "same order as" a local scope file.41- Round USD amounts to two decimals unless the template asks for cents or another precision.42- Use booleans and enums exactly as allowed by the template.43- Do not copy source `review_status` or `status` fields directly into decisions. Decisions are release-control conclusions from reconciled evidence.44- When evidence conflicts, current API records outrank stale local exports. The prompt and schema outrank example-derived heuristics.