Reorganize src/tools into analysis/ and utility/ categories #242
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.
The
src/toolsdirectory had 12 scattered root-level files with inconsistent organization. This refactoring groups tools into logical categories and enforces kebab-case naming.Changes
Directory Structure
src/tools/analysis/for code analysis and scoring tools (7 files)src/tools/utility/for general-purpose tools (7 files)index.ts) for both directoriesFiles Moved to
analysis/clean-code-scorer.ts,code-hygiene-analyzer.ts,dependency-auditor.tsiterative-coverage-enhancer.ts,semantic-code-analyzer.tsstrategy-frameworks-builder.tsFiles Moved to
utility/guidelines-validator.ts,memory-context-optimizer.ts,mermaid-diagram-generator.tsmode-switcher.ts,model-compatibility-checker.ts,project-onboarding.ts,sprint-timeline-calculator.tsRenamed for Consistency
gap-frameworks-analyzers.ts→gap-frameworks-analyzer.ts(singular form)gapFrameworksAnalyzers()→gapFrameworksAnalyzer()Import Path Updates
src/index.tsimports from./tools/{file}to./tools/{category}/{file}./shared/→../shared/Example
Before:
After:
All tests pass (167 files, 2400 tests). No external API changes.
Original prompt
Refactor Project Structure for Better Organization and Consistency
Problem Statement
The current
srcdirectory structure suffers from several organizational issues that impact maintainability and developer experience:Current Issues
Inconsistent file naming conventions
clean-code-scorer.ts) and camelCase in importsConfusing directory organization
/tools/prompt/and/prompts//tools/while others are categorizedExcessive nesting
../../../shared/utils.js)Poor discoverability
Proposed Solution
Reorganize the
srcdirectory with a flatter, more logical structure that groups related functionality together AND enforce consistent kebab-case naming.New Structure with Consistent Naming