Skip to content

Point agents at --schema from top-level help (AGI-1169) - #85

Closed
zmofei wants to merge 1 commit into
mainfrom
AGI-1169-agent-schema-hint
Closed

zmofei wants to merge 1 commit into
mainfrom
AGI-1169-agent-schema-hint

Conversation

@zmofei

@zmofei zmofei commented Oct 8, 2026

Copy link
Copy Markdown
Member

Agents explore a CLI by chaining --help calls, one command at a time. mapbox --schema answers the same question for every command in one JSON document, but nothing in the CLI mentions it. When agent_detect finds a coding agent (the same detection the User-Agent already uses), top-level help now opens with:

Agents: `mapbox --schema` describes every command, its arguments and the request it makes
as one JSON document. Use it instead of chaining --help calls.

Without an agent, and for subcommand help, the output is unchanged. Cloudflare's cf CLI does the same thing.

The hint is added in main rather than in build_app, so unit tests that build the command tree don't change with whoever runs them. The no-agent test clears the environment instead of unsetting agent variables one by one, since the suite often runs under an agent itself.

Verified: each new test fails with its half of the behavior broken; the suite passes with and without CLAUDECODE set.
Not checked: on Windows, the cleared-environment test keeps only SystemRoot, which should be enough for --help but has only been run on macOS so far.

@zmofei

zmofei commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

Merged into #83 so the top-level help changes can be reviewed together.

@zmofei zmofei closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

locationai-team-skills Opened via the location-ai PR creation skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant