feat: enhance string literal extraction and documentation matching#26
Conversation
- Added a new function `extractStringLiterals` in `diff-parser.ts` to capture meaningful string literals from changed lines, filtering out common non-architectural strings. - Updated `parsePRFiles` to include extracted string literals alongside changed symbols. - Introduced a regex in `doc-extractor.ts` to capture quoted string values from documentation, aiding in matching diffs that change string literals. - Modified `findCandidateSections` to incorporate changed literals from the diff for improved section scoring. - Increased the threshold for candidate section matching in `drift-detector.ts` from 3 to 6 to refine detection accuracy. - Updated `ChangedFile` interface in `types.ts` to include `changedLiterals` for better data structure representation.
🧠 Knowledge Diff — Rationale Drift DetectedI found 2 documentation drift issue(s) in this PR. The code changed, but the docs didn't keep up. 🔴
|
extractStringLiteralsindiff-parser.tsto capture meaningful string literals from changed lines, filtering out common non-architectural strings.parsePRFilesto include extracted string literals alongside changed symbols.doc-extractor.tsto capture quoted string values from documentation, aiding in matching diffs that change string literals.findCandidateSectionsto incorporate changed literals from the diff for improved section scoring.drift-detector.tsfrom 3 to 6 to refine detection accuracy.ChangedFileinterface intypes.tsto includechangedLiteralsfor better data structure representation.