This issue proposes adding a new agent formatter that contains as few tokens as necessary to accomplish communicating the same information. That means it is not intended for human consumption, but to be read by a machine (like AI). That probably means something like:
- Minimal code rendering (e.g., context lines), maybe even none at all
- Includes diagnostic help text, labeling, error messages
- De-duplicated filenames or at least truncated somewhat
- No fancy unicode characters to draw lines or boxes
Then, once we have the new formatter available, we automatically enable it if we detect that oxlint is being used by an AI agent. We can probably copy some of this logic from https://github.com/unjs/std-env, which is used by Vitest.
Prior art
This issue proposes adding a new
agentformatter that contains as few tokens as necessary to accomplish communicating the same information. That means it is not intended for human consumption, but to be read by a machine (like AI). That probably means something like:Then, once we have the new formatter available, we automatically enable it if we detect that
oxlintis being used by an AI agent. We can probably copy some of this logic from https://github.com/unjs/std-env, which is used by Vitest.Prior art