Verification for TypeScript repos
Hold a repo to its own rules.
One committed list of checks, whole-repo rules ESLint cannot reach, and linters pinned to an exact version. Every check runs, every command is printed, and a check that could not run is never a pass.
npx @noctcore/harness check
Zero runtime dependencies. No network call. Node 22 or later.
Every way a gate goes soft, held.
Repo rules rot in a handful of known ways. Each row is one of them and the part of the package that stops it. Every row links to the page that explains how.
- FailureA new linter release turns CI red on nobody’s change
pinned-toolszizmor, actionlint and gitleaks run at exactly their pinned version, natively or by image digest. - FailureA check that could not run counts as a pass
pinned-tools · harness checkNo pinned binary and no Docker is blocked, exit 2. A timeout or a launch failure is a failed check. - FailureThe first failure hides the rest
harness checkEvery check runs. The fix instruction lists each failed one with its command and output. - FailureA git or tarball source slips into the lockfile
lockfile-registry-resolutionsEvery package resolves from the registry with a sha512 hash, read from the lockfile on every run. - FailureA deploy token is readable by every install script
github-actions-secret-no-installA job that can read a stored secret runs no package install. - FailureA patch outlives the bug it worked around
pnpm-patch-ledgerEach patch has a reason, an upstream link, a removal condition and a review date that turns red. - FailureOld debt blocks a new rule
lint-meta baselinesA baseline freezes today’s offenders. A new one fails; a frozen one may only shrink.
Your rules, in your repo.
harness lint-meta imports one file, the registry, and runs the rules it exports. The generic ones come from @noctcore/harness/rules; yours sit beside them.
- The registry exports
META_RULES, an array of rule objects. - Each rule reads the repo through
ctxand returns its violations. - A violation from a CI-critical rule, or a rule that throws, exits 1.
import type { IMetaRule } from '@noctcore/harness';import { createGithubActionsSecretNoInstallRule, createGithubActionsSecurityNoCancelRule,} from '@noctcore/harness/rules';
import { maxFileLines } from './rules/max-file-lines.mts';import { readmeHasLicense } from './rules/readme-has-license.mts';
export const META_RULES: IMetaRule[] = [ createGithubActionsSecretNoInstallRule(), createGithubActionsSecurityNoCancelRule(), readmeHasLicense, maxFileLines,];What it refuses to do
- No silent pass
- A timeout, a launch failure, a rule that throws, a missing file you named with a flag, a linter that could not run: each is a failure with a reason. Only a check that ran and passed is green.
- No network call
- The package reads what is committed and nothing else. The one download, for pinned binaries in CI, goes through a function your repo passes in.
- No runtime dependency
node:*builtins only. A TypeScript registry loads through Node's own type stripping.- No scan and import
lint-metaimports exactly one registry file from a fixed list. A stray.jsbeside it is never loaded.- No hidden I/O
- The pinned-tools functions take their I/O as deps, and a rule reads the repo only through the
ctxit is handed, so a repo tests its own wiring without spawning anything.
Two commands, three imports
harness checkRuns every check in .noctcore/harness.json, all of them, and exits 1 if any failed.harness lint-metaRuns the whole-repo rules from your registry. harness catalog writes their table.@noctcore/harnessThe rule contract, the manifest and result types, the ratchet helpers and portableFileGlob.@noctcore/harness/rulesSix strict rules for the pnpm lockfile and GitHub Actions workflows.@noctcore/harness/pinned-toolszizmor, actionlint and gitleaks at exactly their pinned version.