Right now Gitbun mostly understands changes at a surface level by looking at filenames, folders, and raw diffs. That works fine for smaller commits, but it starts becoming inaccurate during larger refactors or structural code changes.
For example, if someone renames a function, extracts logic into another file, or changes an API signature, Gitbun currently just sees line changes instead of understanding what actually happened.
The goal of this issue is to make the analyzer more semantic-aware so generated commit messages become smarter during complex code changes.
A few examples of things that would be useful to detect:
- renamed functions/methods
- extracted or moved logic
- API/interface changes
- larger architectural refactors
This will probably require some form of AST-based analysis instead of relying only on raw git diffs.
Possible starting points:
- Tree-sitter
- ts-morph
- Babel AST
- TypeScript compiler APIs
The implementation does not need to support every language immediately. Even improving semantic understanding for TypeScript/JavaScript first would already be a huge improvement.
Try to keep performance in mind as well. The analyzer should still remain reasonably fast on larger repositories.
Right now Gitbun mostly understands changes at a surface level by looking at filenames, folders, and raw diffs. That works fine for smaller commits, but it starts becoming inaccurate during larger refactors or structural code changes.
For example, if someone renames a function, extracts logic into another file, or changes an API signature, Gitbun currently just sees line changes instead of understanding what actually happened.
The goal of this issue is to make the analyzer more semantic-aware so generated commit messages become smarter during complex code changes.
A few examples of things that would be useful to detect:
This will probably require some form of AST-based analysis instead of relying only on raw git diffs.
Possible starting points:
The implementation does not need to support every language immediately. Even improving semantic understanding for TypeScript/JavaScript first would already be a huge improvement.
Try to keep performance in mind as well. The analyzer should still remain reasonably fast on larger repositories.