A configuration with docs: { config, out } (docs.config.ts and _site where it names none) MUST turn on the verbs docs build (a mutation that previews with --dry-run), docs check (a report of the public tier that writes nothing in the repository) and docs serve; a configuration with no docs has none of them.
Enforced (check): .github: cd commons/repoctl && bun run verify — suite/docs.test.ts: the verbs are there only with docs settings
The generator MUST be loaded where it is installed (the node_modules of the repository or above it, else by its package name) as an optional peer, its main called with the arguments of build or check as ifc-docs reads them (build --out DIR --config FILE, check --config FILE, paths absolute from the repository's root); where it cannot be loaded the verb MUST end with 1 and the problem E-DOCS-GENERATOR-MISSING, whose explanation says how to install it.
Enforced (check): .github: cd commons/repoctl && bun run verify — suite/docs.test.ts: the generator is loaded from the repository and missing is its typed problem
A generator that ends with a status other than 0 MUST be the problem E-DOCS-FAILED and the status 1; docs build MUST say the folder it built and docs check MUST say there is no finding where there is none.
Enforced (check): .github: cd commons/repoctl && bun run verify — suite/docs.test.ts: a failing generator is E-DOCS-FAILED
docs serve MUST build the site and then serve the folder on a loopback port only (127.0.0.1, the port of --port, 4173 by default, 0 for one the system chooses) until it is interrupted or --for SECONDS has passed; it MUST NOT send the site anywhere and MUST answer a path that is not there with 404.
Enforced (check): .github: cd commons/repoctl && bun run verify — suite/docs.test.ts: serve answers on loopback only
Given a configuration with docs, When the help is read, Thendocs build, serve and check are listed, per FR-001.
Given a repository with no installed generator, Whendocs check runs, Then it ends with 1 and E-DOCS-GENERATOR-MISSING, per FR-002.
Given a generator installed in the fixture repository, Whendocs build runs, Then it is asked for build --out <root>/_site --config <root>/docs.config.ts and the site is there, per FR-002.
Given a generator that ends with 3, Whendocs check runs, ThenE-DOCS-FAILED, per FR-003.
Given a built folder, When it is served on port 0, Then/ answers its index.html, a missing path 404, and the address is a loopback one, per FR-004.