Skip to content

docs(build-an-oracle): audit + fix all 60 pages against the runtime (IXO-3105)#25

Merged
ig-shaun merged 1 commit into
mainfrom
ixo-3105-build-an-oracle-docs-audit
Jun 27, 2026
Merged

docs(build-an-oracle): audit + fix all 60 pages against the runtime (IXO-3105)#25
ig-shaun merged 1 commit into
mainfrom
ixo-3105-build-an-oracle-docs-audit

Conversation

@youssefhany-ixo

Copy link
Copy Markdown
Collaborator

For everyone (plain-language summary)

The Build-an-Oracle guide is what developers follow to build an AI agent ("Oracle") on QiForge. Over time it had drifted out of sync with the actual software — some pages described things that had changed, named settings that no longer exist, or showed example code that wouldn't run, and the most-asked question ("how do I change the AI model?") wasn't answered anywhere. This PR reviews every page (all 60) against the real software, the working example project, and the CLI, then corrects what was wrong, fills in what was missing, and makes sure every example actually runs.

By the numbers: 78 issues fixed across 49 of 60 pages.

What changed

  • Changing the AI model (the original gap): documented createOracleApp({ hooks: { resolveModel } }) with a copy-paste example; enumerated all createOracleApp options, the full OracleApp return surface, and all 10 MainAgentHooks fields.
  • Auth model: corrected every page to invocation-primary (Authorization: Bearer <invocation> + X-Auth-Type: ucan), with x-ucan-delegation as downstream-authorization + migration fallback; exact 401 strings; x-auth-type added to CORS; documented /delegation endpoints + real WebSocket events.
  • Plugin middleware: removed the fabricated onError hook (real hooks: beforeAgent/beforeModel/wrapModelCall/wrapToolCall/afterModel/afterAgent); corrected the always-on stack; fixed dangerous "return a partial state object" guidance.
  • Bundled plugins: rewrote tasks.mdx for the shipped v2.0.0 plugin; fixed editor/composio/sandbox/skills pages; plugin count is 15.
  • Reference drift: added missing UCAN env vars, removed a phantom state channel + fake DTO names, fixed the manifest tags rule (hard boot error).
  • Client SDK + CLI: corrected the @ixo/oracles-client-sdk API; fixed the CLI to the real qiforge-cli binary (scaffold new, chat --chat, set-URL update-oracle-api-url); removed fabricated commands; normalized default PORT to 3000.
  • Create-entity note: documented that create-entity registers the oracle URL as http://localhost:4000 by default while the runtime default PORT is 3000 — set PORT=4000 to match or change it with qiforge-cli update-oracle-api-url.

How it was verified

Every code example checked against runtime source. Cross-page sweeps clean: no stale port 5678, no @ixo/common mis-import, no "14 plugins", onError only as the real OracleApp.onError method, qiforge-cli only as binary/package name. Frontmatter intact; nav (docs.json) has no orphans/broken links.

Tracking

Linear: IXO-3105. Per-finding detail (severity, runtime path:line, suggested fix) lives in the boilerplate repo at docs/docs-audit/.

A few source-side follow-ups (runtime code, not docs) are listed in IXO-3105 — e.g. the example app's stale port comment, two inaccurate JSDoc blocks, and a boot warning that still prints the legacy CLI command.

Full audit of the Build-an-Oracle guide against the live runtime
(packages/oracle-runtime), the reference oracle (apps/qiforge-example),
and the CLI (ixo-oracles-cli). 78 findings fixed across 49 of 60 pages.

Highlights:
- Document changing the AI model via createOracleApp({ hooks: { resolveModel } });
  enumerate all createOracleApp options, the OracleApp surface, and all 10
  MainAgentHooks fields with examples.
- Correct the auth model everywhere: invocation-primary (Authorization: Bearer
  + X-Auth-Type: ucan), x-ucan-delegation as downstream-authz/fallback; add
  x-auth-type to CORS; document /delegation endpoints and real WS events.
- Remove the fabricated onError middleware hook; fix the always-on middleware
  list; correct dangerous middleware state-mutation guidance.
- Rewrite tasks.mdx for the shipped v2.0.0 plugin; fix editor/composio/sandbox/
  skills plugin pages; plugin count is 15.
- Fix env/state/manifest reference drift (missing UCAN vars, phantom state
  channel, tags = hard boot error).
- Correct the client SDK API and the CLI: binary is qiforge-cli, scaffold is
  'new', chat is the --chat flag, set-URL is update-oracle-api-url; remove
  fabricated commands; normalize default PORT to 3000.
- Add the create-entity localhost:4000 vs PORT=3000 reconciliation note.

Refs IXO-3105.
@youssefhany-ixo youssefhany-ixo requested a review from ig-shaun June 26, 2026 21:25
@mintlify

mintlify Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ixoworld 🟢 Ready View Preview Jun 26, 2026, 9:39 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@ig-shaun ig-shaun merged commit 977cfc8 into main Jun 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants