## Problem Agents doing local webapp work currently have to poll shell output or guess when a dev server is ready. That makes the loop flaky: `npm run dev` may print before the app is actually serving, and frontend verification can race the server startup. The `webapp-testing` workflow needs a small, reusable readiness primitive that can be used by tools, bundled skills, verifier gates, and helper scripts. ## Proposal Add a bounded dev-server readiness primitive, either as a small native tool, a shared helper, or both. Initial shape: - wait for a TCP port to accept connections - optionally wait for a URL/healthcheck to return a 2xx/3xx response - support bounded timeout and poll interval - report structured timeout/connection errors - work for localhost-first development without requiring a hosted service This should avoid replacing full process supervision. It is the narrow readiness check that higher-level server lifecycle helpers and browser automation can call. ## Acceptance criteria - [ ] A caller can wait for `localhost:<port>` with a bounded timeout and receive structured success/failure output. - [ ] A caller can optionally wait for an HTTP URL and require a successful status class. - [ ] Timeout output includes the target, elapsed time, and last observed error/status. - [ ] The primitive is usable from the webapp-testing/server-lifecycle flow without ad hoc shell polling. - [ ] Tests cover success, timeout, refused connection, and HTTP non-success behavior using local fixtures. ## Related - #3358 provides browser automation. - #3359 bundles the webapp-testing skill and server lifecycle helper. - #3145 tracks visual artifacts that browser verification can attach.