Skip to content

Feat/enhance cli workflow#10

Merged
moris88 merged 2 commits into
mainfrom
feat/enhance-cli-workflow
Aug 4, 2025
Merged

Feat/enhance cli workflow#10
moris88 merged 2 commits into
mainfrom
feat/enhance-cli-workflow

Conversation

@moris88

@moris88 moris88 commented Aug 4, 2025

Copy link
Copy Markdown
Owner

No description provided.

moris88 added 2 commits August 4, 2025 21:16
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.
@moris88 moris88 self-assigned this Aug 4, 2025
@moris88 moris88 added the enhancement New feature or request label Aug 4, 2025
@moris88 moris88 merged commit c6bddf8 into main Aug 4, 2025
@moris88 moris88 deleted the feat/enhance-cli-workflow branch August 4, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant