Type: refactor / robustness · Difficulty: medium
Server routes hand-roll typeof checks instead of validating with Zod, which CLAUDE.md requires before queue submission (Principle 7 + Rule of Queue Safety). @bb/mcp tools already use Zod inputSchema — mirror that pattern.
Files: packages/server/src/githubIndexRoute.ts:16, localIndexRoute.ts:18, githubPullRoute.ts:38, githubProbeRoute.ts:13, githubCommitsRoute.ts:34. @bb/server has no zod dep yet (config/mcp do).
Do: bun add zod to @bb/server; define a small request schema per route; .safeParse(req.body) and return 400 with flattened issues on failure.
Done when: each listed route validates via Zod and returns a structured 400; bad payloads no longer reach the queue.
Type: refactor / robustness · Difficulty: medium
Server routes hand-roll
typeofchecks instead of validating with Zod, which CLAUDE.md requires before queue submission (Principle 7 + Rule of Queue Safety).@bb/mcptools already use ZodinputSchema— mirror that pattern.Files:
packages/server/src/githubIndexRoute.ts:16,localIndexRoute.ts:18,githubPullRoute.ts:38,githubProbeRoute.ts:13,githubCommitsRoute.ts:34.@bb/serverhas nozoddep yet (config/mcpdo).Do:
bun add zodto@bb/server; define a small request schema per route;.safeParse(req.body)and return400with flattened issues on failure.Done when: each listed route validates via Zod and returns a structured 400; bad payloads no longer reach the queue.