Harness Intelligence Wiki
HarnessEntry Points

Docs Update

Use docs-ingest-phase to route docs-affecting work through the wiki contract into setup, capture, health, private ingest, or public docs

docs-ingest-phase is the docs router. It turns docs-affecting work into durable, routed wiki knowledge, or into an explicit no-op with a reason.

  • Use this when: proven work changed behavior, architecture, setup, contracts, operator workflow, or routed docs structure; a spec needs durable domain capture; a user supplies a raw source to keep; a wiki needs setup, adoption, or a health check; or public docs need creation or a material update.
  • It gives you: routed wiki pages that match implemented reality, with navigation, discovery entries, bookkeeping, and a log.md entry.
  • It ends with: one outcome per branch (complete, partial with each unfinished item, or no-op with its reason), a contract gap report, or a stop at the public fragment checkpoint. Inside AFK delivery-phase, no gate stops; see Inside AFK Delivery.
  • Wrapped skills: $docs-ingest-phase; in the public branch writing-fragments, writing-beats, and writing-shape; $show-me for complex flows; docs-onboarding as the follow-up after setup.

Trigger

  • delivery-phase opens docs ingest after implementation and review for docs-affecting work.
  • bug-resolution-phase routes a tech-debt finding to it, to write the canonical debt file <wiki-root>/content/docs/project/tech-debt/<domain>/<spec>/<debt-slug>.md that $resolve-debt-phase reads.
  • An operator invokes it after standalone work, to capture a raw source, to check wiki health, or to set up or adopt a wiki.

docs-ingest-phase is model-invoked, so a matching request can also start it.

Runtime Graph

Each branch ends with its own outcome. To run the next branch, re-enter the router.

Router

  1. Scope. If the docs goal or source artifacts are unclear, ask one concrete question and stop. Inside AFK delivery-phase, settle scope as an Autonomous Decision instead.

  2. Contract. Resolve the wiki contract from the wiki-root AGENTS.md: wiki location, raw home, canonical article tree, discovery entrypoints, source owners, and validation commands. Done when you hold a resolved contract or a list of its gaps.

  3. Branch. Select the first branch whose trigger matches:

    • Setup/adoption: the user asks to set up or adopt the wiki.
    • Capture: the user supplies a raw source to keep.
    • Health: the user asks for a wiki health check or maintenance.
    • Private/internal: a spec, project or wiki page, legacy root docs/ tree, operator workflow, route metadata, or learning artifact needs ingest.
    • Public: reader-facing docs are requested or materially affected.
    • No-op: no docs-affecting change exists. Report the evidence and stop.

    Audience decides private against public. When it stays unclear, ask who the reader is; inside AFK delivery-phase, decide it.

  4. Gap. When a contract gap covers a destination of the selected branch, run setup/adoption if the task holds setup authority. Otherwise write the gap report and stop. Inside AFK delivery-phase, setup authority is an Autonomous Decision; see Inside AFK Delivery.

When several branches apply, capture comes before the ingest of that source, and private/internal comes before public.

Branches

Setup/adoption

Adopt writes the contract into an existing wiki tree and moves or deletes nothing. Set up creates the contract, the raw home, the article tree, and a root discovery index. Both report readiness for source storage, knowledge and navigation, and rendering. When the destination is usable, docs-onboarding can reconstruct initial wiki context from the existing code, docs, and backlog. It builds the Project Map, closes project-wide decisions through a direct targeted $requirements-grill, and initializes the backlog through $write-backlog. It then hands each accepted flow to $requirements-phase as an explicit human handoff, with a brief and the onboarding projection boundary, and stops; Requirements Phase compiles the architecture and spec pair.

Capture

Capture keeps one raw source unchanged in raw/<origin>/<slug>/<revision12>/ with its source.json and SHA-256. It reuses an existing record with the same hash, commits only that revision folder, and reads it back with verify-captured-source.mjs. The outcome is not captured, saved-uncommitted, unverified, or committed (a local commit, no push).

Health

Health records a structural result for each validation command and a semantic record of stale claims, contradictions, missing connections, and discovery gaps. It resumes from durable evidence and re-reads disk and Git before it writes over a concurrent change.

Private/internal

