Task routes
The task tracker needs routes to create, list, and update tasks. Createsrc/server/routes/tasks.ts:
scopedProcedure([])requires authentication — any logged-in user can call the procedurescopedProcedure(['tasks:viewAll'])additionally requires thetasks:viewAllscope- Every procedure must include
.meta({ description })— the build fails without it. The description is used by the AI agent, HTTP API docs, MCP server, and built-in docs pages. - Input is validated with Zod — invalid input returns a 400 error before the handler executes
ctx.userIdidentifies the authenticated user — never accept user identity as input
Registering routers
Register the newtasksRouter with the app in src/server/router.ts:
Always include all system routers. The built-in admin pages, docs pages, and monitoring pages depend on them.

