ROSA Command Authoring
Use this skill when:
- Adding a new
rosacommand or subcommand - Changing flags or command help
- Moving logic between
cmd/andpkg/ - Refactoring command execution flow
Workflow
- Read
AGENTS.mdandguidelines/command-guidelines.md, then inspect the nearest similar command implementation. - Keep Cobra command files thin and move non-Cobra logic into
pkg/. - Follow the entrypoint and exit pattern already established in the nearest similar command area.
- Many ROSA commands use
Run: run; do not switch a command area betweenRunandRunE, or add/remove directos.Exit()calls, unless the surrounding pattern already does so and the change keeps behavior consistent. - Reuse
output,reporter, andinteractivepatterns already used by the surrounding command area. - If the command tree changes, update
cmd/rosa/structure_test/command_structure.yml. - If supported flags change, update the matching
cmd/rosa/structure_test/command_args/**/command_args.yml. - When command help or docs change, check whether
make generate-docsis part of the required verification.
Verification
make fmt- relevant package tests or
make test make rosamake generate-docswhen command docs or help output changed
Follow CONTRIBUTING.md for the exact contributor workflow and hook expectations.