container-superposition 0.1.3 → 0.1.5
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 +72 -1014
- package/dist/scripts/init.js +512 -238
- package/dist/scripts/init.js.map +1 -1
- package/dist/tool/commands/adopt.d.ts +62 -0
- package/dist/tool/commands/adopt.d.ts.map +1 -0
- package/dist/tool/commands/adopt.js +767 -0
- package/dist/tool/commands/adopt.js.map +1 -0
- package/dist/tool/commands/doctor.js +2 -2
- package/dist/tool/commands/explain.d.ts.map +1 -1
- package/dist/tool/commands/explain.js +88 -0
- package/dist/tool/commands/explain.js.map +1 -1
- package/dist/tool/commands/hash.d.ts +36 -0
- package/dist/tool/commands/hash.d.ts.map +1 -0
- package/dist/tool/commands/hash.js +242 -0
- package/dist/tool/commands/hash.js.map +1 -0
- package/dist/tool/commands/plan.d.ts +53 -0
- package/dist/tool/commands/plan.d.ts.map +1 -1
- package/dist/tool/commands/plan.js +784 -42
- package/dist/tool/commands/plan.js.map +1 -1
- package/dist/tool/questionnaire/composer.d.ts +12 -3
- package/dist/tool/questionnaire/composer.d.ts.map +1 -1
- package/dist/tool/questionnaire/composer.js +133 -20
- package/dist/tool/questionnaire/composer.js.map +1 -1
- package/dist/tool/schema/project-config.d.ts +15 -0
- package/dist/tool/schema/project-config.d.ts.map +1 -0
- package/dist/tool/schema/project-config.js +359 -0
- package/dist/tool/schema/project-config.js.map +1 -0
- package/dist/tool/schema/types.d.ts +57 -1
- package/dist/tool/schema/types.d.ts.map +1 -1
- package/dist/tool/utils/backup.d.ts +23 -0
- package/dist/tool/utils/backup.d.ts.map +1 -0
- package/dist/tool/utils/backup.js +123 -0
- package/dist/tool/utils/backup.js.map +1 -0
- package/dist/tool/utils/gitignore.d.ts +15 -0
- package/dist/tool/utils/gitignore.d.ts.map +1 -0
- package/dist/tool/utils/gitignore.js +41 -0
- package/dist/tool/utils/gitignore.js.map +1 -0
- package/dist/tool/utils/services-export.d.ts +14 -0
- package/dist/tool/utils/services-export.d.ts.map +1 -0
- package/dist/tool/utils/services-export.js +478 -0
- package/dist/tool/utils/services-export.js.map +1 -0
- package/dist/tool/utils/summary.d.ts +69 -0
- package/dist/tool/utils/summary.d.ts.map +1 -0
- package/dist/tool/utils/summary.js +260 -0
- package/dist/tool/utils/summary.js.map +1 -0
- package/docs/README.md +12 -2
- package/docs/adopt.md +196 -0
- package/docs/custom-patches.md +1 -1
- package/docs/discovery-commands.md +55 -3
- package/docs/examples.md +40 -6
- package/docs/filesystem-contract.md +58 -0
- package/docs/hash.md +183 -0
- package/docs/minimal-and-editor.md +1 -1
- package/docs/overlays.md +108 -5
- package/docs/presets-architecture.md +1 -1
- package/docs/presets.md +1 -1
- package/docs/publishing.md +36 -23
- package/docs/security.md +43 -0
- package/docs/specs/001-verbose-plan-graph/checklists/requirements.md +36 -0
- package/docs/specs/001-verbose-plan-graph/contracts/plan-verbose-output.md +96 -0
- package/docs/specs/001-verbose-plan-graph/data-model.md +111 -0
- package/docs/specs/001-verbose-plan-graph/plan.md +127 -0
- package/docs/specs/001-verbose-plan-graph/quickstart.md +106 -0
- package/docs/specs/001-verbose-plan-graph/research.md +100 -0
- package/docs/specs/001-verbose-plan-graph/spec.md +128 -0
- package/docs/specs/001-verbose-plan-graph/tasks.md +223 -0
- package/docs/specs/002-superposition-config-file/checklists/requirements.md +36 -0
- package/docs/specs/002-superposition-config-file/contracts/init-project-config.md +98 -0
- package/docs/specs/002-superposition-config-file/data-model.md +126 -0
- package/docs/specs/002-superposition-config-file/plan.md +208 -0
- package/docs/specs/002-superposition-config-file/quickstart.md +140 -0
- package/docs/specs/002-superposition-config-file/research.md +144 -0
- package/docs/specs/002-superposition-config-file/spec.md +130 -0
- package/docs/specs/002-superposition-config-file/tasks.md +213 -0
- package/docs/team-workflow.md +27 -1
- package/docs/workflows.md +136 -0
- package/overlays/.presets/microservice.yml +32 -6
- package/overlays/.presets/sdd.yml +84 -0
- package/overlays/.presets/web-api.yml +76 -56
- package/overlays/README.md +7 -1
- package/overlays/amp/README.md +70 -0
- package/overlays/amp/devcontainer.patch.json +3 -0
- package/overlays/amp/overlay.yml +15 -0
- package/overlays/amp/setup.sh +21 -0
- package/overlays/amp/verify.sh +21 -0
- package/overlays/claude-code/README.md +83 -0
- package/overlays/claude-code/devcontainer.patch.json +3 -0
- package/overlays/claude-code/overlay.yml +15 -0
- package/overlays/claude-code/setup.sh +21 -0
- package/overlays/claude-code/verify.sh +21 -0
- package/overlays/cloudflared/README.md +190 -0
- package/overlays/cloudflared/devcontainer.patch.json +3 -0
- package/overlays/cloudflared/overlay.yml +15 -0
- package/overlays/cloudflared/setup.sh +49 -0
- package/overlays/cloudflared/verify.sh +21 -0
- package/overlays/direnv/README.md +6 -4
- package/overlays/direnv/setup.sh +0 -12
- package/overlays/gemini-cli/README.md +77 -0
- package/overlays/gemini-cli/devcontainer.patch.json +3 -0
- package/overlays/gemini-cli/overlay.yml +15 -0
- package/overlays/gemini-cli/setup.sh +21 -0
- package/overlays/gemini-cli/verify.sh +21 -0
- package/overlays/grpc-tools/README.md +242 -0
- package/overlays/grpc-tools/devcontainer.patch.json +14 -0
- package/overlays/grpc-tools/overlay.yml +14 -0
- package/overlays/grpc-tools/setup.sh +57 -0
- package/overlays/grpc-tools/verify.sh +47 -0
- package/overlays/keycloak/.env.example +5 -0
- package/overlays/keycloak/README.md +238 -0
- package/overlays/keycloak/devcontainer.patch.json +17 -0
- package/overlays/keycloak/docker-compose.yml +32 -0
- package/overlays/keycloak/overlay.yml +23 -0
- package/overlays/keycloak/verify.sh +54 -0
- package/overlays/mailpit/.env.example +4 -0
- package/overlays/mailpit/README.md +191 -0
- package/overlays/mailpit/devcontainer.patch.json +20 -0
- package/overlays/mailpit/docker-compose.yml +17 -0
- package/overlays/mailpit/overlay.yml +26 -0
- package/overlays/mailpit/verify.sh +52 -0
- package/overlays/ngrok/overlay.yml +2 -1
- package/overlays/opencode/README.md +76 -0
- package/overlays/opencode/devcontainer.patch.json +3 -0
- package/overlays/opencode/overlay.yml +14 -0
- package/overlays/opencode/setup.sh +21 -0
- package/overlays/opencode/verify.sh +21 -0
- package/overlays/python/README.md +51 -35
- package/overlays/python/devcontainer.patch.json +7 -4
- package/overlays/python/setup.sh +50 -23
- package/overlays/python/verify.sh +29 -1
- package/overlays/spec-kit/README.md +181 -0
- package/overlays/spec-kit/devcontainer.patch.json +6 -0
- package/overlays/spec-kit/overlay.yml +19 -0
- package/overlays/spec-kit/setup.sh +45 -0
- package/overlays/spec-kit/verify.sh +33 -0
- package/overlays/windsurf-cli/README.md +69 -0
- package/overlays/windsurf-cli/devcontainer.patch.json +3 -0
- package/overlays/windsurf-cli/overlay.yml +15 -0
- package/overlays/windsurf-cli/setup.sh +21 -0
- package/overlays/windsurf-cli/verify.sh +21 -0
- package/package.json +1 -1
- package/tool/schema/config.schema.json +138 -9
package/docs/examples.md
CHANGED
|
@@ -10,6 +10,37 @@ npm run init
|
|
|
10
10
|
|
|
11
11
|
Follow the prompts to select your stack, database, tools, and output location.
|
|
12
12
|
|
|
13
|
+
## Declarative Project Config
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
stack: compose
|
|
17
|
+
language:
|
|
18
|
+
- nodejs
|
|
19
|
+
database:
|
|
20
|
+
- postgres
|
|
21
|
+
outputPath: ./.devcontainer
|
|
22
|
+
customizations:
|
|
23
|
+
environment:
|
|
24
|
+
APP_ENV: development
|
|
25
|
+
devcontainerPatch:
|
|
26
|
+
features:
|
|
27
|
+
ghcr.io/devcontainers-extra/features/apt-get-packages:1:
|
|
28
|
+
packages: jq
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run init -- --no-interactive
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Creates the same generated output you would get from equivalent clean-generation
|
|
36
|
+
input, while keeping the setup intent in version control.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run init -- regen
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Regenerates from the repository project file by default when one exists.
|
|
43
|
+
|
|
13
44
|
## Non-Interactive Examples
|
|
14
45
|
|
|
15
46
|
### .NET with PostgreSQL
|
|
@@ -411,11 +442,14 @@ npm run init -- --from-manifest ./superposition.json
|
|
|
411
442
|
|
|
412
443
|
### Non-Interactive Regeneration
|
|
413
444
|
|
|
414
|
-
|
|
445
|
+
Use `regen` when you want deterministic replay of a persisted source:
|
|
415
446
|
|
|
416
447
|
```bash
|
|
417
|
-
# Regenerate with exact same selections
|
|
418
|
-
npm run init -- --from-manifest ./superposition.json --
|
|
448
|
+
# Regenerate with exact same selections from a manifest, no backup
|
|
449
|
+
npm run init -- regen --from-manifest ./superposition.json --no-backup
|
|
450
|
+
|
|
451
|
+
# Or let regen use the repository project file when present
|
|
452
|
+
npm run init -- regen
|
|
419
453
|
```
|
|
420
454
|
|
|
421
455
|
**Use cases:**
|
|
@@ -463,7 +497,7 @@ git push
|
|
|
463
497
|
# Developer 2: Clone and regenerate from manifest
|
|
464
498
|
git clone <repo>
|
|
465
499
|
npm install
|
|
466
|
-
npm run init -- --from-manifest ./superposition.json
|
|
500
|
+
npm run init -- regen --from-manifest ./superposition.json
|
|
467
501
|
# Gets exact same devcontainer setup
|
|
468
502
|
```
|
|
469
503
|
|
|
@@ -481,7 +515,7 @@ The manifest stores and restores:
|
|
|
481
515
|
|
|
482
516
|
```json
|
|
483
517
|
{
|
|
484
|
-
"version": "
|
|
518
|
+
"version": "X.Y.Z",
|
|
485
519
|
"generated": "2026-02-08T10:00:00Z",
|
|
486
520
|
"baseTemplate": "compose",
|
|
487
521
|
"baseImage": "bookworm",
|
|
@@ -572,5 +606,5 @@ mv prod/superposition.json prod-superposition.json
|
|
|
572
606
|
|
|
573
607
|
# Now you have three manifests for different environments
|
|
574
608
|
# Regenerate any environment from its manifest
|
|
575
|
-
npm run init -- --from-manifest ./dev-superposition.json --
|
|
609
|
+
npm run init -- regen --from-manifest ./dev-superposition.json --output ./dev
|
|
576
610
|
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Filesystem Contract
|
|
2
|
+
|
|
3
|
+
This describes what the tool writes and which files are safe to edit.
|
|
4
|
+
|
|
5
|
+
## What Gets Written
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
your-project/
|
|
9
|
+
├── .devcontainer/ # Main devcontainer directory
|
|
10
|
+
│ ├── devcontainer.json # Container configuration
|
|
11
|
+
│ ├── docker-compose.yml # Services (compose stack only)
|
|
12
|
+
│ ├── .env.example # Environment variable templates
|
|
13
|
+
│ ├── ports.json # Port documentation and connection strings
|
|
14
|
+
│ ├── scripts/ # Setup and verification scripts
|
|
15
|
+
│ │ ├── post-create.sh # Runs once when container is created
|
|
16
|
+
│ │ └── post-start.sh # Runs every time container starts
|
|
17
|
+
│ └── custom/ # Your customizations (preserved across regen)
|
|
18
|
+
│ ├── devcontainer.patch.json
|
|
19
|
+
│ └── docker-compose.patch.yml
|
|
20
|
+
├── superposition.json # Manifest file (enables regeneration)
|
|
21
|
+
└── .devcontainer.backup-*/ # Automatic backups (gitignored)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Files You Should Customize
|
|
25
|
+
|
|
26
|
+
- `.devcontainer/.env` or `.env` (copied from `.env.example`)
|
|
27
|
+
- `.devcontainer/custom/` (your patches and scripts)
|
|
28
|
+
|
|
29
|
+
## Files Safe to Edit Directly
|
|
30
|
+
|
|
31
|
+
- `.devcontainer/custom/devcontainer.patch.json`
|
|
32
|
+
- `.devcontainer/custom/docker-compose.patch.yml`
|
|
33
|
+
- `.devcontainer/custom/environment.env`
|
|
34
|
+
- `.devcontainer/custom/scripts/*`
|
|
35
|
+
|
|
36
|
+
## Files Regenerated (Do Not Edit Directly)
|
|
37
|
+
|
|
38
|
+
- `.devcontainer/devcontainer.json`
|
|
39
|
+
- `.devcontainer/docker-compose.yml`
|
|
40
|
+
- `.devcontainer/scripts/*`
|
|
41
|
+
|
|
42
|
+
## Files You Should Commit
|
|
43
|
+
|
|
44
|
+
- `superposition.json`
|
|
45
|
+
- `.devcontainer/` (generated configuration)
|
|
46
|
+
- `.devcontainer/custom/` (project-specific patches)
|
|
47
|
+
- `.devcontainer/.env.example`
|
|
48
|
+
|
|
49
|
+
## Files in .gitignore
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
# Environment secrets (never commit)
|
|
53
|
+
.env
|
|
54
|
+
.devcontainer/.env
|
|
55
|
+
|
|
56
|
+
# Regeneration backups (local only)
|
|
57
|
+
.devcontainer.backup-*
|
|
58
|
+
```
|
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
|
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
|
+
### Amp (`amp`)
|
|
456
|
+
|
|
457
|
+
Sourcegraph Amp CLI for AI-powered code generation and assistance
|
|
458
|
+
|
|
459
|
+
| Property | Value |
|
|
460
|
+
| ------------ | --------------------------------- |
|
|
461
|
+
| **Category** | dev |
|
|
462
|
+
| **Requires** | `nodejs` |
|
|
463
|
+
| **Tags** | `dev`, `ai`, `amp`, `sourcegraph` |
|
|
464
|
+
|
|
465
|
+
### Claude Code (`claude-code`)
|
|
466
|
+
|
|
467
|
+
Anthropic Claude Code CLI for AI-powered development assistance
|
|
468
|
+
|
|
469
|
+
| Property | Value |
|
|
470
|
+
| ------------ | ---------------------------------- |
|
|
471
|
+
| **Category** | dev |
|
|
472
|
+
| **Requires** | `nodejs` |
|
|
473
|
+
| **Tags** | `dev`, `ai`, `claude`, `anthropic` |
|
|
474
|
+
|
|
475
|
+
### Cloudflared (`cloudflared`)
|
|
476
|
+
|
|
477
|
+
Cloudflare Tunnel for securely exposing local services to the internet
|
|
478
|
+
|
|
479
|
+
| Property | Value |
|
|
480
|
+
| ------------- | ----------------------------------------- |
|
|
481
|
+
| **Category** | dev |
|
|
482
|
+
| **Conflicts** | `ngrok` |
|
|
483
|
+
| **Tags** | `dev`, `tunneling`, `proxy`, `cloudflare` |
|
|
484
|
+
|
|
445
485
|
### Codex (`codex`)
|
|
446
486
|
|
|
447
487
|
OpenAI Codex CLI for AI-powered code generation and assistance
|
|
@@ -492,6 +532,16 @@ Isolated Docker daemon inside container (portable, works in Codespaces)
|
|
|
492
532
|
| **Conflicts** | `docker-sock` |
|
|
493
533
|
| **Tags** | `dev`, `docker` |
|
|
494
534
|
|
|
535
|
+
### Gemini CLI (`gemini-cli`)
|
|
536
|
+
|
|
537
|
+
Google Gemini CLI for AI-powered development assistance
|
|
538
|
+
|
|
539
|
+
| Property | Value |
|
|
540
|
+
| ------------ | ------------------------------- |
|
|
541
|
+
| **Category** | dev |
|
|
542
|
+
| **Requires** | `nodejs` |
|
|
543
|
+
| **Tags** | `dev`, `ai`, `gemini`, `google` |
|
|
544
|
+
|
|
495
545
|
### Git Helpers (`git-helpers`)
|
|
496
546
|
|
|
497
547
|
Git LFS, GitHub CLI, GPG/SSH support for secure Git operations
|
|
@@ -501,6 +551,15 @@ Git LFS, GitHub CLI, GPG/SSH support for secure Git operations
|
|
|
501
551
|
| **Category** | dev |
|
|
502
552
|
| **Tags** | `dev`, `git`, `security`, `ssh`, `gpg` |
|
|
503
553
|
|
|
554
|
+
### gRPC Tools (`grpc-tools`)
|
|
555
|
+
|
|
556
|
+
Protocol Buffers compiler, Buf, and grpcurl for gRPC development
|
|
557
|
+
|
|
558
|
+
| Property | Value |
|
|
559
|
+
| ------------ | -------------------------------- |
|
|
560
|
+
| **Category** | dev |
|
|
561
|
+
| **Tags** | `dev`, `grpc`, `protobuf`, `api` |
|
|
562
|
+
|
|
504
563
|
### Just Task Runner (`just`)
|
|
505
564
|
|
|
506
565
|
Fast, simple command runner (Rust-based alternative to Make)
|
|
@@ -510,6 +569,29 @@ Fast, simple command runner (Rust-based alternative to Make)
|
|
|
510
569
|
| **Category** | dev |
|
|
511
570
|
| **Tags** | `dev`, `automation`, `tasks` |
|
|
512
571
|
|
|
572
|
+
### Keycloak (`keycloak`)
|
|
573
|
+
|
|
574
|
+
Open-source identity and access management (OIDC/OAuth2)
|
|
575
|
+
|
|
576
|
+
| Property | Value |
|
|
577
|
+
| ------------ | ------------------------------------------- |
|
|
578
|
+
| **Category** | dev |
|
|
579
|
+
| **Supports** | compose |
|
|
580
|
+
| **Requires** | `postgres` |
|
|
581
|
+
| **Tags** | `dev`, `auth`, `oidc`, `oauth2`, `identity` |
|
|
582
|
+
| **Ports** | [object Object] |
|
|
583
|
+
|
|
584
|
+
### Mailpit (`mailpit`)
|
|
585
|
+
|
|
586
|
+
Email testing tool with web UI and SMTP server
|
|
587
|
+
|
|
588
|
+
| Property | Value |
|
|
589
|
+
| ------------ | --------------------------------- |
|
|
590
|
+
| **Category** | dev |
|
|
591
|
+
| **Supports** | compose |
|
|
592
|
+
| **Tags** | `dev`, `email`, `smtp`, `testing` |
|
|
593
|
+
| **Ports** | [object Object], [object Object] |
|
|
594
|
+
|
|
513
595
|
### Modern CLI Tools (`modern-cli-tools`)
|
|
514
596
|
|
|
515
597
|
jq, yq, ripgrep, fd, bat - Essential modern command-line tools
|
|
@@ -523,11 +605,12 @@ jq, yq, ripgrep, fd, bat - Essential modern command-line tools
|
|
|
523
605
|
|
|
524
606
|
Secure tunneling for webhook testing and external access
|
|
525
607
|
|
|
526
|
-
| Property
|
|
527
|
-
|
|
|
528
|
-
| **Category**
|
|
529
|
-
| **
|
|
530
|
-
| **
|
|
608
|
+
| Property | Value |
|
|
609
|
+
| ------------- | ------------------------------ |
|
|
610
|
+
| **Category** | dev |
|
|
611
|
+
| **Conflicts** | `cloudflared` |
|
|
612
|
+
| **Tags** | `dev`, `tunneling`, `webhooks` |
|
|
613
|
+
| **Ports** | 4040 |
|
|
531
614
|
|
|
532
615
|
### OpenAPI Tools (`openapi-tools`)
|
|
533
616
|
|
|
@@ -539,6 +622,16 @@ OpenAPI/Swagger tooling for API development and documentation
|
|
|
539
622
|
| **Suggests** | `nodejs` |
|
|
540
623
|
| **Tags** | `dev`, `openapi`, `swagger`, `api`, `documentation` |
|
|
541
624
|
|
|
625
|
+
### opencode (`opencode`)
|
|
626
|
+
|
|
627
|
+
opencode AI coding agent for terminal-based development assistance
|
|
628
|
+
|
|
629
|
+
| Property | Value |
|
|
630
|
+
| ------------ | ----------------------- |
|
|
631
|
+
| **Category** | dev |
|
|
632
|
+
| **Requires** | `nodejs` |
|
|
633
|
+
| **Tags** | `dev`, `ai`, `opencode` |
|
|
634
|
+
|
|
542
635
|
### Playwright (`playwright`)
|
|
543
636
|
|
|
544
637
|
Browser automation and testing framework
|
|
@@ -571,6 +664,16 @@ Live update and orchestration for Kubernetes development
|
|
|
571
664
|
| **Tags** | `dev`, `kubernetes`, `k8s`, `development`, `live-reload` |
|
|
572
665
|
| **Ports** | 10350 |
|
|
573
666
|
|
|
667
|
+
### Windsurf CLI (`windsurf-cli`)
|
|
668
|
+
|
|
669
|
+
Codeium Windsurf CLI for AI-powered development assistance
|
|
670
|
+
|
|
671
|
+
| Property | Value |
|
|
672
|
+
| ------------ | ---------------------------------- |
|
|
673
|
+
| **Category** | dev |
|
|
674
|
+
| **Requires** | `nodejs` |
|
|
675
|
+
| **Tags** | `dev`, `ai`, `windsurf`, `codeium` |
|
|
676
|
+
|
|
574
677
|
## Dependency Model
|
|
575
678
|
|
|
576
679
|
### Dependency Types
|
package/docs/presets.md
CHANGED
package/docs/publishing.md
CHANGED
|
@@ -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:** `
|
|
9
|
-
**Size:**
|
|
10
|
-
**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
|
|
26
|
+
1. **Update CHANGELOG.md** with release notes
|
|
27
27
|
|
|
28
|
-
|
|
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
|
|
40
|
-
git commit -m "
|
|
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
|
-
|
|
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: `
|
|
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
|
-
|
|
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.
|
|
196
|
+
### 4. Version Source (Automated)
|
|
185
197
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
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
|
|
package/docs/security.md
ADDED
|
@@ -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.
|