Feat/enhance cli workflow#10
Merged
Merged
Conversation
This commit refactors the internal prompt files to improve their clarity, structure, and future maintainability. The primary motivation is to enhance the user experience and the reliability of the AI's responses by providing more explicit instructions and context within each prompt. Key changes include: * **Enhanced Readability:** Prompts now use bold headings, horizontal rules, and distinct sections (e.g., `🎯 OBJECTIVE`, `📌 REQUIREMENTS`, `⚠️ OUTPUT`) to make the instructions immediately clear and easy to parse for the AI model. * **Clarified Instructions:** Ambiguous phrasing has been replaced with more precise language, detailing requirements such as language, format, length, and expected output. * **Standardized Structure:** All prompt files (`branch.txt`, `commit-body.txt`, `commit.txt`, `review.txt`) now follow a consistent markdown-like structure, making it easier to understand their purpose at a glance and to add new prompts in the future. * **Improved Guidance for AI:** By explicitly stating objectives, requirements, valid/invalid examples (where applicable), and expected output formats, the prompts guide the AI model more effectively toward generating desired results. For instance, the `commit.txt` prompt now includes clear `✅ FORMAT RULES` and `✅ VALID/❌ INVALID EXAMPLES`. * **Added Context to `review.txt`:** The review prompt now includes `Code Duplication` as a specific evaluation parameter, providing a more comprehensive review scope. It also clarifies the response rules and the handling of empty diffs.
This commit introduces the initial setup for automated package publishing to GitHub Packages and implements several improvements to the project's structure and configuration.
The primary goal is to streamline the release process by automating the publication of new versions to NPM. This ensures that new features and bug fixes are readily available to users.
Key changes include:
* **GitHub Actions Workflow (`.github/workflows/deploy.yml`)**:
* A new CI/CD workflow is added to handle the publishing process.
* This workflow is triggered on every `push` event to a `tag`, specifically when a new version tag (e.g., `v1.0.0`) is created.
* It uses `actions/checkout@v4` to retrieve the code, `dawidd6/action-get-tag@v1` to extract the version from the tag, and `actions/setup-node@v4` to configure the Node.js environment.
* The workflow configures `.npmrc` to publish to `https://npm.pkg.github.com` with the `@crmpartners` scope.
* It executes `npm ci` for dependency installation, sets up Git user configuration, runs `npm version` to update `package.json` with the tag version, and finally `npm publish` using a `NPM_TOKEN` secret for authentication.
* **Configuration Updates (`bin/init-config.cjs`)**:
* The default `geminiModel` in the configuration template has been updated from `gemini-1.5-flash` to `gemini-2.5-flash`. This ensures that new installations or configurations default to a potentially more capable or updated model.
* **Validation Improvements (`src/main.js`)**:
* Enhanced validation for configuration properties.
* Added checks to ensure `config.geminiApiKey` and `config.geminiModel` are not only present but also non-empty (after trimming whitespace). This prevents the application from proceeding with invalid or blank API keys/models.
* **Readability and Structure Enhancements (`PUBLIC.md`, `README.md`)**:
* Removed redundant horizontal rule separators (`---`) in `PUBLIC.md` and `README.md`. These changes improve the overall readability and cleanliness of the documentation files.
* **Development Tracking (`TODO.md`)**:
* A new `TODO.md` file has been added to list planned features and improvements, starting with a placeholder for listing recent commits. This helps in tracking future development efforts.
* **Version Reset (`package.json`)**:
* The `version` in `package.json` has been reset to `0.0.0`. This is a standard practice when setting up automated release pipelines, as the version will now be dynamically managed and updated by the CI/CD workflow based on Git tags.
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.
No description provided.