# RETRIEVAL_QUERY_RECORD (template)

**Type:** Template (conforms to RAM Search Ledger schema)
**Ledger owner:** S4 Epistemic Output Layer (schema authority).
**Writer (this skill):** S1 Multi-Corpus Retrieval Router.
**Record kinds produced:** `every-query`, `every-accepted`, `every-rejected`, `every-skipped`.
**Invocation:** Step 7 of SKILL.md. Every retrieval action that leaves this skill produces one record.

---

## Record kind: `every-query`

```json
{
  "record_kind": "every-query",
  "query_id": "<uuid>",
  "run_id": "<run-id>",
  "claim_id": "<claim-id from S5>",
  "writer": "S1",
  "pass": "confirmatory",
  "query_text": "<full query string as dispatched>",
  "corpus_target": "english_peer_reviewed | scielo | ajol | grey_practitioner | non_western_scholarship | other",
  "timestamp_utc": "<ISO-8601>",
  "rationale": "<claim-type + trigger-pattern + routing rationale; non-boilerplate>",
  "s1_extensions": {
    "claim_type": "descriptive | causal | predictive | normative | interpretive",
    "monoculture_triggers": ["T1", "T2"],
    "monoculture_decision_point": "M1 | M2 | M3",
    "routing_decision_rationale": "<why these corpora, not others>",
    "care_gate_status": "passed | flagged | halted | not_applicable",
    "care_gate_rationale": {"G1": "...", "G2": "...", "G3": "...", "G4": "..."},
    "translation_provenance": {"native_language": "pt", "synonym_source": "operator | MT | registry"}
  }
}
```

## Record kind: `every-accepted`

```json
{
  "record_kind": "every-accepted",
  "source_id": "<source-id>",
  "query_id": "<uuid>",
  "fitness_verdict_ref": null,
  "integrity_verdict_ref": null,
  "admiralty_input": null,
  "claim_id": "<claim-id>",
  "timestamp_utc": "<ISO-8601>",
  "s1_tags": {
    "corpus_surface": "english_peer_reviewed | scielo | ajol | grey_practitioner | non_western_scholarship | other",
    "query_used": "<query_id>",
    "language_detected": "<iso-639-1 | unknown>",
    "openalex_language_mismatch": {"input": "en", "detected": "pt"},
    "detection_conflict": false,
    "fidelity_tag": "fidelity_high | fidelity_machine | fidelity_review_required",
    "human_review_flag": false,
    "care_gate_status": "passed | not_applicable",
    "monoculture_trigger_record": ["T1", "T2"]
  }
}
```

`fitness_verdict_ref`, `integrity_verdict_ref`, `admiralty_input` are intentionally null at S1 emit; they are populated downstream by S7 / S2.

## Record kind: `every-rejected`

```json
{
  "record_kind": "every-rejected",
  "source_id": "<source-id>",
  "query_id": "<uuid>",
  "rejection_reason": "translation-fidelity-fail | care-gate-refused | dispatch-failure",
  "reviewer_flag": null,
  "timestamp_utc": "<ISO-8601>",
  "s1_rejection_detail": {
    "care_gate_failed_pillar": "G1 | G2 | G3 | G4 | null",
    "fidelity_detail": "<text: which component of triple-check failed>",
    "detection_conflict": true
  }
}
```

Rejection reasons S1 is authorized to use: `translation-fidelity-fail`, `care-gate-refused`, `dispatch-failure`. Other reasons (`retracted`, `fabricated-citation`, `ai-contaminated`, `pub-bias`, `fitness-below-threshold`, `disqualifier-hit`) are S2/S7 authority.

## Record kind: `every-skipped`

```json
{
  "record_kind": "every-skipped",
  "avenue": "<corpus-or-surface identifier>",
  "skip_reason": "architectural-limit | operator-override | care-gate-halt | runtime-budget | dispatch-failure",
  "claim_id": "<claim-id>",
  "writer": "S1",
  "timestamp_utc": "<ISO-8601>",
  "architectural_limit_disclosure": "<text rendered by S4 in the user-facing output; required when skip_reason == 'architectural-limit'>"
}
```

## Reconciliation Rule

Before handoff to S2, S1 reconciles:
`count(every-query for this run) - count(every-accepted) - count(every-rejected) == count(every-skipped with skip_reason == 'dispatch-failure')`

Mismatch is a **silent-filter defect** and halts handoff.

## Anti-Patterns

- Writing `every-accepted` without populating `s1_tags`.
- Writing `every-rejected` using a rejection reason reserved for downstream skills.
- Writing an `every-skipped` entry without a `skip_reason` -- silent-skip defect.
- Omitting `architectural_limit_disclosure` text on an `architectural-limit` skip -- S4 cannot render what it cannot read.