Read <wiki-root>/AGENTS.md first. Classify every target by audience. Then run these steps in order; each starts only after the previous one is done:

  1. Learning: scan and refresh the scoped learning artifacts. Each gets an outcome: keep, update, consolidate, replace, delete, or mark stale.
  2. Flows: write or merge one routed flow page per extracted flow. If a required flow write fails, skip concepts and go to Outcome; the outcome is partial.
  3. Concepts: write or merge each concept page, or record a knowledge no-op or an unfinished item.
  4. Discovery: for each changed article, list it in its owning meta.json, add a discovery-map entry with an "Applies when" cue, and make every link resolve.
  5. Operations: put implemented architecture, setup, contracts, decisions, runbooks, and non-obvious operator behavior on their owning page, usually under project/reference/ or project/runbooks/, and list each new page in its section index.
  6. Outcome: run the contract's validation commands, then record the outcome, its bookkeeping, and its log.md entry.

Spec ingest checks freshness by blob id (ingested_revision) and sources[].sha256. A legacy ingested: true field counts as stale. A complete run writes ingested_revision and last_ingested into SPEC.md and IMPLEMENTATION-NOTES.md frontmatter; a partial run writes only its log entry.

Legacy root docs/. A root docs/ tree is legacy input, never a write target. With setup authority, merge it with references/legacy-root-docs.md: list every leaf doc, map each to its owning page in the canonical article tree, merge the content, list new pages in their section meta.json and index, remove the root docs/ projection from the sync command, then delete the tree. Without setup authority, report the tree as "awaiting merge".

If public docs are also needed, leave a handoff with the public target, source links, and the writer artifact home, then re-enter the router.

Public

  1. Infer the public docs surface from existing pages, sidebars, meta.json, and indexes.
  2. For a small patch, edit directly and report why the writer chain was skipped.
  3. For substantial work, use one private writer artifact bundle for the target page, for example apps/wiki/content/docs/project/public-docs/<slug>/.
  4. Run writing-fragments to create or refresh fragments.md when it is missing or stale.
  5. Fragment sufficiency checkpoint (mandatory): show the fragments and ask whether they are sufficient. Do not continue while the answer or the requested guidance is missing. Inside AFK delivery-phase, the checkpoint is an Autonomous Decision instead.
  6. Run writing-beats (beats.md), then writing-shape (shape.md), then write or merge the final page.
  7. Update routed metadata, sidebars, and indexes.

Inside AFK Delivery

Inside AFK delivery-phase, every docs-ingest gate settles as an Autonomous Decision, and the run continues. Each out-of-bounds decision is posted to the thread at once.

  • Scope and audience: take the docs goal, source artifacts, and target reader from the delivery spec, diff, and review output. In-bounds.
  • Setup authority: adopting an existing wiki tree is in-bounds. Setting up a new wiki at the destination that project guidance names is out-of-bounds. With no named destination, write the gap report, record it as docs follow-up debt, and return the outcome to delivery without a stop.
  • Destination and spec folder: take the candidate that the delivery spec and project guidance name. In-bounds.
  • Fragment sufficiency checkpoint: judge the fragments against the delivery spec and diff, revise fragments.md from that evidence, and continue to beats and shape. In-bounds.
  • Health conflicts: apply the change that the accepted spec supports. Out-of-bounds when it changes accepted product meaning.

Log Entry

Every writer of <wiki-root>/log.md appends one entry at the end of the file. The log is append-only and oldest-first:

## [YYYY-MM-DD] <capture | ingest | maintenance | grill | spec> | <subject>

- Source: <path> @ <revision or blob ID>
- Outcome: <outcome>
- Outputs: <pages written or changed, with counts>
- Unfinished: <each unfinished item, or none>

Boundaries

  • Keep one routed docs surface: no second article tree, domains/ owner layer, or backlog mirror.
  • Keep surface and permission frontmatter on routed pages.
  • Document implemented reality, not speculative future state. Keep agent task instructions out of human-facing pages.
  • Treat Project Verifier Feature Maps as read-only. Docs ingest records observed coverage gaps for implement-spec; it never edits Feature Maps.

Routing In This Repository

apps/wiki/content/docs is the only knowledge home. Use /docs/harness for the Harness model, /docs/cli for CLI mechanics, and /docs/project for specs, plans, implementation notes, decisions, runbooks, reference, research, reviews, and writer artifacts. Other repositories follow their own wiki contract instead of these route names.

No-Op Rule

A no-op names its evidence. A freshness no-op means every source is already fresh. A knowledge no-op means the stale evidence adds no reusable delta to the owning page. Good reasons name the unchanged surface: no behavior, workflow, setup, or contract change, and no routed page or navigation impact.

Terminal Outcome

Future humans and agents find the implemented reality through routed pages, meta.json, discovery-map entries, and source paths in frontmatter, and log.md records the run.

Validation

Run the contract's validation commands: bun run --cwd apps/wiki check:health (links, navigation, frontmatter, source.json integrity) and bun run --cwd apps/wiki check:content (projection drift).

On this page