refactor: rename formatCommitsForAI to prepareAIPrompt and enhance instructions - #2
Merged
Conversation
davegarvey
commented
Dec 16, 2025
Owner
- Rename function from formatCommitsForAI to prepareAIPrompt for clarity
- Enhance getBaseInstructions with context awareness for README/diffs
- Completely rewrite getDefaultStyleInstructions with detailed conventional commits parsing
- Separate base instructions (technical context) from style instructions (customizable)
- Improve XML data structure and instruction organization
- Separate AI instructions from input data using OpenAI Responses API - Add --instructions and --instructions-extend CLI options for customization - Implement XML-tagged commit data for better prompt engineering - Update documentation with usage examples and architecture details - Add comprehensive tests for new functionality
- Add ESLint configuration for code linting - Set up Husky for Git hooks - Configure lint-staged to run lint on staged files - Run tests in pre-commit hook - Add lint and build scripts to package.json - Update .gitignore for Husky internal files
- Automatically read README.md to provide project context to AI - Separate base instructions (technical context) from style instructions (customizable) - Include README in XML-tagged input data for better audience targeting - Update base instructions to mention README availability - Add comprehensive tests for README context functionality
- Add --include-diffs CLI option to provide git diffs to AI - Implement getDiffsSinceLastTag function in git.js for diff retrieval - Include diffs in XML-tagged input data when option is enabled - Update base instructions to mention diff availability - Add comprehensive tests for diffs functionality - Update README documentation with new option
- Add --include-readme CLI option (default: true) to control README inclusion - Make README reading conditional based on the option - Update README documentation with new option - Maintain backward compatibility with default true behavior
- Specify technical writer role more clearly - Add explicit task description for release note generation - Improve clarity of AI's purpose and approach
- Update assertions to check for new instruction text - Fix expectations for custom instructions tests - Ensure all tests pass with updated generator logic
…structions - Rename function from formatCommitsForAI to prepareAIPrompt for clarity - Enhance getBaseInstructions with context awareness for README/diffs - Completely rewrite getDefaultStyleInstructions with detailed conventional commits parsing - Separate base instructions (technical context) from style instructions (customizable) - Improve XML data structure and instruction organization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.