# AGENTS.md instructions for 用于 Agent 工作流 JSON 处理的 jq

Use 用于 Agent 工作流 JSON 处理的 jq only for: 轻量、可脚本化的 JSON 处理器，适合 Agent 查看 API 响应、包文件和日志。

## 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.