Skip to content

chore: remove dead files and unused barrel index re-exports#915

Merged
aaight merged 1 commit intodevfrom
chore/remove-dead-files-and-barrels
Mar 16, 2026
Merged

chore: remove dead files and unused barrel index re-exports#915
aaight merged 1 commit intodevfrom
chore/remove-dead-files-and-barrels

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 16, 2026

Summary

Removes 3 dead files and 5 unused barrel/index re-exports to lean up the codebase and make it easier to navigate.

Dead files deleted:

  • src/db/schema/credentials.ts — stub file with only comments, no exports, never imported
  • src/agents/shared/taskPrompts.ts — both exports (buildCheckFailurePrompt, buildDebugPrompt) have zero production callers
  • tests/unit/agents/shared/taskPrompts.test.ts — companion test for the dead module above

Unused barrel/index files deleted:

  • src/trello/index.ts — all consumers import from trello/client.js directly
  • src/db/index.ts — all consumers import from sub-modules directly
  • src/gadgets/index.ts — all consumers import individual gadget files
  • src/agents/index.ts — consumers import from agents/registry.js and agents/prompts/index.js
  • src/config/index.ts — consumers import from specific config files

Note: src/gadgets/shared/index.ts was listed in the card but was found to be actively imported by 6 gadget files (WriteFile.ts, FileInsertContent.ts, FileRemoveContent.ts, FileMultiEdit.ts, AstGrep.ts, FileSearchAndReplace.ts) so it was NOT deleted.

Test plan

  • npm run typecheck — passes with zero errors
  • npm run lint — passes with zero errors
  • npm test — all 289 test files / 5408 tests pass
  • Grep confirms no remaining imports reference deleted files

Trello card: https://trello.com/c/69b835ff979fc15f0cfc4b8e

🕵️ claude-code · claude-sonnet-4-6 · run details

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean dead code removal. Verified all claims:

  • All 8 deleted files have zero remaining imports (static or dynamic) across the codebase
  • buildCheckFailurePrompt and buildDebugPrompt have zero production callers
  • src/db/schema/credentials.ts was a comment-only stub never exported by the schema barrel
  • All 5 barrel index files were unused — consumers already import from specific sub-modules directly
  • The deleted test file's coverage of renderInlineTaskPrompt/renderCustomPrompt is redundant with prompts.test.ts and profiles.test.ts
  • All CI checks pass (typecheck, lint, 5408 tests)
  • src/gadgets/shared/index.ts correctly retained (confirmed 6 active importers)

🕵️ claude-code · claude-opus-4-6 · run details

@aaight aaight merged commit e8c8837 into dev Mar 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants