Docker Entropy Ops
Overview
Containers are thermodynamic systems: CPU is energy, memory is state, disk is storage, and network is exchange. This skill applies an entropy lens to Docker fleet health so agents distinguish reversible, diagnostic actions from irreversible, dangerous ones. The goal is never to memorize commands — it is to read the thermodynamic state of the fleet and choose the narrowest safe intervention.
arifOS-ACT Embedding
Before using this skill on any mutating, irreversible, or high-blast-radius task:
- ART — Attune (what is the real task?), Recognize (what class of power?), Test (fit · authority · evidence · blast · reversible).
- Kernel — Route to arifOS for F1–F13 judgment if action class is Maker/Messenger/Mutator/Destroyer/Sovereign.
- ACT — Apply narrow, Constrain scope, Trace witness, STOP before corruption.
- Receipt — Leave evidence of what changed, why, and under whose authority.
When to Use
- A Docker container or compose stack appears unhealthy, restarting, or resource-starved.
- Disk pressure, memory pressure, or CPU saturation is suspected on the VPS.
- You need to decide whether to restart, prune, inspect logs, or escalate.
- The task is limited to container lifecycle, logs, health, and resource observation.
When NOT to Use
- Do not use for non-Docker services (systemd-native, bare-metal processes).
- Do not use for Kubernetes or Swarm orchestration (not deployed).
- Do not use for Docker image authoring, Dockerfile creation, or CI/CD pipeline configuration.
- Do not use as authority to run destructive commands without 888 HOLD.
Inputs
| Input |
Required |
Description |
| container/service name |
no |
Target container or compose service |
| symptom |
yes |
What is wrong (restart loop, disk full, slow, etc.) |
| compose file path |
no |
Default /root/compose/docker-compose.yml |
| prior prune history |
no |
When was the last docker system prune? |
Procedure
Step 1: Read Fleet Entropy
Run these in order before any intervention:
docker ps — what is running, dead, or restarting?
docker stats --no-stream — who is consuming CPU/memory?
docker system df — how much disk entropy (images, volumes, build cache) has accumulated?
docker compose ps and docker compose config if a compose stack is involved.
Step 2: Interpret Signal Priority
Rank findings in this order:
- Container health status (Up vs Restarting vs Exited)
- Memory pressure (approaching limit)
- Disk entropy (dangling images, volumes, build cache)
- CPU saturation (sustained >80%)
- Log anomalies (error rate spikes)
Step 3: Choose the Intervention Class
Safe / reversible — proceed with witness:
docker compose config (validate, no mutation)
docker compose ps (state inspection)
docker logs --tail=N <service> (observation)
docker compose restart <service> (reversible)
docker compose up -d <service> (restore known state)
Dangerous / irreversible — 888 HOLD required:
docker system prune -af --volumes (irreversible disk purge)
docker rm -f <container> (data loss risk)
docker volume rm <volume> (permanent data destruction)
docker rmi <image> when the image is actively used
Step 4: Apply Uncertainty Protocol
- Container is Restarting → read logs before restarting again.
- Disk usage >85% → diagnose before pruning.
- Unsure whether a volume is in use → inspect; do not delete.
- Service unhealthy but cause unclear → 888 HOLD.
- Never prune without first running
docker system df.
Allowed Tools
| Tool / Command |
Purpose |
docker ps |
Fleet state snapshot |
docker stats --no-stream |
Resource consumption |
docker system df |
Disk entropy inventory |
docker logs --tail=N <service> |
Diagnostic observation |
docker compose ps |
Compose stack state |
docker compose config |
Validate compose configuration |
docker compose restart <service> |
Reversible service restart |
docker compose up -d <service> |
Restore known-good state |
Forbidden Actions
- NEVER run
docker system prune -af as a first response to any problem (panic pruning).
- NEVER restart a container without reading its logs first.
- NEVER assume "container is Up" means "container is healthy".
- NEVER ignore disk entropy until it causes system failure.
- NEVER delete volumes without verifying they contain no critical data.
- NEVER run prune without human confirmation (F1 violation).
- Escalate to arifOS 888_JUDGE before any destructive action.
Output Format
## Skill Result: docker-entropy-ops
### Summary
One-paragraph summary of fleet thermodynamic state and chosen intervention.
### Evidence
- Container state: <running / restarting / exited>
- Resource pressure: <CPU / memory / disk findings>
- Disk entropy: <docker system df output>
- Log anomalies: <yes/no with snippet>
### Recommendations
- Safe reversible action, OR
- 888 HOLD with reason and proposed next step
### Escalations
- None / <list>
Escalation Path
| Condition |
Escalate To |
Method |
| Destructive or irreversible Docker action |
arifOS 888_JUDGE + Arif |
888 HOLD |
| Data-loss risk (volume/container removal) |
arifOS 888_JUDGE |
verdict_request |
| Scope creep into systemd/K8s/Dockerfile work |
STOP; route to correct skill |
A2A message |
| Root cause unclear after diagnosis |
arifOS 888_JUDGE |
hold with reason |
Skill imported from /root/.claude/skills/docker-thermodynamics.md — AAA Skill Library v1.0.0
1---2name: forge-docker-entropy3description: Thermodynamic reasoning lens for container fleet health, resource pressure, and safe/dangerous intervention boundaries.4---56# Docker Entropy Ops78## Overview910Containers are thermodynamic systems: CPU is energy, memory is state, disk is storage, and network is exchange. This skill applies an entropy lens to Docker fleet health so agents distinguish reversible, diagnostic actions from irreversible, dangerous ones. The goal is never to memorize commands — it is to read the thermodynamic state of the fleet and choose the narrowest safe intervention.1112## arifOS-ACT Embedding1314Before using this skill on any mutating, irreversible, or high-blast-radius task:151. **ART** — Attune (what is the real task?), Recognize (what class of power?), Test (fit · authority · evidence · blast · reversible).162. **Kernel** — Route to arifOS for F1–F13 judgment if action class is Maker/Messenger/Mutator/Destroyer/Sovereign.173. **ACT** — Apply narrow, Constrain scope, Trace witness, STOP before corruption.184. **Receipt** — Leave evidence of what changed, why, and under whose authority.1920## When to Use2122- A Docker container or compose stack appears unhealthy, restarting, or resource-starved.23- Disk pressure, memory pressure, or CPU saturation is suspected on the VPS.24- You need to decide whether to restart, prune, inspect logs, or escalate.25- The task is limited to container lifecycle, logs, health, and resource observation.2627## When NOT to Use2829- **Do not use** for non-Docker services (systemd-native, bare-metal processes).30- **Do not use** for Kubernetes or Swarm orchestration (not deployed).31- **Do not use** for Docker image authoring, Dockerfile creation, or CI/CD pipeline configuration.32- **Do not use** as authority to run destructive commands without 888 HOLD.3334## Inputs3536| Input | Required | Description |37|-------|----------|-------------|38| container/service name | no | Target container or compose service |39| symptom | yes | What is wrong (restart loop, disk full, slow, etc.) |40| compose file path | no | Default `/root/compose/docker-compose.yml` |41| prior prune history | no | When was the last `docker system prune`? |4243## Procedure4445### Step 1: Read Fleet Entropy4647Run these in order before any intervention:48491. `docker ps` — what is running, dead, or restarting?502. `docker stats --no-stream` — who is consuming CPU/memory?513. `docker system df` — how much disk entropy (images, volumes, build cache) has accumulated?524. `docker compose ps` and `docker compose config` if a compose stack is involved.5354### Step 2: Interpret Signal Priority5556Rank findings in this order:57581. Container health status (Up vs Restarting vs Exited)592. Memory pressure (approaching limit)603. Disk entropy (dangling images, volumes, build cache)614. CPU saturation (sustained >80%)625. Log anomalies (error rate spikes)6364### Step 3: Choose the Intervention Class6566**Safe / reversible — proceed with witness:**67- `docker compose config` (validate, no mutation)68- `docker compose ps` (state inspection)69- `docker logs --tail=N <service>` (observation)70- `docker compose restart <service>` (reversible)71- `docker compose up -d <service>` (restore known state)7273**Dangerous / irreversible — 888 HOLD required:**74- `docker system prune -af --volumes` (irreversible disk purge)75- `docker rm -f <container>` (data loss risk)76- `docker volume rm <volume>` (permanent data destruction)77- `docker rmi <image>` when the image is actively used7879### Step 4: Apply Uncertainty Protocol8081- Container is Restarting → read logs before restarting again.82- Disk usage >85% → diagnose before pruning.83- Unsure whether a volume is in use → inspect; do not delete.84- Service unhealthy but cause unclear → 888 HOLD.85- Never prune without first running `docker system df`.8687## Allowed Tools8889| Tool / Command | Purpose |90|----------------|---------|91| `docker ps` | Fleet state snapshot |92| `docker stats --no-stream` | Resource consumption |93| `docker system df` | Disk entropy inventory |94| `docker logs --tail=N <service>` | Diagnostic observation |95| `docker compose ps` | Compose stack state |96| `docker compose config` | Validate compose configuration |97| `docker compose restart <service>` | Reversible service restart |98| `docker compose up -d <service>` | Restore known-good state |99100## Forbidden Actions101102- **NEVER** run `docker system prune -af` as a first response to any problem (panic pruning).103- **NEVER** restart a container without reading its logs first.104- **NEVER** assume "container is Up" means "container is healthy".105- **NEVER** ignore disk entropy until it causes system failure.106- **NEVER** delete volumes without verifying they contain no critical data.107- **NEVER** run prune without human confirmation (F1 violation).108- Escalate to **arifOS 888_JUDGE** before any destructive action.109110## Output Format111112```113## Skill Result: docker-entropy-ops114115### Summary116One-paragraph summary of fleet thermodynamic state and chosen intervention.117118### Evidence119- Container state: <running / restarting / exited>120- Resource pressure: <CPU / memory / disk findings>121- Disk entropy: <docker system df output>122- Log anomalies: <yes/no with snippet>123124### Recommendations125- Safe reversible action, OR126- 888 HOLD with reason and proposed next step127128### Escalations129- None / <list>130```131132## Escalation Path133134| Condition | Escalate To | Method |135|-----------|-------------|--------|136| Destructive or irreversible Docker action | arifOS 888_JUDGE + Arif | 888 HOLD |137| Data-loss risk (volume/container removal) | arifOS 888_JUDGE | verdict_request |138| Scope creep into systemd/K8s/Dockerfile work | STOP; route to correct skill | A2A message |139| Root cause unclear after diagnosis | arifOS 888_JUDGE | hold with reason |140141---142143*Skill imported from `/root/.claude/skills/docker-thermodynamics.md` — AAA Skill Library v1.0.0*