House rules
- Read
CODING_STYLE.mdbefore writing TypeScript. It is the whole rulebook: module shape, file order, error handling, named parameters, how config is read. - No comments in executable code. Intent goes in names, structure, types and tests, and change-specific context goes in the commit message.
- Fix every instance, not just the reported one. If the same bug shape exists in four callers, the fix belongs where all four cross.
- A fix should leave the system smaller. Deleting beats adding a flag.
- No abstraction for one caller. A plain object or a direct call beats a registry, a factory, or an interface with a single implementation.
Adding a server module
Follow.agents/skills/craftspace-module/SKILL.md: shared zod schemas, a FastifyPluginAsyncZod
controller with its request schemas at the end of the file, registered in app.ts. The simplest existing
example is packages/app/server/src/knowledge/spaces/space-controller.ts.