container-superposition 0.1.8 → 0.1.10

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.
Files changed (184) hide show
  1. package/README.md +3 -0
  2. package/dist/tool/cli/args.d.ts.map +1 -1
  3. package/dist/tool/cli/args.js +1 -1
  4. package/dist/tool/cli/args.js.map +1 -1
  5. package/dist/tool/commands/adopt.d.ts.map +1 -1
  6. package/dist/tool/commands/adopt.js +15 -21
  7. package/dist/tool/commands/adopt.js.map +1 -1
  8. package/dist/tool/commands/doctor.d.ts +1 -0
  9. package/dist/tool/commands/doctor.d.ts.map +1 -1
  10. package/dist/tool/commands/doctor.js +1370 -73
  11. package/dist/tool/commands/doctor.js.map +1 -1
  12. package/dist/tool/questionnaire/composer.d.ts +3 -1
  13. package/dist/tool/questionnaire/composer.d.ts.map +1 -1
  14. package/dist/tool/questionnaire/composer.js +273 -20
  15. package/dist/tool/questionnaire/composer.js.map +1 -1
  16. package/dist/tool/questionnaire/presets.d.ts.map +1 -1
  17. package/dist/tool/questionnaire/presets.js +1 -0
  18. package/dist/tool/questionnaire/presets.js.map +1 -1
  19. package/dist/tool/questionnaire/questionnaire.d.ts.map +1 -1
  20. package/dist/tool/questionnaire/questionnaire.js +3 -1
  21. package/dist/tool/questionnaire/questionnaire.js.map +1 -1
  22. package/dist/tool/schema/project-config.d.ts.map +1 -1
  23. package/dist/tool/schema/project-config.js +174 -1
  24. package/dist/tool/schema/project-config.js.map +1 -1
  25. package/dist/tool/schema/types.d.ts +53 -2
  26. package/dist/tool/schema/types.d.ts.map +1 -1
  27. package/docs/README.md +1 -0
  28. package/docs/overlays.md +188 -147
  29. package/docs/specs/001-verbose-plan-graph/spec.md +5 -12
  30. package/docs/specs/002-superposition-config-file/spec.md +5 -12
  31. package/docs/specs/003-mkdocs2-overlay/spec.md +2 -9
  32. package/docs/specs/004-doctor-fix/spec.md +1 -8
  33. package/docs/specs/005-cuda-overlay/spec.md +2 -9
  34. package/docs/specs/006-rocm-overlay/spec.md +3 -10
  35. package/docs/specs/007-target-aware-generation/spec.md +4 -11
  36. package/docs/specs/008-project-file-canonical/spec.md +7 -8
  37. package/docs/specs/009-project-env/spec.md +3 -10
  38. package/docs/specs/010-compose-env-materialization/spec.md +3 -10
  39. package/docs/specs/011-overlay-parameters/spec.md +2 -9
  40. package/docs/specs/012-ollama-cli-overlay/spec.md +47 -0
  41. package/docs/specs/013-doctor-dependency-check/spec.md +250 -0
  42. package/docs/specs/014-doctor-compose-port-cross-validation/spec.md +276 -0
  43. package/docs/specs/015-doctor-env-example-drift/spec.md +248 -0
  44. package/docs/specs/016-doctor-reproducibility-check/spec.md +276 -0
  45. package/docs/specs/017-doctor-dry-run/spec.md +276 -0
  46. package/docs/specs/{007-init-project-file → 018-init-project-file}/spec.md +2 -9
  47. package/docs/specs/019-project-mounts/spec.md +176 -0
  48. package/docs/specs/taxonomy.md +186 -0
  49. package/docs/superposition-yml.md +467 -0
  50. package/overlays/.presets/full-observability.yml +113 -0
  51. package/overlays/.presets/k8s-dev.yml +174 -0
  52. package/overlays/.presets/local-llm.yml +105 -0
  53. package/overlays/.presets/vector-ai.yml +150 -0
  54. package/overlays/.shared/vscode/js-ts-settings.json +19 -0
  55. package/overlays/.shared/vscode/markdown-extensions.json +8 -0
  56. package/overlays/alertmanager/devcontainer.patch.json +0 -1
  57. package/overlays/alertmanager/docker-compose.yml +8 -0
  58. package/overlays/alertmanager/overlay.yml +1 -0
  59. package/overlays/amp/devcontainer.patch.json +4 -1
  60. package/overlays/ansible/README.md +163 -0
  61. package/overlays/ansible/devcontainer.patch.json +14 -0
  62. package/overlays/ansible/overlay.yml +18 -0
  63. package/overlays/argocd/README.md +158 -0
  64. package/overlays/argocd/devcontainer.patch.json +9 -0
  65. package/overlays/argocd/overlay.yml +17 -0
  66. package/overlays/argocd/setup.sh +29 -0
  67. package/overlays/argocd/verify.sh +14 -0
  68. package/overlays/bun/devcontainer.patch.json +1 -10
  69. package/overlays/bun/overlay.yml +8 -1
  70. package/overlays/claude-code/devcontainer.patch.json +6 -1
  71. package/overlays/codex/devcontainer.patch.json +5 -0
  72. package/overlays/comfyui/docker-compose.yml +1 -0
  73. package/overlays/comfyui/overlay.yml +4 -0
  74. package/overlays/commitlint/devcontainer.patch.json +1 -6
  75. package/overlays/docker-sock/overlay.yml +1 -0
  76. package/overlays/dotnet/overlay.yml +4 -1
  77. package/overlays/fuseki/.env.example +5 -0
  78. package/overlays/fuseki/README.md +173 -0
  79. package/overlays/fuseki/devcontainer.patch.json +18 -0
  80. package/overlays/fuseki/docker-compose.yml +29 -0
  81. package/overlays/fuseki/overlay.yml +42 -0
  82. package/overlays/fuseki/verify.sh +58 -0
  83. package/overlays/gemini-cli/devcontainer.patch.json +4 -1
  84. package/overlays/go/overlay.yml +6 -1
  85. package/overlays/grafana/devcontainer.patch.json +0 -1
  86. package/overlays/grafana/docker-compose.yml +8 -2
  87. package/overlays/grafana/overlay.yml +6 -1
  88. package/overlays/jaeger/.env.example +11 -0
  89. package/overlays/jaeger/README.md +33 -4
  90. package/overlays/jaeger/devcontainer.patch.json +9 -1
  91. package/overlays/jaeger/docker-compose.yml +17 -0
  92. package/overlays/jaeger/overlay.yml +1 -12
  93. package/overlays/java/overlay.yml +6 -1
  94. package/overlays/jupyter/docker-compose.yml +1 -0
  95. package/overlays/jupyter/overlay.yml +1 -0
  96. package/overlays/keycloak/devcontainer.patch.json +0 -1
  97. package/overlays/keycloak/docker-compose.yml +1 -0
  98. package/overlays/keycloak/overlay.yml +15 -0
  99. package/overlays/localstack/docker-compose.yml +1 -0
  100. package/overlays/localstack/overlay.yml +19 -1
  101. package/overlays/loki/devcontainer.patch.json +0 -1
  102. package/overlays/loki/docker-compose.yml +8 -0
  103. package/overlays/loki/overlay.yml +1 -0
  104. package/overlays/mailpit/docker-compose.yml +1 -0
  105. package/overlays/mailpit/overlay.yml +1 -0
  106. package/overlays/minio/devcontainer.patch.json +1 -1
  107. package/overlays/minio/docker-compose.yml +1 -0
  108. package/overlays/minio/overlay.yml +23 -2
  109. package/overlays/mkdocs/devcontainer.patch.json +1 -5
  110. package/overlays/mkdocs/overlay.yml +3 -1
  111. package/overlays/mkdocs2/devcontainer.patch.json +1 -5
  112. package/overlays/mkdocs2/overlay.yml +2 -0
  113. package/overlays/mongodb/docker-compose.yml +2 -0
  114. package/overlays/mongodb/overlay.yml +26 -2
  115. package/overlays/mysql/docker-compose.yml +2 -0
  116. package/overlays/mysql/overlay.yml +36 -2
  117. package/overlays/nats/docker-compose.yml +1 -0
  118. package/overlays/nats/overlay.yml +18 -2
  119. package/overlays/nodejs/devcontainer.patch.json +1 -12
  120. package/overlays/nodejs/overlay.yml +8 -1
  121. package/overlays/ollama/README.md +4 -3
  122. package/overlays/ollama/docker-compose.yml +1 -0
  123. package/overlays/ollama/overlay.yml +6 -1
  124. package/overlays/ollama/verify.sh +5 -28
  125. package/overlays/ollama-cli/README.md +90 -0
  126. package/overlays/ollama-cli/devcontainer.patch.json +3 -0
  127. package/overlays/ollama-cli/overlay.yml +19 -0
  128. package/overlays/{ollama → ollama-cli}/setup.sh +7 -10
  129. package/overlays/ollama-cli/verify.sh +49 -0
  130. package/overlays/open-webui/docker-compose.yml +1 -0
  131. package/overlays/open-webui/overlay.yml +8 -1
  132. package/overlays/opencode/devcontainer.patch.json +4 -1
  133. package/overlays/otel-collector/README.md +4 -0
  134. package/overlays/otel-collector/devcontainer.patch.json +4 -1
  135. package/overlays/otel-collector/docker-compose.yml +8 -4
  136. package/overlays/otel-collector/overlay.yml +1 -0
  137. package/overlays/otel-demo-nodejs/devcontainer.patch.json +0 -1
  138. package/overlays/otel-demo-nodejs/docker-compose.yml +1 -0
  139. package/overlays/otel-demo-nodejs/overlay.yml +9 -1
  140. package/overlays/otel-demo-python/devcontainer.patch.json +0 -1
  141. package/overlays/otel-demo-python/docker-compose.yml +1 -0
  142. package/overlays/otel-demo-python/overlay.yml +6 -1
  143. package/overlays/pandoc/README.md +10 -0
  144. package/overlays/pandoc/devcontainer.patch.json +0 -5
  145. package/overlays/pandoc/overlay.yml +2 -0
  146. package/overlays/pandoc/setup.sh +10 -0
  147. package/overlays/pgvector/devcontainer.patch.json +11 -5
  148. package/overlays/pgvector/docker-compose.yml +1 -0
  149. package/overlays/pgvector/overlay.yml +3 -0
  150. package/overlays/playwright/devcontainer.patch.json +0 -5
  151. package/overlays/playwright/overlay.yml +2 -1
  152. package/overlays/postgres/docker-compose.yml +1 -0
  153. package/overlays/postgres/overlay.yml +4 -1
  154. package/overlays/pre-commit/devcontainer.patch.json +1 -7
  155. package/overlays/prometheus/devcontainer.patch.json +0 -1
  156. package/overlays/prometheus/docker-compose.yml +8 -0
  157. package/overlays/prometheus/overlay.yml +1 -0
  158. package/overlays/promtail/devcontainer.patch.json +1 -2
  159. package/overlays/promtail/docker-compose.yml +8 -0
  160. package/overlays/promtail/overlay.yml +1 -0
  161. package/overlays/qdrant/docker-compose.yml +1 -0
  162. package/overlays/qdrant/overlay.yml +5 -1
  163. package/overlays/rabbitmq/docker-compose.yml +1 -0
  164. package/overlays/rabbitmq/overlay.yml +25 -2
  165. package/overlays/redis/docker-compose.yml +7 -0
  166. package/overlays/redis/overlay.yml +15 -1
  167. package/overlays/redpanda/docker-compose.yml +1 -0
  168. package/overlays/redpanda/overlay.yml +15 -3
  169. package/overlays/rocm/overlay.yml +2 -1
  170. package/overlays/rust/overlay.yml +3 -1
  171. package/overlays/sqlserver/docker-compose.yml +1 -0
  172. package/overlays/sqlserver/overlay.yml +17 -0
  173. package/overlays/task/README.md +47 -0
  174. package/overlays/task/devcontainer.patch.json +9 -0
  175. package/overlays/task/overlay.yml +16 -0
  176. package/overlays/task/setup.sh +29 -0
  177. package/overlays/task/verify.sh +14 -0
  178. package/overlays/tempo/devcontainer.patch.json +0 -1
  179. package/overlays/tempo/docker-compose.yml +8 -0
  180. package/overlays/tempo/overlay.yml +1 -0
  181. package/overlays/windsurf-cli/devcontainer.patch.json +4 -1
  182. package/package.json +1 -1
  183. package/tool/schema/config.schema.json +74 -1
  184. package/overlays/.shared/otel/otel-base-config.yaml +0 -30
