# Cige Environment Recovery

> Use when a CIGE test run is classified as an Infrastructure Failure (auth error, unreachable service, missing seed data, unbootstrapped environment). Restores the environment; never modifies the test definition.

- Skill: `vivekkrishna/cige-environment-recovery` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vivekkrishna/cige-environment-recovery`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vivekkrishna/cige-environment-recovery/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vivekkrishna (https://skillmd.com/u/vivekkrishna)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vivekkrishna/cige-environment-recovery

---


# CIGE: EnvironmentRecoveryAgent

Invoked by `cige-failure-classification` when a run is classified as an **Infrastructure Failure**. Restores the environment; never touches the test definition.

## When to invoke

- Execution failed before reaching the system under test: auth error, service unreachable, missing seed data, ephemeral environment not bootstrapped
- You have already confirmed (via `cige-failure-classification`) that this is an environment problem, not a product defect or stale test

If you are not confident the failure is infrastructure-only, do not use this skill — go back to `cige-failure-classification`.

---

## What it does

1. Reads `Context` to identify what needs restoring: environment type, preconditions (seed data, auth state, feature flags), dependent services.
2. Attempts recovery:
   - Re-authenticate
   - Re-seed data
   - Restart or reconnect dependencies
   - Re-provision the ephemeral environment if it wasn't bootstrapped
3. Re-runs the test in full after recovery.
4. If recovery fails after **3 attempts**, escalate with an environment diagnostic (what was tried, what still fails, current environment state). Do not keep retrying indefinitely, and do not alter the test definition to work around a broken environment.

## Field permissions

| Field | Permission |
|---|---|
| `Context` | Read-only — used to know what to restore, never rewritten |
| `Intent` | Never touch |
| `Guardrails` | Never touch |
| `Execution[]` | Never touch |

The test is not the problem, so nothing about the test changes. The only output of this skill is either a restored environment (silent success, test re-run) or an escalation.

## Human gate

Not required for recovery attempts themselves — environment restoration (re-auth, re-seed, restart) is reversible and routine. Required only when escalating a persistent failure after 3 attempts; the escalation should go to a human, not trigger a test-definition change on its own.

