Add knip configuration and CI gate for unused code detection#72
Open
Add knip configuration and CI gate for unused code detection#72
Conversation
Covers debrief-future spec 201: knip.json entry points for the Electron loader, deleting updater.ts, and adding knip as a CI gate. https://claude.ai/code/session_01G3vAESEa23shFAo3o1nuGs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR establishes unused code scanning as a gated CI check for the monorepo by adding knip configuration, removing a genuine orphan module, and integrating knip into the CI pipeline.
Changes
knip.jsonat repo root with entry point declarations for the Electron loader (main, preload, and renderer processes) to eliminate false positives from the scannerapps/loader/src/main/updater.ts— a genuinely unused module with no call sites or tests, kept as a placeholder for future auto-update work that belongs in its own spec.github/workflows/ci.ymlto add a "Run knip" step after linting, making knip a required CI gate rather than an ad-hoc diagnosticpnpm exec kniprather thanpnpm dlx) to ensure reproducible builds and prevent silent version upgrades from affecting CI resultsspecs/201-knip-loader-config/contracts/to prevent future ignore entries or workspace stanzas from being added without explicit coordinationImplementation Details
The configuration takes a principled approach to scanner hygiene:
dlxfor CI-critical tools — version pinning is non-negotiable once CI depends on outputThis is infrastructure and hygiene work with no user-facing changes. The audience is contributors who need to trust the scanner's output.
https://claude.ai/code/session_01G3vAESEa23shFAo3o1nuGs