feat: add init CLI for both langs; give Go a real model config#6
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
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