Processing Model
How conformant consumers process AI Discovery Files.
This processing model is published and recommended for any implementation that consumes AI Discovery Files. The reference validator (AI Visibility Checker) follows this model. See specification conventions for status definitions.
Last updated:
This page documents the algorithm a conformant consumer applies when processing a publisher's AI Discovery Files. The model is deterministic: given the same input (target host and a clock), two conformant implementations MUST produce equivalent normalised output. The output is the contract; the steps below explain how to produce it.
1. Overview
The processing model has seven stages, executed in order. Each stage takes the output of the previous stage and contributes to the final normalised summary documented by the validator-output schema.
- Discover: enumerate which files to fetch from the target host.
- Fetch: retrieve each file over HTTPS, observing redirects and rate limits.
- Validate: check each fetched file against its specification.
- Resolve identity: derive a single identity from the available files.
- Resolve permissions: derive a single permission set.
- Detect contradictions: surface disagreements between files.
- Emit normalised summary: produce a result conforming to the validator-output schema.
2. Discover
Given a target host (e.g. example.com):
- Load
/specifications/registry.jsonfrom this site (or a cached copy). The registry is the canonical list of AI Discovery Files and their conventional paths. - For each entry in
registry.files, construct the file's URL ashttps://<host><path>. Example: ADF-001 haspath = "/llms.txt", so the URL ishttps://example.com/llms.txt. - Optionally, the consumer MAY honour a publisher-supplied discovery index (forthcoming as part of Phase 6) that points to non-default file locations.
The result of stage 1 is an ordered list of (id, name, path, url) tuples.
3. Fetch
For each URL produced in stage 1:
- Issue an HTTPS GET request with a clear
User-Agentidentifying the validator. - Follow redirects per HTTP Behaviour: up to 5 hops, no HTTPS-to-HTTP downgrade, warn on cross-host redirects.
- Record the final URL, HTTP status, Content-Type, Content-Length, and elapsed time.
- Apply soft-404 detection: a 200 response with the wrong Content-Type or unparseable content is reclassified as 404.
- Honour 429 with
Retry-After; back off exponentially on repeated 429 or 5xx; cap total fetch time per file at a reasonable bound (10 seconds is typical).
The result of stage 2 is a fetch record per file: { found, httpStatus, redirectedTo, contentType, contentLength, body }.
4. Validate
For each file with found = true:
- Parse the body according to the file's format. JSON files parse to a JSON document; text files parse line-by-line per their specification.
- For JSON files with a published schema (
ai.json,identity.json), validate against the schema referenced by the file's$schemaproperty. Accept either the versioned (/v1/) or unversioned URL. - For text files, apply the format rules documented on the corresponding spec page (e.g.
llms.txtstructure,ai.txtkey:value pairs,brand.txtnaming sections). - Record diagnostics: structural errors as
errors(markvalid = false); softer concerns (placeholder content, missing recommended fields, malformed BCP 47 tags) aswarnings(file may still be valid).
The result of stage 3 is a per-file validation record: { id, name, url, httpStatus, contentType, found, valid, errors[], warnings[] }.
5. Resolve identity
Multiple files carry identity claims. The resolution algorithm walks them in order of authority and produces a single canonical identity:
- identity.json is authoritative for structured identity (legal name, brand name, services, founding date, contacts). Use its values as the baseline.
- brand.txt is authoritative for naming, pronunciation, and "don't-call-us-that" guidance. If brand.txt declares a brand name distinct from identity.json's
name, prefer brand.txt for naming and identity.json for legal name. - llms.txt provides narrative context. Use its prose to enrich the identity (description, summary, services) but do not let it override structured values from identity.json or brand.txt.
- ai.txt and ai.json identity hints (name, url) are cross-checked for consistency with the above. Disagreements are recorded as contradictions in stage 6.
Where a publisher publishes only a subset of these files, resolve identity from what's available. A site at the Essential conformance class has only llms.txt and ai.txt; the resolved identity is necessarily less structured than for a site at the Complete class.
See the Interoperability Guide for the full precedence matrix.
6. Resolve permissions
Two files carry permission declarations:
- ai.json is authoritative for structured permissions and restrictions. Use its
permissions[]andrestrictions[]arrays as the baseline. - ai.txt is the human-readable summary. Cross-check that its claims are consistent with ai.json. Disagreements are recorded as contradictions.
- robots.txt and robots-ai.txt sit above both ai.txt and ai.json for access control. A robots.txt or robots-ai.txt rule that disallows fetching content overrides any permission declared in ai.json or ai.txt for that content.
The resolved permission set is the union of declared permissions, minus anything contradicted by a higher-precedence file. A consumer MAY choose to apply stricter rules than the publisher declared (defensive posture) but MUST NOT relax them.
7. Detect contradictions
Contradictions are surfaced as structured diagnostics in the output. Detect:
- Business name mismatch: the names declared in
identity.json,llms.txt,ai.txt,brand.txt, andai.jsondisagree in ways not reconciled by analternateNameslist. - Service description divergence: the services listed across files differ substantively (a heuristic similarity threshold is typical).
- Permission conflicts:
ai.jsonpermits an action thatrobots.txtblocks, orai.txtdeclares restrictions inconsistent withai.json. - Content-type mismatch: a JSON file served with a non-JSON Content-Type, or vice versa.
- Redirect target mismatch:
llm.txtredirects somewhere other than/llms.txt;llms.htmlexists but its content disagrees withllms.txt.
Each contradiction includes the files involved, the field that disagrees, a one-line description, and a severity (error blocks the corresponding conformance class; warning does not).
8. Emit normalised summary
The final stage produces a result conforming to validator-output.schema.json. The output includes:
target: the host and resolved canonical URL.validator: name, version, vendor URL, and areferenceboolean.checkedAt: ISO 8601 timestamp.specVersion: the AI Discovery Files version the validator targeted.registryUrl: optional pointer to the registry consulted.files[]: per-file validation records, in registry order.contradictions[]: detected disagreements.conformance:claimed(publisher's self-declaration if found),achieved(highest class the target passes),classes(per-class pass/fail with missing files and reasons).diagnostics[](optional): human-readable suggestions and recommendations.
Determinism: given identical input (same target, same registry, same clock time), two conformant validators MUST produce equivalent output. The order of files[], the wording of structured fields, and the conformance verdict MUST agree. Optional diagnostics[] wording MAY differ between validators.
9. Caching and re-checking
Conformant consumers SHOULD cache fetch results for a reasonable interval (1 hour is typical) to avoid hammering publisher hosts. A consumer that re-checks SHOULD honour conditional requests (If-Modified-Since, If-None-Match) and treat 304 as "no change".
For Directory verification specifically, re-checking happens on a quarterly schedule per the conformance specification.
10. Implementation notes
The AI Visibility Checker is the reference implementation of this processing model. Its source is published as part of the AI Visibility project; conformant alternative validators SHOULD produce equivalent output for the same target.
Implementation guidance for validator authors:
- Treat the registry as the source of truth for which files to fetch, rather than hard-coding the list. Files MAY be added in future MINOR releases.
- Accept both versioned (
/v1/) and unversioned schema URLs in JSON files'$schemaproperties. - Tolerate missing optional fields gracefully; treat their absence as informational rather than as failures.
- Surface determinism issues (e.g. non-stable ordering, time-dependent output) as bugs; the contract requires reproducibility.
References
- Specification Conventions: editorial and structural conventions.
- Conformance: how conformance classes are evaluated using the processing model.
- Specification Registry: the canonical file list this model consults.
- Validator Output Schema: the contract the emit stage produces.
- Interoperability Guide: precedence rules used during identity and permission resolution.
- HTTP Behaviour: fetch-stage details (status codes, redirects, soft-404 detection, caching, rate limits).
- AI Visibility Checker: the reference implementation.