From 326317913d7cf8dec7f7487ad04e3b6c23de0519 Mon Sep 17 00:00:00 2001 From: t Date: Thu, 8 Oct 2026 19:34:57 +0530 Subject: [PATCH] docs: restore the concrete type list in the scaffold AGENTS.md #1632 reduced the "Type everything" section to a pointer. Typing is the one rule check and tsc cannot enforce, so the concrete forms belong where an agent reads first: the row type, action input and result, routing props, the typed Route union and prop(). The rule itself stays in the skill's Default Workflow step 8. --- packages/cli/templates/AGENTS.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/cli/templates/AGENTS.md b/packages/cli/templates/AGENTS.md index 64b6f21a9..4fe7dcedf 100644 --- a/packages/cli/templates/AGENTS.md +++ b/packages/cli/templates/AGENTS.md @@ -36,7 +36,16 @@ This is what separates a working app from a broken one. Derive the type at every boundary from its source. Never reach for `any`, and never `unknown` where a real type exists. The rule is step 8 of the skill's "Default -Workflow"; the full ladder, with an end-to-end example, is +Workflow"; the forms to reach for: + +- A database row: `typeof table.$inferSelect` (`$inferInsert` for a write), + carried into a shipping component with `import type`. +- An action's input: a named `interface`. Its result: `ActionResult`. +- Routing files: `PageProps<'/blog/[slug]'>`, `LayoutProps`, + `RouteHandlerContext`. `npx webjsdev types` writes the typed `Route` union. +- A reactive property: `prop(Object)`, `prop(Array)`. + +The full ladder, with an end-to-end example, is `.agents/skills/webjs/references/typescript.md`. Keep server-only code (database drivers, secrets, `node:*` builtins) in