Commit eaf4694
feat(template):
Add `devstack template new` — the interactive sibling of `template init` that
authors a complete template bundle (template.yaml + optional build/ tree +
golden) through one deterministic builder fed by two front-ends.
- internal/template/scaffold: pure, deterministic Build(Spec)->Bundle (app vs
engine is a compile-time branch; meta emitted as literal YAML via ordered
goccy MapSlice; actions only under service:/build); WriteBundle atomic +
no-clobber/--force backup; PreviewSource for the real Resolve+LintResolved
preview.
- Three authoring lints (meta-templating hard error; delimiter-collision and
param-type warnings) shared by `template new` preview AND wired into
`template lint` (template.ParseCheck added for collision detection).
- CLI: newTemplateNewCmd with the full flag surface (--kind/--name/--from/
--extends/--base-image/--param/--port/--provides/--exports/--entrypoint/
--golden/--regold/--dir/--dry-run/--force/--print-spec) + a Bubble Tea v2
wizard gated on prompt.IsInteractive so --json/--quiet/--no-input/non-TTY/CI
never enter bubbletea. --print-spec ⇒ --from is a byte-identical round-trip.
- template.ValidRef exported for name validation; `template init` unchanged.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>template new authoring wizard + scaffold builder (spec 23) (#81)1 parent 19bf7b9 commit eaf4694
13 files changed
Lines changed: 1791 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | | - | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
104 | | - | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
149 | | - | |
150 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
151 | 159 | | |
152 | 160 | | |
153 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
154 | 170 | | |
155 | 171 | | |
156 | 172 | | |
157 | | - | |
| 173 | + | |
158 | 174 | | |
159 | 175 | | |
160 | 176 | | |
161 | | - | |
| 177 | + | |
162 | 178 | | |
163 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
164 | 202 | | |
165 | 203 | | |
166 | 204 | | |
| |||
0 commit comments