avd-opsDeploy quietly
Community research project. Use at your own risk. No warranty.Use at your own risk
  • Built on my own time for research and learning. Not affiliated with, endorsed by or supported by my employer or Microsoft.
  • Don't run any of it in production or against tenants that matter. Test in a dedicated lab subscription and tenant first.
  • Provided "as is", without warranty of any kind, under each repo's license. You use it at your own risk and own the Azure charges it incurs.
  • Contributions and forks are welcome and encouraged. See Contribute.

Bounded recursive self-improvement (RSI) specification

One unified specification for how avd-ops and adopter AVD estates learn from every run without unapproved mutations, runaway spend, or metric thrashing.

More

This specification unifies decision 0030, the C35 fitness contract, the ITSM and Change-Gate adapter, the Digital Twin, and the lab walkthrough.

Dual-loop architecture

RSI operates as two coupled, human-gated loops: a private Estate Loop per adopter and a public Platform Loop across avd-ops and avd-second-brain.

More
Loop Where it runs Inputs Outputs Fitness gate
Estate Loop Adopter's private companion repo and vault C11, C21, C25, avd-remediate probes, ITSM tickets Single-variable C9/C24 deltas, C35 outcomes C35 pre/simulated/post verdict + owner gate (CLI/PIM or optional GitHub Environment) + ITSM Change-Gate
Platform Loop Public avd-ops, avd-second-brain, avd-assess Get-VaultHarvest.ps1, avd-assistant plan edits, kb-curator kb-feedback PRs, known-errors.yaml, avd-assess checks, Guru playbooks redact.js, scripts/kb/validate.py, tests/*.test.mjs, kb-accepted

Ring promotion and anti-oscillation state machine

Changes advance one variable at a time from Ring 0 (Canary) through Ring 1 (Pilot) to Ring 2 (Fleet), bounded by soak windows, hysteresis, and circuit breakers.

More
Stage Scope Entry requirement Soak & exit requirement
Ring 0 (Canary) Single canary host pool or Ring 0 Intune group preFitness (C35) + $0 Digital Twin simulatedFitness pass; pool mutex free; dual-gate approval Immediate T+1h sanity probe + T+24h soak; verdict = improved unlocks Ring 1 PR
Ring 1 (Pilot) Subset of production-like pools Ring 0 verdict = improved with zero rollbacks T+24h to T+72h soak; CAB / Normal Change approval; verdict = improved unlocks Ring 2
Ring 2 (Fleet) Remaining estate pools Ring 1 verdict = improved Final C35 PIR recorded; eligible for Standard Change graduation after repeated clean runs
  • Pre-Ring-0 Digital Twin gate: Before opening a Ring 0 Change Request, evaluate the candidate delta against the Tier A State & Simulation Twin (decision 0031); requires-ephemeral-twin changes or capacity regressions fail closed before touching live Azure.
  • Hysteresis band: Metrics within ±5% (or below minimum sample count) resolve to neutral rather than improved or regressed to prevent noise-driven churn.
  • Cooldown & circuit breaker: After any regressed verdict or rollback, the same changeVariable enters a 7-day cooldown; two consecutive regressions trip a circuit breaker requiring manual owner reset.
  • Pool mutex: Only one unsoaked Ring 0 change may run on a given host pool at a time so C35 attribution stays unambiguous.

Platform RSI loop (self-improving docs, checks, and playbooks)

Every human override and anonymized field finding upgrades deterministic checks and Guru playbooks so future runs rely less on LLM synthesis.

More
  1. Signal capture: When an operator edits a C9/C24 plan before approval or avd-assistant falls back to BYO-LLM, the diff is flagged in the private vault as a deterministic rule gap.
  2. Sanitized harvest: Get-VaultHarvest.ps1 and redact.js strip all tenant identifiers and propose a kb-feedback or known-errors.yaml issue in avd-ops or avd-second-brain.
  3. Fitness & acceptance: scripts/kb/validate.py, tests/*.test.mjs, and kb-freshness verify zero leaks, valid schemas, and primary-source citations before a maintainer applies kb-accepted.

Cross-repo ownership and rollout order

Each repo owns its layer in dependency order; avd-ops holds the governance and docs while execution stays in the downstream repos.

More
Repo Responsibility in RSI Rollout order
avd-ops MADR 0030, C35 spec, 5+2 ITSM spec, Digital Twin tie-in, walkthroughs 1
avd-assess Canonical C35 JSON Schema and updated C21 checks 2
avd-second-brain Pin C35, store vault outcome history, Get-VaultHarvest.ps1 C35 support 3
avd-remediate Compute preFitness/postFitness, run 5+2 adapter, redact.js outbound gate 4
avd-swarm Enforce Ring 0/1/2 state machine, pool mutex, circuit breaker, and C9 rollback plans 5
avd-landing-zone / avd-servicenow Execute approved C9/C24 plans and enforce CMDB maintenance windows 6

Red-team review of the RSI specification

Adversarial review of the full RSI loop identified six failure modes beyond the ITSM adapter threats and locked in mandatory mitigations.

More
Attack / failure mode How it breaks RSI Mandatory mitigation in this spec
Goodhart's Law (metric gaming) Optimizing idleHostHours shuts down hosts too aggressively, spiking logonDurationP95Sec Pareto non-regression rule: verdict = improved only if the target metric improves and no other C35 metric crosses its regression floor
Oscillation / metric thrashing Noisy telemetry flips a setting between two values across consecutive cycles ±5% hysteresis band (neutral), 7-day cooldown after regression, and 2-strike circuit breaker per changeVariable
Delayed / slow-burn regression A change looks improved at T+1h but causes FSLogix handle leaks or profile bloat at T+24h Two-stage soak (T+1h sanity + T+24h full soak) required before Ring 1 promotion is unlocked
Vault poisoning from external outages An upstream Azure or ISP outage during Ring 0 falsely labels a valid changeVariable as regressed in vault memory Pre-flight platform health check (avd-linecheck / Azure status); degraded external health forces neutral and aborts scoring
Coupled multi-variable interference Two Ring 0 changes run concurrently on the same pool, corrupting C35 causal attribution Single-variable delta rule + pool-level mutex blocking new Ring 0 proposals while a soak is active
Hallucination amplification in Platform RSI An LLM-drafted kb-feedback or Guru playbook entry is accepted without primary evidence, propagating bad advice All harvested claims remain marked unverified in kb-freshness until backed by a primary source or real run and kb-accepted
Linked from 4 pages