Skip to content
Back to skills

Principles

ASecurity

The principles behind the leyman framework (the bar for packages, versioning, support floors, dependencies, lint, generated content, patches, and how work is committed and verified), and why. Read before a design, a review or an audit, and decide by them anything no other skill covers

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
developmenttypescriptgogitapi

Works with

  • api

Security analysis

A100/100

Scanned November 25, 2026

npx -y skills add JacobLey/leyman --skill principles --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Principles?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Principles
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jacobley-principles/badge)](https://www.skillsdirectory.com/skills/jacobley-principles)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: principles
description: The principles behind the leyman framework (the bar for packages, versioning, support floors, dependencies, lint, generated content, patches, and how work is committed and verified), and why. Read before a design, a review or an audit, and decide by them anything no other skill covers
---

<!-- @generated-signature v1:d3c771f42b512f2c55f9a70f0f616c7f Generated by docs/scripts/populate-docs.mjs (nx run @leyman/docs:populate-docs). Edit only inside manual sections. -->

# Principles

The repository's skills say how things are done. This page says why, so a judgment call that no skill covers still ends up in the same place. When a design or review question has no rule, decide it by these. Code-level conventions (types, DI, tests, errors) are in the [coding-patterns skill](https://github.com/JacobLey/leyman/blob/main/.agents/skills/coding-patterns/SKILL.md).

## The bar for a package

A package is **simple, deterministic, predictable and, most of all, useful**.

- **Useful** comes first: judge a change by whether it makes the package more useful to the person calling it.
- **Simple** means no more surface than the use warrants. Cut a confusing feature rather than keep it, and split a natural extension into its own package rather than grow this one.
- **Deterministic** means the same input always gives the same output, with stable ordering, no unseeded randomness, and no output that depends on when or where it runs.
- **Predictable** means no hidden state, silent fallbacks or surprising defaults. When something can't work, fail loudly and say what to do instead.

Audits and reviews flag anything that misses one of these.

## Versions mean something

- A **major** is for a meaningful change. A bug fix is a patch, a minor at most, even when correcting a wrong type breaks someone's compile.
- Ship the non-breaking part first. Put breaking changes in their own commits, so they go out together in one major.
- Every breaking change offers an explicit, `unsafe`-prefixed option that restores the old behaviour, so migrating means setting one option rather than rewriting code.
- Data written by an earlier version stays readable.
- A change limited to something not yet released isn't breaking. Before calling something breaking, check what has actually shipped.

The [versioning skill](https://github.com/JacobLey/leyman/blob/main/.agents/skills/versioning/SKILL.md) says how changes are recorded.

## Newest toolchain, lowest floor

Development and CI run the newest runtimes and tools. Each published package supports the oldest runtime it can **without losing functionality**. Never swap a newer API for a weaker stand-in to reach a lower floor. A package's floor is never below any of its runtime dependencies' floors. Upgrading the toolchain doesn't raise a package's floor. Only that package needing something newer does. In this repository, every published package's TypeScript floor is 6.0, so its declarations and type tests must check there as well as on the newest.

[Support floors](https://github.com/JacobLey/leyman/blob/main/.agents/skills/typescript/SKILL.md#support-floors) says how floors are declared and checked.

## Lean where it ships, free where it doesn't

Every runtime dependency of a published package costs its users something: justify each one and look for something lighter first. Dependencies that only affect local work (tests, tooling, the docs site) are fine. Install the real library rather than fake or suppress its types in an example.

## More lint rules, from reputable sources

Rules push code onto one well-aligned path and end debates over style. So:

- When a lint plugin upgrade brings new rules, keep them on and fix the code. Turn one off only if it would need a large rewrite, or contradicts a rule already on, and say which.
- Every disable gives its reason (`-- reason`) at the narrowest scope that works: the line, then the file, then config. A disable whose reason has gone away is removed.
- Fix the code in its own commits first, each passing both the old and the new rules. The version bump goes in a separate commit with only the version, lockfile and config.

The [linting-formatting skill](https://github.com/JacobLey/leyman/blob/main/.agents/skills/linting-formatting/SKILL.md) says how to run lint and fix it.

## Generate what can be derived

A list or table that comes entirely from data (package tables, path lists, indexes) is generated and checked in CI, not maintained by hand. Where a person needs to add context to such a file, give it a manual section inside the generated file. Write a file by hand only when every part of it is a judgment.

## Comments state the contract

A comment says what the code does and why. Where behaviour is surprising, link the justification: a spec, or the exact upstream source lines as a permalink. History ("this used to…", "upstream did…") goes in the commit message, not the code.

## Every workaround says when it ends

A patch, dependency override, pinned version or disabled check carries a note naming what removes it: an upstream release, an issue, or a date. A workaround with no exit stays forever. Remove it when that condition is met.

## Commit as you go, verify by how hard it is to undo

- Split multi-part work into steps and commit each one once it works. A local commit that hasn't reached a shared branch costs nothing to rework.
- Run the narrowest check while iterating (one spec, lint on the changed files). Run full verification often, and always before anything that is hard to undo: a merge, a push, a release, or work that builds on top of what you just did.

The [nx-run-tasks skill](https://github.com/JacobLey/leyman/blob/main/.agents/skills/nx-run-tasks/SKILL.md) says how to verify, and the [commit-messages skill](https://github.com/JacobLey/leyman/blob/main/.agents/skills/commit-messages/SKILL.md) how to write the commit.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.