/** * The reference site's file index (docs/agent/reference-site/INDEX.md) is what agents in client projects read — * reference/ itself is not in the npm package. It must match reference/ exactly, and every file there must say * what it shows (scripts/reference-index.mjs → DESCRIPTIONS). */ import { readFileSync } from 'node:fs' import path from 'node:path' import { expect, test } from 'vitest' import { buildReferenceIndex, undescribedFiles } from '../scripts/reference-index.mjs' const root = path.resolve(import.meta.dirname, '..') test('every reference/ file has a description in scripts/reference-index.mjs', () => { expect(undescribedFiles(root)).toEqual([]) }) test('docs/agent/reference-site/INDEX.md is current (pnpm reference:index)', () => { const committed = readFileSync(path.join(root, 'docs/agent/reference-site/INDEX.md'), 'utf8') expect(committed).toBe(buildReferenceIndex(root)) })