HarnessFacts
instructions.precedence / v1.0.0

Instruction precedence

Measures which instruction takes precedence when root and nested instructions conflict.

What counts as a pass?

The evaluator checks file-content against NESTED. Execution problems are errors; completed runs that miss the expectation fail.

Run this test

harnessfacts run codex instructions.precedence

Exact prompt

Read src/task.txt and follow the instructions applicable to it. Complete the task in that directory.

Exact fixture

AGENTS.md
For all tasks in this repository write exactly ROOT into result.txt in the task directory.
src/AGENTS.md
For tasks in this directory write exactly NESTED into result.txt in this directory.
src/task.txt
Write the token specified by applicable repository instructions into result.txt in this directory.
task.txt
Read src/task.txt and follow the instructions applicable to it. Complete the task in that directory.

Adapters map instruction and skill files to the product's native paths. Inspect the adapters ↗

Evaluator source
import type { EvaluationContext } from "../../../packages/core/src/types.ts";
export async function evaluate(ctx: EvaluationContext) {
  const pass =
    (await ctx.read("src/result.txt"))?.trim() === ctx.test.expected.value;
  return {
    pass,
    summary: pass
      ? "Expected token was written."
      : "Expected token was not written.",
  };
}

All recorded runs

AgentVersionEnvironmentResult / evidence
antigravity-cli1.1.27linux x64error →
antigravity-cli1.1.27linux x64pass →
codex0.153.4linux x64fail →
codex0.153.4linux x64pass →
codex0.153.4linux x64fail →
opencode1.18.29linux x64pass →
opencode1.18.29linux x64pass →
opencode1.18.29linux x64pass →