@@ -1,18 +1,11 @@
1
1
  # Feature Specification: CUDA (NVIDIA GPU) Overlay
2
2
 
3
- **Feature Branch**: `copilot/add-cuda-overlay-for-gpu`
3
+ **Spec ID**: `005-cuda-overlay`
4
4
  **Created**: 2026-03-22
5
5
  **Status**: Final
6
6
  **Input**: Add a `cuda` overlay to enable NVIDIA GPU-accelerated workloads inside a dev container.
7
7
 
8
- ## Review & Approval _(mandatory before implementation)_
9
-
10
- - **Spec Path**: `docs/specs/005-cuda-overlay/spec.md`
11
- - **Commit Status**: Committed
12
- - **Review Status**: Approved
13
- - **Implementation Gate**: No implementation code may begin until this spec is committed and reviewed.
14
-
15
- ## User Scenarios & Testing _(mandatory)_
8
+ ## User Scenarios & Testing
16
9
 
17
10
  ### User Story 1 - GPU passthrough for ML/inference workloads (Priority: P1)
18
11
 
@@ -1,24 +1,17 @@
1
1
  # Feature Specification: ROCm (AMD GPU) Overlay
2
2
 
3
- **Feature Branch**: `copilot/add-rocm-overlay`
3
+ **Spec ID**: `006-rocm-overlay`
4
4
  **Created**: 2026-03-22
