container-superposition 0.1.4 → 0.1.6

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 (98) hide show
  1. package/README.md +74 -1370
  2. package/dist/scripts/init.js +350 -185
  3. package/dist/scripts/init.js.map +1 -1
  4. package/dist/tool/commands/adopt.d.ts +63 -0
  5. package/dist/tool/commands/adopt.d.ts.map +1 -0
  6. package/dist/tool/commands/adopt.js +1104 -0
  7. package/dist/tool/commands/adopt.js.map +1 -0
  8. package/dist/tool/commands/hash.d.ts +36 -0
  9. package/dist/tool/commands/hash.d.ts.map +1 -0
  10. package/dist/tool/commands/hash.js +242 -0
  11. package/dist/tool/commands/hash.js.map +1 -0
  12. package/dist/tool/commands/plan.d.ts +2 -0
  13. package/dist/tool/commands/plan.d.ts.map +1 -1
  14. package/dist/tool/commands/plan.js +262 -42
  15. package/dist/tool/commands/plan.js.map +1 -1
  16. package/dist/tool/schema/project-config.d.ts +17 -0
  17. package/dist/tool/schema/project-config.d.ts.map +1 -0
  18. package/dist/tool/schema/project-config.js +441 -0
  19. package/dist/tool/schema/project-config.js.map +1 -0
  20. package/dist/tool/schema/types.d.ts +39 -1
  21. package/dist/tool/schema/types.d.ts.map +1 -1
  22. package/dist/tool/utils/backup.d.ts +23 -0
  23. package/dist/tool/utils/backup.d.ts.map +1 -0
  24. package/dist/tool/utils/backup.js +123 -0
  25. package/dist/tool/utils/backup.js.map +1 -0
  26. package/docs/README.md +12 -2
  27. package/docs/adopt.md +202 -0
  28. package/docs/custom-patches.md +1 -1
  29. package/docs/discovery-commands.md +55 -3
  30. package/docs/examples.md +40 -6
  31. package/docs/filesystem-contract.md +58 -0
  32. package/docs/hash.md +183 -0
  33. package/docs/minimal-and-editor.md +1 -1
  34. package/docs/overlays.md +70 -0
  35. package/docs/presets-architecture.md +1 -1
  36. package/docs/presets.md +1 -1
  37. package/docs/publishing.md +36 -23
  38. package/docs/security.md +43 -0
  39. package/docs/specs/001-verbose-plan-graph/checklists/requirements.md +36 -0
  40. package/docs/specs/001-verbose-plan-graph/contracts/plan-verbose-output.md +96 -0
  41. package/docs/specs/001-verbose-plan-graph/data-model.md +111 -0
  42. package/docs/specs/001-verbose-plan-graph/plan.md +127 -0
  43. package/docs/specs/001-verbose-plan-graph/quickstart.md +106 -0
  44. package/docs/specs/001-verbose-plan-graph/research.md +100 -0
  45. package/docs/specs/001-verbose-plan-graph/spec.md +128 -0
  46. package/docs/specs/001-verbose-plan-graph/tasks.md +223 -0
  47. package/docs/specs/002-superposition-config-file/checklists/requirements.md +36 -0
  48. package/docs/specs/002-superposition-config-file/contracts/init-project-config.md +98 -0
  49. package/docs/specs/002-superposition-config-file/data-model.md +126 -0
  50. package/docs/specs/002-superposition-config-file/plan.md +213 -0
  51. package/docs/specs/002-superposition-config-file/quickstart.md +140 -0
  52. package/docs/specs/002-superposition-config-file/research.md +144 -0
  53. package/docs/specs/002-superposition-config-file/spec.md +136 -0
  54. package/docs/specs/002-superposition-config-file/tasks.md +215 -0
  55. package/docs/team-workflow.md +33 -1
  56. package/docs/workflows.md +139 -0
  57. package/features/cross-distro-packages/README.md +18 -0
  58. package/features/cross-distro-packages/devcontainer-feature.json +3 -3
  59. package/features/cross-distro-packages/install.sh +49 -7
  60. package/overlays/.presets/sdd.yml +84 -0
  61. package/overlays/README.md +7 -1
  62. package/overlays/amp/README.md +70 -0
  63. package/overlays/amp/devcontainer.patch.json +3 -0
  64. package/overlays/amp/overlay.yml +15 -0
  65. package/overlays/amp/setup.sh +21 -0
  66. package/overlays/amp/verify.sh +21 -0
  67. package/overlays/claude-code/README.md +83 -0
  68. package/overlays/claude-code/devcontainer.patch.json +3 -0
  69. package/overlays/claude-code/overlay.yml +15 -0
  70. package/overlays/claude-code/setup.sh +21 -0
  71. package/overlays/claude-code/verify.sh +21 -0
  72. package/overlays/gemini-cli/README.md +77 -0
  73. package/overlays/gemini-cli/devcontainer.patch.json +3 -0
  74. package/overlays/gemini-cli/overlay.yml +15 -0
  75. package/overlays/gemini-cli/setup.sh +21 -0
  76. package/overlays/gemini-cli/verify.sh +21 -0
  77. package/overlays/opencode/README.md +76 -0
  78. package/overlays/opencode/devcontainer.patch.json +3 -0
  79. package/overlays/opencode/overlay.yml +14 -0
  80. package/overlays/opencode/setup.sh +21 -0
  81. package/overlays/opencode/verify.sh +21 -0
  82. package/overlays/pandoc/README.md +279 -0
  83. package/overlays/pandoc/devcontainer.patch.json +14 -0
  84. package/overlays/pandoc/overlay.yml +19 -0
  85. package/overlays/pandoc/setup.sh +94 -0
  86. package/overlays/pandoc/verify.sh +13 -0
  87. package/overlays/spec-kit/README.md +181 -0
  88. package/overlays/spec-kit/devcontainer.patch.json +6 -0
  89. package/overlays/spec-kit/overlay.yml +19 -0
  90. package/overlays/spec-kit/setup.sh +45 -0
  91. package/overlays/spec-kit/verify.sh +33 -0
  92. package/overlays/windsurf-cli/README.md +69 -0
  93. package/overlays/windsurf-cli/devcontainer.patch.json +3 -0
  94. package/overlays/windsurf-cli/overlay.yml +15 -0
  95. package/overlays/windsurf-cli/setup.sh +21 -0
  96. package/overlays/windsurf-cli/verify.sh +21 -0
  97. package/package.json +1 -1
  98. package/tool/schema/config.schema.json +138 -9
