---
name: audit-registration
description: Runs the policyreplication audit check `registration` (trial or pre-registration). Use when auditing papers cited by U.S. policy documents for this check.
check_id: registration
status: built
tier: 1
unit: paper
needs: fulltext
cost: api
module: Registration and trial trust
depends_on: []
---

# Trial or pre-registration

Finds registration ids in the paper and checks on ClinicalTrials.gov whether the trial was registered before it started.

**When it applies:** Papers with full text. Timing is judged only for interventional trials that started after July 2005.

## Inputs

- Paper full text
- ClinicalTrials.gov API (no key)

## When to run it

Cheap filters, cheapest first. The planner runs the check only on targets that pass them; the rest get a `not_applicable` row.

- Full text held.
- Text mentions random assignment, a trial, or a registry id (NCT, ISRCTN, AEARCTR, CRD, osf.io, aspredicted).
- Study started after July 2005 (when ICMJE required registration) for the timing test.

Filter as SQL over the audit views (D1):

```sql
SELECT t.paper_id FROM audit_target t JOIN paper_fulltext f USING (paper_id) WHERE f.has_fulltext = 1 AND t.year >= 2006
```

**Decision-model trigger (Jev).** For cases the filters cannot settle, ask a typed question and run the check when the answer clears the threshold.

| Part | Value |
| --- | --- |
| Input | Title and abstract |
| Question | What is the study design? |
| Answer type | pick one: randomized trial / natural or quasi-experiment / observational / modelling or simulation / review or meta-analysis / other |
| Run the check if | p(randomized trial) > 0.5 turns on the timing test and prereg_deviation |

Jev is weak at counting, dates and reading numbers literally, so it only decides whether to run the check, never the check's result.

## How to run

This check is implemented in `audit/pilot_checks.py` (PR 10) and run by the planner:

```
python3 audit/plan.py --papers papers.json --openalex openalex.json --citations citations.csv --texts texts.db --tier 1 --check registration --out out/
```

Then load `out/results.jsonl` into `audit_run` / `audit_result` (see `audit/README.md`).

## Steps

1. Find ids by regex: NCT, ISRCTN, AEARCTR, PROSPERO CRD, OSF and AsPredicted links.
2. For NCT ids, fetch the record and compare the first-posted date with the study start date.
3. Flag RCT language with no id, and retrospective registration.

## Outcomes

| outcome | meaning |
| --- | --- |
| flag | retrospective registration, or RCT language but no id |
| pass | registered prospectively, or an id found |
| not_applicable | no RCT language and no id |

Every result row carries `evidence` (JSON: quotes, values, ids, URLs) so a reviewer can confirm it without rerunning.

## False positives

"Randomized" appears in non-trial papers. Secondary analyses of a registered trial carry its id but were never meant to match it.

**Precision:** Ids exact; trial-without-id flags need review.

## Prompt to give an agent

```
Run the policyreplication audit check `registration` following audit/skills/registration/SKILL.md
in github.com/Jomanw/policyreplication. Target corpus: sig2025 (change as needed).
Write one result per target to out/results.jsonl in the audit_result shape
(check_id, version, paper_id, citation_id, outcome, value, evidence).
Then report outcome counts and list every fail and flag with its evidence for
human review. Do not publish or contact anyone about a flag.
```

## Rules for agents

- Write a result for every target, including `not_applicable`, so denominators stay honest.
- A flag is a lead for human review, not a finding. Never publish or report a flag that names a paper or its authors until a person has checked it.
- Use only legally obtained full text. Record blocks; never bypass them.
- Avoid paid LLM calls unless the check's tier is 2 and a budget has been set.
