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.

ITSM and Change-Gate adapter specification

A provider-agnostic 5+2 method interface that connects avd-remediate, avd-swarm, and the C35 RSI loop to any ticketing or Change Management system.

More

This specification extends decision 0027 and connects it to the bounded RSI specification, decision 0030, and the C35 fitness contract.

Core 5+2 adapter interface

Every provider implements five base ticket operations and two optional Change-Gate operations behind one normalized state machine.

More

Normalized ticket states are new, triaging, awaiting_approval, and resolved. Providers that lack a formal Change Management module default the two optional Change-Gate methods to safe fallbacks.

Method Category Purpose Fallback for simple providers
createTicket(payload) Base (0027) Open an incident, service request, or change candidate Required
listOpenTickets(filter) Base (0027) Poll open items awaiting triage or verification Required
getTicket(id) Base (0027) Read normalized metadata, labels, and authoritative state Required
addWorkNote(id, body, { internal }) Base (0027) Attach redacted C24/C9 plans or C35 PIR evidence Required
transitionTicket(id, targetState) Base (0027) Move item across new, triaging, awaiting_approval, resolved Required
isInChangeWindow(id) Change-Gate Verify CAB approval and active maintenance window before run Returns true when GitHub Environment gate is used
recordOutcome(id, c28Payload) Change-Gate Write structured C35 pre/post fitness verdict and PIR close code Calls addWorkNote with formatted C35 summary

Provider profiles

The same avd-remediate and avd-swarm workflows run unchanged across local mocks, GitHub-native gates, Microsoft-native approvals, or enterprise ITSM tools.

More
Provider ID System of record Change-Gate mechanism Cost tier
mock Local JSON queue Simulated approval and window check $0 offline
github-native Private repo Issues and PRs GitHub Environments required reviewers and wait timers $0
power-platform Dataverse and Power Automate avd-power-platform Approvals + schedule check M365 / Power Automate
jira-jsm Jira Service Management JSM workflow transition (awaiting_approval to resolved) $0 Cloud Free (up to 3 agents)
servicenow avd-servicenow ServiceNow Incident/Change Table API + CMDB maintenance window Enterprise ServiceNow
custom-rest Any REST or webhook ITSM Implements the 5+2 interface in a private provider module Varies

End-to-end RSI and Change-Gate lifecycle

An incident or C21 drift signal moves through triage, dual-gate approval, Ring 0 execution, and objective C35 Post-Implementation Review (PIR).

More
  1. Intake (new → triaging): listOpenTickets or an avd-current-state drift alert triggers avd-remediate to correlate C11/C21 facts and establish preFitness (C35).
  2. Proposal (triaging → awaiting_approval): avd-swarm drafts a single-variable Ring 0 C9/C24 delta with cost estimate and pre-attached rollback plan, posting a redacted summary via addWorkNote(..., { internal: true }).
  3. Dual-Gate Approval: The ITSM Change-Gate approves the CR (isInChangeWindow(id) = true) and the owner approves the execution gate (interactive CLI/portal confirmation, Azure PIM, or optional GitHub Environment); neither gate can bypass the other.
  4. Execution & Verification: avd-landing-zone / avd-swarm executes Ring 0, runs a post-change probe to compute postFitness and verdict, and calls recordOutcome(id, c28Payload).
  5. PIR Closure (resolved or Rollback): improved closes the ticket/CR and unlocks a Ring 1 promotion PR; regressed blocks promotion and opens a human-gated rollback CR.

Red-team threat model and controls

Every provider implementation must enforce five fail-closed controls so untrusted ticket data or stale approvals cannot cause unauthorized cloud changes.

More
Threat Attack vector Mandatory control
Prompt injection via ticket text Attacker puts instructions in getTicket title, description, or comments Treat all ticket fields as untrusted data; run avd-assistant Stage 0 scope gate and F4 verdict filter; never pass raw ticket text to shell execution
Approval spoofing Attacker posts "approved" in a public comment or sends a forged webhook Read authorization only from the ITSM system's authoritative status/CAB field over authenticated API, paired with out-of-band owner approval (interactive CLI/PIM or optional GitHub Environment)
Tenant or secret leakage addWorkNote or createTicket pushes raw host names, IDs, or tokens to external SaaS Run redact.js fail-closed scrubbing before any outbound adapter call; block if unredacted patterns remain
Change-window TOCTOU CR was approved hours earlier, but the maintenance window closed before execution Re-verify isInChangeWindow(id) and re-read live Azure/Intune state immediately prior to avd-swarm execution
Replay and duplicate runs Webhook retries or polling loops re-trigger an already-executed C9/C24 plan Bind every execution to a unique (planId, ticketId, idempotencyKey) recorded in the private estate vault

Next steps across the family

Adopting this spec requires keeping the adapter contract pinned in avd-second-brain and wiring providers in avd-remediate and avd-swarm.

More
Linked from 6 pages