Skip to content

Developer Harness ​

The developer harness is the repository-owned interface for validation, setup, dependency maintenance, policy checks, environment diagnosis, and release artifacts.

bash
cargo dev <command>

Use cargo dev --help and subcommand help for the complete command surface. The CLI is the source of truth for available options and artifact profiles.

Choose a Workflow ​

GoalCommand
Run the daily quality gatecargo dev check routine --repo-root .
Run all repository checkscargo dev check all --repo-root .
Include release artifact validationcargo dev check --profile full all --repo-root .
Install locked repository dependencies and hookscargo dev setup --repo-root .
Diagnose the local toolchaincargo dev health doctor --repo-root .
Audit dependency freshnesscargo dev deps audit-latest --repo-root .
Audit dependency vulnerabilitiescargo dev deps audit-security --repo-root .
Plan or apply repository dependency updatescargo dev deps update --dry-run --repo-root .
Verify repository automation policycargo dev policy verify-automation --repo-root .
Audit frozen external pinscargo dev policy audit-external-pins --repo-root .
Build local release artifactscargo dev release build --repo-root .

Use cargo dev runtime-deps --repo-root . --base-ref <base> --head-ref <head> to determine whether a change alters the shipped CLI dependency graph.

Run cargo update separately before cargo dev deps update. The harness runs beneath Cargo, so a nested Cargo lockfile update would be overwritten when the parent process exits. Review both lockfiles after the two commands complete.

Detailed pin rotation belongs in Pin maintenance. Artifact profiles and publishing contracts belong in Docs and release.

Plans and Output ​

Commands that mutate repository state support --dry-run. A dry run renders the same ordered action plan used by apply mode without executing its mutations. Use it before setup, cleanup, dependency updates, or release builds when the affected state is not already clear.

Reporting commands support three output formats:

  • human for terminal output
  • json for automation
  • agent for Markdown summaries

health doctor describes each tool by its required and installed version alone, so its reports are safe to paste into public issues. Check and audit reports quote the output of the commands that failed, which can contain local paths; read them before sharing.

Use --quiet to suppress clean success output without suppressing findings, errors, or non-zero exit codes.

Exit Codes ​

CodeMeaning
0The command passed, found no drift, or applied its plan.
1The command found drift, failed checks, or an unhealthy environment.
2The harness could not complete because its input, repository state, or command execution was invalid.

Ownership Boundary ​

The harness may inspect machine state, but it mutates only repository-owned state and generated repository artifacts. It does not install or remove system tools, language runtimes, or global Cargo binaries. Local environment managers and CI setup actions own those machine-level changes; cargo dev health doctor reports the responsible remediation.

When maintenance becomes repetitive, surprising, or easy to perform incorrectly, encode the solution in the harness instead of adding a manual procedure.