> ## Documentation Index
> Fetch the complete documentation index at: https://cli-docs.relai.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# wiki

> Reference for relai wiki commands and the project knowledge RELAI curates.

For a guided workflow, see [EvalsWiki](/evals-wiki).

`relai wiki` manages EvalsWiki, RELAI's local project knowledge base. Init
bootstraps it by default, and later commands use it to ground agent tests,
evaluators, benchmarks, and optimization work.

## Project knowledge types

RELAI curates three user-facing categories:

* **Requirements** are grounded behaviors the agent appears expected to satisfy.
* **Risk hypotheses** are likely ways the current agent may fail. RELAI can turn
  them into agent tests through discovery.
* **Open questions** are unresolved ambiguities. They are not treated as
  requirements until a user answers them.

## Inspect project knowledge

```sh theme={"system"}
relai wiki list requirements
relai wiki list risks
relai wiki list open-questions
```

Use `--id {id}` to inspect one item in detail and `--json` when another tool
needs deterministic output.

## Generate agent tests from Wiki items

Create an agent test from a selected risk:

```sh theme={"system"}
relai wiki list risks --create-test
relai wiki list risks --create-test --risk {risk-id}
```

Create an agent test from a selected requirement:

```sh theme={"system"}
relai wiki list requirements --create-test
relai wiki list requirements --create-test --id {requirement-id}
```

The risk flow runs `relai test discover` for the selected risk. Use
`relai test discover --risk {id}` directly when you need discovery
controls such as the invocation-wide `--timeout` or `--no-review`. The
requirement flow runs `relai test create --requirement {id}` and
supports normal creation controls such as `--agent-target`, `--guidance`,
permissions and the invocation-wide timeout. Every `relai wiki` command runs
for at most 1 hour by default, including the discovery or creation it starts;
pass `--timeout {DURATION|off}` to change that (see
[Timeouts](/cli/overview#timeouts)).

## Resolve open questions

When you know the answer to an open question, resolve it through RELAI's Wiki
update flow:

```sh theme={"system"}
relai wiki resolve open-question {open-question-id} --answer "{answer}"
```

You can also start from the list command:

```sh theme={"system"}
relai wiki list open-questions --resolve --id {open-question-id} --answer "{answer}"
```

Resolution treats the answer as explicit user intent. It may create or update a
requirement and remove the resolved open-question page. The patch applies
directly; pass `--review` to approve it first.

## Bootstrap, update, and reconcile

`relai init` runs Wiki bootstrap by default. Use these commands directly when
you need more control:

```sh theme={"system"}
relai wiki bootstrap
relai wiki update --evidence-json -
relai wiki reconcile
```

* `bootstrap` builds or merges the initial Wiki from repository files, Git
  history, local RELAI artifacts, and local run/evaluation logs.
* `update` records durable project decisions, corrections, constraints, and
  preferences from a bounded evidence envelope.
* `reconcile` reviews agent tests, evaluators, and benchmarks whose
  grounded requirements changed.

To curate a folder of traces or other context, see [Ingest traces and
context](/cli/ingest).

## Backlinks

Use backlinks to find registered artifacts grounded in a requirement or other
stable Wiki knowledge ID.

```sh theme={"system"}
relai wiki backlinks {knowledge-id}
relai wiki backlinks {knowledge-id} --json
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.