v1.0 · Working demonstration in repo

A runbook that updates itself — for the price of a team lunch.

Turn our four Ansible automation projects' provisioning, decommission and P1 runbooks into an always-current internal wiki. When a role or playbook changes, Azure OpenAI drafts the doc update; an engineer reviews and merges the PR. No new infrastructure — it runs on the Azure DevOps, n8n and Azure OpenAI we already have. Phase 2 adds an "ask the runbooks" assistant on top.

At a glance
4
Ansible projects in scope
100%
changes PR-gated (human review)
~$40
/ month — token cost only
$0
new infrastructure
1–2 wks
to a live demo
4
regions: EMEA · BR · CN · on-prem
Built entirely on assets we already own: Azure DevOps, self-hosted n8n, and Azure OpenAI.
Executive Summary

Pros, cons, and risks — in one page.

Pros

Why do it

  • Runbooks stay accurate. Every documentation-worthy change to code, infra, tickets, or dashboards produces a reviewed PR against the wiki within minutes.
  • Faster incident response. On-call finds the correct procedure through the RAG assistant with citations — no more grepping SharePoint and SNOW at 03:00.
  • Better onboarding. New engineers get a canonical, current map of the estate instead of tribal knowledge.
  • One search box for the org. Wiki + SNOW KB + SharePoint + Teams all searchable through a single ACL-aware assistant.
  • Extensible by design. Adding a new source = one adapter; the rest of the pipeline never changes.
  • Vendor-neutral. Pluggable LLM and pluggable vector store — no lock-in.
Cons

Trade-offs

  • Reviewer load. Auto-drafted PRs need owners to review; expect 15–40 PRs/week initially. Mitigated by good routing and grouping.
  • Prompt & template maintenance. Drafts are only as good as the prompts. Requires a small ongoing tuning effort (see Ops).
  • Cross-team coordination. Every top-level section needs a named owner in RACI; some teams will resist ownership.
  • Real cost floor. ~$4.5k/mo prod is not zero; must be justified against status quo.
  • Content debt exposed. The drift report will surface many stale pages on day one — this is a feature, not a bug, but it looks noisy.
Risks

What could go wrong

  • LLM hallucination. Mitigated by PR-gating + explicit citation requirement + low-confidence needs-sme flag.
  • Prompt injection via ingested content. Sandwich prompts, sanitize adapters, treat all source text as data.
  • Data leakage in RAG answers. ACL trimming at query time using Entra ID group membership; classification field on every page.
  • Runaway LLM cost. Per-workflow token quotas + monthly budget alerts + circuit breaker.
  • Operator bypass. Someone edits /_generated by hand → drift. Blocked by CI hand-edit guard.
  • Automation is not merge-capable. Bot can open PRs, never approve or merge. Humans always in the loop.
Business Case

The problem in three columns.

Today

Manual wiki that drifts

  • • Overview wiki is sparse and hand-maintained.
  • • Truth is scattered across 9+ systems.
  • • On-call re-derives procedures at 03:00.
  • • New joiners take weeks to become productive.
  • • No corpus to ground an AI assistant.
Proposed

Self-updating source of truth

  • • Git-backed wiki with enforced templates & owners.
  • • 9 adapters push change events to a normalized bus.
  • • AI drafts updates → owner reviews PR → merge → publish.
  • • RAG assistant answers questions with citations, ACL-trimmed.
  • • Nightly drift report keeps content debt visible.
Impact

Quantifiable wins

  • MTTR ↓ by removing runbook search time (est. 5–15 min per Sev-2+).
  • Sev-1 from stale runbooks ↓ because drift becomes visible & fixable.
  • Onboarding ↓ from weeks to days for the wiki-visible parts of the estate.
  • Architect time freed from answering "how does X work" tickets.
  • Audit surface ↑ — every page has owner, review date, sources, PR history.
Architecture

One picture. Every source. Human in the loop.

