TanStack
CLI Reference

intent review

intent review shows which library skills and planning records need review after source changes. Completed reviews are remembered until their source or guidance changes again.

For the full maintainer pipeline, use intent maintainer review with --base, --json, or --record. It uses the same source-review implementation and report format described here. intent maintainer check combines review with registration, skill validation, distribution, and generated-file checks. The standalone command remains available for review-only checks and generated workflow reminders.

plaintext
@tanstack/intent@latest review [dir] [--base <ref>] [--json] [--check] [--record <report.json>] [--github-review] [--package-label <label>]

For the normal coding-agent workflow, run maintainer setup once. The installed guidance instructs the agent to review guidance and maintain the planning documents before handoff.

Quick start

  1. Run intent review from your library repository to see pending work.
  2. Ask your agent to review those items using the current source change. It updates the skills and planning record, then runs the relevant checks.
  3. Keep the resulting .intent/review-state.json with the source, skills, and planning documents in your change.
  4. Run intent review --check to confirm that no unreviewed items remain.

A justified no-op is a completed review. Missing evidence remains pending.

Options

Comparison and output

OptionBehavior
[dir]Locate the Git working tree. The review covers that repository, including its packages.
--base <ref>Compare against an available Git commit or ref, such as the actual PR base.
--jsonPrint the complete structured report for an agent or script.
--checkExit nonzero when review items remain.

Recording and reminders

OptionBehavior
--record <report.json>Record completed outcomes from an annotated JSON report.
--github-reviewWrite review-items.json, a pr-body.md reminder when needed, and GitHub step output/summary when configured.
--package-label <label>Set the library label in generated reminder items.

--record cannot be combined with --base, --json, or --check. --github-review cannot be combined with --record, --json, or --check.

Behavior

What appears in a review

ItemWhy it appearsWhat to do
Skill (skill)No recorded review, changed source, or changed skill/reference content.Compare the guidance with the source and update it when needed.
Planning records (planning)The domain map, spec, or tree needs initial review, or its source/skill evidence changed.Reconcile all three documents, preserving earlier decisions and remaining work.
Unmapped change (source)A changed file is outside declared skill sources and not an ignored path, or a skill was removed.Decide whether existing guidance, a new skill, or an exclusion is appropriate.

An unmapped file does not automatically require a new skill. A planning review can be needed even when nobody edited the planning documents.

Comparison scope

Git and an initial commit are required. The default command is read-only.

SettingComparison
Explicit --baseThe commit selected by that ref.
Existing review stateThe first recorded baseline, plus each item's recorded content hashes.
No review stateEach tracked skill uses the commit that introduced it to identify subsequent mapped-source changes. New skills still require an initial review; repository-wide unmapped changes use HEAD.

Items without a recorded review use their introducing commit even when repository review state exists, unless you pass --base. Planning records use the commit that introduced their skill_tree.yaml.

The comparison includes committed changes since the base and staged, unstaged, and untracked files visible to Git. Renames appear as removals and additions. It reviews final working-tree content; a partially staged index is not separately certified.

Recorded hashes detect later edits even when a review happened before a commit. The state retains hashes rather than earlier source text. Default review fails closed when its stored baseline is no longer available; it does not infer a replacement from rewritten history.

Recover an unavailable baseline

A squash merge, shallow clone, or history rewrite can remove the commit stored as the review baseline. Choose an available commit that covers the changes you intend to review, then create an explicit-base report:

plaintext
@tanstack/intent@latest review --base <available-commit> --json > .intent/review.json

Review and resolve every item in that report, then record it:

@tanstack/intent@latest review --record .intent/review.json

When the previous stored baseline is unavailable, recording this fully resolved explicit-base report adopts the report's base as the new durable baseline. An empty report can also adopt the new base because it records that the selected comparison has no pending items. A partial report, an omitted or unresolved outcome, unresolved source or planning evidence, or a changed fingerprint cannot replace the missing baseline. When the stored baseline is still available, recording an explicit-base report does not replace it.

Select the recovery base deliberately

The selected base sets the Git comparison boundary. Fetch missing history when possible. Otherwise choose a reachable commit old enough to include every intended change; a base that is too recent can omit earlier unreviewed changes.

Source mappings

