Skip to content

Conversation

@prosdev
Copy link
Collaborator

@prosdev prosdev commented Dec 1, 2025

Summary

Closes the benchmark gap: "Baseline read test files; dev-agent skipped them"

After semantic search results, dev_search now shows related test files in a separate section:

1. [89%] function: authenticate (src/auth.ts:15)
2. [84%] class: AuthMiddleware (src/middleware.ts:5)

---
Related test files:
  • src/auth.test.ts
  • src/middleware.test.ts

Design Decisions

Decision Rationale
Structural matching (.test.ts, .spec.ts) Test files have structural relationship, not semantic
Separate section Keeps semantic search rankings pure
Parameterized patterns Future configurability without refactoring

Implementation

  • New related-files.ts utility with findTestFile, findRelatedTestFiles
  • SearchAdapter calls utility after formatting results
  • MCPMetadata extended with related_files_count field
  • Patterns exportable for custom configurations

Testing

  • 15 new tests for utility functions
  • All 1472 existing tests pass

After semantic search results, dev_search now shows related test files
(e.g., utils.ts -> utils.test.ts) in a separate 'Related test files:' section.

Design decisions:
- Structural matching (*.test.ts, *.spec.ts) not semantic search
- Keeps semantic search pure - test hints don't affect rankings
- Patterns are parameterized for future configurability

Implementation:
- New related-files.ts utility with findTestFile, findRelatedTestFiles
- SearchAdapter calls utility after formatting results
- MCPMetadata extended with related_files_count field
- 15 tests for utility functions
- Updated PLAN.md with design rationale and marked Phase 1 complete

Closes benchmark gap: 'Baseline read test files; dev-agent skipped them'
@prosdev prosdev force-pushed the feat/test-file-hints branch from a4f81f6 to 986b801 Compare December 1, 2025 16:38
@prosdev prosdev merged commit ad4af12 into main Dec 1, 2025
1 check 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.

1 participant