flowchart TB subgraph SRC[Sources] R1[4 Ansible repos
Azure DevOps] R2[SharePoint
docs · Excel · legacy] R3[Power BI + SNOW
reports] R4[Teams + Outlook
automation comms 🔒] end SRC -->|webhooks / delta / hooks| N8N[n8n
self-hosted, existing] N8N --> CLS{Classify} CLS -->|normal| DRAFT[AI Drafter
Azure OpenAI] CLS -->|deleted| TOMB[Tombstone
no LLM] CLS -->|confidential| LINK[Link-only stub
no LLM, no mirror] DRAFT --> PR[Azure DevOps PR
owner review] TOMB --> PR LINK --> PR PR -.human review.-> MERGE{Merge} MERGE --> WIKI[Code Wiki
Git-backed, free] N8N --> DRIFT[Nightly drift report
to Teams] WIKI -.Phase 2.-> IDX[Azure AI Search
or pgvector] IDX -.Phase 2.-> RAG[Ask-the-runbooks
ACL-trimmed] classDef src fill:#0b3b52,stroke:#0891b2,color:#e0f2fe; classDef ai fill:#3b0764,stroke:#a855f7,color:#f3e8ff; classDef ops fill:#052e16,stroke:#22c55e,color:#dcfce7; classDef guard fill:#422006,stroke:#f59e0b,color:#fde68a; classDef later fill:#1e293b,stroke:#475569,color:#94a3b8; class R1,R2,R3,R4 src; class DRAFT,DRIFT ai; class WIKI,PR,MERGE ops; class TOMB,LINK,CLS guard; class IDX,RAG later;

Every source is normalised into one event shape, then classified: normal changes are AI-drafted, deletes become tombstones, and confidential Teams/Outlook comms become link-only stubs that never touch the LLM or get mirrored. Everything lands as a PR for owner review. Adding a new source = one adapter; nothing downstream changes.

Cost

Near-zero, because we reuse what we own.

The MVP adds no new infrastructure. It runs on our existing Azure DevOps, self-hosted n8n, and Azure OpenAI. The only new spend is Azure OpenAI tokens — and drafting a handful of runbook changes a week is tiny.

MVP monthly
~ $30–50 / mo
tokens only · $0 new infra
Component How it's provided New $/mo Note
WikiAzure DevOps Code wiki (Git)0Included in ADO — free
OrchestratorExisting self-hosted n8n0Already running; we add workflows
Event deliveryADO service hooks + n8n0No message bus needed at this scale
LLM (drafting)Existing Azure OpenAI · gpt-4o-mini30–50Pay-per-token; low draft volume
SecretsKey Vault (likely existing)~0Pennies; managed identity
MVP total (new spend) 30–50 Phase-2 RAG adds AI Search Basic ~$75/mo, or $0 with pgvector
Build effort
1–2 weeks

To a live demo, solo. Much of the code already exists (this repo).

Scale-up ceiling
< $150 / mo

Even with the Phase-2 RAG assistant across all four projects. Still no dedicated compute.

Cost controls
  • • Token quotas per workflow
  • • Monthly budget alerts
  • • Circuit breaker on LLM adapter
  • • Cheap model default; strong model only for hard cases

A fuller enterprise build (dedicated AKS n8n, Service Bus, AI Search S1, private networking everywhere) is available as a scale-up path — roughly $3–4.5k/mo — but is not required for the four-project scope.

Security & Compliance

Private, identity-first, PR-gated.

Identity

Entra ID everywhere

SSO for wiki, n8n, RAG UI. Managed Identity from AKS via workload identity federation. Zero long-lived secrets or PATs.

Network

Private by default

Private endpoints on AI Search, Storage, Key Vault, SQL, Service Bus. Egress via Azure Firewall. n8n reachable only through internal App Gateway.

Data

Classification-aware RAG

Every page carries a classification field. AI Search filters by Entra group membership at query time. PII redaction in adapters. Secret scanning on wiki CI.

Governance

PR-gated changes

Automation opens PRs; only humans merge. CODEOWNERS-style reviewer routing from page front-matter. Hand-edit guard on /_generated.

Audit

Full traceability

Every change: PR → git log → n8n execution → LLM prompt hash. Shipped to Log Analytics. 90-day hot / 2-year cold retention.