5
- **Status**: Accepted
5
+ **Status**: Final
6
6
  **Input**: Add a `rocm` overlay to enable AMD GPU-accelerated workloads inside a dev container.
7
7
 
8
- ## Review & Approval _(mandatory before implementation)_
9
-
10
- - **Spec Path**: `docs/specs/006-rocm-overlay/spec.md`
11
- - **Commit Status**: Committed
12
- - **Review Status**: Approved
13
- - **Implementation Gate**: No implementation code may begin until this spec is committed and reviewed.
14
-
15
8
  ## Overview
16
9
 
17
10
  Add a `rocm` overlay to enable AMD GPU-accelerated workloads inside a dev container using the ROCm open software platform.
18
11
 
19
12
  > **Note:** ROCm-in-container is a supported but more fragile path than CUDA. It depends heavily on the host kernel version, AMD driver stack, specific device support, and container runtime configuration. Treat this as a separate supported profile — not a drop-in equivalent of CUDA.
20
13
 
21
- ## User Scenarios & Testing _(mandatory)_
14
+ ## User Scenarios & Testing
22
15
 
23
16
  ### User Story 1 - AMD GPU passthrough for ML/inference workloads (Priority: P1)
24
17
 
@@ -1,18 +1,11 @@
1
1
  # Feature Specification: Target-Aware Generation
