refactor: establish testability as core development practice #19
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.
🎯 Overview
Establishes testability and modular design as core development practices through documentation, tooling, and exemplary implementations.
📚 Documentation Added
1. TESTABILITY.md - Comprehensive Guide
2. FEATURE_TEMPLATE.md - Step-by-Step Template
3. Updated CONTRIBUTING.md
4. PR Template
🏗️ Exemplary Implementations
Indexer Utils (This PR)
Refactored Repository Indexer with modular utilities:
Benefits:
Previously: Explorer Subagent (PR #18)
📊 Coverage Targets (Now Official)
🛠️ Tooling
test:coveragescript for easy coverage checks🎓 Enforcement Strategy
Soft Enforcement (Education)
Process Enforcement
Future: Hard Enforcement (Optional)
!assertions🏆 Key Principles Established
🔗 Commits
This PR contains 5 granular commits:
feat(indexer): add language utilities (foundation)- No dependencies, 31 testsfeat(indexer): add formatting utilities (independent)- Independent, 27 testsfeat(indexer): add document preparation utilities- Depends on formatting, 29 testsrefactor(indexer): integrate modular utils architecture- Wire everything togetherdocs: enshrine testability as core development practice- Documentation & toolingEach commit builds and tests independently.
✅ Testing
All 126 tests passing:
pnpm vitest run packages/core/src/indexer --coverage # 100% statements, 88.88% branches, 100% functions on utils📖 For Reviewers
This PR establishes patterns that will guide all future development:
🚀 Impact