setup-env
Setup environment
A protocol for setting up a project's development environment from a bare clone to a working first run.
Tradeoff: bias toward verifying each step over assuming it worked. For a project set up recently, use judgment.
1. Check requirements
Read the project's own docs and version files (README, .tool-versions, engines, python_requires, go.mod, Cargo.toml). Note the required runtime and version, note system dependencies, and compare against what is installed. A version mismatch is the most common setup failure. Report gaps before closing them.
2. Install the runtime and package manager
Install the version the project asks for, not the latest. Prefer a version manager (nvm, pyenv, rbenv, rustup) over a system-wide install. Use the package manager the lockfile implies.
3. Install dependencies
Install from the lockfile (npm ci, poetry install) so the dependency graph matches the committed one. For Python, create an isolated virtualenv first. If install fails, read the first error, not the last.