<!-- omnius:discovery:start -->
# Omnius Agent Guide

This project uses Omnius. Search the installed discovery contract before
guessing a command, route, tool, provider, state path, or source owner:

```bash
omnius discover "your task"
omnius show <capability-id>
omnius docs
omnius capabilities --json
```

Start with `workflow.choose-entrypoint`, then expand the relevant `layer.*`,
`module.*`, `runtime.*`, `store.*`, or task-specific `workflow.*` entry.

| Need | Use |
| --- | --- |
| Interactive chat and human-only slash commands | `omnius` |
| One foreground coding task | `omnius "<task>"` |
| Stateful daemon conversation | `POST /v1/chat` |
| Long task with ID, events, polling, and cancel | `POST /v1/run` |
| OpenAI-compatible client | `POST /v1/chat/completions` |
| One direct tool | Only the exact `rest-call` interface returned by tool metadata |

For a running daemon, bootstrap from `GET /v1/discovery/bootstrap`, then check
`GET /version`, `GET /health/ready`, `GET /openapi.json`, and the relevant live
registry such as `GET /v1/tools`. Send `X-Omnius-Min-Version` on execution
requests so a stale runtime fails before creating work.

State is deliberately split: project sessions/tasks/context belong in
`<project>/.omnius`; daemon identity, credentials, managed runtimes, and shared
model/media storage belong in `~/.omnius`. Resolve the active workspace before
touching project state, and never emit secrets from global state.

`web_search` is agent-bound: inspect `GET /v1/tools/web_search`, then use
`/v1/run`, `/v1/chat`, or `/v1/chat/completions` with
`agent_loop:true` and `include_daemon_tools:["read"]`.

Never infer REST exposure from a slash command or direct-call exposure from a
tool name. Treat queued/accepted as non-terminal; verify the observable result.
Small-context agents should expand one workflow and its references. Maintainer
agents should also expand the owning layer/module and run discovery freshness.
<!-- omnius:discovery:end -->
