Add fixture JSDoc consistency guidelines #75
Merged
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.
Summary
Adds guidelines to prevent JSDoc inconsistencies between fixture test file pairs (
.input.tsand.expected.ts).Background
While working on fixture tests for issue #73 (name conflict detection), Claude made an error by using incorrect line numbers in the JSDoc
@commandannotations of.expected.tsfiles, causing the documentation to reference wrong coordinates compared to the.input.tsfiles.Design Decision: Maintain JSDoc Repetition
Although this violates DRY principles, we decided to keep identical JSDoc in both fixture files because the repetition provides significant value to AI agents - each file is self-documenting and can be understood in isolation without requiring cross-file references, which is especially important given RefakTS is built "by AI agents, for AI agents."
Implementation Approach
The easiest immediate solution is adding clear guidelines to
guides/COMMAND_IMPLEMENTATION.md. Future automation options could include linting rules to validate JSDoc consistency, pre-commit hooks to check fixture pairs, or programmatic generation of.expected.tsfiles from.input.ts+ transformation results.Changes
@commandcoordinates must always reference the input file location