package/docs/hash.md ADDED
@@ -0,0 +1,183 @@
1
+ # Hash Command
2
+
3
+ The `hash` command produces a stable, deterministic fingerprint for a devcontainer configuration.
4
+ It lets you verify that two environments are equivalent, detect drift in CI, and commit a reproducible
5
+ stamp alongside your `superposition.json` manifest.
6
+
7
+ ## Overview
8
+
9
+ ```bash
10
+ # From CLI options
11
+ npx container-superposition hash --stack compose --overlays dotnet,postgres,redis
12
+
13
+ # Reading from an existing manifest (auto-discovers superposition.json)
14
+ npx container-superposition hash
15
+
16
+ # Machine-readable output
17
+ npx container-superposition hash --stack compose --overlays dotnet,postgres,redis --json
18
+
19
+ # Write full hash to .devcontainer/superposition.hash
20
+ npx container-superposition hash --write
21
+ ```
22
+
23
+ ## What Is Hashed
24
+
25
+ The fingerprint is a SHA-256 digest of a canonical JSON object with the following fields:
26
+
27
+ | Field | Source | Notes |
28
+ | ---------- | --------------------------------------------- | ------------------------------------------------------ |
29
+ | `stack` | `--stack` flag or manifest `baseTemplate` | `plain` or `compose` |
30
+ | `overlays` | Resolved overlay list (alphabetically sorted) | Includes auto-resolved dependencies |
31
+ | `preset` | `--preset` flag or manifest `preset` | `null` when no preset |
32
+ | `base` | `--base` flag or manifest `baseImage` | e.g. `bookworm`, `alpine` |
33
+ | `tool` | Tool version (major.minor only) | Stable across patch releases; truncated before hashing |
34
+
35
+ Keys in the canonical object are sorted alphabetically and the overlay list is sorted before hashing,
36
+ so the result is identical regardless of the order overlays are provided.
37
+
38
+ ## Output
39
+
40
+ ### Text Output (default)
41
+
42
+ ```
43
+ ╭ Environment Fingerprint ──────────────────────────╮
44
+ │ │
45
+ │ stack compose │
46
+ │ overlays dotnet, postgres, redis │
47
+ │ preset (none) │
48
+ │ base bookworm │
49
+ │ tool 0.1.3 │
50
+ │ │
51
+ │ hash 53ed972d │
52
+ │ │
53
+ ╰───────────────────────────────────────────────────╯
54
+ ```
55
+
56
+ Auto-resolved dependencies are shown with an `(auto)` label:
57
+
58
+ ```
59
+ overlays grafana, prometheus (auto)
60
+ ```
61
+
62
+ ### JSON Output (`--json`)
63
+
64
+ ```json
65
+ {
66
+ "stack": "compose",
67
+ "overlays": ["dotnet", "postgres", "redis"],
68
+ "preset": null,
69
+ "base": "bookworm",
70
+ "tool": "0.1.3",
71
+ "hash": "53ed972d",
72
+ "hashFull": "53ed972da2ba0712ae15b4003aa46234e7eeba2e977e7a397453740202ebbea4"
73
+ }
74
+ ```
75
+
76
+ - `hash` — first 8 hex characters, suitable for display and badges
77
+ - `hashFull` — full 64-character SHA-256 hex digest, recommended for CI comparisons
78
+
79
+ ## Options
80
+
81
+ | Option | Description |
82
+ | --------------------- | -------------------------------------------------- |
83
+ | `--stack <type>` | Base template: `plain` or `compose` |
84
+ | `--overlays <list>` | Comma-separated overlay IDs |
85
+ | `--preset <id>` | Preset ID (optional, reflected in hash) |
86
+ | `--base <image>` | Base image/distro (e.g. `bookworm`, `alpine`) |
87
+ | `--manifest <path>` | Path to a specific `superposition.json` |
88
+ | `-o, --output <path>` | Directory to write hash file (used with `--write`) |
89
+ | `--write` | Write hash to `.devcontainer/superposition.hash` |
90
+ | `--json` | Output as JSON for scripting |
91
+
92
+ When `--stack`/`--overlays` are omitted the command searches for `superposition.json` in:
93
+
94
+ 1. Current directory (`superposition.json`)
95
+ 2. `.devcontainer/superposition.json`
96
+ 3. Parent directory (`../superposition.json`)
97
+
98
+ ## The `--write` Flag
99
+
100
+ ```bash
101
+ npx container-superposition hash --write
102
+ ```
103
+
104
+ Writes the **full** 64-character hash to `.devcontainer/superposition.hash` (one line, no trailing
105
+ whitespace). Commit this file alongside `superposition.json`:
106
+
107
+ ```
108
+ .devcontainer/
109
+ ├── devcontainer.json
110
+ ├── superposition.json
111
+ └── superposition.hash ← commit this
112
+ ```
113
+
114
+ Use a custom output directory with `-o`:
115
+
116
+ ```bash
117
+ npx container-superposition hash --write -o ./infra/.devcontainer
118
+ ```
119
+
120
+ ## CI Drift Detection
121
+
122
+ Detect when the environment has changed since the last commit:
123
+
124
+ ```yaml
125
+ - name: Verify environment fingerprint
126
+ run: |
127
+ EXPECTED=$(cat .devcontainer/superposition.hash)
128
+ ACTUAL=$(npx container-superposition hash --json | jq -r .hashFull)
129
+ [ "$EXPECTED" = "$ACTUAL" ] || (echo "Environment drift detected" && exit 1)
130
+ ```
131
+
132
+ Or using the short hash stored in a badge/README:
133
+
134
+ ```yaml
135
+ - name: Verify short fingerprint
136
+ run: |
137
+ EXPECTED="53ed972d"
138
+ ACTUAL=$(npx container-superposition hash --json | jq -r .hash)
139
+ [ "$EXPECTED" = "$ACTUAL" ] || (echo "Environment drift detected" && exit 1)
140
+ ```
141
+
142
+ ## Stability Guarantees
143
+
144
+ - **Same inputs → same hash** — guaranteed for any given tool version series
145
+ - **Overlay order is irrelevant** — `postgres,redis` hashes identically to `redis,postgres`
146
+ - **Dependencies are included** — auto-resolved dependencies affect the hash (as they affect the environment)
147
+ - **Patch versions are ignored** — `0.1.3` and `0.1.99` produce the same hash; `0.2.0` does not
148
+ - **Hash changes when any input changes** — stack, overlays, preset, base image, or minor/major tool version
149
+
150
+ ## Examples
151
+
152
+ ### Fingerprint a Standard Web API Stack
153
+
154
+ ```bash
155
+ npx container-superposition hash \
156
+ --stack compose \
157
+ --overlays nodejs,postgres,redis
158
+ ```
159
+
160
+ ### Read from Manifest and Write Hash File
161
+
162
+ ```bash
163
+ # Run from the project root (manifest at .devcontainer/superposition.json)
164
+ npx container-superposition hash --write
165
+ ```
166
+
167
+ ### Compare Two Configurations
168
+
169
+ ```bash
170
+ # Project A
171
+ HASH_A=$(npx container-superposition hash --stack compose --overlays nodejs,postgres --json | jq -r .hash)
172
+
173
+ # Project B
174
+ HASH_B=$(npx container-superposition hash --manifest ./project-b/.devcontainer/superposition.json --json | jq -r .hash)
175
+
176
+ [ "$HASH_A" = "$HASH_B" ] && echo "Environments are equivalent" || echo "Environments differ"
177
+ ```
178
+
179
+ ## Related Commands
180
+
181
+ - [`plan`](discovery-commands.md#plan-command) — Preview what will be generated
182
+ - [`list`](discovery-commands.md#list-command) — Browse available overlays
183
+ - [`explain`](discovery-commands.md#explain-command) — Deep dive into a specific overlay
@@ -243,7 +243,7 @@ Both settings are stored in `superposition.json`:
243
243
 
244
244
  ```json
245
245
  {
246
- "version": "0.1.0",
246
+ "version": "X.Y.Z",
247
247
  "generated": "2026-02-13T09:00:00.000Z",
248
248
  "minimal": true,
249
249
  "editor": "none",
package/docs/overlays.md CHANGED
@@ -442,6 +442,46 @@ Infrastructure as Code with HCL (includes tflint)
442
442
 
443
443
  ## Dev Tool Overlays
444
444
 
445
+ ### Spec Kit (SDD) (`spec-kit`)
446
+
447
+ Specify CLI for Spec-Driven Development with any AI coding agent
448
+
449
+ | Property | Value |
450
+ | ------------ | -------------------------------------------------------- |
451
+ | **Category** | dev |
452
+ | **Suggests** | `python`, `codex` |
453
+ | **Tags** | `dev`, `ai`, `sdd`, `spec-driven`, `specify`, `spec-kit` |
454
+
455
+ ### Pandoc PDF (`pandoc`)
456
+
457
+ Pandoc with XeLaTeX, Mermaid diagrams, and quality fonts for Markdown-to-PDF export
458
+
459
+ | Property | Value |
460
+ | ------------ | -------------------------------------------------------------- |
461
+ | **Category** | dev |
462
+ | **Suggests** | `nodejs` |
463
+ | **Tags** | `dev`, `pandoc`, `pdf`, `latex`, `markdown`, `docs`, `mermaid` |
464
+
465
+ ### Amp (`amp`)
466
+
467
+ Sourcegraph Amp CLI for AI-powered code generation and assistance
468
+
469
+ | Property | Value |
470
+ | ------------ | --------------------------------- |
471
+ | **Category** | dev |
472
+ | **Requires** | `nodejs` |
473
+ | **Tags** | `dev`, `ai`, `amp`, `sourcegraph` |
474
+
475
+ ### Claude Code (`claude-code`)
476
+
477
+ Anthropic Claude Code CLI for AI-powered development assistance
478
+
479
+ | Property | Value |
480
+ | ------------ | ---------------------------------- |
481
+ | **Category** | dev |
482
+ | **Requires** | `nodejs` |
483
+ | **Tags** | `dev`, `ai`, `claude`, `anthropic` |
484
+
445
485
  ### Cloudflared (`cloudflared`)
446
486
 
447
487
  Cloudflare Tunnel for securely exposing local services to the internet
@@ -502,6 +542,16 @@ Isolated Docker daemon inside container (portable, works in Codespaces)
502
542
  | **Conflicts** | `docker-sock` |
503
543
  | **Tags** | `dev`, `docker` |
504
544
 
545
+ ### Gemini CLI (`gemini-cli`)
546
+
547
+ Google Gemini CLI for AI-powered development assistance
548
+
549
+ | Property | Value |
550
+ | ------------ | ------------------------------- |
551
+ | **Category** | dev |
552
+ | **Requires** | `nodejs` |
553
+ | **Tags** | `dev`, `ai`, `gemini`, `google` |
554
+
505
555
  ### Git Helpers (`git-helpers`)
506
556
 
507
557
  Git LFS, GitHub CLI, GPG/SSH support for secure Git operations
@@ -582,6 +632,16 @@ OpenAPI/Swagger tooling for API development and documentation
582
632
  | **Suggests** | `nodejs` |
583
633
  | **Tags** | `dev`, `openapi`, `swagger`, `api`, `documentation` |
584
634
 
635
+ ### opencode (`opencode`)
636
+
637
+ opencode AI coding agent for terminal-based development assistance
638
+
639
+ | Property | Value |
640
+ | ------------ | ----------------------- |
641
+ | **Category** | dev |
642
+ | **Requires** | `nodejs` |
643
+ | **Tags** | `dev`, `ai`, `opencode` |
644
+
585
645
  ### Playwright (`playwright`)
586
646
 
587
647
  Browser automation and testing framework
@@ -614,6 +674,16 @@ Live update and orchestration for Kubernetes development
614
674
  | **Tags** | `dev`, `kubernetes`, `k8s`, `development`, `live-reload` |
615
675
  | **Ports** | 10350 |
616
676
 
677
+ ### Windsurf CLI (`windsurf-cli`)
678
+
679
+ Codeium Windsurf CLI for AI-powered development assistance
680
+
681
+ | Property | Value |
682
+ | ------------ | ---------------------------------- |
683
+ | **Category** | dev |
684
+ | **Requires** | `nodejs` |
685
+ | **Tags** | `dev`, `ai`, `windsurf`, `codeium` |
686
+
617
687
  ## Dependency Model
618
688
 
619
689
  ### Dependency Types
@@ -213,7 +213,7 @@ async function applyGlueConfig(glueConfig: PresetGlueConfig, envPath: string, ou
213
213
 
214
214
  ```json
215
215
  {
216
- "version": "0.1.0",
216
+ "version": "X.Y.Z",
217
217
  "generatedAt": "2026-02-08T10:00:00Z",
218
218
  "baseTemplate": "compose",
219
219
 
package/docs/presets.md CHANGED
@@ -261,7 +261,7 @@ Presets are tracked in `superposition.json`:
261
261
 
262
262
  ```json
263
263
  {
264
- "version": "0.1.0",
264
+ "version": "X.Y.Z",
265
265
  "baseTemplate": "compose",
266
266
  "preset": "web-api",
267
267
  "presetChoices": {
@@ -5,9 +5,9 @@ This guide explains how to publish `container-superposition` to npm, making it a
5
5
  ## Package Overview
6
6
 
7
7
  **Package Name:** `container-superposition`
8
- **Current Version:** `0.1.0`
9
- **Size:** ~327 KB (compressed), 1.2 MB (unpacked)
10
- **Files:** 327 files
8
+ **Current Version:** See `package.json`
9
+ **Size:** Varies by release (use `npm pack --dry-run`)
10
+ **Files:** Varies by release
11
11
  **Entry Point:** `dist/scripts/init.js`
12
12
 
13
13
  **Available Commands:**
@@ -23,33 +23,45 @@ Publishing is **automated via GitHub Actions** when a new release is created.
23
23
 
24
24
  ### Automated Publishing (Recommended)
25
25
 
26
- 1. **Update version in package.json:**
26
+ 1. **Update CHANGELOG.md** with release notes
27
27
 
28
- ```bash
29
- npm version patch # 0.1.0 → 0.1.1 (bug fixes)
30
- npm version minor # 0.1.0 → 0.2.0 (new features)
31
- npm version major # 0.1.0 → 1.0.0 (breaking changes)
32
- ```
33
-
34
- 2. **Update CHANGELOG.md** with release notes
35
-
36
- 3. **Commit and push changes:**
28
+ 2. **Commit and push changes:**
37
29
 
38
30
  ```bash
39
- git add package.json package-lock.json CHANGELOG.md
40
- git commit -m "chore: bump version to X.Y.Z"
31
+ git add CHANGELOG.md
32
+ git commit -m "docs: update changelog for X.Y.Z"
41
33
  git push
42
34
  ```
43
35
 
44
- 4. **Create GitHub Release:**
36
+ 3. **Create GitHub Release:**
45
37
  - Go to https://github.com/veggerby/container-superposition/releases/new
46
38
  - Tag: `vX.Y.Z` (e.g., `v0.1.1`)
47
- - Title: `vX.Y.Z`
48
- - Description: Copy from CHANGELOG.md
39
+ - Title: `Version X.Y.Z` (e.g., `Version 0.1.1`)
40
+ - Description: Copy the full release section from `CHANGELOG.md`, including the header line
41
+ - Example (include all subsections like `### Added`, `### Changed`, `### Fixed`):
42
+
43
+ ```markdown
44
+ ## [0.1.5] - 2026-03-01
45
+
46
+ ### Added
47
+
48
+ - **Foo overlay** — Adds Foo service for local dev
49
+ - **Bar CLI helpers** — Convenience scripts for common tasks
50
+
51
+ ### Changed
52
+
53
+ - **Template defaults** — Compose stack now includes a healthcheck by default
54
+
55
+ ### Fixed
56
+
57
+ - **Port offsets** — Resolved collisions for default web ports
58
+ ```
59
+
49
60
  - Click "Publish release"
50
61
 
51
- 5. **GitHub Actions will automatically:**
62
+ 4. **GitHub Actions will automatically:**
52
63
  - ✅ Validate semantic version format
64
+ - ✅ Set `package.json` version from the tag
53
65
  - ✅ Install dependencies
54
66
  - ✅ Run tests
55
67
  - ✅ Build TypeScript
@@ -181,12 +193,13 @@ npm pack --dry-run
181
193
  - Compressed: ~122 KB
182
194
  - Unpacked: ~462 KB
183
195
 
184
- ### 4. Update Version (if needed)
196
+ ### 4. Version Source (Automated)
185
197
 
186
- ```bash
187
- # First release (already at 0.1.0)
188
- # For subsequent releases:
198
+ For GitHub Releases, the publish workflow sets `package.json` version from the tag (`vX.Y.Z`). You should not run `npm version` locally for automated releases.
199
+
200
+ If you are doing a manual publish (outside GitHub Releases), you can use:
189
201
 
202
+ ```bash
190
203
  # Patch release (bug fixes): 0.1.0 → 0.1.1
191
204
  npm version patch
192
205
 
@@ -0,0 +1,43 @@
1
+ # Security Considerations
2
+
3
+ Container Superposition is designed for **development environments only**. Use these guardrails to avoid common pitfalls.
4
+
5
+ ## Docker Socket Access (`docker-sock`)
6
+
7
+ **Risk**: Mounting `/var/run/docker.sock` gives the container full control of the host Docker daemon.
8
+
9
+ Recommended usage:
10
+
11
+ - Use `docker-sock` only on local machines with trusted code.
12
+ - Prefer `docker-in-docker` for isolation or cloud IDEs.
13
+ - Never use `docker-sock` in multi-tenant or production environments.
14
+
15
+ ## Database Defaults
16
+
17
+ Database overlays ship with **development-only defaults** (e.g., `postgres/postgres`).
18
+
19
+ Recommended usage:
20
+
21
+ - Rotate credentials for any shared or networked environment.
22
+ - Keep services on private networks.
23
+ - Put real credentials in `.env` (gitignored), not `.env.example`.
24
+
25
+ ## Environment Files
26
+
27
+ - `.env.example` is committed and contains templates.
28
+ - `.env` is gitignored and contains real values.
29
+
30
+ Recommended usage:
31
+
32
+ - Copy `.env.example` to `.env` and customize.
33
+ - Keep `.env` out of version control.
34
+ - Use placeholder values in `.env.example`.
35
+
36
+ ## General Principles
37
+
38
+ - Treat generated configs as dev-only.
39
+ - Avoid exposing devcontainer ports publicly.
40
+ - Keep base images and overlays updated.
41
+ - Audit dependencies in your devcontainer.
42
+
43
+ For overlay-specific notes, see each overlay README (for example, `overlays/docker-sock/README.md`).
@@ -0,0 +1,36 @@
1
+ # Specification Quality Checklist: Verbose Plan Graph
2
+
3
+ **Purpose**: Validate specification completeness and quality before proceeding to planning
4
+ **Created**: 2026-03-10
5
+ **Feature**: [spec.md](../spec.md)
6
+
7
+ ## Content Quality
8
+
9
+ - [x] No implementation details (languages, frameworks, APIs)
10
+ - [x] Focused on user value and business needs
11
+ - [x] Written for non-technical stakeholders
12
+ - [x] All mandatory sections completed
13
+
14
+ ## Requirement Completeness
15
+
16
+ - [x] No [NEEDS CLARIFICATION] markers remain
17
+ - [x] Requirements are testable and unambiguous
18
+ - [x] Success criteria are measurable
19
+ - [x] Success criteria are technology-agnostic (no implementation details)
20
+ - [x] All acceptance scenarios are defined
21
+ - [x] Edge cases are identified
22
+ - [x] Scope is clearly bounded
23
+ - [x] Dependencies and assumptions identified
24
+
25
+ ## Feature Readiness
26
+
27
+ - [x] All functional requirements have clear acceptance criteria
28
+ - [x] User scenarios cover primary flows
29
+ - [x] Feature meets measurable outcomes defined in Success Criteria
30
+ - [x] No implementation details leak into specification
31
+
32
+ ## Notes
33
+
34
+ - Validation completed on 2026-03-10 after the manifest-driven scope update.
35
+ - No checklist failures found during the validation pass for the revised scope.
36
+ - Spec is ready for `/speckit.plan` after review of the updated scope.
@@ -0,0 +1,96 @@
1
+ # Contract: Plan Verbose Output
2
+
3
+ ## Scope
4
+
5
+ This contract defines the user-visible behavior of the `plan` command when `--verbose` is requested. It covers terminal output and structured JSON output for the normal planning path.
6
+
7
+ ## Command Surface
8
+
9
+ ### New Option
10
+
11
+ - `--verbose`: Include dependency-resolution narration that explains why each overlay appears in the final plan.
12
+
13
+ ### Existing Manifest Input
14
+
15
+ - Manifest-driven planning must support the existing manifest workflow and apply `--verbose` when overlays are loaded from `superposition.json`.
16
+
17
+ ### Compatibility Rules
18
+
19
+ - `plan` without `--verbose` keeps the existing concise output contract.
20
+ - `plan --json --verbose` returns the standard plan data plus structured explanation data.
21
+ - `plan` run from an existing manifest with `--verbose` uses the same explanation structure as overlay-list-driven planning.
22
+ - `plan --diff` remains a separate mode; verbose planning must not silently change diff semantics.
23
+
24
+ ## Text Output Contract
25
+
26
+ When `--verbose` is present and the command completes normal planning:
27
+
28
+ 1. The standard summary remains visible:
29
+ - stack
30
+ - overlays selected
31
+ - auto-added dependencies
32
+ - conflicts, if any
33
+ - port mappings
34
+ - files to create/modify
35
+ 2. A dedicated explanation section appears after the overlay summary.
36
+ 3. The explanation section must:
37
+ - identify each included overlay exactly once
38
+ - state whether it was selected directly or added automatically
39
+ - treat manifest-defined overlays as the explicit root configuration when planning is loaded from a manifest
40
+ - name the parent overlay or overlays that required it
41
+ - show transitive chains in request-to-dependency order
42
+ - call out failure boundaries when conflicts or invalid selections prevent successful completion
43
+
44
+ ### Example Shape
45
+
46
+ ```text
47
+ Dependency Resolution:
48
+ nodejs
49
+ selected directly by the user
50
+ grafana
51
+ selected directly by the user
52
+ prometheus
53
+ required by grafana
54
+ path: grafana -> prometheus
55
+ ```
56
+
57
+ The wording may vary, but the content requirements above are mandatory.
58
+
59
+ ## JSON Output Contract
60
+
61
+ When `--json --verbose` is present, the result must include:
62
+
63
+ - the existing standard plan fields
64
+ - an additional explanation payload that:
65
+ - records whether the plan input came from explicit overlays or a manifest
66
+ - lists each included overlay once
67
+ - distinguishes direct selections from dependency-driven inclusions
68
+ - records one or more parent reasons for dependencies with shared ancestry
69
+ - includes ordered dependency paths for transitive inclusions
70
+ - optionally records failure context when planning cannot complete normally
71
+
72
+ ### Minimum Field Expectations
73
+
74
+ The verbose payload must support these questions without requiring text parsing:
75
+
76
+ - Was this overlay selected by the user or added automatically?
77
+ - Which overlay or overlays caused this inclusion?
78
+ - What dependency path led to this overlay?
79
+ - Did resolution stop or skip anything, and why?
80
+
81
+ ## Error and Failure Contract
82
+
83
+ - Unknown overlay IDs remain hard failures.
84
+ - Missing or invalid manifests remain hard failures for manifest-driven planning.
85
+ - Conflicts remain visible in both concise and verbose modes.
86
+ - Verbose mode adds context about the dependency path and failure boundary; it does not suppress or soften existing error behavior.
87
+
88
+ ## Documentation Contract
89
+
90
+ The command reference and examples must show:
91
+
92
+ - one direct-selection example
93
+ - one manifest-driven verbose example
94
+ - one auto-added dependency example
95
+ - one transitive or multi-parent explanation example
96
+ - one note confirming that default `plan` output stays concise without `--verbose`