feat: implement AXI compliance for agent-friendly CLI#67
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Truncate()appends... [N]showing total original length instead of silent...output.PrintHint()for contextual next-step suggestions after mutations and on empty/paginated lists--fieldsflag: all 6 list commands support--fieldsfor table column projection via newSelectColumns/FilterRowhelperssl alias,sl mailbox,sl domainshow live data instead of help text when invoked with no subcommandalias listandmailbox listnow print explicit warnings when results are empty--jsonis active and a command fails, a{"error":"...","code":N}envelope is emitted to stdoutcli-devpluginTest plan
go build ./...passesgo test -race ./...passesgo vet ./...passessl aliasshows alias table (not help)sl alias list --fields id,emailshows 2-column tablesl alias create --randomshows hint after successalias list,mailbox list)[N]total length (e.g.Email to contact Mose... [108])sl alias list --jsonwith bad API key emits{"error":"...","code":1}to stdoutHint: sl alias list --page 2 or sl alias list --all)sl alias delete(Hint: sl alias list)