Strict types, tests before merge, no silent failures, minimal dependencies.
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.
-
Strict types. No
any. Public functions declare their return types.strictis on in every package and the build fails on a type error. -
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.
-
No silent failures. Errors are logged with their context or returned to the caller as typed errors. Nothing is swallowed; an empty
catchfails the review. -
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.
-
Observable by default. Every request has a correlation id, and every external call has a timeout and is measured.