Tool Open source

gdp-ts

gdp-ts is a TypeScript library, linter, and coding-agent skill that applies Ghosts of Departed Proofs to authorization and entitlement checks. It makes sensitive functions require a compile-time proof that a specific user can act on a specific resource, rather than accepting an unconnected boolean permission check. The library's `name()` function gives runtime values distinct compile-time identities, trusted proof modules verify relationships between those named values, and protected functions demand proofs tied to their exact arguments; using the wrong proof, a proof for another value, a raw identifier, or no proof produces a type error. Proofs are represented by small runtime objects while most of the safety comes from TypeScript's type checker, with negligible runtime overhead and no added dependencies for the core package. Its ESLint and Oxlint presets detect practices the type checker cannot, including forged proofs and proof minting outside designated modules. The companion skill installs through `npx skills add rauchg/gdp-ts` and provides a workflow, implementation recipe, linting guidance, examples, and limitations for applying the pattern. The core package requires TypeScript 5.4 or newer and is licensed under MIT.

View repository Mentioned in 1 video ↓

What gdp-ts is used for

1 use taken from transcripts — each links to the moment in the video.

  • A TypeScript library that prevents the mistake of checking a permission but forgetting to connect it to the protected action: sensitive functions require a proof that a specific user can act on a specific resource, or the code won't type check. Includes a linter against forged proofs and a companion skill for coding agents.

Videos mentioning gdp-ts

1 in the library.