2
2
 
3
- **Feature Branch**: `copilot/feat-target-aware-generation`
4
- **Created**: 2026-03-23
5
- **Status**: Final
3
+ **Spec ID**: `007-target-aware-generation`
4
+ **Created**: 2026-03-23
5
+ **Status**: Final
6
6
  **Input**: Issue [feat] Target-aware generation — produce workspace artifacts and guidance for codespaces, gitpod, and devpod
7
7
 
8
- ## Review & Approval _(mandatory before implementation)_
9
-
10
- - **Spec Path**: `docs/specs/007-target-aware-generation/spec.md`
11
- - **Commit Status**: Committed
12
- - **Review Status**: APPROVED
13
- - **Implementation Gate**: No implementation code may begin until this spec is committed and reviewed.
14
-
15
- ## User Scenarios & Testing _(mandatory)_
8
+ ## User Scenarios & Testing
16
9
 
17
10
  ### User Story 1 — Generate codespaces artifacts (Priority: P1)
18
11
 
@@ -1,11 +1,10 @@
1
- ---
2
- Feature Branch: copilot/make-superposition-yml-canonical-input
3
- Created: 2026-03-26
4
- Status: Implementing
5
- Input: GitHub issue #134
6
- ---
1
+ # Feature Specification: Make superposition.yml the Canonical Input
7
2
 
8
- # Spec: Make superposition.yml the Canonical Input
3
+ **Spec ID**: `008-project-file-canonical`
4
+ **Created**: 2026-03-26
5
+ **Author**: PM Agent
6
+ **Status**: Approved
7
+ **Input**: GitHub issue #134 — make `superposition.yml` the required canonical input for all generation flows
9
8
 
10
9
  ## Overview
11
10
 
@@ -77,7 +76,7 @@ Once the project file is canonical, `doctor` can compare the two files:
77
76
  | Has both (consistent) | None — regen prefers project file | — |
78
77
  | CI using `--from-manifest` | Warning on each run | Switch to `cs migrate` + `regen` |
79
78
 
80
- ## Review & Approval Gate
79
+ ## Notes
81
80
 
82
81
  Implementation proceeds with this spec committed. No further approval required for the
83
82
  behavioral changes listed above.
@@ -1,18 +1,11 @@
1
1
  # Feature Specification: Unified Project-Level Environment Variables
2
2
 
3
- **Feature Branch**: `codex/project-env`
3
+ **Spec ID**: `009-project-env`
4
4
  **Created**: 2026-03-29
5
- **Status**: Implementing
5
+ **Status**: Approved
6
6
  **Input**: User request
7
7
 
8
- ## Review & Approval _(mandatory before implementation)_
9
-
10
- - **Spec Path**: `docs/specs/009-project-env/spec.md`
11
- - **Commit Status**: Committed
12
- - **Review Status**: Pending
13
- - **Implementation Gate**: No implementation code may begin until this spec is committed and reviewed.
14
-
15
- ## User Scenarios & Testing _(mandatory)_
8
+ ## User Scenarios & Testing
16
9
 
17
10
  ### User Story 1 — Define environment variables once for plain stack (Priority: P1)
18
11
 
@@ -1,18 +1,11 @@
1
1
  # Feature Specification: Compose Env Materialization and Env Template Naming
