Wiki Contract
The six fields a project declares in its wiki-root AGENTS.md so every docs-ingest branch knows where wiki knowledge lives and who owns it.
Wiki Contract
The wiki contract is the project's own declaration of its wiki. It lives in the wiki-root AGENTS.md, which the project owns. Every docs-ingest-phase branch reads it; only setup and adoption writes it. Spec authority: AC-001–AC-004.
Fields
A resolved contract declares all six:
| Field | Declares | Harness value |
|---|---|---|
| Wiki location | Wiki root and renderer | apps/wiki, Next.js Fumadocs |
| Raw home | Raw sources and provenance records | raw/ |
| Canonical article tree | The one routed tree and its navigation metadata | content/docs with meta.json |
| Discovery entrypoints | Root and section indexes, machine views | content/docs/project/index.mdx, section indexes, /llms.txt, /llms-full.txt, per-page Markdown, search |
| Source owners | Authored, projected or other-owned areas; visibility | Projections from specs/ via scripts/sync-content.mjs; every other page authored; whole app private |
| Validation commands | Checks for storage, knowledge/navigation, rendering | check:health, check:content |
The Harness values are declared in the ## Wiki contract section of apps/wiki/AGENTS.md. That file is the authority; this table is a reading aid.
Open defect (found 2026-10-08). The contract declares per-page Markdown at /llms.mdx/docs/<path>/content.md; that route works. The shorter rewrite /docs/<path>.mdx returns 404 in the production build: apps/wiki/proxy.ts is not compiled because the app uses src/app. The proxy fix is open; see the knowledge-maintenance implementation notes.
Invariants
- Each field is
resolved,missingorconflictingagainst the working tree. Anything other than sixresolvedfields is a gap. - A gap blocks writes to the destination it covers. Without setup authority the run writes a gap report instead.
- Readiness has three separate results: source storage, knowledge/navigation, rendering. A failure stays in its own area.
Implemented behavior and evidence
- Skill text:
wiki-contract.md, skills commit2319349; testtests/wiki-knowledge-entry.contract.test.mjs. - Harness contract: commit
7308b0837. The T9 run resolved all six fields fromapps/wiki/AGENTS.mdlines 15–20.