← Workflows

阅读中文版本

Developer Environment Onboarding Workflow

Get new developers productive in hours with a scripted bootstrap, verified against a smoke project, and fed by every onboarding failure.

beginner~20 minenvironment-governancedeveloper-experienceonboarding

Objective

Reduce environment setup from days to hours with a bootstrap script that is itself continuously verified and improved by onboarding telemetry.

Environment

  • A bootstrap script or devcontainer capturing setup steps
  • A smoke task proving the toolchain works end to end
  • A feedback channel from every new setup

Steps

1. Script the entire setup

Encode every manual step — versions, dependencies, secrets scaffolding, seed data — into one bootstrap script, leaving nothing tribal.

Expected state: A new machine reaches a running environment with one command and no human help.

2. Verify with a smoke project

End the bootstrap with a canonical smoke task: build, test, run, and hit a local endpoint, proving the whole toolchain.

Expected state: The bootstrap's success criterion is the smoke task passing, not the script exiting zero.

3. Instrument the onboarding path

Time each bootstrap phase and capture failures, so the script's weak steps are visible rather than anecdotal.

Expected state: Phase timings and failure counts exist per bootstrap run.

4. Fix from every new failure

When a new joiner hits an unscripted step or a broken phase, the fix lands in the script before the next onboarding, not in a chat thread.

Expected state: No onboarding failure repeats for the next joiner.

5. Run the bootstrap in CI weekly

Execute the bootstrap on a clean CI machine weekly to catch drift (a changed download URL, a new required step) before any human does.

Expected state: The weekly run stays green; drift is caught by machines, not newcomers.

Expected outcome

Onboarding measured in hours, with a bootstrap that is verified weekly in CI and improved by every joiner's experience.

Verification

New joiners reach the smoke task within the target time without help; the weekly CI bootstrap stays green across dependency drift.

Onboarding is the environment’s stress test

A new joiner is a clean machine walking through every implicit assumption the environment makes. Scripting the whole path, ending in a smoke task, and letting each joiner’s failures improve the script turns onboarding from a rite into a diagnostic.

bootstrap.sh phases (timed):
  1 toolchain (node 22.11, pnpm 9)      3.1 min
  2 deps (pnpm install)                  2.4 min
  3 env scaffolding (.env from vault)    0.4 min
  4 seed db (docker compose + seeds)     1.8 min
  5 SMOKE: build + test + hit /health    1.2 min
  ------------------------------------------
  total: 8.9 min  (was: 2-4 days of asking)

CI weekly clean-machine run:
  2026-10-14 PASS  8.6 min
  2026-10-21 FAIL phase 3: vault policy
    changed  -> fixed before any human hit it

The smoke task defines done

A script that exits zero means the commands ran, not that the environment works. Ending on a canonical task — build, test, serve, request — makes success verifiable by the joiner without knowing what working looks like yet.

Every joiner is a fresh probe

The newcomer’s failures are the highest-fidelity telemetry the environment gets: they have no cached state, no muscle memory, no workarounds. Routing each failure into the script (not a Slack thread) compounds the fix across every future joiner.