2
2
 
3
- **Feature Branch**: `codex/compose-env-materialization`
3
+ **Spec ID**: `010-compose-env-materialization`
4
4
  **Created**: 2026-03-29
5
- **Status**: Implementing
5
+ **Status**: Approved
6
6
  **Input**: User request
7
7
 
8
- ## Review & Approval _(mandatory before implementation)_
9
-
10
- - **Spec Path**: `docs/specs/010-compose-env-materialization/spec.md`
11
- - **Commit Status**: Committed
12
- - **Review Status**: Pending
13
- - **Implementation Gate**: No implementation code may begin until this spec is committed and reviewed.
14
-
15
- ## User Scenarios & Testing _(mandatory)_
8
+ ## User Scenarios & Testing
16
9
 
17
10
  ### User Story 1 — Compose env values materialize into .devcontainer/.env (Priority: P1)
18
11
 
@@ -1,17 +1,10 @@
1
1
  # Feature Specification: Overlay Parameters with Safe Substitution
2
2
 
3
- **Feature Branch**: `011-overlay-parameters`
3
+ **Spec ID**: `011-overlay-parameters`
4
4
  **Created**: 2026-03-30
5
5
  **Status**: Final
6
6
  **Input**: Issue — Introduce overlay parameters with safe, namespaced substitution — no conflicts with Docker/shell/VS Code
7
7
 
8
- ## Review & Approval _(mandatory before implementation)_
9
-
10
- - **Spec Path**: `docs/specs/011-overlay-parameters/spec.md`
11
- - **Commit Status**: Committed
12
- - **Review Status**: APPROVED
13
- - **Implementation Gate**: No implementation code may begin until this spec is committed and reviewed.
14
-
15
8
  ## Summary
16
9
 
17
10
  Add first-class **parameters** to overlays so users can configure environment-specific values
@@ -203,7 +196,7 @@ Sensitive parameters use masked input. Pre-filled with defaults.
203
196
 
204
197
  ---
205
198
 
206
- ## User Scenarios & Testing _(mandatory)_
199
+ ## User Scenarios & Testing
207
200
 
208
201
  ### User Story 1 — Postgres with custom database name (P1)
209
202
 
