sdaf-failure-triage
Skill145 starsChanged 3 months agoMITView on GitHub
Triage a failed or suspicious SDAF run: distinguish a real failure from a green no-op or a clean plan reported as failure, map the observed symptom to a documented cause in `docs/local/troubleshooting.md`, and hand off to the stage-owning skill for retry. Use when a user says "SDAF run failed", "my deploy exited non-zero", "the plan was clean but exit 1", "the run said success but nothing was deployed", "state lock error", "unexpected replacement", "control plane stopped partway", "generated hosts.yaml missing", "workload-zone private endpoint failure", "workload-zone subnet policy failure", or "SDAF exit 2". Do NOT use to actually deploy or to redesign the workspace layout.
In this repository21 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- Webapp/.github/copilot-instructions.mdCopilot instructions
- code-reviewSkill
- sdaf-bom-selectionSkill
- sdaf-control-plane-bootstrapSkill
- sdaf-ha-diagnosticsSkill
- sdaf-ha-topologySkill
- sdaf-media-acquisitionSkill
- sdaf-media-diagnosticsSkill
- sdaf-orientation-and-surfaceSkill
- sdaf-plan-and-test-semanticsSkill
- sdaf-quality-assuranceSkill
- sdaf-readiness-checkSkill
- sdaf-safe-removalSkill
- sdaf-sap-installationSkill
- sdaf-sap-systemSkill
- sdaf-sovereign-cloudSkill
- sdaf-state-managementSkill
- sdaf-workload-zoneSkill
- sdaf-workspace-and-tfvarsSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Do NOT trigger on: pre-flight readiness (sdaf-readiness-check), authoring tfvars (sdaf-workspace-and-tfvars), fresh deploy of a stage.
- Very specific: line 61
If nothing matches, walk the "canonical 'clean plan reported as failure' note" in references/symptom-map.md, which walks the stage § …
- Distinctive: line 120
If artefacts are missing, treat the "success" as false and route to the stage-owning skill.
- Distinctive: line 129
Do not silently pass a non-zero exit code.
- Distinctive: line 130
Do not narrate benign log noise as a failure without a documented anchor.
- Distinctive: line 134
Does not deploy or retry directly.
- Very specific: line 135
Does not repair Terraform state.
- Very specific: line 136
Does not restate stage-specific safety rules — the stage skills and .github/copilot-instructions.md own those.
- Very specific: line 138
Does not replace the documented media/install/HA/removal/sovereign owners.
- Very specific: line 139
Does not reason about undocumented failure modes (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SDAF Failure Triage
Action-loop skill. The entry point for "it broke". Maps observed symptoms to
the documented cause in docs/local/troubleshooting.md (and the stage docs'
own § Validate / § Configuration preparation sections), then hands off
to the stage-owning skill. This skill is a router, not the owner of any
per-stage fix.
When to invoke
Trigger on: "SDAF run failed", "the plan was clean but the run exited 1", "success but nothing deployed", "state lock", "unexpected replacement", "control plane stopped partway", "generated hosts.yaml missing", "BOM files not found", "removal is incomplete", "Ansible playbook failed", "workload-zone private endpoint failure", "workload-zone subnet policy failure", "SDAF exit 2".
Do NOT trigger on: pre-flight readiness (sdaf-readiness-check), authoring
tfvars (sdaf-workspace-and-tfvars), fresh deploy of a stage.
Preconditions
- Collect the exit code and the last 200 lines of the run log before invoking. If you have neither, ask for them; do not guess.
Recipe
Step 1 — Establish exit-code intent
0— Terraform / script signalled success. Still worth verifying the expected artefacts exist (some symptoms below are "success but nothing deployed").- non-zero — real failure OR a validation-gate refusal (
exit 2fromvalidate.shor a stage script). Treatexit 2as a validation gate that was intentionally tripped, not a bug; do not silence it.
Step 2 — Map the symptom
Walk references/symptom-map.md, which lists
every named failure class from docs/local/troubleshooting.md plus the
documented workload-zone private-endpoint / subnet-policy case, with the
owning skill for removal/state/install/HA/media/sovereign routes. Pick the
first row whose symptom matches the observed signature.
If nothing matches, walk the "canonical 'clean plan reported as failure'
note" in references/symptom-map.md, which walks the stage § Validate
sections. If nothing there matches either, say docs are silent on this
symptom and stop — do not invent a cause.
Step 3 — Route to the stage-owning skill
Route to the stage-owning skill for the actual retry:
| Stage / symptom | Owning skill |
| Control plane | sdaf-control-plane-bootstrap |
| Workload zone (including the private-endpoint / subnet-policy workaround) | sdaf-workload-zone |
| SAP system | sdaf-sap-system |
| SAP installation / numbered playbooks | sdaf-sap-installation |
| Media acquisition preconditions / clean downloader path | sdaf-media-acquisition |
| Media archive / checksum / extractor / BOM-processing failures | sdaf-media-diagnostics |
HA cluster evidence / crm / pcs / fencing | sdaf-ha-diagnostics |
| Explicit Terraform state lock / import / remove / drift repair | sdaf-state-management |
| Safe teardown / incomplete removal / control-plane step trap | sdaf-safe-removal |
| Azure Government / sovereign-cloud deltas | sdaf-sovereign-cloud |
| WORKSPACES/tfvars authoring issue | sdaf-workspace-and-tfvars |
| BOM file location / selection | sdaf-bom-selection |
Step 4 — Confirm before retry
The retry safety rules — no --force / no --auto-approve / no state
edits / no concurrent execution / do not delete .progress markers — are
enforced by the shipped repo instructions (.github/copilot-instructions.md)
and by each stage skill's own recipe. This triage skill defers to the
stage-owning skill's retry section rather than restating those rules.
Special cases (documented)
Interrupted control-plane removal reports success
docs/local/troubleshooting.md § Removal is incomplete and
docs/local/07-00-operations.md § Remove resources: an interrupted
control-plane removal can exit "successfully" after step=1 without
deleting the deployer. Diagnostic path: inspect
.sap_deployment_automation, persisted step, library destroy result, and
remaining deployer state / resources. Do not edit step to bypass the
guard. sdaf-safe-removal owns the documented diagnostic path and any
approved retry.
success but nothing was deployed
Cross-check the expected artefacts for the stage:
- Control plane: state in library storage account, metadata under
.sap_deployment_automation, summary written (docs/local/03-00-control-plane.md § Validate,§ Outcome). - Workload zone:
.tfvarsand backend metadata in the state account'stfvarscontainer, zone Key Vault deployed (docs/local/04-00-workload-zone.md § Validate,§ Outcome). - SAP system: infra deployed and
<SID>_hosts.yaml/sap-parameters.yamlpresent (docs/local/05-00-sap-system.md § Validate,§ Outcome).
If artefacts are missing, treat the "success" as false and route to the stage-owning skill.
Hard rules
- Documented behaviour only (D19). If the symptom does not match a
docs/local/troubleshooting.mdsection, a documented§ Configuration preparation/§ Validatecross-check, or a named owner row inreferences/symptom-map.md, say docs are silent and stop. - Do not silently pass a non-zero exit code.
- Do not narrate benign log noise as a failure without a documented anchor.
What this skill does NOT do
- Does not deploy or retry directly.
- Does not repair Terraform state;
sdaf-state-managementowns that. - Does not restate stage-specific safety rules — the stage skills and
.github/copilot-instructions.mdown those. - Does not replace the documented media/install/HA/removal/sovereign owners.
- Does not reason about undocumented failure modes (e.g. end-to-end Government
beyond
sdaf-sovereign-cloud, air-gapped, or undocumentedARM_ENVIRONMENTflows).
See also
sdaf-control-plane-bootstrap,sdaf-workload-zone,sdaf-sap-system,sdaf-sap-installation,sdaf-media-acquisition,sdaf-media-diagnostics,sdaf-ha-diagnostics,sdaf-state-management,sdaf-safe-removal,sdaf-sovereign-cloud,sdaf-workspace-and-tfvars,sdaf-bom-selection.docs/local/troubleshooting.md,docs/local/07-00-operations.md,docs/local/04-00-workload-zone.md § Configuration preparation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

