Skip to content

T-W1D1-adopt-node-template-quality-patterns

Status: closed/superseded · Impact: medium · Complexity: medium

The graph-scheduler scaffold (T-PDDK-gs-scaffold-package-and-tooling) copies intersect’s tooling, which has no lint/format gate, no coverage floor, and no publish-hygiene, dead-code, or dependency checks. Adopt the quality patterns from the reference repo github.com/sksizer/node-template so the package ships behind an enforced quality gate and is safe to publish standalone.

Greenfield — the graph-scheduler package does not exist yet; the scaffold task stands it up with intersect-style tooling (bun test + moon), and the sibling packages/ts/intersect carries only moon.yml, package.json, and tsconfig.json — no linter, formatter, coverage floor, or publish checks. The repo has no GitHub Actions CI today; gating runs through moon tasks and lefthook. The reference patterns live in the external repo github.com/sksizer/node-template.

The package ships the node-template quality gate, adapted to this repo’s bun + moon substrate:

Concernnode-template patternRealized here
Lint + formatBiome (unified)biome.json, run via a package script + moon task
Tests + coverageVitest + coverage floorbun test with an enforced coverage floor (runner reconciled — see Approach 2)
TS configtsconfig.json + tsconfig.build.jsonsame two-config split
Publish hygienepublint + are-the-types-wrongsame, as a package script gate
Dead codeknip (report-only)knip.json, report-only
Metricsscc (report-only)report-only script
Dependency hygieneDependabot + audit.github/dependabot.yml entry for the package
CI gatetsc + lint + format + testGitHub Actions workflow gating the package (new to this repo)
  1. Read node-template’s config at github.com/sksizer/node-template — Biome, Vitest, tsconfig.build.json, knip, the CI workflow, and Dependabot.
  2. Reconcile the test runner. Adopt Biome and the publish/dead-code/metrics tools directly. The test runner and coverage floor reconcile against the repo’s bun-test convention: keep bun test and add a coverage floor, rather than introducing Vitest alongside it. Record the choice in the PR.
  3. Add package-local config: biome.json, tsconfig.build.json, knip.json; wire the quality scripts into the package package.json and a moon task.
  4. Add the CI gate — a GitHub Actions workflow running tsc + lint + format + test + publint/attw for the package. This introduces .github/ to the repo; flag it for review.
  5. Add a .github/dependabot.yml entry covering the package’s manifest.
LocationKindChange
packages/ts/graph-scheduler/biome.jsonnewBiome lint + format config
packages/ts/graph-scheduler/tsconfig.build.jsonnewProduction build TS config
packages/ts/graph-scheduler/knip.jsonnewDead-code (report-only) config
packages/ts/graph-scheduler/package.jsonmodifyQuality scripts: check/lint/format, coverage floor, publint, attw
packages/ts/graph-scheduler/moon.ymlmodifyQuality-gate task wiring
.github/workflows/graph-scheduler.ymlnewCI gate: tsc + lint + format + test + publish-hygiene
.github/dependabot.ymlnewDependency updates for the package
  • AC-1: bun run exposes lint, format, and dead-code (knip) checks for the package via Biome and knip config files.
  • AC-2: The test script enforces a coverage floor — a run below the floor exits non-zero.
  • AC-3: A publish-hygiene script runs publint and are-the-types-wrong against the built package and exits non-zero on failure.
  • AC-4: A GitHub Actions workflow runs tsc, lint, format, test, and publish-hygiene for the package on push.
  • AC-5: .github/dependabot.yml lists the package’s manifest ecosystem.
  • Applying the same stack to packages/ts/intersect or other packages — this task lands it on graph-scheduler; generalizing to a packages/ts library standard is a follow-up.
  • Introducing Vitest (the runner reconciliation keeps bun test — Approach 2).
  • Actually publishing to npm — hygiene checks only, no release.

Requested directly: adopt the quality patterns defined in github.com/sksizer/node-template for the graph-scheduler package.

T-PDDK-gs-scaffold-package-and-tooling


← Back to Tasks