Discovery covers first-party skills/**/SKILL.md files in the repository and its packages, custom roots containing _artifacts/, exact paths declared in the skill tree, and previously reviewed skill paths. An unrelated SKILL.md elsewhere does not automatically become a library skill. Review excludes node_modules, even without a Git ignore rule.

Source entryResolution
src/request.tsRelative to the owning package, including skills in custom directories.
owner/repository:src/request.tsRelative to the Git root; the repository identity must match the origin or root package metadata.
src/**/*.tsGit glob syntax: *, ?, character classes, and **.

Brace expansion and extglobs are unsupported. Ignored files, submodules, external source repositories, and symbolic links require manual review. Missing or unsupported mappings remain unresolved.

Ignored paths

Files that Intent writes or that carry no library guidance do not appear as unmapped changes. The default list covers the agent instruction files (AGENTS.md, CLAUDE.md, .cursorrules, .github/copilot-instructions.md), .claude-plugin/**, .cursor-plugin/**, .github/workflows/check-skills.yml, .intent/**, **/package.json, and the lockfiles (pnpm-lock.yaml, package-lock.json, npm-shrinkwrap.json, yarn.lock, bun.lock).

The list only stops these paths from surfacing as unmapped changes. A skill that lists one of them in sources still tracks it.

Add repository-specific patterns under review.ignore in skill_tree.yaml:

yaml
review:
  ignore:
    - "docs/**"
    - "examples/**/package.json"

Entries use the same Git glob syntax as source mappings. An entry that is not a non-empty string fails review with the path of the tree file.

Required planning documents

The maintainer workflow keeps a cumulative record across batches:

DocumentRecords
domain_map.yamlDomains, developer tasks, relationships, failure modes, and gaps.
skill_spec.mdReadable coverage, maintainer decisions, batch history, and remaining work.
skill_tree.yamlSkill identities, paths, package placement, prerequisites, and source mappings.

Review finds existing planning locations from these filenames, including custom directories. Without one, installed maintainer guidance requires _artifacts/ at a monorepo root or skills/_artifacts/ for a standalone library. Previously recorded locations remain required if their files are deleted.

All three files must be present, nonempty, readable, and visible to Git. Each YAML document must contain an object with a skills array. Missing or invalid records remain unresolved.

The planning snapshot includes the documents and the discovered skill/source evidence. Changes reopen planning review without reopening an otherwise unchanged individual skill. The check establishes file presence, YAML shape, and reviewed content hashes; the agent and maintainer still assess whether the written record is accurate and complete.

Record a completed review

Interactive review

For a human terminal, run the interactive command from the library repository:

@tanstack/intent@latest maintainer review --interactive

Inspect each item's current guidance and changed files, choose an outcome, and supply the reason and actual evidence. The changes view compares tracked files with the displayed Git base and includes untracked content. Use --base <available-commit> for a specific comparison. Edit and test guidance before starting; changes during review invalidate the affected outcomes.

Choose Leave pending when more work is needed. Items with unresolved source mappings or planning problems cannot be completed. The final preview lists the proposed outcomes and evidence. Confirmation records through the same fingerprint checks as --record; cancellation records nothing. Evidence text is stored, not executed or independently verified.

Interactive review requires a terminal outside CI and cannot be combined with --json or --record. A zero exit status means the interaction completed, not that all review items were resolved. Use intent maintainer check --base <available-commit> as the read-only CI gate. JSON reports and the manual procedure below remain available to agents and scripts.

Record all pending items

After inspecting all pending items and running the relevant checks, record one conclusion in one command:

plaintext
@tanstack/intent@latest maintainer review --unchanged "Checked retries and cancellation against the updated implementation; the guidance remains accurate."
@tanstack/intent@latest maintainer review --updated "Updated the affected examples and planning records, then checked them against the source."

Choose one command. --unchanged records no-change; --updated records updated. The reason is required and applies to every pending item. Intent records each item's current changed paths and head revision as evidence and applies the same fingerprint and unresolved-problem checks as JSON recording. The command fails when nothing is pending or any item cannot be recorded. It does not assess the guidance or run the checks for you.

These flags belong to maintainer review, accept --base, and cannot be combined with each other, --json, --record, or --interactive. Use a JSON report when items need different conclusions or more detailed evidence.

