# Ground-Truth Isolation Pattern

**Status**: v3.3.2 — narrative hub doc; for declarative annotations see
`shared/handoff_schemas.md`

---

## § 1 — Why ground-truth isolation matters

When an agent can read the evaluation answer key while producing the candidate
output, it learns to optimize directly against the rubric rather than against
the underlying task. The result is inflated scores that do not transfer to
held-out data — a textbook case of reward hacking. The failure is not about
intent; it is architectural. An agent that can see what counts as a correct
answer will, over time, route toward surface features of correctness rather
than toward the underlying quality those features are supposed to signal.

The failure mode appears at different granularities: a single agent session
that reads a scoring key before generating; a pipeline stage that appends
expected outputs to the prompt as "negative examples"; a calibration setup
where the model has already processed the gold set before it reports confidence
estimates. In every case, the shared presence of ground-truth material and
candidate-output generation in the same context produces results that look
strong on paper and fail on genuinely held-out evaluation.

Two published cases make this concrete and directly inform the ARS design.

Anthropic's automated-w2s-researcher (2026) uses a three-tier sandbox: local
mode for development, docker-with-redacted-data for integration testing, and
RunPod with server-side ground truth as the only valid evaluation tier. The
architecture exists because earlier iterations without this separation produced
unreliable results. Their README explicitly warns that local-mode results
"might not be legit" because the agent can find `labeled_data` on the local
filesystem. The solution is structural: ground truth never coexists in the same
process or filesystem layer as the agent generating candidate answers.
Isolation is a property of the system design, not a prompt-level instruction
that can be added after the fact.

Lu et al. (2026, *Nature* 651:914-919) document a related failure mode at
pipeline scale, which they call "shortcut reliance." In their fully autonomous
AI research system — the first to pass blind peer review end-to-end — models
exploit spurious correlations in training data, achieve high scores on the
target benchmark, and write papers describing the results as a genuine
scientific solution. The failure is not dishonesty; the model optimizes
whatever measurable signal is available. If the measurable signal leaks
information about the evaluation criterion, the model finds that leak. The
paper looks like a solved problem. The underlying scientific question remains
open.

ARS's human-in-the-loop pipeline already enforces the spirit of this
isolation: researchers set their own research questions, review outputs at each
integrity gate, and supply calibration gold sets at runtime rather than
embedding them in the repository. This document makes the pattern explicit and
machine-checkable via the `data_access_level` annotation declared in every
top-level `SKILL.md`.

---

## § 2 — The three-layer mental model

Every artifact in ARS belongs to one of three layers, and the direction of
flow is strictly one-way. An artifact can be promoted from a lower layer to a
higher one by passing an integrity gate. It cannot move in the other direction.
Layer 3 material cannot appear as input to a process whose output is layer 1
or 2.

**Layer 1 — raw inputs** covers user queries, primary sources retrieved from
web or database search, and agent-assembled bibliographies before any
verification. Material at this layer is untrusted by default. It may be
hallucinated, adversarially crafted, outdated, or contain PII. A skill
operating at layer 1 must treat every factual claim as potentially wrong, flag
gaps rather than silently filling them from parametric memory, and pass nothing
downstream as verified fact without explicit gate passage. The `deep-research`
skill operates here.

**Layer 2 — verified artifacts** are outputs that have cleared an integrity
gate: Semantic Scholar API existence confirmation, anti-leakage checks
confirming claims came from session material rather than from the model's
training-time memory, citation existence proofs, or the
`integrity_verification_agent`'s seven-mode failure checklist at Stage 2.5 or
4.5. Once an artifact is at layer 2, downstream skills may treat it as
provisionally reliable for argument building and paper drafting. The provenance
chain must remain traceable through the Material Passport carried with each
artifact.

**Layer 3 — ground truth and evaluation rubrics** includes gold labels,
reviewer scoring rubrics, calibration sets, and any material that defines what
a correct output looks like. This layer is distinct in kind, not just degree.
The critical rule is that no agent operating on layer 1 or 2 inputs and
producing layer 1 or 2 outputs should ever have layer 3 material in its
context window. The boundary between layer 2 and layer 3 is not a quality
filter — it is an epistemological firewall.

The `data_access_level` annotation in `SKILL.md` frontmatter maps to this
model as follows:

| Value | Layer | Meaning |
|---|---|---|
| `raw` | Layer 1 | Operates on unverified sources; must assume adversarial or hallucinated input |
| `redacted` | Boundary 1→2 | Operates on sanitized material with no new raw ingestion |
| `verified_only` | Layer 2 | Runs only after upstream integrity gates have been passed |

No ARS skill operates on layer 3 inputs and produces layer 1 or 2 outputs.
The reviewer skill holds a rubric, but that rubric is either a structural
format guide (not an answer key) or a calibration gold set supplied by the
human researcher at runtime. The paper-writing agent never reads the rubric
before generating its candidate output.

---

## § 3 — Rules for adding a skill or agent

Isolation is a design-time decision. The time to reason about data layer
boundaries is before writing any agent prompt, not after a skill is already
in use.

**DO: Declare `data_access_level` truthfully.** The value must reflect the
dirtiest input the skill may legitimately consume across all its modes. If one
mode processes raw web search results and another processes verified artifacts,
the skill's declared level is `raw`. The annotation exists so pipeline authors
can reason about data-flow safety without reading every agent definition file.

