Added some Cobra CLI conventions to AGENTS.md

This commit is contained in:
2026-05-31 17:09:53 -05:00
parent 9b665d2df6
commit c50388a38c
+7
View File
@@ -39,3 +39,10 @@ Use `make help` as the source of truth for available build/test targets and desc
- Maintain write-route protections (allowlist and rate limiting).
- Keep storage behavior transparent for clients (compression is internal).
- Add or update tests for behavior changes.
## Cobra CLI conventions
- Keep `cmd/pastebin/main.go` focused on `main()` and root command wiring.
- Put each Cobra subcommand in its own file (for example `cmd/pastebin/server.go`).
- Start the service through the explicit subcommand (`scratchbox server`), not from the root command directly.
- Validate command arguments with Cobra arg validators (for example `cobra.NoArgs`) where applicable.