Windows Setup
Procedure
- Inspect current state first. Use
env_inspectand project requirements. Preservenull/unknown probe state; do not reinstall a tool merely because discovery failed to establish it. - Locate the earliest missing or broken prerequisite. Distinguish runtime absence, unknown probe state, PATH/session propagation, version mismatch, package-manager failure, project dependency failure, and Windows feature state.
- Choose the native repair. Prefer the smallest Windows-owned change that repairs that prerequisite. Do not turn a local project problem into a machine-wide setup rewrite.
- For system packages, resolve identity before install. Preserve an exact ID supplied by the user or authoritative project/config state. Otherwise call
package_search, inspect the candidates, and callpackage_installwithexecute: falsefor the resolved ID before requesting execution. - For Windows optional features, use an explicitly approved PowerShell action only when the feature is actually required. WSL, Windows Sandbox, and Hyper-V are OS features, not ordinary package installs. If feature discovery is unknown because the current process could not establish it, resolve that fact before treating the feature as absent.
- For project dependencies, switch to the project's own package manager only after the required runtime/toolchain is established. Preserve lockfiles and project conventions. Project-code/build/test execution follows the active host's ordinary permission path.
- Verify the repaired joint with fresh state. Prefer the narrow version, availability, build, or project check that can establish the requested post-state. If full
env_inspectis the right witness after a host mutation, useforce_refresh: true.
Rules
- Never use
--silentto bypass license or installer interaction. - Resolve an exact package identity before installation; do not guess WinGet IDs.
- Do not treat a successful installer exit as proof that the current shell sees the new PATH.
- Do not mutate unrelated runtimes or package-manager state while repairing one dependency.
- If elevation or restart is required, state that post-state explicitly rather than claiming completion early.