The task can be completed entirely with existing dependencies and config — no changes needed here.
Routine code changes that don't touch config/dependencies/env.
Required Inputs
Current package.json (dependencies, devDependencies, scripts), lockfile type.
Existing config files relevant to the task.
Existing .env.example or equivalent (without reading actual secret values from .env if avoidable).
Assumptions
The existing package manager and lockfile are authoritative — never switch package managers.
New dependencies, major version upgrades, and config changes require approval before being applied.
Step-by-Step Workflow
Check existing dependencies first: search package.json and codebase usage for a library that already solves the need, or a native/platform API that does.
If a new dependency seems necessary:
Identify the specific package, version range, and what it's needed for.
Ask for approval before installing (per Safety and Risk rules) unless the user has already explicitly approved adding dependencies for this task.
If installing (after approval): use the project's existing package manager (npm/yarn/pnpm/bun per lockfile) and let it update the lockfile naturally — never hand-edit the lockfile.
For environment variables:
Add new variables to the example env file (e.g. .env.example) with a placeholder value and a short comment on purpose.
Reference them via the project's existing config-loading convention (e.g. process.env.X, a typed config module).
Never commit real secret values.
For config file changes:
Confirm the change is required by the task (e.g. a new path alias, a new build target) or explicitly approved.
Make the minimal change needed; don't reformat or restructure the whole config file.
Note any behavioral impact (e.g. a new alias affecting imports project-wide).
For scripts: don't add new package.json scripts unless asked; if asked, follow the naming style of existing scripts.