Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Dependencies, package managers and lockfiles card 2 of 6

Borrowed code, written down twice

builds on: How a code project is laid out
Most projects reuse code that others published, called **packages**. A **package manager** (`npm` for JavaScript, `pip` for Python) downloads them from a public **registry**. The **manifest** (`package.json`) lists the packages you asked for, each with a range of allowed versions. The **lockfile** (`package-lock.json`) records the exact version of every package installed, including the packages those packages need. The package files themselves go into `node_modules/`. That folder is normally left out when the project is shared, because installing rebuilds it.
Terms on this card
package
A bundle of reusable code that someone published so other projects can use it, e.g. `express` or `requests`.
package manager
A command-line program that downloads, installs and updates packages for a project, e.g. `npm` or `pip`.
npm
The standard package manager for JavaScript projects. It reads `package.json` and installs packages into `node_modules/`.
pip
The standard package manager for Python. It installs packages from PyPI, often listed in `requirements.txt`.
registry
A public online store of packages that package managers download from, e.g. npmjs.com for npm or PyPI for pip.
Learn this step by step on Bytewise
Lesson goal: Explain that projects pull in external packages through a package manager (pip, npm, ...), listed in a manifest and pinned in a lockfile. Explain why installing a package runs someone else's code on your machine. · the whole lesson