Asteria DQ Auditor
Overview
Use this skill to solve Asteria Fleet Data Quality Hub reconciliation tasks. The goal is to derive the requested JSON answer from the task prompt, payloads/case_scope.json, payloads/answer_template.json, environment_access.md, and the hub's public read-only data.
Workflow
- Read the task prompt,
case_scope.json, answer_template.json, and environment_access.md.
- Identify the collection family from the prompt/catalog: contacts, fuel, freight, or maintenance.
- Fetch all records for the scoped collection with pagination. Use
collection=<collection_id> for collection endpoints.
- Fetch source snapshots and all needed reference tables before computing metrics.
- Apply the rules in references/reconciliation.md.
- Fill only the fields required by the answer template, preserving every ordering rule.
- Validate the final response as strict JSON with no commentary.
Helper Script
Use scripts/asteria_audit.py to fetch and classify reusable intermediate data. Run it from the task workspace so it can read environment_access.md by default:
python skill/scripts/asteria_audit.py classify-ledger --family fuel --collection "$COLLECTION_ID" > fuel_classified.json
python skill/scripts/asteria_audit.py classify-ledger --family freight --collection "$COLLECTION_ID" > freight_classified.json
python skill/scripts/asteria_audit.py classify-maintenance --collection "$COLLECTION_ID" > maintenance_classified.json
python skill/scripts/asteria_audit.py classify-contacts --collection "$COLLECTION_ID" > contacts_classified.json
Use fetch when you need raw records for manual checks:
python skill/scripts/asteria_audit.py fetch --family contacts --collection "$COLLECTION_ID" > raw_contacts.json
The script emits classified intermediate records, not final answers. Map its output into the current answer template and recompute any task-specific ranking, focus panel, threshold, or status field required by case_scope.json.
Decision Rules
- Use source snapshots to determine raw counts, authoritative snapshot IDs, duplicate occurrences, and retained records.
- For fuel and freight, recognize categories/classes from active, date-effective aliases using longest non-overlapping phrase matches. Quarantine only unresolved aliases or invalid physical measures; valid mismatches still enter normalized totals.
- For contacts, merge by strong contact identifiers, select canonical fields by field-level source precedence, and keep no-contact rows as quarantine singletons.
- For maintenance, reject malformed retained events first, then detect odometer regressions within each asset's retained chronological history.
- Use the compact code mappings in the reference file. Do not invent code meanings beyond the observed condition-to-code mappings.
Final JSON
Return one JSON object conforming exactly to payloads/answer_template.json. Sort every list by the contract's ordering rule, use stable public IDs, round numeric fields only as specified, and omit all Markdown or explanatory text.
1---2name: asteria-dq-auditor3description: Reconcile Asteria Fleet Data Quality Hub collections and produce JSON audit or certification answers for contact master, dispatch roster, fuel ledger, freight accrual, and maintenance history tasks using case_scope and answer_template payloads, hub endpoints, source snapshots, alias references, unit and FX normalization, survivor selection, compact control codes, and release decisions.4metadata:5 source: https://skillmd.com/skills/prism-shadow/asteria-dq-auditor6---78# Asteria DQ Auditor910## Overview1112Use this skill to solve Asteria Fleet Data Quality Hub reconciliation tasks. The goal is to derive the requested JSON answer from the task prompt, `payloads/case_scope.json`, `payloads/answer_template.json`, `environment_access.md`, and the hub's public read-only data.1314## Workflow15161. Read the task prompt, `case_scope.json`, `answer_template.json`, and `environment_access.md`.172. Identify the collection family from the prompt/catalog: contacts, fuel, freight, or maintenance.183. Fetch all records for the scoped collection with pagination. Use `collection=<collection_id>` for collection endpoints.194. Fetch source snapshots and all needed reference tables before computing metrics.205. Apply the rules in [references/reconciliation.md](references/reconciliation.md).216. Fill only the fields required by the answer template, preserving every ordering rule.227. Validate the final response as strict JSON with no commentary.2324## Helper Script2526Use [scripts/asteria_audit.py](scripts/asteria_audit.py) to fetch and classify reusable intermediate data. Run it from the task workspace so it can read `environment_access.md` by default:2728```bash29python skill/scripts/asteria_audit.py classify-ledger --family fuel --collection "$COLLECTION_ID" > fuel_classified.json30python skill/scripts/asteria_audit.py classify-ledger --family freight --collection "$COLLECTION_ID" > freight_classified.json31python skill/scripts/asteria_audit.py classify-maintenance --collection "$COLLECTION_ID" > maintenance_classified.json32python skill/scripts/asteria_audit.py classify-contacts --collection "$COLLECTION_ID" > contacts_classified.json33```3435Use `fetch` when you need raw records for manual checks:3637```bash38python skill/scripts/asteria_audit.py fetch --family contacts --collection "$COLLECTION_ID" > raw_contacts.json39```4041The script emits classified intermediate records, not final answers. Map its output into the current answer template and recompute any task-specific ranking, focus panel, threshold, or status field required by `case_scope.json`.4243## Decision Rules4445- Use source snapshots to determine raw counts, authoritative snapshot IDs, duplicate occurrences, and retained records.46- For fuel and freight, recognize categories/classes from active, date-effective aliases using longest non-overlapping phrase matches. Quarantine only unresolved aliases or invalid physical measures; valid mismatches still enter normalized totals.47- For contacts, merge by strong contact identifiers, select canonical fields by field-level source precedence, and keep no-contact rows as quarantine singletons.48- For maintenance, reject malformed retained events first, then detect odometer regressions within each asset's retained chronological history.49- Use the compact code mappings in the reference file. Do not invent code meanings beyond the observed condition-to-code mappings.5051## Final JSON5253Return one JSON object conforming exactly to `payloads/answer_template.json`. Sort every list by the contract's ordering rule, use stable public IDs, round numeric fields only as specified, and omit all Markdown or explanatory text.