Test Vectors

Canonical test suite for AI Discovery Files validators.

Status Draft

The test vectors themselves are under active development. This page documents the structure and location; the suite contents are being built in the ai-discovery-files spec repository. See specification conventions for status definitions.

Last updated:

Purpose

The test vector suite is the canonical set of input-output pairs validator authors use to verify their implementations agree with the reference validator. Tests live in the public spec repository; this page documents where to find them, how they're structured, and how to apply them.

1. Where the tests live

The canonical home for test vectors is the ai-discovery-files repository on GitHub, under the test-vectors/ directory. The repository is public; tests are licensed under CC BY 4.0 alongside the specification text.

The tests are mirrored to this site at /specifications/test-vectors/ at deploy time. The mirror is a convenience for validator authors who want a stable URL; the spec repo is the source of truth and is updated first.

2. Test case structure

Each test case is a directory under test-vectors/<category>/<case-name>/ containing:

input/
The AI Discovery Files that constitute the test input. Typically a subset of the 10 ADFs (e.g. llms.txt, identity.json, ai.json) representing what a particular publisher might serve.
expected.json
The validator-output document the reference validator MUST produce for this input. Conforms to validator-output.schema.json. Stable fields (target, validator name held fixed, files[], contradictions[], conformance{}) MUST match; optional diagnostics MAY vary across validators.
readme.md
Plain-English description of what this case tests: what's interesting about the input, what the expected output demonstrates, which requirement IDs (e.g. ADF-IDENT-001) the case exercises.

3. Test categories

Tests are grouped into the following categories:

4. Requirement identifiers

Each test case references one or more numbered requirement clauses of the form ADF-<FILE>-<NNN>. Example: ADF-IDENT-001 for "identity.json MUST contain a name field." The numbered clauses are stable across specification revisions; tests reference them so a validator failure can be traced to a specific normative requirement.

The full list of requirement IDs is published with each specification's data file under requirements[].id.

5. How to run the suite

For validator authors:

  1. Clone the ai-discovery-files repository or fetch the mirror from this site.
  2. For each test case, serve the contents of input/ as if they were files at the conventional paths on a real host (typically using a local fixture server).
  3. Run your validator against the fixture host.
  4. Compare your validator's output against expected.json. Required fields MUST match; optional diagnostics[] MAY differ but SHOULD cover the same semantic issues.

The reference validator (the AI Visibility Checker) runs the full suite as part of its CI pipeline. Conformant alternative validators SHOULD do the same.

6. Contributing tests

New tests are accepted as pull requests to the ai-discovery-files repository. A useful contribution:

See the governance page for the proposal lifecycle that applies to test contributions.

References