tdmcp-coverage-writer
Use this skill when assigned a specific coverage gap.
Workflow
- Read the target implementation and the closest existing tests.
- Identify the behavior or branch that is currently untested.
- Add the smallest test that would fail if that behavior regressed.
- Use existing helpers such as
tests/helpers/tdMock.ts,KnowledgeBase,RecipeLibrary, andsilentLoggerinstead of inventing new scaffolding. - Run the narrow test and fix any real failure.
Assertions to prefer
- Real return text/JSON blocks from
CallToolResult. - Bridge request bodies captured by msw.
- Friendly
isErrorresults instead of thrown handler errors. - CLI stdout/stderr and exit status for user-facing commands.
- Resource URI and payload shape consumed by MCP clients.
Avoid
- Tests that only import a module to mark lines covered.
- Broad snapshots where a specific behavior assertion would do.
- New exclusions in coverage config.
- Rewriting production code unless the test exposes a real bug and the lead asked you to patch it.
Output
Report the changed files, command run, behavior covered, and any remaining branch or live-TD validation that is still unverified.