Skip to content

library-quality-mandate

Library Quality Mandate — Great Lib, Zero Tech Debt

Section titled “Library Quality Mandate — Great Lib, Zero Tech Debt”

When a project’s primary deliverable is a reusable library / shared package / submodule (consumed by other projects, not a single shipping app), it is on a zero-tech-debt budget. Every extraction, refactor, naming, and packaging decision MUST optimize for maximum reuse across current and future consumers AND new-consumer velocity at once. When these conflict with “ship faster by deferring cleanup,” the mandate wins — ship the right answer or don’t ship.

A change passes the mandate iff it is domain-neutral (no consumer-specific token in shared code), data-driven (every tunable is config or a named constant, never an inline magic literal), tested (new surface ships with coverage), charter-conformant (names describe the generic role, never one concrete instance), and documented in the same commit.

Decision authority: in a library-first project, agents make debt-removal calls (extract-now vs defer, rename-before-merge, relocate-leaked-token) autonomously without re-prompting — fall back to always-ask-on-unresolved.md only outside these patterns. Every commit touching shared code runs the pass-test above; fail → fix before merge. Apply procedure, engine-charter placement, decision table + naming charter, and why the library is the deliverable: docs/library-quality-mandate.md.