How to finalise a repository change
Use Nx to select affected projects and run the repository checks before handoff.
Complete setup with mise install, an active mise shell, and pnpm install.
Prepare the change
Inspect branch commits, staged and unstaged changes, and untracked files. Confirm which changes belong to the task. Complete the reviews required by the finalise-change skill. These include outcomes, generated output, release impact, CI changes, and required security scans.
Create required changesets and regenerate stale output before the checks. The check targets do not generate release metadata, stage files, or create commits.
Run the checks
Fetch the intended base when necessary. Nx does not fetch refs. For branch work, run this command from the repository root:
nx affected --base=origin/main -t \
build typecheck test test:e2e lint fmt:check \
docs:check test:scripts apm:audit \
docs:skills:check changeset:status
Use --base=HEAD for uncommitted work only. For local checks, omit --head and
clear NX_HEAD if the shell defines it. Nx then includes staged, unstaged, and
untracked files, plus branch changes from the merge base.
For an explicit file scope, replace --base with --files:
nx affected --files=apps/scout/src/change-scope-command.ts,scripts/audit-apm.mjs -t \
build typecheck test test:e2e lint fmt:check \
docs:check test:scripts apm:audit \
docs:skills:check changeset:status
Select actual changed paths. Include both paths for a rename and retain deleted
paths. Use --stdin for a newline-delimited list if command length is a
concern. Nx --exclude excludes projects, not file paths.
If the scope is uncertain, replace nx affected --base=origin/main with
nx run-many. Keep the same target list. Use this full check set for unknown
shared configuration that the Nx inputs do not yet describe.
Inspect the results
Nx selects affected projects and their dependents. It runs each requested target that those projects define. Dependency tasks run first where configured. The task reference lists the repository checks.
Repository checks inspect their full input sets. A source change can select the repository format and lint checks. A Markdown change can select all documentation checks. Unrelated errors within those input sets can therefore fail the command.
Confirm the selected projects and tasks when a result is unexpectedly empty. Nx can report success when no requested targets exist. Report missing coverage and unavailable checks explicitly. A successful command proves only the selected automated checks. It does not prove that the change satisfies the requirements.
Use the failed task output to resolve errors. Keep the full target list for the next finalisation run. Cacheable targets can reuse valid local results. APM audits, Changesets status, repository tests, and offline link checks run each time Nx selects their projects.
Complete the handoff
Do not edit files while the checks run. Inspect the final diff and Git status. Repeat checks after any later edit. Nx does not provide the retired command's repository fingerprint, path exclusion policy, or compact JSON report.
Report the outcome, check results, release metadata, and any coverage limits. Stage, commit, or publish only when the user authorises that action.