← Todas las plantillas

Tipos estrictos, tests antes del merge, sin fallos silenciosos, dependencias mínimas.

Constitution — TypeScript service

Version 1.2.0 · Ratified 2026-10-12

These principles hold for every spec, plan and task of the service. A spec may add rules; it never weakens these.

  1. Strict types. No any. Public functions declare their return types. strict is on in every package and the build fails on a type error.

  2. Tests before merge. Every functional requirement has at least one test that is green before the merge. A defect is fixed together with the test that shows it.

  3. No silent failures. Errors are logged with their context or returned to the caller as typed errors. Nothing is swallowed; an empty catch fails the review.

  4. Few dependencies. A new runtime dependency needs a reason in the plan: what it replaces and why the standard library or an existing dependency is not enough.

  5. Observable by default. Every request has a correlation id, and every external call has a timeout and is measured.