diff --git a/AGENTS.md b/AGENTS.md index ea30f49..110808d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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.