Motivation
A knowledge base decays unless someone tends it: links rot, concepts go undocumented, related decisions stay disconnected. AskMyDocs compiles its own wiki on top of every ingested corpus and keeps it healthy over time — without ever weakening the human-vouched authoritative tier.The auto tier and the firewall
The cornerstone is a second-class auto tier
(knowledge_documents.generation_source ∈ {human, auto}). AI-compiled knowledge
is real, searchable and navigable, but the reranker always ranks
human-accepted > auto > raw, and an admin can promote auto → human. Every
layer is reversible, audited to kb_canonical_audit, tenant-scoped (R30), and
config-gated (default-ON but cleanly degradable, R43). See the
anti-hallucination firewall.
The phases
Tri-surface (R44)
Every capability is exposed across PHP / HTTP API / MCP over one shared core service. Representative Artisan commands (all tenant-scoped via--tenant):
/api/admin/kb/* (RBAC-gated) and
MCP tools on the enterprise-kb server (KbWikiNavigateTool is the primary
agentic surface).
Config gates (R43)
Each phase is independently toggleable and degrades cleanly when off:KB_AUTOWIKI_GRAPH_ENABLED, KB_AUTOWIKI_CONCEPTS_ENABLED,
KB_AUTOWIKI_REVIEW_ENABLED (+ a dedicated review model via
KB_AUTOWIKI_REVIEW_AI_PROVIDER/_MODEL for true cross-model diversity),
KB_CHANGE_AUTOAPPLY_ENABLED (default-OFF). With every flag off, AskMyDocs
behaves exactly like its pre-Auto-Wiki self.
Gotchas & operations
- The firewall is non-negotiable: never write retrieval code that ignores
generation_source. - Auto pages are machine-reviewed by a different model than the compiler — point the review override at a distinct provider for real diversity.
- Concept synthesis + maintenance are explicit-trigger / scheduled, never per-ingest, and bounded per run.
Anti-hallucination firewall
Why machine knowledge never outranks human-vouched truth.
Chat & retrieval
How the auto tier feeds grounded, cited answers.