cmd/simplexcalc/ now holds only main.go: it passes the version the linker sets to cli.Main and exits with the status that returns. root.go and run.go move to internal/cli with their comments, changed only to take the version as a parameter. Main reads the process's arguments and output; execute takes them as parameters so the new tests can check the version line and the non-zero status of an unknown command. Commands, flags, output, log lines and exit status are unchanged, and the -X main.version flag in the Dockerfile still applies. Model: opus-5-5
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Agent Guidance
|
||||
last_modified: 2026-09-26
|
||||
last_modified: 2026-09-28
|
||||
---
|
||||
|
||||
This file is the single source of guidance for any automated agent
|
||||
@@ -118,9 +118,10 @@ Do not weaken them.
|
||||
## Layout
|
||||
|
||||
```
|
||||
cmd/simplexcalc/ cobra command tree; main(), run and version
|
||||
cmd/simplexcalc/ main(), a single call into internal/cli
|
||||
internal/bot/ startup, address setup, and the reply to a message
|
||||
internal/calc/ the arithmetic: go/parser and go/constant
|
||||
internal/cli/ cobra command tree: run and version
|
||||
internal/config/ viper-backed configuration; the abort-on-garbage rule
|
||||
internal/logger/ log/slog, JSON always
|
||||
internal/simplex/ the simplex-chat child process and its WebSocket API
|
||||
|
||||
Reference in New Issue
Block a user