Skip to content

feat: implement AXI compliance for agent-friendly CLI#67

Merged
mexcool merged 1 commit into
mainfrom
feat/axi-compliance
Apr 9, 2026
Merged

feat: implement AXI compliance for agent-friendly CLI#67
mexcool merged 1 commit into
mainfrom
feat/axi-compliance

Conversation

@mexcool

@mexcool mexcool commented Apr 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Truncation size hints: Truncate() appends ... [N] showing total original length instead of silent ...
  • PrintHint helper: new output.PrintHint() for contextual next-step suggestions after mutations and on empty/paginated lists
  • --fields flag: all 6 list commands support --fields for table column projection via new SelectColumns/FilterRow helpers
  • Content first: sl alias, sl mailbox, sl domain show live data instead of help text when invoked with no subcommand
  • Empty state fixes: alias list and mailbox list now print explicit warnings when results are empty
  • Structured JSON errors: when --json is active and a command fails, a {"error":"...","code":N} envelope is emitted to stdout
  • AGENTS.md: documents AXI compliance patterns and references the cli-dev plugin

Test plan

  • go build ./... passes
  • go test -race ./... passes
  • go vet ./... passes
  • sl alias shows alias table (not help)
  • sl alias list --fields id,email shows 2-column table
  • sl alias create --random shows hint after success
  • Empty state guards verified in code (alias list, mailbox list)
  • Truncated note shows [N] total length (e.g. Email to contact Mose... [108])
  • sl alias list --json with bad API key emits {"error":"...","code":1} to stdout
  • Pagination hint shown on full page (Hint: sl alias list --page 2 or sl alias list --all)
  • Delete hint shown after sl alias delete (Hint: sl alias list)

Add 6 AXI (Agent eXperience Interface) improvements:

- Truncation size hints: Truncate() now appends "... [N]" showing total
  original length instead of silent "..."
- PrintHint helper: new output.PrintHint() for contextual next-step
  suggestions after mutations and on empty/paginated lists
- --fields flag: all 6 list commands support --fields for table column
  projection via new SelectColumns/FilterRow helpers
- Content first: sl alias, sl mailbox, sl domain show live data instead
  of help text when invoked with no subcommand
- Empty state fixes: alias list and mailbox list now print explicit
  warnings when results are empty
- Structured JSON errors: when --json is active and a command fails,
  a {"error":"...","code":N} envelope is emitted to stdout

Document AXI compliance and cli-dev plugin skills in AGENTS.md.
@mexcool mexcool self-assigned this Apr 9, 2026
@mexcool mexcool merged commit ce49c3a into main Apr 9, 2026
1 check passed
@mexcool mexcool deleted the feat/axi-compliance branch April 9, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant