tRPC's test setup and TypeScript conventions, which win where the generic pstack tdd, typescript-best-practices and principle-type-system-discipline skills disagree. Use when fixing a bug, writing or changing tests, or writing or reviewing TypeScript in…
Put a callout at the top of a PR body while an agent is working on the PR, and remove it once the agent no longer plans to push. Use when starting or stopping work on any PR you push to, including other people's.
Apply when wiring validation, error handling, or framework adapters. Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions.
Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text.
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative…
Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.
TypeScript best practices. Use when reading or editing any .ts or .tsx file.