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.
needs-sme flag./_generated by hand → drift. Blocked by CI hand-edit guard.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.
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.
| Component | How it's provided | New $/mo | Note |
|---|---|---|---|
| Wiki | Azure DevOps Code wiki (Git) | 0 | Included in ADO — free |
| Orchestrator | Existing self-hosted n8n | 0 | Already running; we add workflows |
| Event delivery | ADO service hooks + n8n | 0 | No message bus needed at this scale |
| LLM (drafting) | Existing Azure OpenAI · gpt-4o-mini | 30–50 | Pay-per-token; low draft volume |
| Secrets | Key Vault (likely existing) | ~0 | Pennies; managed identity |
| MVP total (new spend) | 30–50 | Phase-2 RAG adds AI Search Basic ~$75/mo, or $0 with pgvector | |
To a live demo, solo. Much of the code already exists (this repo).
Even with the Phase-2 RAG assistant across all four projects. Still no dedicated compute.
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.
SSO for wiki, n8n, RAG UI. Managed Identity from AKS via workload identity federation. Zero long-lived secrets or PATs.
Private endpoints on AI Search, Storage, Key Vault, SQL, Service Bus. Egress via Azure Firewall. n8n reachable only through internal App Gateway.
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.
Automation opens PRs; only humans merge. CODEOWNERS-style reviewer routing from page front-matter. Hand-edit guard on /_generated.
Every change: PR → git log → n8n execution → LLM prompt hash. Shipped to Log Analytics. 90-day hot / 2-year cold retention.
Source content wrapped as data, never as instructions. Prompt registry versioned + reviewed. Golden-output tests to prevent regressions.
Git repo mirror + AI Search replica in secondary region. Postgres geo-redundant backup. Failover runbook in the wiki itself.
Fits Azure Landing Zone conventions. Compatible with ISO 27001, SOC 2 controls that the platform team already meets.
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.
| Activity | Hours / 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 |
| Area | Owner |
|---|---|
| Platform (AKS, n8n, LLM adapter, pipelines) | platform-devops |
| Wiki IA + templates + CI | platform-devops + architects |
| Adapters (per source) | source-owning team |
| RAG assistant | platform-devops |
| Content quality & drift | page owners (from front-matter) |
| Security review of prompts | secops |
/_generated.Wiki IA, provisioning/decomm/P1 templates, CI validators, Ansible adapter, drafter, drift report, Azure OpenAI provider — all runnable in the demo today.
Create the Code wiki + service account. Add a git.push hook on one Ansible repo → n8n → Azure OpenAI → PR. First live auto-drafted runbook.
Nightly coverage/freshness report to a Teams channel. Turns invisible doc-debt into a number that trends down.
Onboard the remaining repos (config only). Per-project classification; China content stays in-region with summaries + links in the wiki.
Index the curated wiki. Teams assistant answers with citations and ACL trimming. +$0–75/mo.
Tune prompts, grow the corpus, add new sources (SNOW, SolarWinds) when they earn their place.
---
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.
Approve ~$180k build + ~$4.5k/mo run.
Endorse PR-gated publishing (recommended) — automation never merges.
Confirm subscription + region for AKS + AI Search.
Service accounts for SNOW, Graph, SolarWinds, Azure DevOps.
10 section owners so auto-drafted PRs land on the right desk.
Confirm groups for ACL trimming in RAG (readers / authors / admins).