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.
@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.
A justified no-op is a completed review. Missing evidence remains pending.
| Option | Behavior |
|---|---|
| [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. |
| --json | Print the complete structured report for an agent or script. |
| --check | Exit nonzero when review items remain. |
| Option | Behavior |
|---|---|
| --record <report.json> | Record completed outcomes from an annotated JSON report. |
| --github-review | Write 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.
| Item | Why it appears | What 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.
Git and an initial commit are required. The default command is read-only.
| Setting | Comparison |
|---|---|
| Explicit --base | The commit selected by that ref. |
| Existing review state | The first recorded baseline, plus each item's recorded content hashes. |
| No review state | Each 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.
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:
@tanstack/intent@latest review --base <available-commit> --json > .intent/review.jsonReview 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.
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 entry | Resolution |
|---|---|
| src/request.ts | Relative to the owning package, including skills in custom directories. |
| owner/repository:src/request.ts | Relative to the Git root; the repository identity must match the origin or root package metadata. |
| src/**/*.ts | Git 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.
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:
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.
The maintainer workflow keeps a cumulative record across batches:
| Document | Records |
|---|---|
| domain_map.yaml | Domains, developer tasks, relationships, failure modes, and gaps. |
| skill_spec.md | Readable coverage, maintainer decisions, batch history, and remaining work. |
| skill_tree.yaml | Skill 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.
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.
After inspecting all pending items and running the relevant checks, record one conclusion in one command:
@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.
The installed maintainer procedure handles these steps. For manual use:
@tanstack/intent@latest review --json > .intent/review.json@tanstack/intent@latest review --record .intent/review.json @tanstack/intent@latest review --check
| Outcome | Meaning | Clears the item? |
|---|---|---|
| updated | Guidance or planning records were corrected and checked. | Yes, with current fingerprints and resolved evidence. |
| no-change | The existing content was checked and remains accurate. | Yes, with a reason and evidence. |
| out-of-scope | A skill or source item is outside the reviewed guidance scope. | Yes, with a reason and evidence. Not accepted for planning records. |
| unresolved | Required evidence or a decision is still missing. | No. |
| No outcome | The item has not been reviewed. | No. |
For example, add these fields to an existing report item; this is not a complete report:
{
"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.
--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.
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 field | Meaning |
|---|---|
| schemaVersion | Report format version; currently 1. |
| root, head, base | Working-tree identity and compared Git revisions. |
| recording | Accepted outcomes, the narrower planningOutcomes, the required fields (outcome, reason, evidence), and the command that records the report. --record ignores this block. |
| items | Pending skill, planning, and source review items. |
| Item id, kind, path | Stable item identity, category, and location. |
| Item changedFiles | Paths changed since the relevant comparison. Can be empty for initial review. |
| Item snapshot, fingerprint | Current content hashes and item fingerprint used when recording. |
| Item problems | Unresolved evidence that prevents recording completion. |
The optional version 4 setup workflow connects review to PRs and releases:
| Trigger | Check |
|---|---|
| Pull request with maintainer guidance or review state | maintainer check --base <PR-base-sha> |
| Release/manual run with review state | review --github-review |
| Release/manual run without review state | Existing 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.
| Result | Behavior 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 document | Restore or repair the record before recording completion. |
| Source or guidance changed after the report | Regenerate --json after editing; stale fingerprints are rejected. |
| Missing recorded baseline | Fetch the referenced history, or create and fully resolve an explicit --base report to adopt a deliberate available baseline. |
| Missing or option-like explicit base | Pass a reachable commit or ref; explicit bases remain strict and are never inferred. |
| Corrupt review state | Restore or repair the state; Intent does not silently discard it. |
| Existing recording lock | Wait 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 tree | Regenerate the report in the repository being reviewed. |
| Git/setup failure | Normal review exits nonzero. --github-review writes a failure reminder so the missing evidence stays visible. |