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
- Intake (
new→triaging):listOpenTicketsor anavd-current-statedrift alert triggersavd-remediateto correlateC11/C21facts and establishpreFitness(C35). - Proposal (
triaging→awaiting_approval):avd-swarmdrafts a single-variable Ring 0C9/C24delta with cost estimate and pre-attached rollback plan, posting a redacted summary viaaddWorkNote(..., { internal: true }). - 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. - Execution & Verification:
avd-landing-zone/avd-swarmexecutes Ring 0, runs a post-change probe to computepostFitnessandverdict, and callsrecordOutcome(id, c28Payload). - PIR Closure (
resolvedor Rollback):improvedcloses the ticket/CR and unlocks a Ring 1 promotion PR;regressedblocks 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
- Finalize decision 0027 and decision 0030 from
proposedtoaccepted. - Pin the normalized 5+2 adapter schema and
C35outcome schema inavd-second-brainandavd-assess. - Follow Run a bounded RSI loop on a lab estate to exercise the loop in
mockorgithub-nativemode first.
Linked from 6 pages
- First principles
- Bounded recursive self-improvement (RSI) specification
- Estate fitness and outcome contract (C35)
- 0027. Separate helpdesk simulator kit and normalized ticket-adapter boundary
- 0030. Bounded recursive self-improvement (RSI) loop for avd-ops and AVD estates
- 0032. Decouple adopter-tenant operations from GitHub Actions