@docker-doctor/cli 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,13 +28,18 @@ Works with any project that uses Docker.
28
28
  npx @docker-doctor/cli@latest
29
29
  ```
30
30
 
31
- ### 2. Browse rules
31
+ ### 2. Install for agents
32
+
33
+ Once you have an audit, install the skill so your coding agent learns the `/docker-doctor` triage workflow and can fix the issues for you:
32
34
 
33
35
  ```bash
34
- npx @docker-doctor/cli@latest rules list
35
- npx @docker-doctor/cli@latest rules explain docker-doctor/no-root-user
36
+ npx @docker-doctor/cli@latest install
36
37
  ```
37
38
 
39
+ Works with Claude Code, Cursor, Codex, OpenCode, and many more. After an interactive scan finds issues, Docker Doctor also offers to hand them straight to an agent detected on your machine.
40
+
41
+ [Rules reference →](https://docker-doctor.vercel.app/docs/reference/rules)
42
+
38
43
  ### 3. Run in CI
39
44
 
40
45
  Docker Doctor walks you through setting up a GitHub Actions workflow after your first scan:
@@ -45,15 +50,41 @@ npx @docker-doctor/cli@latest
45
50
 
46
51
  ### 4. Configure
47
52
 
48
- ```js
53
+ ```ts
49
54
  // docker-doctor.config.ts
55
+ import type { DockerDoctorConfig } from "@docker-doctor/cli";
56
+
50
57
  export default {
51
58
  rules: {
52
59
  "docker-doctor/no-root-user": "error",
53
60
  },
54
- };
61
+ } satisfies DockerDoctorConfig;
62
+ ```
63
+
64
+ Prefer YAML? `docker-doctor.config.yaml` works too, with editor autocomplete via `# yaml-language-server: $schema=https://docker-doctor.vercel.app/schema.json`. A `defineConfig` helper is also exported for projects with `@docker-doctor/cli` installed — see the [configuration docs](https://docker-doctor.vercel.app/docs/reference/configuration).
65
+
66
+ ## How the score works
67
+
68
+ Every scan produces a 0-100 health score alongside a label (`Excellent 🏆`, `Good ✅`, `Needs Work ⚠️`, `Critical 🚨`).
69
+
70
+ Each diagnostic adds a penalty based on severity:
71
+
72
+ | Severity | Penalty |
73
+ | --------- | ------- |
74
+ | `error` | 10 |
75
+ | `warning` | 4 |
76
+ | `info` | 1 |
77
+
78
+ The penalties are summed, then the score is computed as an asymptotic decay curve rather than a simple subtraction:
79
+
80
+ ```
81
+ score = round(100 * e^(-penalty / K)) // K = 70
55
82
  ```
56
83
 
84
+ A perfect project (no diagnostics) always scores exactly 100. As penalty increases, the score keeps decreasing — it approaches 0 but never gets stuck there, so the score stays meaningful (and can still register improvement) even on projects with a lot of findings. `K = 70` was chosen so a single warning (penalty 4) still lands around 94 — comfortably inside the `Excellent` bucket — while errors and repeated warnings continue to meaningfully erode the score.
85
+
86
+ The label thresholds are unchanged: `>= 90` Excellent, `>= 75` Good, `>= 50` Needs Work, otherwise Critical.
87
+
57
88
  ## API
58
89
 
59
90
  ```ts