REPO_POLICIES.md says each cmd/<name>/main.go is thin: its body is a single call into internal/, with no project logic in cmd/. cmd/bsdaily/main.go builds the cobra command, checks that --date and --from/--to are used correctly, parses the dates and expands the range, all inside main.
Definition of done
cmd/bsdaily/main.go only calls into internal/ (passing along the version from #4, which must stay settable as main.Version) and exits with the status it gets back.
The command, the flag rules and the date parsing live in internal/, with the same flags, help text, error messages and exit status as today.
Unit tests cover the flag rules and the date handling: a single date, a range, a range of one day, --from after --to, a missing half of a range, --date with --from, and a malformed date.
make check passes.
Starts after #4 lands on next, since both change cmd/bsdaily/main.go.
Model: opus-5-5
`REPO_POLICIES.md` says each `cmd/<name>/main.go` is thin: its body is a single call into `internal/`, with no project logic in `cmd/`. `cmd/bsdaily/main.go` builds the cobra command, checks that `--date` and `--from`/`--to` are used correctly, parses the dates and expands the range, all inside `main`.
## Definition of done
1. `cmd/bsdaily/main.go` only calls into `internal/` (passing along the version from https://git.eeqj.de/sneak/bsdaily/issues/4, which must stay settable as `main.Version`) and exits with the status it gets back.
2. The command, the flag rules and the date parsing live in `internal/`, with the same flags, help text, error messages and exit status as today.
3. Unit tests cover the flag rules and the date handling: a single date, a range, a range of one day, `--from` after `--to`, a missing half of a range, `--date` with `--from`, and a malformed date.
4. `make check` passes.
Starts after https://git.eeqj.de/sneak/bsdaily/issues/4 lands on `next`, since both change `cmd/bsdaily/main.go`.
Model: opus-5-5
Plan. Starts now that #4 has landed on next. main.Version stays in package main, where -X sets it. main passes it to one call into internal/, which builds the cobra command, applies the flag rules, parses the dates and runs, then returns the exit status for main to exit with. The first startup log line still carries the version. Flags, help text, error messages and exit status stay as they are on next. The new unit tests cover the cases in the definition of done, without touching the filesystem or the hard-coded production paths. Standards: REPO_POLICIES.md and CODE_STYLEGUIDE_GO.md at sneak/prompts commit cc440118c876, and the shared lint config already in the repo.
Model: opus-5-5
Plan. Starts now that https://git.eeqj.de/sneak/bsdaily/issues/4 has landed on `next`. `main.Version` stays in package `main`, where `-X` sets it. `main` passes it to one call into `internal/`, which builds the cobra command, applies the flag rules, parses the dates and runs, then returns the exit status for `main` to exit with. The first startup log line still carries the version. Flags, help text, error messages and exit status stay as they are on `next`. The new unit tests cover the cases in the definition of done, without touching the filesystem or the hard-coded production paths. Standards: `REPO_POLICIES.md` and `CODE_STYLEGUIDE_GO.md` at `sneak/prompts` commit `cc440118c876`, and the shared lint config already in the repo.
Model: opus-5-5
Built in #13: the command, its flag rules and the date parsing now live in internal/cli, and cmd/bsdaily/main.go is the single call os.Exit(cli.Main(Version)). Table tests cover the flag rules and the dates.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/bsdaily/pulls/13: the command, its flag rules and the date parsing now live in `internal/cli`, and `cmd/bsdaily/main.go` is the single call `os.Exit(cli.Main(Version))`. Table tests cover the flag rules and the dates.
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.
REPO_POLICIES.mdsays eachcmd/<name>/main.gois thin: its body is a single call intointernal/, with no project logic incmd/.cmd/bsdaily/main.gobuilds the cobra command, checks that--dateand--from/--toare used correctly, parses the dates and expands the range, all insidemain.Definition of done
cmd/bsdaily/main.goonly calls intointernal/(passing along the version from #4, which must stay settable asmain.Version) and exits with the status it gets back.internal/, with the same flags, help text, error messages and exit status as today.--fromafter--to, a missing half of a range,--datewith--from, and a malformed date.make checkpasses.Starts after #4 lands on
next, since both changecmd/bsdaily/main.go.Model: opus-5-5
Plan. Starts now that #4 has landed on
next.main.Versionstays in packagemain, where-Xsets it.mainpasses it to one call intointernal/, which builds the cobra command, applies the flag rules, parses the dates and runs, then returns the exit status formainto exit with. The first startup log line still carries the version. Flags, help text, error messages and exit status stay as they are onnext. The new unit tests cover the cases in the definition of done, without touching the filesystem or the hard-coded production paths. Standards:REPO_POLICIES.mdandCODE_STYLEGUIDE_GO.mdatsneak/promptscommitcc440118c876, and the shared lint config already in the repo.Model: opus-5-5
Built in #13: the command, its flag rules and the date parsing now live in
internal/cli, andcmd/bsdaily/main.gois the single callos.Exit(cli.Main(Version)). Table tests cover the flag rules and the dates.Model: opus-5-5