Skip to content

feat: add init CLI for both langs; give Go a real model config#6

Merged
rjrodger merged 1 commit into
mainfrom
claude/beautiful-newton-aCdiB
Jun 8, 2026
Merged

feat: add init CLI for both langs; give Go a real model config#6
rjrodger merged 1 commit into
mainfrom
claude/beautiful-newton-aCdiB

Conversation

@rjrodger

@rjrodger rjrodger commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

init (parity across both CLIs + library):

  • voxgig-model init [dir] scaffolds /model/model.jsonic and model/.model-config/model-config.jsonic, skipping existing files; identical output in TypeScript and Go. Library: initModel(dir, fs) in TS, model.Init(dir) in Go.

Go model config (true parity, not just a registry):

  • Add a Config build (go/config.go): resolves .model-config/ model-config.jsonic, auto-creates a self-contained stub when missing, and writes model-config.json - mirroring the TypeScript Config.
  • Model runs the config build before the model build and re-resolves it on each watch rebuild (go/model.go + a watch reload hook).
  • LocalProducer takes the action order from the config model (sys.model.order.action, then sys.model.action keys), falling back to the build spec / sorted registry. Action funcs are still bound from ModelSpec.Actions (Go can't require()), so the config file is now the source of truth for which actions run and in what order, like TS.

Tests: TS 22 (init scaffolds/skips, scaffold builds, CLI init); Go adds config (auto-create, order-from-config) and init (scaffold then build, CLI init). make test green; gofmt/vet clean.

Docs: how-to "Initialize a new model", reference init subcommand, CLI help, and updated Go parity notes in AGENTS.md / go/README.md.

https://claude.ai/code/session_01HxXpZNrKj3qonocwAtEP8r

init (parity across both CLIs + library):
- `voxgig-model init [dir]` scaffolds <dir>/model/model.jsonic and
  model/.model-config/model-config.jsonic, skipping existing files;
  identical output in TypeScript and Go. Library: initModel(dir, fs)
  in TS, model.Init(dir) in Go.

Go model config (true parity, not just a registry):
- Add a Config build (go/config.go): resolves .model-config/
  model-config.jsonic, auto-creates a self-contained stub when missing,
  and writes model-config.json - mirroring the TypeScript Config.
- Model runs the config build before the model build and re-resolves it
  on each watch rebuild (go/model.go + a watch reload hook).
- LocalProducer takes the action order from the config model
  (sys.model.order.action, then sys.model.action keys), falling back to
  the build spec / sorted registry. Action funcs are still bound from
  ModelSpec.Actions (Go can't require()), so the config file is now the
  source of truth for which actions run and in what order, like TS.

Tests: TS 22 (init scaffolds/skips, scaffold builds, CLI init); Go adds
config (auto-create, order-from-config) and init (scaffold then build,
CLI init). make test green; gofmt/vet clean.

Docs: how-to "Initialize a new model", reference init subcommand, CLI
help, and updated Go parity notes in AGENTS.md / go/README.md.

https://claude.ai/code/session_01HxXpZNrKj3qonocwAtEP8r
@rjrodger rjrodger merged commit ad370e8 into main Jun 8, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants