Diagnostics
monochange step diagnose-changesets gives you a quick snapshot of every pending changeset together with its git and review context.
It is useful for human developers reviewing a PR, for AI agents auditing what has changed, and for CI steps that need to understand the full context of pending work before triggering a release.
Basic usage
Inspect all pending changesets:
monochange step diagnose-changesets
Inspect a specific changeset:
monochange step diagnose-changesets --changeset .changeset/feature.md
You can pass --changeset multiple times. Duplicate paths are deduplicated automatically:
monochange step diagnose-changesets \
--changeset .changeset/api-change.md \
--changeset .changeset/api-change.md \
--changeset .changeset/bug-fix.md
A short name without the directory prefix also works:
monochange step diagnose-changesets --changeset feature.md
And absolute paths resolve correctly too:
monochange step diagnose-changesets --changeset /home/user/project/.changeset/feature.md
JSON output
Machine-readable diagnostics for scripting, CI, or AI consumption:
monochange step diagnose-changesets --format json
The JSON envelope includes:
requested_changesets: the resolved paths that were queriedchangesets: fullPreparedChangesetrecords, each with:path: workspace-relative path to the changeset filesummary: the first paragraph of the markdown bodydetails: optional follow-up paragraphstargets: package/group bump entries, each withkind,id,bump,origin, and optionalevidence_refscontext: git and review context (see below)
Context fields
When a changeset has been committed to a git repository, each context record contains:
introduced: revision where the changeset file was first committedlast_updated: revision where it was most recently changed (omitted when same asintroduced)related_issues: issues linked by the changeset or the PR that introduced it
Each revision record includes:
commit.sha: full commit SHAcommit.short_sha: short SHA for displayreview_request: PR/MR number and URL when the commit is associated with a pull request
Command
Use the generated immutable step command directly:
monochange step diagnose-changesets --format json
You only need a [cli.*] entry if you want a repository-specific alias that wraps diagnostics with additional steps or inputs.
AI agent and MCP usage
monochange step diagnose-changesets --format json and the MCP tool monochange_diagnostics are designed to give AI agents a structured overview of all pending changes before planning a release, reviewing a PR, or proposing follow-up work.
A typical agent workflow looks like this:
monochange step discover --format json: understand the workspace package graphmonochange step diagnose-changesets --format json: see all pending changesets, linked PRs, and introduced commitsmonochange run release --dry-run --format json: preview the computed release planmonochange run change ...: add, update, or remove changesets as neededmonochange run release: execute the release when everything looks correct
Because monochange step diagnose-changesets and monochange_diagnostics return stable, workspace-relative paths and structured JSON, agents can parse the output without needing to read raw markdown files directly. Each changeset record includes enough context, such as who introduced it, which PR it belongs to, and which issues it closes, for an agent to make targeted decisions about whether to proceed with a release or request changes.
Example: check for undocumented packages before a release
monochange step diagnose-changesets --format json | jq '[.changesets[] | select(.targets | length == 0)]'
Example: list all open review requests linked to pending changesets
monochange step diagnose-changesets --format json \
| jq '[.changesets[].context?.introduced?.review_request? | select(. != null) | .id] | unique'