**DO: Separate rubric files from skill input bundles.** Use `*/rubrics/` for
repo-tracked rubric files that describe output format or structural
requirements — not answer keys, not expected content. For calibration gold
sets, require the human researcher to supply a session file at runtime. Never
bundle gold labels into the repository or reference them from `SKILL.md` in a
way that loads them unconditionally.

**DO: Pass scores back through a reviewer agent that holds the rubric
privately.** The review workflow is: reviewer reads paper + rubric → reviewer
produces natural-language feedback → paper-writing agent reads paper +
feedback. The paper-writing agent's context must never contain the rubric text
or the expected scoring outcome before it produces its candidate output. The
two agents must be separate invocations, or separated by a stage boundary
where the context window does not carry rubric content forward.

**DON'T: Embed answer keys, scoring rubrics, or test-set labels in any file
an agent reads as part of normal context loading.** This applies to `SKILL.md`
frontmatter, agent definition files, reference files loaded unconditionally at
session start, and any file an agent accesses as background material. If the
file loads at session initialization, it is layer 1 or 2 material — not
layer 3.

**DON'T: Pass an evaluation prompt that includes the expected output to the
same agent that produces the candidate output.** The "negative example"
framing does not protect against this: models pattern-match toward examples
regardless of polarity labeling.

**DON'T: Use the same model session for both output generation and output
scoring without stripping rubric content from the generating context.** A
model that has seen rubric text in the conversation history will orient toward
it during generation even without explicit instruction. Separate invocations,
not just separate instructions, are required.

---

## § 4 — Today's implementation

The isolation pattern is already instantiated across the ARS codebase through
a set of narrowly scoped protocol files. This section is a navigational map —
not a duplication of their contents.

| Mechanism | Where it lives |
|---|---|
| Source verification (S2 API) | `deep-research/references/semantic_scholar_api_protocol.md` |
| Anti-leakage protocol | `academic-paper/references/anti_leakage_protocol.md` |
| Integrity gates (Stage 2.5/4.5) + 7-mode failure checklist | `academic-pipeline/references/ai_research_failure_modes.md` |
| Reviewer calibration mode (FNR/FPR with private gold set) | `academic-paper-reviewer/references/calibration_mode_protocol.md` |
| Cross-model verification | `shared/cross_model_verification.md` |
| Declarative posture | `shared/handoff_schemas.md` (`data_access_level` and `task_type` sections) |

This pattern document is the narrative rationale; those six reference files
are the implementation detail. If a specific rule here conflicts with language
in one of those files, the more specific file governs for that mechanism —
and that conflict should be surfaced as an issue so this document can be
updated.

---

## § 5 — What this pattern is NOT

**Not a runtime permission system.** Nothing in ARS enforces isolation at
execution time by blocking API calls, sandboxing the filesystem, or
intercepting prompt construction. The mechanism is convention, declarative
annotation, and CI lint via `scripts/check_data_access_level.py`. That script
confirms every `SKILL.md` carries a valid annotation; it does not inspect
context windows at runtime. A contributor who deliberately passes ground-truth
material into a raw-layer skill's context can do so — the pattern is a design
commitment and an audit surface, not a technical lock.

**Not a substitute for human review at integrity gates.** Stage 2.5 and
Stage 4.5 are the actual enforcement points in the pipeline. The human
researcher reviews the integrity agent's reports and makes go/no-go decisions
at each gate. This pattern document explains the design reasoning behind those
gates and the data-flow structure that makes them meaningful. Reading this
document does not grant confidence that any specific pipeline run was clean.
Only a passed integrity gate with a verified Material Passport does that.

**Not a benchmark protocol.** All current ARS skills are `task_type:
open-ended` because ARS targets humanities research, higher-education quality
assurance, and policy analysis — work whose quality depends on domain judgment
and interpretive context that no scalar metric fully captures. This pattern
keeps that posture honest by making it harder to accidentally introduce
benchmark-style optimization into the pipeline. It does not provide
infrastructure for running ARS outputs through automatic scoring against a
held-out test set, and that gap is intentional.

---

## § 6 — Future evolution (intentionally out of scope)

Version 3.3.2 ships the pattern document, the `data_access_level` annotation
across all four top-level `SKILL.md` files, and the `task_type` annotation.
The isolation pattern is fully stated at the declarative and documentation
level. Several natural extensions are foreseeable but explicitly out of scope
for this release: a server-side rubric endpoint that supplies evaluation
criteria to reviewer agents without exposing them in the local context window
(directly analogous to the RunPod tier in Anthropic's w2s sandbox); per-agent
rather than per-skill access levels, allowing a multi-mode skill to tag
individual agent definition files with the layer they operate on; runtime
verification that the Material Passport's declared `data_access_level` chain
is consistent with the actual handoff sequence before a consuming agent accepts
an artifact; and automated detection of rubric or gold-label content appearing
in a generating agent's context. These possibilities are listed here so future
contributors do not propose them as overlooked features — they are deferred,
not missing. If you want to pursue one, open an issue referencing this section
before writing code, so the tradeoffs can be discussed before implementation
begins.
