Skip to content

v0.x: author settings as one surface

Spec 0197, landing in phases. This note grows with them.

Phase 1: the record and its flags

  • version.go is recorded. regenerate renders the Go directive the manifest holds instead of the toolchain it runs on. An older manifest gains the field on its next regenerate, set to the running toolchain (what the go line already says), and keeps it from then on. Change it with --go-version at generation or, until gtb set lands, by editing version.go in the manifest.
  • New flags on gtb generate project: --telemetry-endpoint, --telemetry-otel-endpoint, --auto-initialise, --skip-config-check, --auxiliary-commands, --config-layers, --signing-require-signature, --signing-require-checksum. Each writes the manifest field the generate reference names.
  • New manifest fields: bootstrap.auxiliary_commands (renders props.Tool.Bootstrap.AuxiliaryCommands) and signing.require_checksum (renders props.Tool.Signing.RequireChecksum).
  • props.BoolPtr(v bool) *bool in the framework, for the tri-state baselines a generated root sets in a struct literal.
  • The wizard gains a Telemetry page (with the telemetry feature) and a "require a verified checksum" confirm on the signing page.

Phase 2: one sync, run by every writer

  • enable, disable, enable signing and attach run the same derived-file sync as regenerate (root command, signing files, adapter files, derived fields). gtb enable ai alone now yields a chat.go that links the default providers; a regenerate project afterwards is no longer needed.
  • keychain.go is synced from the manifest. It is written while the manifest's keychain entry is enabled and removed when it is not, on every sync. A project that dropped the keychain by deleting the file will get the file back on its next regenerate: run gtb disable keychain once to record the choice. keychain joins the toggleable features.
  • A durable override is a manifest field, never a deleted file, stated as the rule in the manifest concept page and the generate reference.

Phase 3: gtb set, unset, get

  • One setter over the manifest's author settings by dotted path, validated like the flags, running the derived-file sync. The "edit the manifest and regenerate" instruction is gone from the docs. Features and templates keep their own commands and are refused by set.

Phase 4: emitted is not verified, and gtb leaves the tool block

  • Exit 3 from generate project and regenerate project when the files were written but go mod tidy or golangci-lint run --fix failed; the last line names the step. A script that expected 0 from an offline generation passes --no-verify, which skips the steps and exits 0 with a warning. Exit 2 stays the usage code.
  • The generated go.mod drops gitlab.com/phpboyscout/go-tool-base/cli/cmd/gtb, github.com/golangci/golangci-lint/cmd/golangci-lint and github.com/vektra/mockery/v3 from its tool block. Install gtb with the line the README now carries (@<version.gtb>); the justfile and CI already ran golangci-lint and mockery as installed binaries. An existing project loses the lines on its next regenerate, and go mod tidy drops the indirect requirements they carried, among them the golangci-lint v1 pin (#31) and the viper that made adding chat-gemini fail with an ambiguous cloud.google.com/go/compute/metadata.

Phase 5: gtb wizard

  • The generation wizard runs over an existing project, pre-filled from the manifest, and applies its answers through the same validation and sync as gtb set. --dry-run prints the diff. Needs a terminal; gtb set is the scripted way.
  • The features page listed keychain twice for a short while after phase 2 (keychain joined the toggleable features and was still appended separately); fixed here, with a test.