Queued first for the simplexcalc repo-manager. cmd/simplexcalc/ becomes a single main.go that only calls into internal/, and the command setup and run logic in root.go and run.go move into an internal/ package. This lands before the units of issue 2, so they build on the corrected layout. Work starts when clawbot can push to this repo again (it has had read-only access since the transfer).
Model: opus-5-5
Queued first for the simplexcalc repo-manager. `cmd/simplexcalc/` becomes a single `main.go` that only calls into `internal/`, and the command setup and run logic in `root.go` and `run.go` move into an `internal/` package. This lands before the units of [issue 2](https://git.eeqj.de/sneak/simplexcalc/issues/2), so they build on the corrected layout. Work starts when clawbot can push to this repo again (it has had read-only access since the transfer).
Model: opus-5-5
Brief. The first unit of this repo's queue; the units of #2 start from next after it lands.
The Go style guide (CODE_STYLEGUIDE_GO.md in the prompts repo) says each cmd/{name}/ holds one main.go whose body is one call into library code, with all command logic in internal/. Today cmd/simplexcalc/ has main.go, root.go (the command tree and the version command) and run.go (the run command: configuration, logger, signals, bot.Run).
Decisions (reversible, taken by the repo-manager):
New package internal/cli, the style guide's own example name, holding the command tree and both commands, moved from root.go and run.go with their comments. It exposes func Main(version string) int: it runs the command tree and returns the exit status, printing the error to stderr as main does now.
cmd/simplexcalc/main.go keeps only the package comment, var version = "dev" (the linker sets it, so the -X main.version flag in the Dockerfile does not change) and func main() { os.Exit(cli.Main(version)) }. root.go and run.go are deleted.
No behaviour changes: same commands, flags, output, log lines and exit status.
Done when:
cmd/simplexcalc/ contains only main.go, shaped as above.
internal/cli has a test, at least that version prints simplexcalc {version} {os}/{arch} and that an unknown command returns a non-zero status.
The Layout block in AGENTS.md and any README mention of cmd/ describe the new layout. docs/TODO.md Completed Steps gets a line.
make check is green, and the image still builds and starts (simplexcalc version inside it prints the version passed in VERSION).
Model: opus-5-5
**Brief.** The first unit of this repo's queue; the units of https://git.eeqj.de/sneak/simplexcalc/issues/2 start from `next` after it lands.
The Go style guide (`CODE_STYLEGUIDE_GO.md` in the `prompts` repo) says each `cmd/{name}/` holds one `main.go` whose body is one call into library code, with all command logic in `internal/`. Today `cmd/simplexcalc/` has `main.go`, `root.go` (the command tree and the `version` command) and `run.go` (the `run` command: configuration, logger, signals, `bot.Run`).
**Decisions** (reversible, taken by the repo-manager):
- New package `internal/cli`, the style guide's own example name, holding the command tree and both commands, moved from `root.go` and `run.go` with their comments. It exposes `func Main(version string) int`: it runs the command tree and returns the exit status, printing the error to stderr as `main` does now.
- `cmd/simplexcalc/main.go` keeps only the package comment, `var version = "dev"` (the linker sets it, so the `-X main.version` flag in the `Dockerfile` does not change) and `func main() { os.Exit(cli.Main(version)) }`. `root.go` and `run.go` are deleted.
- No behaviour changes: same commands, flags, output, log lines and exit status.
**Done when:**
- `cmd/simplexcalc/` contains only `main.go`, shaped as above.
- `internal/cli` has a test, at least that `version` prints `simplexcalc {version} {os}/{arch}` and that an unknown command returns a non-zero status.
- The Layout block in `AGENTS.md` and any README mention of `cmd/` describe the new layout. `docs/TODO.md` Completed Steps gets a line.
- `make check` is green, and the image still builds and starts (`simplexcalc version` inside it prints the version passed in `VERSION`).
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Queued first for the simplexcalc repo-manager.
cmd/simplexcalc/becomes a singlemain.gothat only calls intointernal/, and the command setup and run logic inroot.goandrun.gomove into aninternal/package. This lands before the units of issue 2, so they build on the corrected layout. Work starts when clawbot can push to this repo again (it has had read-only access since the transfer).Model: opus-5-5
Brief. The first unit of this repo's queue; the units of #2 start from
nextafter it lands.The Go style guide (
CODE_STYLEGUIDE_GO.mdin thepromptsrepo) says eachcmd/{name}/holds onemain.gowhose body is one call into library code, with all command logic ininternal/. Todaycmd/simplexcalc/hasmain.go,root.go(the command tree and theversioncommand) andrun.go(theruncommand: configuration, logger, signals,bot.Run).Decisions (reversible, taken by the repo-manager):
internal/cli, the style guide's own example name, holding the command tree and both commands, moved fromroot.goandrun.gowith their comments. It exposesfunc Main(version string) int: it runs the command tree and returns the exit status, printing the error to stderr asmaindoes now.cmd/simplexcalc/main.gokeeps only the package comment,var version = "dev"(the linker sets it, so the-X main.versionflag in theDockerfiledoes not change) andfunc main() { os.Exit(cli.Main(version)) }.root.goandrun.goare deleted.Done when:
cmd/simplexcalc/contains onlymain.go, shaped as above.internal/clihas a test, at least thatversionprintssimplexcalc {version} {os}/{arch}and that an unknown command returns a non-zero status.AGENTS.mdand any README mention ofcmd/describe the new layout.docs/TODO.mdCompleted Steps gets a line.make checkis green, and the image still builds and starts (simplexcalc versioninside it prints the version passed inVERSION).Model: opus-5-5