Public Health Observatory Algorithmic Audit
Complete a registered PHO multi-module statistical audit using a read-only
HTTP evidence portal. Every task supplies an analysis_request.json payload
and an answer_template.json output contract. The requested modules,
parameters, grids, seeds, cohorts, filters, and decision gates are fully
specified in the request --- never invent them.
Required input files
analysis_request.json --- registered protocol, measures, years, geography,
publication filters, module specifications, grids, seeds, decision rules.
answer_template.json --- exact output JSON shape: required keys, array
lengths, cardinality rules, precision, enum values, ordering constraints.
The prompt text supplies the portal base URL as <TASK_ENV_BASE_URL>.
Workflow
1. Read the contract
Parse both analysis_request.json and answer_template.json fully before
touching any data. Identify:
- The effective geography scope, years, measures, and publication filters.
- The ordered list of audit modules and their exact method, cohort, parameter,
grid, seed, and required-evidence bindings.
- The output template's required keys, array lengths, cardinality rules,
numeric precision, ordering constraints, and controlled enum values.
2. Resolve the evidence portal
Replace <TASK_ENV_BASE_URL> with the actual URL from the prompt. The portal
is a read-only REST API. See references/portal-api.md for endpoint details
and data shapes.
Fetch every requested dataset in parallel when possible. The portal endpoints
return complete datasets; filter client-side by the request's effective
geography, years, value types, source types, release status, and validity
flags.
3. Resolve releases and build cohorts
Follow references/data-resolution.md for the release-resolution, filtering,
completeness-check, and cohort-construction patterns. Key rules:
- Select one record per entity--time--measure key using the declared revision
priority (greatest revision, then latest release timestamp, then lowest
record identifier).
- Suppressed, invalid, withdrawn, blank, or null analytic values are
unavailable and never zero-filled.
- Build each cohort from its effective completeness predicates; preserve
declared entity, time, feature, and group orders.
4. Execute modules in declared order
Implement each module exactly as the request specifies. Do not reorder, skip,
or substitute modules. See references/modules.md for reusable implementation
patterns covering:
- Fixed-effects / weighted regression: double-demeaning, WLS with HC3/CR1
inference, delete-one-cluster jackknife.
- Nested ridge / elastic-net CV: training-only standardization, cyclic
coordinate descent, outer/inner fold selection by pooled RMSE, penalty
tie-breaking.
- Wild cluster bootstrap: restricted-model synthetic outcomes, PCG32 or
xorshift32 PRNG streams (never reset between replicates), CR1
studentization, exceedance counts, plus-one p-values, nearest-rank
quantiles.
- Grouped split conformal: outer-fold calibration pools, rank-based
interval radii, symmetric inclusive intervals, pooled coverage and width.
- Trajectory PCA clustering: covariance PCA with Jacobi eigendecomposition,
loading orientation, deterministic farthest-first k-means, leave-one-out
stability with adjusted Rand index.
- Source / year perturbation: exhaustive subset enumeration, bitmask
replacement, Shapley attribution, stability summaries.
- Difference GMM / panel mediation: residualized instruments, two-step
efficient GMM with Moore-Penrose weighting, cross-equation delta-method
inference.
- Partial-R2 sensitivity surface: confounder-strength grid, adjusted
indirect effects, tipping-point calculation.
- Source-group perturbation: no-retune fold deletion, RMSE deterioration
ranking.
5. Apply decision rules
Follow references/decision-rules.md. Evaluate every effective business
predicate on unrounded computed values. Count satisfied gates. Apply the
request's precedence and controlled conclusion mapping exactly.
6. Produce the answer
Build one JSON object conforming to answer_template.json:
- Every required top-level key must be present.
- Round non-integer numeric fields to the declared decimal places.
- Preserve every declared array order, state order, coefficient order, grid
order, and checkpoint order.
- Use JSON
null only when a statistic is mathematically unavailable; never
emit NaN or Infinity.
- Use the exact controlled enum and Boolean values from the template.
- Omit all narrative --- the response is a single JSON object.
References
- Portal API --- endpoints, data shapes, filtering patterns.
- Data Resolution --- release selection, completeness checks, cohort construction.
- Statistical Modules --- implementation patterns for every recurring module type.
- Decision Rules --- gate evaluation and conclusion mapping.
1---2name: pho-audit-43description: Execute registered Public Health Observatory algorithmic transportability and robustness audits using a read-only evidence portal. Use this skill whenever a task references an analysis_request.json payload from the Public Health Observatory, involves a multi-module statistical audit with controlled decision gates, or mentions PHO protocols, transportability audits, or robustness audits. Do not use for generic public-health data analysis that lacks a registered protocol.4metadata:5 source: https://skillmd.com/skills/prism-shadow/pho-audit-46---78# Public Health Observatory Algorithmic Audit910Complete a registered PHO multi-module statistical audit using a read-only11HTTP evidence portal. Every task supplies an `analysis_request.json` payload12and an `answer_template.json` output contract. The requested modules,13parameters, grids, seeds, cohorts, filters, and decision gates are fully14specified in the request --- never invent them.1516## Required input files1718- `analysis_request.json` --- registered protocol, measures, years, geography,19 publication filters, module specifications, grids, seeds, decision rules.20- `answer_template.json` --- exact output JSON shape: required keys, array21 lengths, cardinality rules, precision, enum values, ordering constraints.2223The prompt text supplies the portal base URL as `<TASK_ENV_BASE_URL>`.2425## Workflow2627### 1. Read the contract2829Parse both `analysis_request.json` and `answer_template.json` fully before30touching any data. Identify:3132- The effective geography scope, years, measures, and publication filters.33- The ordered list of audit modules and their exact method, cohort, parameter,34 grid, seed, and required-evidence bindings.35- The output template's required keys, array lengths, cardinality rules,36 numeric precision, ordering constraints, and controlled enum values.3738### 2. Resolve the evidence portal3940Replace `<TASK_ENV_BASE_URL>` with the actual URL from the prompt. The portal41is a read-only REST API. See `references/portal-api.md` for endpoint details42and data shapes.4344Fetch every requested dataset in parallel when possible. The portal endpoints45return complete datasets; filter client-side by the request's effective46geography, years, value types, source types, release status, and validity47flags.4849### 3. Resolve releases and build cohorts5051Follow `references/data-resolution.md` for the release-resolution, filtering,52completeness-check, and cohort-construction patterns. Key rules:5354- Select one record per entity--time--measure key using the declared revision55 priority (greatest revision, then latest release timestamp, then lowest56 record identifier).57- Suppressed, invalid, withdrawn, blank, or null analytic values are58 **unavailable** and never zero-filled.59- Build each cohort from its effective completeness predicates; preserve60 declared entity, time, feature, and group orders.6162### 4. Execute modules in declared order6364Implement each module exactly as the request specifies. Do not reorder, skip,65or substitute modules. See `references/modules.md` for reusable implementation66patterns covering:6768- **Fixed-effects / weighted regression**: double-demeaning, WLS with HC3/CR169 inference, delete-one-cluster jackknife.70- **Nested ridge / elastic-net CV**: training-only standardization, cyclic71 coordinate descent, outer/inner fold selection by pooled RMSE, penalty72 tie-breaking.73- **Wild cluster bootstrap**: restricted-model synthetic outcomes, PCG32 or74 xorshift32 PRNG streams (never reset between replicates), CR175 studentization, exceedance counts, plus-one p-values, nearest-rank76 quantiles.77- **Grouped split conformal**: outer-fold calibration pools, rank-based78 interval radii, symmetric inclusive intervals, pooled coverage and width.79- **Trajectory PCA clustering**: covariance PCA with Jacobi eigendecomposition,80 loading orientation, deterministic farthest-first k-means, leave-one-out81 stability with adjusted Rand index.82- **Source / year perturbation**: exhaustive subset enumeration, bitmask83 replacement, Shapley attribution, stability summaries.84- **Difference GMM / panel mediation**: residualized instruments, two-step85 efficient GMM with Moore-Penrose weighting, cross-equation delta-method86 inference.87- **Partial-R2 sensitivity surface**: confounder-strength grid, adjusted88 indirect effects, tipping-point calculation.89- **Source-group perturbation**: no-retune fold deletion, RMSE deterioration90 ranking.9192### 5. Apply decision rules9394Follow `references/decision-rules.md`. Evaluate every effective business95predicate on **unrounded** computed values. Count satisfied gates. Apply the96request's precedence and controlled conclusion mapping exactly.9798### 6. Produce the answer99100Build one JSON object conforming to `answer_template.json`:101102- Every required top-level key must be present.103- Round non-integer numeric fields to the declared decimal places.104- Preserve every declared array order, state order, coefficient order, grid105 order, and checkpoint order.106- Use JSON `null` only when a statistic is mathematically unavailable; never107 emit `NaN` or `Infinity`.108- Use the exact controlled enum and Boolean values from the template.109- Omit all narrative --- the response is a single JSON object.110111## References112113- [Portal API](references/portal-api.md) --- endpoints, data shapes, filtering patterns.114- [Data Resolution](references/data-resolution.md) --- release selection, completeness checks, cohort construction.115- [Statistical Modules](references/modules.md) --- implementation patterns for every recurring module type.116- [Decision Rules](references/decision-rules.md) --- gate evaluation and conclusion mapping.