Skip to main content

Documentation and Contract Pipeline

The documentation is a controlled contract system, not an all-in-one document maintained separately for AI.

Source flow

Today the architecture and domain contracts are authored Markdown. When the navigation registry exists, operation schemas and reference tables move to generated output while rationale and tutorials remain authored.

Required metadata

Every page declares:

FieldPurpose
hexis_statuspolicy, current, contract, future, implemented, or legacy
last_verifiedFreshness date tied to the stated evidence
status_noteImportant limitation shown beside status
ai_contextimplementation, api, or exclude
executableWhether target calls may be offered as runnable
contract_versionRequired for target-contract pages
implementation_refRequired for implemented pages

The site status banner and AI artifacts read this metadata. Body prose does not duplicate it.

AI outputs

  • /llms.txt is a concise discovery index.
  • /llms-implementation.txt contains architecture and planned contracts for agents implementing Hexis.
  • /llms-api.txt contains only implemented, executable contracts for agents generating user scripts.
  • /docs-manifest.json exposes status and retrieval metadata.
  • /ai/... provides clean per-page Markdown for selective retrieval.

Archived reference pages are unlisted, excluded from normal search and sitemap discovery, and omitted from AI artifacts. The archive index remains discoverable so maintainers can reach those pages for historical investigation.

Quality gates

npm run docs:check validates metadata, status transitions, internal links, target manifests, legacy isolation, Mermaid blocks, and AI bundle selection. It also validates the representative retrieval and script-generation cases in evals/api-authoring.json. Artifact tests prevent planned or legacy content from entering the runnable bundle. TypeScript checks the site customizations. The production build treats broken links as errors.

GitHub runs validation on pull requests, master, and weekly. Cloudflare Pages builds and deploys master. A green deployment is not proof that an API is implemented; promotion still requires the acceptance matrix.

Change protocol

  1. Identify current evidence and representative task.
  2. Update the contract and acceptance criteria.
  3. Implement the Java mechanism and registry entry.
  4. Generate or verify the binding and reference.
  5. Add lifecycle, security, pack, AI, and live evidence.
  6. Promote metadata only after every gate passes.

If code and docs disagree, downgrade the page rather than hiding uncertainty.