@@ -0,0 +1,47 @@
1
+ # Feature Specification: Split Ollama Service and CLI Overlays
2
+
3
+ **Spec ID**: `012-ollama-cli-overlay`
4
+ **Created**: 2026-04-16
5
+ **Status**: Final
6
+ **Input**: Requirement — split current `ollama` overlay into separate service and CLI overlays, with implicit dependency from `ollama` to `ollama-cli`
7
+
8
+ ## Summary
9
+
10
+ Separate Ollama support into two overlays:
11
+
12
+ 1. `ollama` — compose-only Ollama server sidecar
13
+ 2. `ollama-cli` — CLI-only installation that works in plain and compose stacks
14
+
15
+ Selecting `ollama` must automatically include `ollama-cli` via `requires` so existing behavior is preserved.
16
+
17
+ ## Design
18
+
19
+ ### Overlay split
20
+
21
+ - `ollama` remains compose-only and owns service wiring (`docker-compose.yml`, API port, sidecar host env)
22
+ - `ollama-cli` owns CLI installation and CLI verification
23
+ - `ollama` declares `requires: [ollama-cli]`
24
+
25
+ ### User intent supported
26
+
27
+ - Users can choose only `ollama-cli` in plain stacks when Ollama runs elsewhere (for example on host)
28
+ - Users can still choose `ollama` and get server + CLI automatically
29
+
30
+ ## Implementation Scope
31
+
32
+ - Add `overlays/ollama-cli/` with `overlay.yml`, `devcontainer.patch.json`, `setup.sh`, `verify.sh`, `README.md`
33
+ - Update `overlays/ollama/overlay.yml` to require `ollama-cli`
34
+ - Remove CLI installation from `overlays/ollama` and keep service responsibilities there
35
+ - Update tests and changelog entries
36
+
37
+ ## User Scenarios & Testing
38
+
39
+ ### User Story 1 — Plain stack with remote Ollama
40
+
41
+ 1. **Given** a plain stack with `ollama-cli`, **When** generation runs, **Then** the devcontainer contains the `ollama` CLI without requiring a local compose service.
42
+ 2. **Given** `OLLAMA_HOST` is configured to a remote endpoint, **When** users run `ollama list`, **Then** requests target that remote server.
43
+
44
+ ### User Story 2 — Compose stack with local sidecar
45
+
46
+ 1. **Given** a compose stack with `ollama`, **When** generation runs, **Then** `ollama-cli` is auto-added and CLI commands are available in the devcontainer.
47
+ 2. **Given** the compose sidecar is running, **When** verification runs, **Then** the service endpoint is reachable via `http://ollama:11434`.
@@ -0,0 +1,250 @@
1
+ # Feature Specification: Doctor Overlay Dependency Resolution Check
2
+
3
+ **Spec ID**: `013-doctor-dependency-check`
4
+ **Taxonomy**: `CLI-UX`
5
+ **Created**: 2026-04-24
6
+ **Author**: PM Agent
7
+ **Status**: Approved
8
+ **Input**: Feature assessment — `cs doctor` does not validate that selected overlays satisfy their own dependency requirements; missing `requires:` entries are only caught at regen time.
9
+
10
+ ## Problem Statement
11
+
12
+ `cs doctor` checks many things about an existing `.devcontainer/` setup but never validates that
13
+ the overlay set declared in the project file is self-consistent. If a project file includes
14
+ `grafana` but omits the required `prometheus`, the error only surfaces when `cs regen` runs or
15
+ when the user opens the devcontainer. Doctor should catch these problems immediately, with a
16
+ clear message and — where safe — fix them automatically.
17
+
18
+ The same gap applies to `suggests:` (advisory recommendations never surfaced) and to overlays
19
+ listed in the project file that no longer exist in the registry (typos, removed overlays).
20
+
21
+ ## Goals
22
+
23
+ - Detect missing `requires:` overlays between the project file's overlay set and the overlay
24
+ registry before regen or container startup.
25
+ - Detect overlay IDs in the project file that are not present in the overlay registry.
26
+ - Surface `suggests:` recommendations as informational notices (not failures).
27
+ - Allow `doctor --fix` to add missing required overlays to the project file and re-run
28
+ generation.
29
+
30
+ ## Non-Goals
31
+
32
+ - Validating `conflicts:` — conflict detection already happens during composition.
33
+ - Changing the dependency resolution logic in `composer.ts`.
34
+ - Checking transitive suggestions (only direct `suggests:` from selected overlays).
35
+
36
+ ## Design
37
+
38
+ ### Dependency resolution check
39
+
40
+ `checkDependencies(overlaysConfig, workingDir)` loads the project file via `loadProjectConfig()`
41
+ and returns early (empty result) if none exists.
42
+
43
+ For each overlay ID in `selection.overlays`:
44
+
45
+ 1. **Unknown overlay**: overlay ID not in `overlaysConfig.overlays` → `fail` ("Overlay `<id>`
46
+ not found in registry — it may have been removed or misspelled").
47
+ 2. **Missing required overlay**: for each ID in `overlay.requires`, check if the full resolved
48
+ set (project overlays + auto-resolved via `resolveImplicitDependencies`) covers it. If not →
49
+ `fail` ("Overlay `<id>` requires `<dep>` which is not in your project file").
50
+ 3. **Missing suggested overlay**: for each ID in `overlay.suggests`, check if it is present in
51
+ the resolved set. If not → `warn` ("Overlay `<id>` suggests `<dep>` — consider adding it for
52
+ better observability / functionality").
53
+
54
+ The check uses the same resolution helpers used by `composer.ts` so the rules are identical.
55
+
56
+ Pass check message: "`N` overlay(s) selected; all dependencies satisfied."
57
+
58
+ ### Fix action: `dependency-fix`
59
+
60
+ Registered in `REMEDIATION_REGISTRY`:
61
+
62
+ - **Safety class**: `safe-unattended`
63
+ - **Execution kind**: `regeneration`
64
+ - **Planned changes**:
65
+ - "Add missing required overlay(s) to project file"
66
+ - "Regenerate devcontainer configuration from updated project file"
67
+
68
+ `executeDependencyFix(outputPath, overlaysConfig, overlaysDir, workingDir, silent)`:
69
+
70
+ 1. Load project config.
71
+ 2. Identify missing required overlays (same logic as the check).
72
+ 3. Add them to `selection.overlays`.
73
+ 4. Write updated project file with `writeProjectConfig()`.
74
+ 5. Rebuild answers from updated config and call `composeDevContainer()`.
75
+ 6. Re-check: verify no dependency failures remain.
76
+
77
+ Unknown overlay IDs (not in registry) are **not** auto-fixable — marked `manual-only`.
78
+ Suggested overlays are never auto-added — always `not-applicable`.
79
+
80
+ ### DoctorReport changes
81
+
82
+ `DoctorReport` gains a `dependencies: CheckResult[]` field.
83
+ `generateReport()` gains a `dependenciesChecks` parameter.
84
+ `formatAsText()` gains a "Dependencies" section that shows failures and warnings;
85
+ suppresses the section entirely if all pass.
86
+ `reportToFindings()` includes `checksToFindings(report.dependencies, 'manifest', 'full')`.
87
+ `executeFixRun()` calls `checkDependencies()` in the re-check pass.
88
+
89
+ ### Affected files
90
+
91
+ | File | Change |
92
+ | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
93
+ | `tool/commands/doctor.ts` | Add `checkDependencies()`, `executeDependencyFix()`, wire into report infrastructure, `REMEDIATION_REGISTRY`, `PRIORITY` map |
94
+ | `tool/__tests__/commands.test.ts` | Tests for unknown overlay, missing required, suggestion warn, fix action |
95
+ | `CHANGELOG.md` | Entry under `### Added` |
96
+
97
+ ### User-visible behaviour
98
+
99
+ ```
100
+ Dependencies:
101
+ ✗ Overlay grafana requires prometheus which is not in your project file
102
+ → Add prometheus to the overlays: list in .superposition.yml
103
+ → Fixable with --fix flag
104
+ ⚠ Overlay postgres suggests grafana — consider adding it for observability
105
+ ✓ All other overlay dependencies satisfied
106
+ ```
107
+
108
+ ### Backward compatibility
109
+
110
+ No changes to existing generated files or project file format. Purely additive check.
111
+
112
+ ## User Scenarios & Testing
113
+
114
+ ### User Story 1 — Missing required overlay detected and fixed (P1)
115
+
116
+ A developer has `grafana` in their project file but forgot to add `prometheus` (which grafana
117
+ requires). They run `cs doctor` and immediately see the problem instead of discovering it when
118
+ the devcontainer fails to build.
119
+
120
+ **Why this priority**: Missing required overlays cause silent failures at startup. This is the
121
+ most actionable fix doctor can offer — it unblocks the user immediately.
122
+
123
+ **Independent Test**: Write a `.superposition.yml` selecting `grafana` without `prometheus`.
124
+ Run `doctorCommand`. Assert output contains dependency failure mentioning `prometheus`.
125
+
126
+ **Acceptance Scenarios**:
127
+
128
+ 1. **Given** a project file with `overlays: [grafana]`, **When** `cs doctor` runs, **Then** a
129
+ `fail` finding reports "`grafana` requires `prometheus` which is not in your project file".
130
+ 2. **Given** the same setup with `--fix`, **When** doctor runs, **Then** `prometheus` is added
131
+ to the project file and `cs regen` is run automatically; the final check passes.
132
+ 3. **Given** a project file with `overlays: [grafana, prometheus]`, **When** `cs doctor` runs,
133
+ **Then** the dependencies section shows a pass with no failures.
134
+
135
+ ---
136
+
137
+ ### User Story 2 — Unknown overlay ID caught (P2)
138
+
139
+ A developer misspells an overlay ID (`nodjs` instead of `nodejs`) in their project file. Doctor
140
+ catches it immediately rather than letting it silently be ignored during generation.
141
+
142
+ **Why this priority**: Typos in the project file produce no error today — the overlay is simply
143
+ not applied. Doctor should surface this.
144
+
145
+ **Independent Test**: Write a `.superposition.yml` with `overlays: [nodjs]`. Run
146
+ `doctorCommand`. Assert a `fail` finding mentioning `nodjs` not found in registry.
147
+
148
+ **Acceptance Scenarios**:
149
+
150
+ 1. **Given** `overlays: [nodjs]` in project file, **When** `cs doctor` runs, **Then** a `fail`
151
+ finding reports "`nodjs` not found in overlay registry — check for typos".
152
+ 2. **Given** `overlays: [nodejs]`, **When** `cs doctor` runs, **Then** no unknown-overlay
153
+ failure appears.
154
+
155
+ ---
156
+
157
+ ### User Story 3 — Suggestions surfaced as informational (P3)
158
+
159
+ A user has `postgres` selected. The postgres overlay suggests `prometheus` and `grafana` for
160
+ observability. Doctor shows these as soft recommendations, not failures.
161
+
162
+ **Why this priority**: Suggestions are optional by definition; showing them as warnings without
163
+ blocking is a quality-of-life improvement.
164
+
165
+ **Independent Test**: Write a `.superposition.yml` with `overlays: [postgres]` (postgres
166
+ suggests `prometheus`, `grafana`). Run `doctorCommand`. Assert warn-level findings for each
167
+ suggestion, no failures.
168
+
169
+ **Acceptance Scenarios**:
170
+
171
+ 1. **Given** `overlays: [postgres]` (postgres suggests prometheus, grafana), **When** `cs doctor`
172
+ runs, **Then** two `warn` findings appear suggesting prometheus and grafana; no failure.
173
+ 2. **Given** `overlays: [postgres, prometheus, grafana]`, **When** `cs doctor` runs, **Then** no
174
+ suggestion warnings appear for postgres.
175
+
176
+ ---
177
+
178
+ ### Edge Cases
179
+
180
+ - Project file with no overlays: return a single pass ("no overlays selected").
181
+ - Overlay that requires itself: guard against infinite recursion (not expected but safe to handle).
182
+ - `requires:` chain (A requires B which requires C, project has A and C but not B): each missing
183
+ level reported individually.
184
+ - Auto-resolved dependencies already in the manifest but not in the project file: not flagged
185
+ (the resolver adds them automatically; this mirrors drift-check behaviour).
186
+
187
+ ## Requirements
188
+
189
+ ### Functional Requirements
190
+
191
+ - **FR-001**: `checkDependencies()` MUST return `fail` for each overlay in the project file that
192
+ references a non-existent registry ID.
193
+ - **FR-002**: `checkDependencies()` MUST return `fail` for each `requires:` entry of a selected
194
+ overlay that is absent from the resolved overlay set.
195
+ - **FR-003**: `checkDependencies()` MUST return `warn` for each `suggests:` entry of a selected
196
+ overlay that is absent from the resolved overlay set.
197
+ - **FR-004**: `executeDependencyFix()` MUST add missing required overlays to the project file
198
+ and regenerate; it MUST NOT add suggested overlays.
199
+ - **FR-005**: Unknown overlay IDs MUST be marked `manual-only` (no auto-fix).
200
+ - **FR-006**: The check MUST use the same dependency resolution logic as `composer.ts` (no
201
+ duplication; shared helpers).
202
+ - **FR-007**: When no project file is present, the check MUST return an empty result (no noise).
203
+
204
+ ### Key Entities
205
+
206
+ - **ResolvedOverlaySet**: the set of overlay IDs after implicit dependency resolution — used as
207
+ the reference for missing-dep detection.
208
+ - **DependencyFinding**: a `CheckResult` enriched with `sourceOverlay` and `missingOverlay` for
209
+ accurate error messages.
210
+
211
+ ## Dependencies & Impact
212
+
213
+ - **Affected Areas**: `tool/commands/doctor.ts`, `tool/__tests__/commands.test.ts`, `CHANGELOG.md`
214
+ - **Compatibility Impact**: None — purely additive new check category.
215
+ - **Required Documentation Updates**: `CHANGELOG.md`
216
+ - **Verification Plan**: Unit tests in `commands.test.ts`; manual test with a project file that
217
+ has a real missing dependency.
218
+
219
+ ## Success Criteria
220
+
221
+ ### Measurable Outcomes
222
+
223
+ - **SC-001**: `cs doctor` on a project file missing a `requires:` dependency reports a `fail`
224
+ within the Dependencies section within the existing doctor runtime (no perceptible extra
225
+ latency).
226
+ - **SC-002**: `cs doctor --fix` on the same setup produces a project file with the missing overlay
227
+ added and a passing re-check.
228
+ - **SC-003**: `npm test` passes with at least 3 new test cases covering: unknown ID, missing
229
+ required, suggestion warn.
230
+ - **SC-004**: No existing doctor tests regress.
231
+
232
+ ## Open Questions
233
+
234
+ | # | Question | Owner | Resolution |
235
+ | --- | ------------------------------------------------------------------------------- | ----- | ------------------------------------------------ |
236
+ | 1 | Should transitive `suggests` (suggests of suggests) be surfaced or only direct? | PM | Pending — lean toward direct only to avoid noise |
237
+ | 2 | Should `dependency-fix` add suggested overlays when user passes `--suggest`? | PM | Pending |
238
+
239
+ ## Out of Scope
240
+
241
+ - Changing the dependency resolver in `composer.ts`.
242
+ - Validating that `conflicts:` declarations are bidirectional (already covered by `overlay-consistency` agent).
243
+ - Surfacing overlay version constraints (overlays don't have versions today).
244
+
245
+ ## Implementation Notes
246
+
247
+ - `checkDependencies` reads raw YAML as a fallback when `loadProjectConfig` throws for unknown overlay IDs, allowing the check to detect the unknown ID itself.
248
+ - Comparison is against `projectFileSet` (the overlay IDs explicitly listed in the project file), not the resolved set — otherwise transitive auto-resolved dependencies would always appear satisfied.
249
+ - `suggests` mismatches are surfaced as `warn`; `requires` mismatches as `fail` with `fixable: true` and remediation key `dependency-fix`.
250
+ - The Dependencies section in `formatAsText` shows the pass summary alongside any suggestion warnings (i.e., the pass line is shown when there are no `fail` results, even if `warn` results exist).