# AGENTS.md instructions for jq for JSON processing in agent workflows

Use jq for JSON processing in agent workflows only for: A small, scriptable JSON processor that helps agents inspect API responses, package files, and logs.

## Default behavior

- Prefer non-interactive commands and stable output formats: json, text.
- Start with read-only inspection commands before changing state.
- Show the exact command before destructive or deployment actions.
- Require explicit user approval for commands marked `requires-review` or `destructive`.

## Useful commands

- safe: `jq -r '.name' package.json` — Extracts one value from JSON.
- safe: `jq '.items[] | select(.status == "open")'` — Filters structured arrays.
- requires-review: `jq '.version = "1.0.1"' package.json > tmp && mv tmp package.json` — Changes a file and should be treated as an edit.

## Safety notes

- jq is read-only unless shell redirection overwrites a file.
- Agents should avoid complex filters when a simpler projection is enough.
- Use -e when exit codes need to signal missing or invalid values.