Skip to content

refactor: rename formatCommitsForAI to prepareAIPrompt and enhance instructions - #2

Merged
davegarvey merged 8 commits into
mainfrom
prompt-customisation
Dec 16, 2025
Merged

refactor: rename formatCommitsForAI to prepareAIPrompt and enhance instructions#2
davegarvey merged 8 commits into
mainfrom
prompt-customisation

Conversation

@davegarvey

Copy link
Copy Markdown
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
@davegarvey
davegarvey merged commit 8e1c536 into main Dec 16, 2025
1 check passed
@davegarvey
davegarvey deleted the prompt-customisation branch December 16, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant