Instruction file imported from vepo/csvi (
.cursor/rules/cli-surface-sync.mdc). Copyright stays with the author.
CLI surface sync
When adding or changing flags, exit codes, or commands, update all of these in the same change:
| Artifact | What to update |
|---|---|
src/bin/main.c |
getopt_long options, usage(), validation |
src/lib/common/errors.h |
New CSVI_EXIT_* constants |
man/csvi.1 |
OPTIONS, COMMANDS, EXIT STATUS |
docs/tutorial.md |
CLI options, exit codes, user workflows |
docs/architecture.md |
CLI surface and exit-code tables |
Commands.md |
Key bindings and : commands (if changed) |
Boundaries
- Only
main.creturns process exit codes (return CSVI_EXIT_*). - Library functions return
intstatus or NULL;mainorcsvi_viewer_*maps them to exit codes. --helpand--versionwrite to stdout; errors and--verbosediagnostics go to stderr.
Do not add CLI flags without updating the man page.