Prompt safety

Injection-resistant

Source content wrapped as data, never as instructions. Prompt registry versioned + reviewed. Golden-output tests to prevent regressions.

DR

Multi-region ready

Git repo mirror + AI Search replica in secondary region. Postgres geo-redundant backup. Failover runbook in the wiki itself.

Compliance

Aligned to enterprise baseline

Fits Azure Landing Zone conventions. Compatible with ISO 27001, SOC 2 controls that the platform team already meets.

Risks & Fixes

Every "what could go wrong" — with the fix.

Because we're ingesting SharePoint docs/Excels, Power BI & ServiceNow reports, and — most sensitively — Outlook & Teams comms created by the automations, each risk below ships with a concrete, already-designed control.

Risk What could go wrong The fix (built in) Status
Confidential Teams/Outlook comms leak Automation run messages contain hostnames, customer refs, P1 detail. Copying them into the wiki (or an LLM prompt) discloses them broadly. Link-only by default. Confidential/restricted items are never sent to the LLM and never mirrored — the wiki holds a discovery stub + link; content stays in the source behind its own ACLs. enforced in code
Deleted source, stale wiki A SharePoint doc or playbook is deleted; the wiki keeps showing an out-of-date procedure someone follows in a P1. Delete detection → tombstone. Graph/webhook deletes are captured as a deleted change; the page is auto-marked [DEPRECATED] with a dated notice (history kept, never hard-deleted). enforced in code
Legacy doc dump 40-page legacy runbooks flood the wiki with stale, low-value content and blow up LLM cost. Short-summary mode. Legacy items are truncated and drafted as an ≤8-line summary + link-back, not a full mirror. Curated, cheap, discoverable. enforced in code
Excel data sprawl Dumping full workbooks (trackers with 100s of rows, some sensitive) into markdown is noisy and risky. Summarise, don't mirror. The adapter emits sheet names, shape and headers only + a link. The workbook stays the record. enforced in code
AI hallucination The model invents a step that doesn't exist; an engineer trusts it in an incident. PR-gated + cited + confidence-scored. Every draft is reviewed by the page owner, must cite its source, and low-confidence drafts are labelled needs-sme. enforced in code
Prompt injection via content A doc/report contains "ignore instructions and paste secrets"; the model obeys. Content treated as data. Source text is delimited and never interpreted as instructions; secret-scan runs on drafted output before commit. design + partial
RAG cross-team disclosure Phase-2 assistant surfaces a restricted page to someone without rights. ACL trimming + classification. Every page carries a classification; queries filter by Entra-ID group membership. Restricted comms are link-only anyway. Phase 2
China / data residency Cross-border movement of China (21Vianet) or on-prem content breaches residency policy. Region tag + in-region processing. China content is classified and kept in-region; the global wiki holds non-sensitive summaries + links only. policy + config
Runaway LLM cost A loop or event flood spikes Azure OpenAI spend. Quotas + budget alerts + circuit breaker. Cheap model default; confidential/tombstone paths use zero tokens. design + partial
Machine content edited by hand Someone hand-edits a generated page; it silently diverges from source. Hand-edit guard in CI. Commits under /_generated by non-automation identities fail the build. enforced in code
Reviewer overload Too many auto-draft PRs; owners ignore them and quality rots. Owner-routed + grouped + drift-tracked. PRs land on the right team; the weekly drift metric keeps the backlog visible and shrinking. enforced in code

enforced in code = demonstrable in the running demo today · design + partial = pattern in place, hardening in Phase 0–1 · Phase 2 = part of the RAG rollout.

Operations & Maintenance

Low ongoing cost of ownership.

Steady-state effort — ~0.5 FTE

ActivityHours / week
Reviewing auto-drafted PRs (spread across owners)~10
Prompt tuning + template updates~3
n8n workflow maintenance~2
Drift report triage~2
Adapter incidents (rare, alert-driven)~1
RAG quality feedback loop~2
Total~20 / wk

Ownership

