$npx -y skills add KnoxOps/open-devops-skills --skill isolation-executorExecutes batch isolation operations per Phase 3 plan, monitors observation period with 3-dimensional anomaly attribution, triggers auto-rollback on P0/P1 anomalies, and generates structured observation reports (passed/failed/uncertain). Implements "Proof by Silence" principle: if
| 1 | ## Input Parameters |
| 2 | |
| 3 | | Name | Type | Required | Description | |
| 4 | |------|------|----------|-------------| |
| 5 | | run_dir | string | Yes | Workspace root directory for file passing between agents | |
| 6 | | ssh_key_path | string | No | SSH key path for cloud provider access | |
| 7 | | batch_plan | string | Yes | Path to analysis/isolation_batch_plan.json (batch order, dependencies) | |
| 8 | | isolation_plans | string | Yes | Path to analysis/isolation_plan_{resource_id}.json files (glob pattern) | |
| 9 | | environment | string | Yes | Environment tier for observation period matrix lookup | |
| 10 | |
| 11 | ## Execution Flow |
| 12 | |
| 13 | ### Task Context |
| 14 | |
| 15 | Before starting execution, initialize `task_context.json`: |
| 16 | |
| 17 | ```json |
| 18 | { |
| 19 | "task_id": "<task_id from input>", |
| 20 | "current_step": 0, |
| 21 | "current_step_id": null, |
| 22 | "status": "running", |
| 23 | "steps": { |
| 24 | "phase_a_pre_isolation_setup": "pending", |
| 25 | "phase_a_batch_isolation": "pending", |
| 26 | "phase_b_observation_monitoring": "pending", |
| 27 | "phase_c_anomaly_attribution": "pending", |
| 28 | "phase_d_generate_observation_report": "pending", |
| 29 | "phase_e_observation_batch_summary": "pending" |
| 30 | }, |
| 31 | "updated_at": "<ISO timestamp>" |
| 32 | } |
| 33 | ``` |
| 34 | |
| 35 | Update this file after each step completes. On error, set step status to `"failed"` and overall `status` to `"failed"`. |
| 36 | |
| 37 | ### Step 1: phase_a_pre_isolation_setup |
| 38 | |
| 39 | **Type:** inline |
| 40 | **Description:** Initialize observation directories and load isolation plans |
| 41 | |
| 42 | ## Execution |
| 43 | Follow these instructions: |
| 44 | |
| 45 | Initialize Phase 4 execution environment: |
| 46 | |
| 47 | 1. Create directory structure: |
| 48 | - {run_dir}/observe/ - for observation reports |
| 49 | - {run_dir}/observe/snapshots/ - for pre-isolation state snapshots |
| 50 | - {run_dir}/observe/logs/ - for execution logs |
| 51 | |
| 52 | 2. Load and validate inputs: |
| 53 | - Read {run_dir}/analysis/isolation_batch_plan.json |
| 54 | - Load all {run_dir}/analysis/isolation_plan_{resource_id}.json files |
| 55 | - Validate schema conformance |
| 56 | |
| 57 | 3. Determine observation period matrix: |
| 58 | - Read environment: {{ environment }} |
| 59 | - For each resource, determine observation_period_days: |
| 60 | * dev/test: 3 days (extend to 90 if quarterly task detected) |
| 61 | * staging: 7 days (extend to 35 if monthly task detected) |
| 62 | * production: 30 days (extend to 365 if annual task detected) |
| 63 | - Calculate observation_end = isolation_executed_at + observation_period_days |
| 64 | |
| 65 | 4. Write {run_dir}/observe/execution_plan.json with: |
| 66 | - batch_count: number of batches |
| 67 | - total_resources: count of all resources |
| 68 | - observation_periods: {resource_id: {start, end, days}} |
| 69 | - execution_started_at: ISO8601 timestamp |
| 70 | |
| 71 | This file is required for subsequent steps. |
| 72 | |
| 73 | |
| 74 | ### Progress Tracking |
| 75 | |
| 76 | After completing this step, update `task_context.json`: |
| 77 | - Set `current_step_id` to `"phase_a_pre_isolation_setup"` |
| 78 | - Set `steps.phase_a_pre_isolation_setup` to `"completed"` |
| 79 | ### Step 2: phase_a_batch_isolation |
| 80 | |
| 81 | **Type:** agent |
| 82 | **Description:** Execute isolation for ALL batches sequentially |
| 83 | |
| 84 | ## Input Files |
| 85 | - `observe/execution_plan.json` (from Step phase_a_pre_isolation_setup, schema: schemas/execution-plan.schema.json) |
| 86 | - `analysis/isolation_plan_{resource_id}.json` |
| 87 | |
| 88 | ## Execution |
| 89 | Launch an independent agent with the following prompt file: |
| 90 | |
| 91 | **Dispatch instruction:** |
| 92 | |
| 93 | IMPORTANT: The batch plan (isolation_batch_plan.json) can contain N batches. |
| 94 | You MUST iterate over ALL batches 1..N sequentially. |
| 95 | |
| 96 | 1. Read batch_count from {run_dir}/analysis/isolation_batch_plan.json |
| 97 | or {run_dir}/observe/execution_plan.json. |
| 98 | |
| 99 | 2. For batch_num in 1..batch_count (SEQUENTIAL, one batch at a time): |
| 100 | a. Identify all resources in batch batch_num from isolation_batch_plan.json. |
| 101 | b. Execute isolation for ALL resources in this batch (can run in PARALLEL |
| 102 | within the batch, but must complete before starting next batch). |
| 103 | c. Follow the per-resource isolation procedure below for each resource. |
| 104 | d. Wait for every resource in this batch to finish (success or failure) |
| 105 | before advancing to batch_num + 1. |
| 106 | |
| 107 | 3. After ALL batches complete, collect all isolation_executed_{resource_id}.json |
| 108 | files and proceed to phase_b_observation_monitoring. |
| 109 | |
| 110 | Per-resource isolation procedure: |
| 111 | |
| 112 | For each resource: |
| 113 | |
| 114 | 1. Pre-isolation snapshot: |
| 115 | - Capture current state (VM: iptables rules, RDS: SG rules, Redis: config, K8s: replicas, etc.) |
| 116 | - Save to {run_dir}/observe/snapshots/{resource_id}_pre_isolation.json |
| 117 | - Include: timestamp, resource_type, isolation_method, current_state |
| 118 | |
| 119 | 2. Execute isolation steps: |
| 120 | - Read isolation_plan_{resource_id}.json |
| 121 | - Execute each isolation_step in sequence |
| 122 | - For each step: SSH exec / cloud API call / kubectl command (per re |