Summary
Several modules are hard to read without CONTEXT.md + the ADRs: the deployment pipeline, build-pack strategies, storage/symlink activation, the Docker runner, and Caddy config generation. Add inline documentation so a fresh agent can ramp up from the code.
Scope
- JSDoc on public functions/types in:
worker/src/deployments/ — pipeline, strategies, storage (symlink activation), rollback, events.
worker/src/infrastructure/ — docker, caddy, retry, log-buffer.
api/src/routes/ and api/src/services/.
shared/src/utils/ (encryption).
- Follow the existing JSDoc style already used in
docker-runner.ts and retry.ts (terse @param/@returns, explain the why — e.g., the symlink swap, the port-conflict retry).
- Align terminology with CONTEXT.md (Deployment, Build Job, Build Pack, activation) so docs read consistently.
- No behavioral changes.
Summary
Several modules are hard to read without CONTEXT.md + the ADRs: the deployment pipeline, build-pack strategies, storage/symlink activation, the Docker runner, and Caddy config generation. Add inline documentation so a fresh agent can ramp up from the code.
Scope
worker/src/deployments/— pipeline, strategies, storage (symlink activation), rollback, events.worker/src/infrastructure/— docker, caddy, retry, log-buffer.api/src/routes/andapi/src/services/.shared/src/utils/(encryption).docker-runner.tsandretry.ts(terse@param/@returns, explain the why — e.g., the symlink swap, the port-conflict retry).