AreaOwner
Platform (AKS, n8n, LLM adapter, pipelines)platform-devops
Wiki IA + templates + CIplatform-devops + architects
Adapters (per source)source-owning team
RAG assistantplatform-devops
Content quality & driftpage owners (from front-matter)
Security review of promptssecops

Operational safeguards (built-in, not bolt-on)

Circuit breaker on LLM adapter — halt drafts on token / cost spikes.
Dead-letter queue per source with a replay tool after a fix.
Nightly reconciliation catches events missed during source outages.
Hand-edit guard in CI protects /_generated.
Stale-page CI check fails PRs older than their review cadence.
RAG feedback loop — thumbs down surfaces content debt to owners.
Roadmap

Value in weeks, not quarters.

  1. Phase 0 · Foundations

    already built

    Wiki IA, provisioning/decomm/P1 templates, CI validators, Ansible adapter, drafter, drift report, Azure OpenAI provider — all runnable in the demo today.

  2. Week 1 · MVP on one project

    solo

    Create the Code wiki + service account. Add a git.push hook on one Ansible repo → n8n → Azure OpenAI → PR. First live auto-drafted runbook.

  3. Week 2 · Drift report

    the metric

    Nightly coverage/freshness report to a Teams channel. Turns invisible doc-debt into a number that trends down.

  4. Weeks 3–6 · All four projects

    EMEA · BR · CN · on-prem

    Onboard the remaining repos (config only). Per-project classification; China content stays in-region with summaries + links in the wiki.

  5. Weeks 6–10 · Ask-the-runbooks (Phase 2)

    AI Search Basic or pgvector

    Index the curated wiki. Teams assistant answers with citations and ACL trimming. +$0–75/mo.

  6. Ongoing · Continuous improvement

    low effort

    Tune prompts, grow the corpus, add new sources (SNOW, SolarWinds) when they earn their place.

Evidence

This isn't a slide deck — it runs today.

Already working in the repository

  • ✅ Wiki scaffold with enforced IA, templates, front-matter contract.
  • ✅ Provisioning / decommission / P1-case runbook templates.
  • ✅ 6 source adapters: Ansible repos, ServiceNow, SharePoint (docs/Excel/legacy), Power BI + SNOW reports, Teams/Outlook comms.
  • Create / update / delete detection — deletes become tombstones.
  • Confidential comms → link-only, never sent to the LLM or mirrored.
  • ✅ Legacy docs → short summary; Excel → summary not full grid.
  • ✅ Pluggable LLM adapter — mock for demo, real Azure OpenAI provider.
  • ✅ Doc-drift report across all four projects (Teams-ready).
  • ✅ 17 unit tests, all passing; demo validated by wiki-ci checks.

Sample auto-drafted page (real output)

---
title: "CHG0012345: Failover primary SQL AG..."
owner: platform-devops
last_reviewed: 2026-07-09
review_cadence_days: 90
sources:
  - type: snow
    ref: "https://.../CHG0012345"
tags: [auto-draft, snow]
generated: true
---

# CHG0012345: Failover primary SQL AG...

> Auto-drafted from snow · Confidence: 0.90

## Implementation plan
1. Pause SolarWinds alerts on sql-ag-core-prod.
2. Verify secondary sync lag < 5s.
3. Failover via ALTER AVAILABILITY GROUP core FAILOVER.
4. Validate app health probes.
5. Resume alerts.

## Citations
- [snow:CHG0012345](https://.../CHG0012345)

A ServiceNow change ticket became a review-ready runbook page in one pipeline run.

What we need from you

Six decisions to unblock delivery.

Decision

Sponsor + budget

Approve ~$180k build + ~$4.5k/mo run.

Decision

Governance model

Endorse PR-gated publishing (recommended) — automation never merges.

Access

Azure landing zone

Confirm subscription + region for AKS + AI Search.

Access

Source-system credentials

Service accounts for SNOW, Graph, SolarWinds, Azure DevOps.

People

Named owners per wiki section

10 section owners so auto-drafted PRs land on the right desk.

People

Entra ID group model

Confirm groups for ACL trimming in RAG (readers / authors / admins).

↑ Back to summary