You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds the file-authoring front door: pick shared engines (postgres/redis/minio),
fill typed params, and write a structurally-validated workspace.yaml. No lock,
no Docker, no ledger — pure config authorship. Structured as the spec's
"two faces, one builder": the flag path and the TUI both feed internal/scaffold.
Foundation (internal/scaffold, fully unit-tested):
- EmitWorkspaceYAML: deterministic ordered goccy emitter (sorted keys; params
kept as strings so 16 never renders 16.0).
- BuildWorkspace/resolveParams: Provides-filter, drop-at-default, required
fail-fast, store-seed.
- SanitizeName: CWD-basename -> valid dsname.
- config.ValidateWorkspaceBytes: in-memory structural validation reusing the
unexported structValidate/formatStructErr — a bad file is caught pre-write.
Flag path (internal/cli/init.go): --name/--service engine@ver/--param
svc.key=val/--alias/--project/--from-store/--out/--dry-run/--force/--json/
--no-input; atomic no-clobber write (+ backup); parent-workspace guard;
RefuseWindowsMount.
Interactive face (internal/prompt + internal/cli/init_tui.go): a Bubble Tea v2
wizard via charm.land/huh/v2 (engine multi-select, per-engine param forms with
defaults, a confirm screen previewing the YAML in a lipgloss box), behind a
shared prompt.IsInteractive gate so --json/--quiet/--no-input/non-TTY/CI always
reach the builder without bubbletea. The charm v2 stack is pure-Go (CGO_ENABLED=0
4-target cross-build clean; no v1 charm).
Tests: scaffold golden/determinism/build matrix, config validate, cli init
(happy/json/dry-run/no-clobber+force/parent-guard/from-store/non-TTY gate),
prompt IsInteractive matrix. make ci + determinism green.
Deferred: the internal/migrate consolidation onto EmitWorkspaceYAML (pinned by
the emit golden); a live two-pane preview is a polish increment.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments