Domains
Wiki Setup and Adoption Flow
How docs-ingest-phase resolves the project wiki contract, adopts or sets up the wiki, and reports three separate readiness results.
Wiki Setup and Adoption Flow
Every docs-ingest-phase run starts here. The run resolves the wiki contract before it selects a branch. Setup and adoption write the contract; every other branch only reads it. Spec authority: FLOW-001, AC-001–AC-007.
Trigger and actors
- Trigger: any
docs-ingest-phaseentry. The setup/adoption branch runs only when the user asks to set up or adopt the wiki, or when project guidance delegates that authority. - Ingesting agent: reads guidance, resolves the contract, reports readiness.
- Project owner: owns the contract in the wiki-root
AGENTS.mdand grants setup authority.
Steps
- Resolve. Read the repository guidance, then the wiki-root
AGENTS.md. Record each of the six contract fields with the file and line that declares it. Check each value against the working tree:resolved,missingorconflicting. - Decide. Six
resolvedfields give a resolved contract. Any other result is a gap:- with setup authority and an existing tree: Adopt. Write the contract section so it describes the existing structure. Move, delete or re-route no page.
- with setup authority and no wiki: Set up. Create the project-owned destination: contract, raw home, article tree with navigation metadata, root discovery index. The installer catalog stays unchanged.
- without setup authority: write a gap report and place no canonical content in a gap-covered destination.
- Report readiness. Record three separate results, each
ready,not readyorunavailable, with the command or inspection that produced it:- source storage: the raw home is in the Git work tree and accepts a source with its provenance record;
- knowledge/navigation: the article tree, navigation metadata and discovery entrypoints exist, and the structural check passes;
- rendering: the declared build command passes.
- Hand off. Capture proceeds when source storage is
ready. Ingest and health proceed when knowledge/navigation isready.docs-onboardingreconstructs existing knowledge after the destination is usable.
Terminal outcomes
- Resolved contract plus three readiness results.
- Adoption or setup complete: all six fields declared and present.
- Setup incomplete: a gap report that names each field, the evidence read and the decision that closes it.
Implemented behavior and evidence
- Skill text:
wiki-contract.mdand the router contract step, skills commit2319349; contract testtests/wiki-knowledge-entry.contract.test.mjs. - Harness adoption: the contract section in
apps/wiki/AGENTS.md, commit7308b0837. - First real run (T9, 2026-10-08): six fields resolved from
apps/wiki/AGENTS.mdlines 15–20. Knowledge/navigation wasnot readyat first (check:healthreported 38 findings); the health branch repaired them before ingest.
The Set up branch (no wiki exists) is proven only by the skill contract test. No real repository has run it yet.