Architecture
graph TD
Sources["Sources"] --> Register["Source register"]
Register --> Evidence["Evidence matrix"]
Evidence --> Queue["Evidence validation queue"]
Evidence --> Synthesis["Human synthesis pages"]
Synthesis --> MkDocs["MkDocs Material site"]
Synthesis --> LLM["LLM operational wiki"]
Synthesis --> Indexer["No-API code index script"]
Indexer --> Generated["src/generated/llmWikiKnowledge.generated.ts"]
MkDocs --> SearchIndex["search/search_index.json"]
MkDocs --> Site["site/ artifact"]
Site --> Cloudflare["Cloudflare Pages host"]
Cloudflare --> AskPage["Ask the Wiki page"]
AskPage --> SearchIndex
AskPage --> AskAPI["/api/ask Pages Function"]
AskAPI --> WorkersAI["Workers AI binding"]
Synthesis --> Graphify["Graphify structural map"]
Graphify --> Assets["docs/assets/graphify/ named communities"]
Synthesis --> OKF["Optional OKF export profile"]
OKF --> OKFOut["okf-out/ generated bundle"]
Revision["Optional revision tools"] --> MkDocs
Human Markdown remains the source of truth. The generated TypeScript index exists for no-cost structured inspection and must not be imported into production runtime code.
The Cloudflare Ask path is an optional publication/runtime layer. GitHub remains the repository source of truth, MkDocs builds the public site/ artifact, and Cloudflare Pages can host that artifact plus the /api/ask Pages Function. Retrieval starts from the published MkDocs search index in the browser; the Function receives selected excerpts and calls Workers AI through the AI binding. It does not read the private repository or GitHub API at runtime.
The 2026-06-25 local Wrangler check used wrangler 4.105.0 and compiled the Pages Worker with env.AI. Runtime inference is confirmed through the Wrangler Pages URL with ASK_WIKI_MODEL=@cf/meta/llama-3.1-8b-instruct-fp8; a POST to /api/ask returned an answer and citations from supplied wiki excerpts. The older @cf/meta/llama-3.1-8b-instruct model is deprecated and must not be used as the default.
The 2026-06-26 production deployment is https://intersystems-wiki.pages.dev/ on Cloudflare Pages project intersystems-wiki, backed by private GitHub repository ajdench/InterSystems.
An Open Knowledge Format (OKF) bundle, if added, is an export or compatibility profile over the same source Markdown. It should preserve local page roles as metadata rather than replacing the Source Register, Evidence Matrix, Evidence Validation Queue, Research Log, synthesis pages, or Graphify. Keep generated OKF output outside docs/ unless the MkDocs and Graphify ingestion rules are intentionally changed.