The number is the rule
port = 10000 + 1000·P + 100·W + R. Reading a port is decoding it: 13204 is project 3, worktree 2, smtp. No allocation table to remember.
Every project gets a permanent, decodable block of ports. A ledger records who holds what, a reconciler checks it against what is really listening, and every Claude Code session is told its ports before it binds anything. Advisory by design; it never kills.


npm install -g @amiable-dev/berth
berth init # a starting policy in ~/.config/berth/policy.toml
cd ~/projects/my-app && berth project add . # permanent project number, ports found in your configs
eval "$(berth env --shell)" # PORT, API_PORT, DB_PORT … for this checkout
berth check # what is listening, who holds it, what needs attentionWith Claude Code, install the plugin instead and let the agent register its own repository:
claude plugin marketplace add amiable-dev/berth
claude plugin install berth@berth
