Motivation
Code shows what the system does; it rarely shows why. The Architecture Decision Records (ADRs) are the editorial trail of the choices that shaped AskMyDocs — each one a problem, the options weighed, the decision, and its consequences. This page is the narrative over those records: it groups them into the arcs they belong to and explains how each built on the last. The full records live indocs/adr/ in the repository.
The foundational arc: knowledge as a typed, governed asset
The first three ADRs define what makes AskMyDocs more than RAG-over-files.- ADR 0001 — Canonical knowledge layer. Decisions
and rejections cannot be represented in a flat corpus. ADR 0001 adds typed
canonical columns inside
knowledge_documents(9 artifact types, status lifecycle, retrieval priority) so the system can carry “we chose X over Y” as first-class, ranked knowledge. See the retrieval pipeline. - ADR 0002 — Lightweight knowledge graph. Typed
artifacts need typed relationships. ADR 0002 adds
kb_nodes/kb_edgesas a derived projection of markdown — rebuildable from Git — with project-scoped composite FKs. See the canonical graph. - ADR 0003 — Human-gated promotion. Machine-generated
content must never silently become truth. ADR 0003 makes promotion a human
editorial gate: skills and the suggest/candidates endpoints produce drafts;
only humans (git → GitHub Action) and operators (
kb:promote) commit canonical storage. This boundary is referenced by every later automation decision.
The integration arc: standalone packages, host wiring
As capabilities grew, they were extracted into reusable, MIT-licensed packages — the host uses them, never the reverse.- ADR 0004 — Sister-package integration. The IoC contract pattern: a package depends only on a host-bound interface; the host implements it with real retrieval / RBAC / audit.
- ADR 0008 — Universal connectors + source-aware ingestion. Per-source converters and chunkers (Notion, Confluence, Drive, Jira, …) plus the modern chat surface. See connectors.
- ADR 0009 — Connector package extraction. Each connector becomes its own composer package, discovered via composer-extra; the host binds them through the ingestion bridge. See sister packages.
- ADR 0011 — AI-Act compliance integration. Disclosure, consent, and audit-evidence surfaces wired from extracted compliance packages. See PII & compliance.
The platform arc: review, workflows, notifications, lifecycle
- ADR 0005 / ADR 0006 / ADR 0007 — the React 19 host bump, the nightly eval-harness regression cron, and the opt-in adversarial nightly: the quality-gate machinery that keeps retrieval honest over time.
- ADR 0010 — Tabular Review + Workflows + AI-suggest. Structured multi-document extraction and reusable workflow templates over the Flow saga architecture. See the admin panel.
- ADR 0012 — Notification system. A DB-backed multi-channel notification layer (mail / webhook / Slack / Teams / Discord).
- ADR 0013 — KB lifecycle intelligence. Content-gap analytics, obsolescence-impact analysis, and search-failure rollups.
The autonomy arc: self-compiling knowledge, safely
- ADR 0014 — Auto-Wiki
autotier. The culmination: an LLM compiles raw docs into enriched, cross-linked, navigable knowledge — but as a second-classgeneration_source='auto'tier, quarantined behind the reranker firewall and still subject to the ADR 0003 human promotion gate. It is the proof that automation and the trust gradient can coexist. See the auto-wiki engine.
Decision rationale (meta)
- Why keep ADRs at all? A wrong fact in a quick-reference propagates into queries and tests. ADRs are the durable why that survives staff turnover and keeps later PRs from unwinding deliberate constraints.
- Why a narrative page on top of the index? The index is lookup; the arcs explain dependency — you cannot understand the auto-wiki tier (0014) without the promotion gate (0003) and the graph (0002).
Gotchas & operations
- Do not unwind a non-obvious decision without a superseding ADR. The “no AI
SDKs / raw
Http::” choice, the human-gated promotion boundary, and the source-of-truth-is-markdown rule are load-bearing. - A new architectural decision ships its own ADR in
docs/adr/— each numbered record above links directly to its file.
Architecture overview
The system spine that connects the subsystems.
Auto-Wiki engine
The autonomy arc’s culmination (ADR 0014).