JSON review

The installed maintainer procedure handles these steps. For manual use:

  1. Review the pending items, edit guidance and planning records as needed, and run the relevant checks.
  2. Regenerate the report after those edits. Save it outside source paths, such as under .intent/, which the maintainer commands create:
plaintext
@tanstack/intent@latest review --json > .intent/review.json
  1. Add an outcome, reason, and evidence to each item you completed. Preserve the report's identities, baseline, and fingerprints. The report's recording block lists the accepted values.
  2. Record the report and check remaining work:

@tanstack/intent@latest review --record .intent/review.json @tanstack/intent@latest review --check

Outcomes

OutcomeMeaningClears the item?
updatedGuidance or planning records were corrected and checked.Yes, with current fingerprints and resolved evidence.
no-changeThe existing content was checked and remains accurate.Yes, with a reason and evidence.
out-of-scopeA skill or source item is outside the reviewed guidance scope.Yes, with a reason and evidence. Not accepted for planning records.
unresolvedRequired evidence or a decision is still missing.No.
No outcomeThe item has not been reviewed.No.

For example, add these fields to an existing report item; this is not a complete report:

json
{
  "outcome": "no-change",
  "reason": "Only the internal cache changed; the documented retry bound and errors remain the same.",
  "evidence": ["src/request.ts", "test/request.test.ts: passed"]
}

For a planning item, the reason and evidence must cover all three documents. Preserve prior tasks, decisions, and future work when extending them with a new batch.

--record rejects a report that annotates none of its items. The error names the required fields and points to intent maintainer review --interactive; a report with zero items still records its baseline.

Saved state

--record writes .intent/review-state.json containing the baseline, source/guidance hashes, reviewed revision, outcomes, reasons, and evidence, creating the directory when it is missing. It does not commit, publish, or change skill versions. .intent/ is reserved for Intent's working files and is excluded from unmapped-change items: review state and working reports, .intent/skill-distribution.json written by maintainer sync, and the temporary .intent/maintainer.lock and .intent/review-state.json.lock that serialize writes.

Identical recorded content suppresses repeat reminders. Later edits reopen review. The saved state does not replace the planning documents, execute evidence strings, or verify the truth of a recorded conclusion.

Default and JSON output

Text output shows the pending count and up to 20 items, with changed paths, unresolved problems, and the next step. Use --json for the full report.

JSON fieldMeaning
schemaVersionReport format version; currently 1.
root, head, baseWorking-tree identity and compared Git revisions.
recordingAccepted outcomes, the narrower planningOutcomes, the required fields (outcome, reason, evidence), and the command that records the report. --record ignores this block.
itemsPending skill, planning, and source review items.
Item id, kind, pathStable item identity, category, and location.
Item changedFilesPaths changed since the relevant comparison. Can be empty for initial review.
Item snapshot, fingerprintCurrent content hashes and item fingerprint used when recording.
Item problemsUnresolved evidence that prevents recording completion.

Automated checks

The optional version 4 setup workflow connects review to PRs and releases:

TriggerCheck
Pull request with maintainer guidance or review statemaintainer check --base <PR-base-sha>
Release/manual run with review statereview --github-review
Release/manual run without review stateExisting stale --github-review fallback

This catches skipped review recording and missing planning documents. It does not run an authoring model in CI. Your coding agent handles the reminder using the same maintainer procedure.

Status and errors

ResultBehavior or next step
No pending items--check exits 0.
Pending review--check exits nonzero; review and record the remaining items.
Missing, empty, or invalid planning documentRestore or repair the record before recording completion.
Source or guidance changed after the reportRegenerate --json after editing; stale fingerprints are rejected.
Missing recorded baselineFetch the referenced history, or create and fully resolve an explicit --base report to adopt a deliberate available baseline.
Missing or option-like explicit basePass a reachable commit or ref; explicit bases remain strict and are never inferred.
Corrupt review stateRestore or repair the state; Intent does not silently discard it.
Existing recording lockWait for the current recording. Remove the reported .intent/review-state.json.lock only after confirming no recording is running, then regenerate the report and retry.
Wrong working treeRegenerate the report in the repository being reviewed.
Git/setup failureNormal review exits nonzero. --github-review writes a failure reminder so the missing evidence stays visible.