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
@@ -0,0 +1,223 @@
1
+ # Tasks: Verbose Plan Graph
2
+
3
+ **Input**: Design documents from `/docs/specs/001-verbose-plan-graph/`
4
+ **Prerequisites**: [plan.md](plan.md), [spec.md](spec.md), [research.md](research.md), [data-model.md](data-model.md), [plan-verbose-output.md](contracts/plan-verbose-output.md), [quickstart.md](quickstart.md)
5
+
6
+ **Tests**: Add automated command-level coverage in `tool/__tests__/commands.test.ts`, then run manual quickstart validation plus `npm test` and `npm run lint`.
7
+
8
+ **Organization**: Tasks are grouped by user story to enable independent implementation and testing of each story.
9
+
10
+ ## Format: `[ID] [P?] [Story] Description`
11
+
12
+ - **[P]**: Can run in parallel (different files, no dependencies)
13
+ - **[Story]**: Which user story this task belongs to (e.g. `US1`, `US2`, `US3`)
14
+ - Include exact file paths in descriptions
15
+
16
+ ## Phase 1: Setup (Shared Infrastructure)
17
+
18
+ **Purpose**: Record the approved governance state and prepare the command surface for the expanded scope.
19
+
20
+ - [x] T001 Record approved spec commit status and review gate in `docs/specs/001-verbose-plan-graph/spec.md`
21
+ - [x] T002 Align implementation sequencing notes for the manifest-driven scope in `docs/specs/001-verbose-plan-graph/plan.md`
22
+ - [x] T003 Update `plan` command option and argument wiring for manifest-driven verbose planning in `scripts/init.ts`
23
+ - [x] T004 Record the revised implementation baseline and pending manifest validation in `docs/specs/001-verbose-plan-graph/quickstart.md`
24
+
25
+ ---
26
+
27
+ ## Phase 2: Foundational (Blocking Prerequisites)
28
+
29
+ **Purpose**: Build the shared request normalization and explanation model that every story depends on.
30
+
31
+ **⚠️ CRITICAL**: No user story work can begin until this phase is complete
32
+
33
+ - [x] T005 Refactor plan request normalization to support overlay-list and manifest inputs in `tool/commands/plan.ts`
34
+ - [x] T006 Define shared inclusion-reason and dependency-path helpers for all plan modes in `tool/commands/plan.ts`
35
+ - [x] T007 Define shared verbose JSON payload shaping for overlay-list and manifest inputs in `tool/commands/plan.ts`
36
+ - [x] T008 Add baseline regression coverage for request parsing and shared plan payload behavior in `tool/__tests__/commands.test.ts`
37
+ - [x] T009 Add fixture support for manifest-driven command tests in `tool/__tests__/commands.test.ts`
38
+
39
+ **Checkpoint**: Foundation ready - user story implementation can now begin following the documented story dependencies
40
+
41
+ ---
42
+
43
+ ## Phase 3: User Story 1 - Explain auto-included overlays (Priority: P1) 🎯 MVP
44
+
45
+ **Goal**: Let users see why directly selected overlays and auto-added required dependencies appear in the final plan.
46
+
47
+ **Independent Test**: Run `npm run init -- plan --stack compose --overlays grafana --verbose` and confirm the output explains `grafana` as directly selected and `prometheus` as required by `grafana`, without duplicate overlay entries.
48
+
49
+ ### Verification for User Story 1
50
+
51
+ - [x] T010 [US1] Add verbose text-output regression coverage for direct selections and required dependencies in `tool/__tests__/commands.test.ts`
52
+ - [x] T011 [US1] Add verbose JSON regression coverage for direct selections and required dependencies in `tool/__tests__/commands.test.ts`
53
+
54
+ ### Implementation for User Story 1
55
+
56
+ - [x] T012 [US1] Implement direct-selection explanation records for overlay-list planning in `tool/commands/plan.ts`
57
+ - [x] T013 [US1] Implement required-dependency explanation records for overlay-list planning in `tool/commands/plan.ts`
58
+ - [x] T014 [US1] Render the verbose dependency narration section for direct overlay selection in `tool/commands/plan.ts`
59
+ - [x] T015 [US1] Attach verbose inclusion-reason data to JSON plan output for direct overlay selection in `tool/commands/plan.ts`
60
+
61
+ **Checkpoint**: User Story 1 should now be fully functional and testable on its own
62
+
63
+ ---
64
+
65
+ ## Phase 4: User Story 2 - Explain plans loaded from a manifest (Priority: P2)
66
+
67
+ **Goal**: Let users run `plan --verbose` from an existing `superposition.json` manifest and receive the same explanation quality they get from direct overlay selection.
68
+
69
+ **Independent Test**: Run `npm run init -- plan --from-manifest superposition.json --verbose` and confirm the explanation treats manifest-defined overlays as the root set while still explaining auto-added dependencies separately.
70
+
71
+ ### Verification for User Story 2
72
+
73
+ - [x] T016 [US2] Add regression coverage for verbose text output from manifest-driven planning in `tool/__tests__/commands.test.ts`
74
+ - [x] T017 [US2] Add regression coverage for verbose JSON output from manifest-driven planning in `tool/__tests__/commands.test.ts`
75
+ - [x] T018 [US2] Add regression coverage for missing, invalid, and semantically broken manifests in `tool/__tests__/commands.test.ts`
76
+
77
+ ### Implementation for User Story 2
78
+
79
+ - [x] T019 [US2] Load manifest-defined overlay roots into the shared plan request model in `tool/commands/plan.ts`
80
+ - [x] T020 [US2] Implement manifest-root explanation records that distinguish saved configuration from dependency-driven inclusions in `tool/commands/plan.ts`
81
+ - [x] T021 [US2] Prevent partial verbose output when manifest-driven planning fails in `tool/commands/plan.ts`
82
+ - [x] T022 [US2] Render manifest-driven verbose narration using the shared explanation model in `tool/commands/plan.ts`
83
+ - [x] T023 [US2] Attach manifest input metadata to verbose JSON plan output in `tool/commands/plan.ts`
84
+
85
+ **Checkpoint**: User Stories 1 and 2 should both work independently
86
+
87
+ ---
88
+
89
+ ## Phase 5: User Story 3 - Trace the full dependency path (Priority: P3)
90
+
91
+ **Goal**: Let users follow transitive dependency chains and shared-parent paths in both direct and manifest-driven planning without guessing how the final plan was assembled.
92
+
93
+ **Independent Test**: Run `plan --verbose` for overlays that create transitive or shared-parent dependencies and confirm each included overlay appears once with traceable path information, regardless of whether the roots came from flags or a manifest.
94
+
95
+ ### Verification for User Story 3
96
+
97
+ - [x] T024 [US3] Add regression coverage for transitive dependency path narration in `tool/__tests__/commands.test.ts`
98
+ - [x] T025 [US3] Add regression coverage for shared-parent dependency explanations without duplicate overlay entries in `tool/__tests__/commands.test.ts`
99
+
100
+ ### Implementation for User Story 3
101
+
102
+ - [x] T026 [US3] Extend inclusion-reason tracking for transitive dependency paths in `tool/commands/plan.ts`
103
+ - [x] T027 [US3] Preserve multiple parent reasons while de-duplicating final overlay entries in `tool/commands/plan.ts`
104
+ - [x] T028 [US3] Render ordered dependency paths in verbose text output for overlay-list and manifest inputs in `tool/commands/plan.ts`
105
+ - [x] T029 [US3] Serialize transitive paths and multi-parent reasons in verbose JSON output in `tool/commands/plan.ts`
106
+
107
+ **Checkpoint**: User Stories 1 through 3 should all be independently functional
108
+
109
+ ---
110
+
111
+ ## Phase 6: User Story 4 - Preserve concise output when not needed (Priority: P4)
112
+
113
+ **Goal**: Keep the default plan experience concise while surfacing verbose failure context only when users explicitly request it.
114
+
115
+ **Independent Test**: Compare `plan` output with and without `--verbose`, then run conflict, invalid-overlay, and stack-incompatible cases with `--verbose` and confirm concise mode is unchanged while verbose mode adds failure context.
116
+
117
+ ### Verification for User Story 4
118
+
119
+ - [x] T030 [US4] Add regression coverage confirming non-verbose text and JSON output remain unchanged for overlay-list and manifest inputs in `tool/__tests__/commands.test.ts`
120
+ - [x] T031 [US4] Add regression coverage for verbose conflict, invalid-overlay, and stack-incompatible skip context in `tool/__tests__/commands.test.ts`
121
+
122
+ ### Implementation for User Story 4
123
+
124
+ - [x] T032 [US4] Gate verbose narration so it only renders when `--verbose` is present in `tool/commands/plan.ts`
125
+ - [x] T033 [US4] Add verbose failure-boundary explanations for conflicts, invalid overlays, stack-incompatible skips, and manifest failures in `tool/commands/plan.ts`
126
+ - [x] T034 [US4] Ensure concise summary and verbose explanation reuse the same resolved overlay set in `tool/commands/plan.ts`
127
+
128
+ **Checkpoint**: All user stories should now be independently functional
129
+
130
+ ---
131
+
132
+ ## Phase 7: Polish & Cross-Cutting Concerns
133
+
134
+ **Purpose**: Finish docs, changelog, and end-to-end verification for the expanded scope.
135
+
136
+ - [x] T035 [P] Document direct-selection and manifest-driven `--verbose` examples in `README.md`
137
+ - [x] T036 [P] Document manifest-driven verbose planning behavior and examples in `docs/discovery-commands.md`
138
+ - [x] T037 Update the user-visible change summary for manifest-driven verbose planning in `CHANGELOG.md`
139
+ - [x] T038 Update validation steps and outcomes for manifest-driven planning in `docs/specs/001-verbose-plan-graph/quickstart.md`
140
+ - [x] T039 Run automated verification with `npm test` and `npm run lint`, then record the results in `docs/specs/001-verbose-plan-graph/quickstart.md`
141
+
142
+ ---
143
+
144
+ ## Dependencies & Execution Order
145
+
146
+ ### Phase Dependencies
147
+
148
+ - **Setup (Phase 1)**: Starts immediately
149
+ - **Foundational (Phase 2)**: Depends on Setup completion and blocks all story work
150
+ - **User Story 1 (Phase 3)**: Depends on Foundational completion
151
+ - **User Story 2 (Phase 4)**: Depends on Foundational completion and should follow US1 because it extends the same command surface and explanation model to manifest inputs
152
+ - **User Story 3 (Phase 5)**: Depends on Foundational completion and should follow US1 and US2 because it builds on the shared explanation records across both input modes
153
+ - **User Story 4 (Phase 6)**: Depends on Foundational completion and should land after US1 through US3 because it validates backward compatibility and failure behavior across the full verbose path
154
+ - **Polish (Phase 7)**: Depends on the desired user stories being complete
155
+
156
+ ### User Story Dependencies
157
+
158
+ - **User Story 1 (P1)**: No dependency on other stories after Phase 2
159
+ - **User Story 2 (P2)**: Depends on the shared explanation data from Phase 2 and should follow US1 once direct-selection verbose records are stable
160
+ - **User Story 3 (P3)**: Depends on the verbose output path from US1 and the manifest-root model from US2
161
+ - **User Story 4 (P4)**: Depends on the full verbose path from US1 through US3 so concise-mode and failure-boundary regressions are measured against the completed behavior
162
+
163
+ ### Within Each User Story
164
+
165
+ - Add or update verification tasks before implementation for that story
166
+ - Extend shared data capture before rendering output
167
+ - Render text and JSON output after explanation data is available
168
+ - Complete story-specific regression coverage before moving on
169
+
170
+ ### Parallel Opportunities
171
+
172
+ - `T035` and `T036` can run in parallel once command behavior is stable
173
+ - Within each user story, the work is intentionally sequential because the changes concentrate in `tool/commands/plan.ts` and `tool/__tests__/commands.test.ts`
174
+
175
+ ---
176
+
177
+ ## Parallel Example: User Story 2
178
+
179
+ ```bash
180
+ No safe [P] tasks inside User Story 2 because manifest input handling, explanation rendering, and command regression coverage all update shared files.
181
+ ```
182
+
183
+ ## Parallel Example: Polish
184
+
185
+ ```bash
186
+ Task: "Document direct-selection and manifest-driven --verbose examples in README.md"
187
+ Task: "Document manifest-driven verbose planning behavior and examples in docs/discovery-commands.md"
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Implementation Strategy
193
+
194
+ ### MVP First (User Story 1 Only)
195
+
196
+ 1. Complete Phase 1: Setup
197
+ 2. Complete Phase 2: Foundational
198
+ 3. Complete Phase 3: User Story 1
199
+ 4. Validate `plan --verbose` for a direct dependency case
200
+ 5. Stop for review before expanding into manifest-driven planning
201
+
202
+ ### Incremental Delivery
203
+
204
+ 1. Ship the shared explanation foundation
205
+ 2. Deliver User Story 1 for direct plus required dependencies
206
+ 3. Add User Story 2 for manifest-driven verbose planning
207
+ 4. Add User Story 3 for transitive and shared-parent path tracing across both input modes
208
+ 5. Add User Story 4 to lock in concise-mode backward compatibility and verbose failure context
209
+ 6. Finish docs, changelog, and verification
210
+
211
+ ### Parallel Team Strategy
212
+
213
+ 1. One developer completes Setup and Foundational work
214
+ 2. After US1 lands, one developer can extend manifest input handling while another prepares the manifest-driven documentation examples
215
+ 3. After US2 lands, the same command owner should complete transitive-path and failure-context work because those changes remain concentrated in shared files
216
+
217
+ ---
218
+
219
+ ## Notes
220
+
221
+ - All tasks use the required checklist format with IDs, optional `[P]` markers, story labels for story phases, and exact file paths
222
+ - The approved spec gate is closed; execution readiness now depends on completing implementation, verification, and documentation tasks cleanly
223
+ - Favor command-level regression tests in `tool/__tests__/commands.test.ts` because the risk is user-visible CLI behavior
@@ -0,0 +1,36 @@
1
+ # Specification Quality Checklist: Project Configuration File
2
+
3
+ **Purpose**: Validate specification completeness and quality before proceeding to planning
4
+ **Created**: 2026-03-11
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-11 and passed on the first review iteration.
35
+ - The spec intentionally defines file names and precedence rules because they are part of the user-visible feature behavior and acceptance scope.
36
+ - Items marked incomplete require spec updates before `/speckit.clarify` or `/speckit.plan`
@@ -0,0 +1,98 @@
1
+ # Contract: Init Project Config
2
+
3
+ ## Purpose
4
+
5
+ Define the user-facing contract for repository-root project config input during
6
+ `init` and `regen` runs.
7
+
8
+ ## Supported Files
9
+
10
+ Exactly one of these files may be used at the repository root:
11
+
12
+ - `.superposition.yml`
13
+ - `superposition.yml`
14
+
15
+ If both exist, initialization fails before generation.
16
+
17
+ ## Supported Declaration Surface
18
+
19
+ The project config file may declare every supported clean-generation input that
20
+ materially affects generated output, including:
21
+
22
+ - stack selection
23
+ - base image and custom image selection
24
+ - container name
25
+ - preset selection and preset parameters
26
+ - overlay selections by category
27
+ - output path
28
+ - port offset
29
+ - target environment
30
+ - minimal/editor settings
31
+ - supported customization inputs such as environment-related settings, custom
32
+ container definitions, preset glue values, and additional generated features
33
+
34
+ ## Resolution Rules
35
+
36
+ ### Standard Initialization
37
+
38
+ 1. Discover a supported project config file in the repository root.
39
+ 2. Validate the file and stop on any ambiguity or invalid entries.
40
+ 3. Apply project config values as the default persisted input source.
41
+ 4. Apply any direct command input as run-specific overrides.
42
+ 5. Collect only still-missing required values through the existing flow.
43
+
44
+ ### Explicit Project-File Source Selection
45
+
46
+ 1. `--from-project` selects the repository project file as the run's persisted
47
+ input source.
48
+ 2. The command fails before generation if no supported project file exists.
49
+ 3. `--from-project` may not be combined with `--from-manifest` or
50
+ clean-generation selection flags such as stack, overlays, or preset
51
+ selection.
52
+
53
+ ### Explicit Manifest Initialization
54
+
55
+ 1. Load the explicit manifest as the run’s persisted input source.
56
+ 2. Apply any direct command input as run-specific overrides.
57
+ 3. Do not silently merge repository project config values into that run.
58
+
59
+ ### Default Regeneration Source Selection
60
+
61
+ 1. `regen` first uses the repository project file when one exists and no other
62
+ persisted-input source has been selected.
63
+ 2. If no project file exists, `regen` falls back to manifest discovery in the
64
+ established manifest locations.
65
+ 3. Persisted-input source selection must be explicit and unambiguous before
66
+ generation starts.
67
+
68
+ ## Parity Requirement
69
+
70
+ If a generation input is supported through the existing clean-generation path
71
+ and materially affects generated output, it must be expressible through the
72
+ project config file and yield the same final generated output.
73
+
74
+ ## Error Conditions
75
+
76
+ Initialization must fail before generation when any of the following occur:
77
+
78
+ - both supported project config filenames exist
79
+ - the file cannot be parsed
80
+ - unsupported keys or values are declared
81
+ - conflicting selections are declared
82
+ - `--from-project` and `--from-manifest` are used together
83
+ - a persisted-input source mode is combined with clean-generation selection
84
+ flags such as stack, overlays, or preset selection
85
+ - a required value is missing in a non-interactive context
86
+ - a declared customization input is outside the supported clean-generation
87
+ surface
88
+
89
+ ## Verification Expectations
90
+
91
+ - Valid project config yields the same output as equivalent direct user
92
+ selections.
93
+ - Supported customization inputs round-trip through project config without
94
+ losing parity.
95
+ - Missing project config preserves current interactive and flag-driven
96
+ behavior.
97
+ - `regen` supports both explicit and implicit project-file source selection.
98
+ - Explicit manifest runs remain isolated from project-config defaults.
@@ -0,0 +1,126 @@
1
+ # Data Model: Project Configuration File
2
+
3
+ ## Entity: ProjectConfigFile
4
+
5
+ **Purpose**: Represents the repository-root YAML document that declares shared
6
+ generation intent for a project.
7
+
8
+ **Fields**:
9
+
10
+ - `path`: Absolute path to the discovered file.
11
+ - `fileName`: `.superposition.yml` or `superposition.yml`.
12
+ - `declaredValues`: Parsed user-authored generation inputs.
13
+ - `status`: `missing`, `loaded`, `invalid`, or `ambiguous`.
14
+
15
+ **Validation rules**:
16
+
17
+ - At most one supported config filename may exist in the repository root.
18
+ - The file must be valid YAML.
19
+ - The file may declare only supported clean-generation inputs.
20
+
21
+ ## Entity: ProjectConfigSelection
22
+
23
+ **Purpose**: Represents the set of supported generation inputs declared in the
24
+ project config file.
25
+
26
+ **Fields**:
27
+
28
+ - `stack`
29
+ - `baseImage`
30
+ - `customImage`
31
+ - `containerName`
32
+ - `preset`
33
+ - `presetChoices`
34
+ - `language`
35
+ - `database`
36
+ - `observability`
37
+ - `cloudTools`
38
+ - `devTools`
39
+ - `playwright`
40
+ - `outputPath`
41
+ - `portOffset`
42
+ - `target`
43
+ - `minimal`
44
+ - `editor`
45
+ - `customizationInputs`
46
+ - `sourceMode`
47
+
48
+ **Validation rules**:
49
+
50
+ - Values must follow the same supported set as equivalent direct command or
51
+ interactive inputs.
52
+ - Customization-related inputs must map to supported clean-generation behavior,
53
+ not unmanaged arbitrary output fragments.
54
+ - Partial definitions are allowed, but unresolved required values must remain
55
+ completable through the existing flow.
56
+
57
+ ## Entity: CustomizationInput
58
+
59
+ **Purpose**: Represents a supported non-basic generation setting that changes
60
+ the final generated output beyond simple stack or overlay selection.
61
+
62
+ **Fields**:
63
+
64
+ - `kind`: category of customization input
65
+ - `name`: user-facing identifier for the customization
66
+ - `value`: declared value
67
+ - `source`: `project-config`, `cli`, `manifest`, or `interactive`
68
+
69
+ **Examples**:
70
+
71
+ - custom container definition
72
+ - environment-related setting
73
+ - preset glue configuration
74
+ - editor/minimal customization
75
+ - additional generated feature setting
76
+
77
+ **Validation rules**:
78
+
79
+ - The customization must already be part of the supported clean-generation
80
+ surface.
81
+ - The customization must round-trip through generation without being dropped or
82
+ silently rewritten to a different meaning.
83
+
84
+ ## Entity: EffectiveGenerationRequest
85
+
86
+ **Purpose**: Represents the final resolved inputs for one generation run.
87
+
88
+ **Fields**:
89
+
90
+ - `sourceMode`: standard init, explicit project-file init, implicit project-file
91
+ regen, explicit manifest init, or standard init with direct overrides
92
+ - `resolvedValues`: final merged `QuestionnaireAnswers`-equivalent values
93
+ - `overrideSources`: per-field record of which source won precedence
94
+
95
+ **Relationships**:
96
+
97
+ - May derive from one `ProjectConfigSelection`
98
+ - May derive from one explicit manifest input
99
+ - May include many `CustomizationInput` values
100
+
101
+ ## Entity: ValidationIssue
102
+
103
+ **Purpose**: Represents one user-facing problem found while loading the project
104
+ config file.
105
+
106
+ **Fields**:
107
+
108
+ - `scope`: `discovery`, `syntax`, `field`, `selection`, `conflict`, `ambiguity`
109
+ - `location`: file or config entry reference
110
+ - `message`: user-facing description
111
+ - `suggestedFix`: corrective action
112
+
113
+ **State transitions**:
114
+
115
+ - `detected` -> `reported`
116
+ - `reported` -> `resolved by config edit`
117
+
118
+ ## Relationship Summary
119
+
120
+ - One repository has zero or one `ProjectConfigFile`.
121
+ - One `ProjectConfigFile` may contain one `ProjectConfigSelection`.
122
+ - One `ProjectConfigSelection` may contain many `CustomizationInput` values.
123
+ - One `EffectiveGenerationRequest` merges values from supported sources and
124
+ feeds generation plus manifest output.
125
+ - One `EffectiveGenerationRequest` must resolve exactly one persisted-input
126
+ source mode before generation starts.