Promoted public skill

Code Quality

Set up, repair, update, or diagnose shared JavaScript and TypeScript quality checks with @servrox/code-quality. Use when a repository needs consistent root commands, missing checks, migration baselines, repository-specific checks, and CI wiring.

Goal

Give maintained JavaScript and TypeScript one set of root quality commands and a blocking full check in CI.

When to use

Use for shared quality setup, repair, release updates, baseline decisions, repo-specific checks and diagnosis.

When not to use

Use the repository's native tools for non-JS/TS source. Record non-applicability when the repo has no maintained JS/TS.

Inputs to inspect

Inspect the repository root, package manager, lockfile, Node version, accepted ADRs, maintained JS/TS, workspaces, tool configs, existing checks and CI.

Workflow

Select a workflow

Available workflows are setup | repair | update | doctor. Announce the selection and reason when intent and authority are clear. For bare or materially ambiguous requests, show the options and ask only for the missing decision. An options request authorizes no execution.

  • setup introduces the package, shared root scripts, maintained source coverage, and a blocking CI gate.
  • repair restores incomplete or inaccurate package, script, check, configuration, or CI wiring.
  • update qualifies the current npm release and refreshes the existing installation and lockfile.
  • doctor inspects the integration and reports missing or unverified coverage. Run the existing quality:doctor when it is present. Do not install, update, or repair during diagnosis.

Apply setup, repair, or update

  1. Confirm applicable source and authority. Resolve conflicts with accepted local decisions before changing their scope.
  2. Resolve the public npm latest tag and inspect the selected stable release's integrity, deprecation, engines and peer metadata. Apply only after checking target compatibility and existing release-age and lifecycle policies. A blocked release leaves the previous working installation in place. Record the candidate, failed prerequisite, owner and revisit condition.
  3. Run code-quality setup or code-quality repair from the repository root using the selected release. For a fresh install use the repository's package runner or an isolated exact-release installation. Ensure the preview covers existing scripts and tool conflicts. Use --apply for authorized edits. Keep "@servrox/code-quality": "latest" in the root manifest. Use the existing package manager to resolve the selected release and verify its exact version and integrity in the lockfile. Frozen installs and day-to-day checks use that lockfile.
  4. Use code-quality.config.mjs and native tool configs for complete source coverage, named scopes, Knip entrypoints, architecture boundaries and approved repo extensions. Preserve required correctness, compiler, framework and test checks. Make them additional script checks where they apply to quality. Add the shared Oxlint, Oxfmt, Knip, jscpd and Dependency Cruiser checks. Qualify matching framework and type-aware presets in their own scope. Missing tooling, invalid input or missing scan coverage is an open blocker.
  5. Run the shared report before choosing how to handle existing findings. Reuse the owner's recorded decision. If absent, ask the owner to choose zero findings or a reviewed migration baseline. A baseline may cover only measured existing findings that the package can represent. Record selected gates, evidence, owner and cleanup or revisit trigger. Create or prune it only as an explicit reviewed action. Keep increases, new findings, tool failures and uncovered checks blocking.
  6. Wire quality:check to the repository's mandatory CI job after the frozen install. Verify quality:doctor, the full local command, a real rejecting case and hosted required CI at the same candidate when available. Re-running setup or repair on the qualified integration should produce no diff.

Daily commands

Run these scripts from the repository root with the owning package manager, for example pnpm run quality:check.

Script Use
quality:check Full blocking check over configured source and repo extensions
quality:check:changed Read-only Git-scoped lint and format with an optional comparison base
quality:report Check coverage, findings, baseline status and blockers
quality:fix Apply supported fixes to explicitly selected files and recheck them
quality:doctor Inspect versions, scripts, configuration and source coverage

Safety rules

Keep package-manager trust, release-age and lifecycle controls. Use existing authorization for manifest, configuration and CI edits. Baseline creation or expansion requires the repository owner's recorded acceptance of measured debt.

References

Use the package documentation for the command, tool and configuration contract. Follow accepted local decisions for adoption and exceptions.

Scripts

The npm package supplies the CLI. Setup and repair preview manifest changes by default and write with --apply. The repository's package manager owns the lockfile.

Output format

Report the lockfile release, checks that ran, baseline decision, and any blocker or unverified hosted result.

Completion criteria

The full check covers each applicable tool locally and in the required CI job. The integration rejects an actual regression, and repeat setup or repair is idempotent.

Failure modes

Keep missing or failing coverage unresolved. An exception records exact paths and technical cause, compensating coverage where possible, and an owner and revisit condition.