Engineering
test-sync avatar

test-sync

Maintain test suite health by automatically detecting orphaned tests, missing coverage, and implementation-coupled anti-patterns.

Introduction

The Test Sync Skill is an specialized engineering workflow designed to bridge the gap between source code and test code. It acts as an automated steward for your repository, ensuring that your test suite remains a reliable reflection of your current implementation. By analyzing filesystem structures and module references, the skill identifies structural rot such as orphaned tests that refer to deleted source files, or gaps where critical logic remains untested. It is built upon established research, including UTRefactor and Meszaros' xUnit Test Patterns, to ensure high-confidence maintenance tasks.

  • Orphaned Test Detection: Scans test directories to match modules against source files, flagging tests for code that has been removed or renamed.

  • Missing Test Identification: Analyzes source code for testable public functions and highlights gaps where no corresponding test coverage exists.

  • Implementation-Coupling Detection: Uses regex-based pattern matching to identify tests that are overly fragile due to direct dependencies on private methods, internal state, or excessive mocking, which can cause tests to break during safe refactors.

  • Test-Code Traceability: Maps the relationship between test files and source files to visualize overall test coverage and architectural alignment.

  • Prioritization Logic: Assesses test coverage based on the criticality of the path, identifying high-priority areas for new test development.

  • Apply this skill during major refactorings, before release cycles, or as a recurring part of your test suite health audits.

  • Trigger the analysis using natural language prompts like 'Find orphaned tests', 'Clean up test suite', or 'Check for coverage gaps'.

  • The skill provides actionable outputs, including direct commands to delete stale files or scaffolding for missing tests.

  • Constraints: The skill operates on pattern matching and static analysis; it does not execute the actual application code. Ensure your file naming conventions are consistent to maximize the accuracy of the automated mapping.

  • Designed for TypeScript environments, though easily adaptable for other xUnit-compatible languages, this skill helps developers reduce technical debt and maintain long-term confidence in their test automation strategy.

Repository Stats

Stars
124
Forks
18
Open Issues
1
Language
TypeScript
Default Branch
main
Sync Status
Idle
Last Synced
Apr 29, 2026, 02:36 PM
View on GitHub