feat(devgen/modules): enhance changelog and license generation with improved file handling

This update introduces improvements to the changelog generator's file handling logic, including proper prepending of new entries and automatic header management. It also refines the license generator's template directory structure and cleans up minor formatting issues in the commit generator.

**New Features**
- Added intelligent changelog prepending logic that preserves existing headers and maintains proper formatting when updating files
- Implemented automatic `# CHANGELOG` header insertion for new changelog files

**Enhancements & Refinements**
- Changed changelog version headers from `#` to `##` for better markdown hierarchy
- Updated license generator to use `templates/licenses` directory instead of `prompt_templates/licenses`
- Removed unnecessary whitespace and improved code formatting in commit generator
- Enhanced changelog file writing logic to handle both new and existing files more robustly
```
This commit is contained in:
sankalp committed 2025-12-24 23:34:32 +05:45
1 parent a7507255c7
commit 3635887a85
3 files changed
+13 -11

No files matched your search

+2 -3
View File
@@ -39,7 +39,6 @@ IGNORE_PATTERNS = [
]
class CommitEngine:
"""
Engine for generating AI-powered commit messages.
@@ -98,11 +97,11 @@ class CommitEngine:
]
)
files = [f.strip() for f in out.split("\n") if f.strip()]
# Also get staged files (in case of a previous failed run)
staged_out = run_git_command(["git", "diff", "--name-only", "--cached"])
staged_files = [f.strip() for f in staged_out.split("\n") if f.strip()]
# Combine and deduplicate
all_files = list(set(files + staged_files))
return all_files