Skip to content

chore: implement pre-release for extensions#1097

Merged
Crunchyman-ralph merged 2 commits intonextfrom
chore/implement.ci.pre.release.extension
Aug 7, 2025
Merged

chore: implement pre-release for extensions#1097
Crunchyman-ralph merged 2 commits intonextfrom
chore/implement.ci.pre.release.extension

Conversation

@Crunchyman-ralph
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph commented Aug 7, 2025

What type of PR is this?

  • 🐛 Bug fix
  • ✨ Feature
  • 🔌 Integration
  • 📝 Docs
  • 🧹 Refactor
  • Other:

Description

Related Issues

How to Test This

# Example commands or steps

Expected result:

Contributor Checklist

  • Created changeset: npm run changeset
  • Tests pass: npm test
  • Format check passes: npm run format-check (or npm run format to fix)
  • Addressed CodeRabbit comments (if any)
  • Linked related issues (if any)
  • Manually tested the changes

Changelog Entry


For Maintainers

  • PR title follows conventional commits
  • Target branch correct
  • Labels added
  • Milestone assigned (if applicable)

Summary by CodeRabbit

  • New Features

    • Introduced automated pre-release and release workflows for the extension, including new scripts and a dedicated pre-release process.
    • Added a GitHub Actions workflow to handle extension pre-releases, publishing pre-release packages to the VS Code Marketplace and Open VSX Registry.
  • Refactor

    • Replaced shell-based release automation with Node.js scripts for improved reliability and maintainability.
    • Centralized project and Git utility functions into a reusable module.
  • Chores

    • Removed legacy shell release script.
    • Updated workflows to use new scripts and improved environment variable management.
    • Removed GitHub release creation and asset upload from the extension release workflow.

@changeset-bot
Copy link

changeset-bot bot commented Aug 7, 2025

⚠️ No Changeset found

Latest commit: 03b456a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 7, 2025

Walkthrough

This change migrates the release and pre-release automation from shell scripts to Node.js scripts, introduces new utility functions for Git and project operations, and refactors existing scripts to use these utilities. It also adds a new pre-release workflow and updates existing GitHub Actions workflows to use the new scripts, while removing GitHub Release asset upload steps and the legacy shell script.

Changes

Cohort / File(s) Change Summary
New Node.js Release & Pre-release Scripts
.github/scripts/pre-release.mjs, .github/scripts/release.mjs
Added Node.js scripts to automate pre-release and release processes, replacing shell scripts. These scripts handle version checks, tag management, and publishing via Changesets, with logging and error handling.
Utility Functions for Scripts
.github/scripts/utils.mjs
Introduced utility functions for finding the project root, running shell commands, retrieving package versions, checking remote Git tags, and creating/pushing tags. These are used by other scripts for consistency and code reuse.
Tag Extension Script Refactor
.github/scripts/tag-extension.mjs
Refactored to delegate root directory and Git tag creation logic to new utility functions, removing inline logic and direct Git command handling.
Removed Legacy Shell Script
.github/scripts/release.sh
Deleted the previous shell-based release automation script, superseded by the new Node.js release script.
New Pre-release Workflow
.github/workflows/extension-pre-release.yml
Added a GitHub Actions workflow to handle extension pre-releases, triggered by RC tags, building, packaging, and publishing to VS Code Marketplace and Open VSX, and uploading artifacts.
Extension Release Workflow Update
.github/workflows/extension-release.yml
Removed steps for creating a GitHub Release and uploading VSIX assets; the workflow now focuses solely on building, packaging, and publishing to marketplaces.
Pre-release Workflow Update
.github/workflows/pre-release.yml
Updated to use the new Node.js pre-release script and set environment variables for extension publishing.
Release Workflow Update
.github/workflows/release.yml
Updated to use the new Node.js release script instead of the removed shell script.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions Workflow
    participant Node.js Script (pre-release/release)
    participant Utils Module
    participant Git (remote)
    participant NPM Registry

    GitHub Actions Workflow->>Node.js Script (pre-release/release): Run script
    Node.js Script (pre-release/release)->>Utils Module: Find root directory, check version/tag, etc.
    Node.js Script (pre-release/release)->>Git (remote): Check/create/push tag (if needed)
    Node.js Script (pre-release/release)->>NPM Registry: Publish packages via Changeset
    Node.js Script (pre-release/release)->>GitHub Actions Workflow: Exit with status
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–25 minutes

Possibly related PRs

Suggested reviewers

  • eyaltoledano

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/implement.ci.pre.release.extension

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4bb6370 and 6c932ef.

📒 Files selected for processing (9)
  • .github/scripts/pre-release.mjs (1 hunks)
  • .github/scripts/release.mjs (1 hunks)
  • .github/scripts/release.sh (0 hunks)
  • .github/scripts/tag-extension.mjs (2 hunks)
  • .github/scripts/utils.mjs (1 hunks)
  • .github/workflows/extension-pre-release.yml (1 hunks)
  • .github/workflows/extension-release.yml (0 hunks)
  • .github/workflows/pre-release.yml (2 hunks)
  • .github/workflows/release.yml (1 hunks)
💤 Files with no reviewable changes (2)
  • .github/workflows/extension-release.yml
  • .github/scripts/release.sh
🧰 Additional context used
🧠 Learnings (46)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.810Z
Learning: Pull Request descriptions must use the provided template, including Task Overview, Subtasks Completed, Implementation Details, Testing, Breaking Changes, and Related Tasks
Learnt from: eyaltoledano
PR: eyaltoledano/claude-task-master#1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: For PRD-driven feature development, create a dedicated tag, draft a PRD in `.taskmaster/docs/`, parse it into tasks, and add a high-level reference in the master tag.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.810Z
Learning: Pull Request titles must follow the format: Task <ID>: <Task Title>
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-31T22:07:14.034Z
Learning: Import Task Master's development workflow commands and guidelines, treat as if import is in the main CLAUDE.md file.
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Every pull request containing new features, bug fixes, breaking changes, performance improvements, significant refactoring, user-facing documentation updates, dependency updates, or impactful build/tooling changes should include a changeset file.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-07-18T17:10:53.657Z
Learning: Guidelines for integrating new features into the Task Master CLI with tagged system considerations (new_features.mdc).
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Ensure new features trigger migration when needed, handle migration errors gracefully, test feature behavior with pre-migration projects, and do not assume projects are already migrated.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Ensure new features work with existing projects seamlessly, supporting both legacy and tagged task data formats, and support silent migration during feature usage.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Applies to package.json : Add and update test scripts in package.json to include test, test:watch, test:coverage, test:unit, test:integration, test:e2e, and test:ci
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-07-18T17:10:53.657Z
Learning: Guidelines for using Changesets (npm run changeset) to manage versioning and changelogs (changeset.mdc).
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Implement complete migration for all related files in the tagged task system, handle configuration and state file creation, and provide migration status tracking.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: When implementation differs significantly from planned approach, call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Implement silent migration from legacy to tagged format in the readJSON() function, detect legacy format, convert automatically, and preserve all existing task data during migration.
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1095
File: .github/scripts/check-pre-release-mode.mjs:14-14
Timestamp: 2025-08-06T21:17:00.405Z
Learning: CI scripts in `.github/scripts/` are designed to run only in Unix-based CI environments and do not require Windows compatibility, so hard-coded Unix paths like '/' are acceptable.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/**/*.test.js : Test core logic independently with both data formats, mock file system operations, test tag resolution behavior, and verify migration compatibility in unit tests.
📚 Learning: in the eyaltoledano/claude-task-master repository, the vs code extension uses a 3-file packaging sys...
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#997
File: apps/extension/package.publish.json:2-8
Timestamp: 2025-07-31T20:49:04.638Z
Learning: In the eyaltoledano/claude-task-master repository, the VS Code extension uses a 3-file packaging system where package.json (with name "extension") is for development within the monorepo, while package.publish.json (with name "task-master-hamster") contains the clean manifest for VS Code marketplace publishing. The different names are intentional and serve distinct purposes in the build and publishing workflow.

Applied to files:

  • .github/workflows/pre-release.yml
  • .github/scripts/release.mjs
  • .github/scripts/tag-extension.mjs
  • .github/workflows/extension-pre-release.yml
  • .github/scripts/pre-release.mjs
📚 Learning: guidelines for using changesets (npm run changeset) to manage versioning and changelogs (changeset.m...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-07-18T17:10:53.657Z
Learning: Guidelines for using Changesets (npm run changeset) to manage versioning and changelogs (changeset.mdc).

Applied to files:

  • .github/workflows/pre-release.yml
  • .github/scripts/release.mjs
  • .github/workflows/release.yml
  • .github/scripts/pre-release.mjs
📚 Learning: every pull request containing new features, bug fixes, breaking changes, performance improvements, s...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Every pull request containing new features, bug fixes, breaking changes, performance improvements, significant refactoring, user-facing documentation updates, dependency updates, or impactful build/tooling changes should include a changeset file.

Applied to files:

  • .github/workflows/pre-release.yml
📚 Learning: applies to .changeset/*.md : when running `npm run changeset` or `npx changeset add`, provide a conc...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Applies to .changeset/*.md : When running `npm run changeset` or `npx changeset add`, provide a concise summary of the changes for the `CHANGELOG.md` in imperative mood, typically a single line, and not a detailed Git commit message.

Applied to files:

  • .github/workflows/pre-release.yml
  • .github/scripts/release.mjs
  • .github/workflows/release.yml
  • .github/scripts/pre-release.mjs
📚 Learning: run npm run test:coverage before commits to ensure all tests pass with sufficient coverage...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Run npm run test:coverage before commits to ensure all tests pass with sufficient coverage

Applied to files:

  • .github/workflows/pre-release.yml
📚 Learning: applies to scripts/modules/*.js : ensure new features work with existing projects seamlessly, suppor...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Ensure new features work with existing projects seamlessly, supporting both legacy and tagged task data formats, and support silent migration during feature usage.

Applied to files:

  • .github/scripts/release.mjs
  • .github/workflows/release.yml
  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/*.js : default to current tag when not specified, support explicit tag se...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Default to current tag when not specified, support explicit tag selection in advanced features, validate tag existence before operations, and provide clear messaging about tag context.

Applied to files:

  • .github/scripts/release.mjs
  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/*.js : ensure new features trigger migration when needed, handle migratio...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Ensure new features trigger migration when needed, handle migration errors gracefully, test feature behavior with pre-migration projects, and do not assume projects are already migrated.

Applied to files:

  • .github/scripts/release.mjs
  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/dependency-manager.js : track and report changes made during dependency c...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Track and report changes made during dependency cleanup

Applied to files:

  • .github/scripts/release.mjs
  • .github/workflows/release.yml
  • .github/scripts/pre-release.mjs
📚 Learning: applies to .changeset/* : create appropriate changesets for new features, use semantic versioning, i...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to .changeset/* : Create appropriate changesets for new features, use semantic versioning, include tagged system information in release notes, and document breaking changes if any.

Applied to files:

  • .github/scripts/release.mjs
📚 Learning: applies to scripts/modules/* : every command that reads or writes tasks.json must be tag-aware...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : Every command that reads or writes tasks.json must be tag-aware

Applied to files:

  • .github/scripts/release.mjs
  • .github/scripts/tag-extension.mjs
  • .github/scripts/pre-release.mjs
📚 Learning: applies to {scripts/modules/utils.js,mcp-server/src/core/utils/path-utils.js,mcp-server/src/tools/ut...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to {scripts/modules/utils.js,mcp-server/src/core/utils/path-utils.js,mcp-server/src/tools/utils.js} : Export all utility functions explicitly, group related functions logically, and include new tagged system utilities.

Applied to files:

  • .github/scripts/release.mjs
  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/commands.js : use path.join() to construct file paths, follow established...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Use path.join() to construct file paths, follow established naming conventions (like task_001.txt), check file existence before deletion, and handle file deletion errors gracefully.

Applied to files:

  • .github/scripts/release.mjs
  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/utils.js : implement complete migration for all related files in the tagg...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Implement complete migration for all related files in the tagged task system, handle configuration and state file creation, and provide migration status tracking.

Applied to files:

  • .github/scripts/release.mjs
📚 Learning: applies to scripts/modules/task-manager.js : generate task files from the current tag context, inclu...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Generate task files from the current tag context, include tag information in generated files, and do not mix tasks from different tags in file generation.

Applied to files:

  • .github/scripts/release.mjs
📚 Learning: applies to **/*.{test,spec}.{js,ts,jsx,tsx} : create a test file if needed and ensure all tests pass...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.810Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Create a test file if needed and ensure all tests pass before completing a task

Applied to files:

  • .github/scripts/release.mjs
  • .github/scripts/tag-extension.mjs
  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/utils.js : use tag resolution functions for all task data access, provide...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Use tag resolution functions for all task data access, provide backward compatibility with legacy format, and default to 'master' tag when no tag is specified.

Applied to files:

  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/task-manager.js : use tag resolution functions to maintain backward compa...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions to maintain backward compatibility, returning legacy format to core functions and not exposing the tagged structure to existing core logic.

Applied to files:

  • .github/scripts/tag-extension.mjs
📚 Learning: applies to scripts/modules/* : do not hard-code tag resolution (e.g., const tag = options.tag || 'ma...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : Do not hard-code tag resolution (e.g., const tag = options.tag || 'master';); always use getCurrentTag

Applied to files:

  • .github/scripts/tag-extension.mjs
📚 Learning: applies to scripts/modules/* : all commands must pass { projectroot, tag } as context to core functi...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : All commands must pass { projectRoot, tag } as context to core functions

Applied to files:

  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/*.js : minimize file i/o operations per feature execution, cache tag reso...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Minimize file I/O operations per feature execution, cache tag resolution results when appropriate, use streaming for large task datasets, and avoid loading all tags when only one is needed.

Applied to files:

  • .github/scripts/tag-extension.mjs
📚 Learning: applies to scripts/modules/*.js : when implementing core logic for new features, do so in 'scripts/m...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : When implementing core logic for new features, do so in 'scripts/modules/' before CLI or MCP interfaces, and design functions to work with both legacy and tagged data formats using tag resolution functions.

Applied to files:

  • .github/scripts/tag-extension.mjs
📚 Learning: applies to scripts/modules/* : all command files must import getcurrenttag from utils.js...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : All command files must import getCurrentTag from utils.js

Applied to files:

  • .github/scripts/tag-extension.mjs
📚 Learning: applies to mcp-server/src/core/direct-functions/*.js : the *direct function is responsible for findi...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-07-18T17:11:36.732Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : The *Direct function is responsible for finding the exact tasks.json path using findTasksJsonPath, relying on the projectRoot passed in args.

Applied to files:

  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
📚 Learning: applies to mcp-server/src/core/utils/path-utils.js : call `findtasksjsonpath(args, log)` from within...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to mcp-server/src/core/utils/path-utils.js : Call `findTasksJsonPath(args, log)` from within direct function wrappers in `mcp-server/src/core/direct-functions/` to get the absolute path to the relevant `tasks.json`.

Applied to files:

  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
📚 Learning: in the claude task master system, core task-manager functions are designed with fallback mechanisms ...
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#943
File: scripts/modules/task-manager/move-task.js:24-24
Timestamp: 2025-07-18T05:38:17.352Z
Learning: In the Claude Task Master system, core task-manager functions are designed with fallback mechanisms for missing projectRoot parameters using the pattern `const projectRoot = providedProjectRoot || findProjectRoot();`. The readJSON and writeJSON functions have default parameters (projectRoot = null, tag = null) and handle missing parameters gracefully. Adding strict validation to these core functions would break the established flexible architecture pattern.

Applied to files:

  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
📚 Learning: start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate the initial tasks.json.

Applied to files:

  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/task-manager.js : extract tasks from prd documents using ai, create them ...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI, create them in the current tag context (defaulting to 'master'), provide clear prompts to guide AI task generation, and validate/clean up AI-generated tasks.

Applied to files:

  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/task-manager/* : all core functions in scripts/modules/task-manager/ must...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/task-manager/* : All core functions in scripts/modules/task-manager/ must use readJSON(tasksPath, projectRoot, tag) and writeJSON(tasksPath, data, projectRoot, tag)

Applied to files:

  • .github/scripts/tag-extension.mjs
  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/* : do not call readjson or writejson without passing projectroot and tag...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : Do not call readJSON or writeJSON without passing projectRoot and tag

Applied to files:

  • .github/scripts/tag-extension.mjs
📚 Learning: applies to scripts/modules/* : all commands must resolve the tag using the pattern: options.tag || g...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : All commands must resolve the tag using the pattern: options.tag || getCurrentTag(projectRoot) || 'master'

Applied to files:

  • .github/scripts/tag-extension.mjs
📚 Learning: applies to scripts/modules/utils.js : place utilities used primarily by the core `task-master` cli l...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Place utilities used primarily by the core `task-master` CLI logic and command modules (`scripts/modules/*`) into `scripts/modules/utils.js`.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/utils.js : use tagged task system aware functions for task finding and ma...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Use tagged task system aware functions for task finding and manipulation, handle both task and subtask operations, and validate task IDs before operations.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to {scripts/modules/utils.js,mcp-server/src/core/utils/path-utils.js,mcp-server/src/tools/ut...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to {scripts/modules/utils.js,mcp-server/src/core/utils/path-utils.js,mcp-server/src/tools/utils.js} : Keep utilities relevant to their location, export all utility functions in a single statement per file, group related exports together, export configuration constants, do not use default exports, and do not create circular dependencies.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/utils.js : detect circular dependencies, validate dependency references, ...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Detect circular dependencies, validate dependency references, and support cross-tag dependency checking (future enhancement) in dependency analysis utilities.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to mcp-server/src/tools/utils.js : use `normalizeprojectroot(rawpath, log)`, `getrawprojectr...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to mcp-server/src/tools/utils.js : Use `normalizeProjectRoot(rawPath, log)`, `getRawProjectRootFromSession(session, log)`, and `withNormalizedProjectRoot(executeFn)` in `mcp-server/src/tools/utils.js` to ensure project root paths are normalized for MCP tools.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/* : all commands must find projectroot with error handling before proceed...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : All commands must find projectRoot with error handling before proceeding

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: for cli usage, install taskmaster globally with `npm install -g task-master-ai` or use locally via `...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: For CLI usage, install Taskmaster globally with `npm install -g task-master-ai` or use locally via `npx task-master-ai ...`.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: use the global `task-master` cli command instead of directly invoking `node scripts/dev.js` for all ...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Use the global `task-master` CLI command instead of directly invoking `node scripts/dev.js` for all task management operations.

Applied to files:

  • .github/scripts/utils.mjs
  • .github/workflows/release.yml
📚 Learning: applies to scripts/modules/commands.js : implement version checking to notify users of available upd...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates, use non-blocking version checks, and display update notifications after command completion.

Applied to files:

  • .github/workflows/release.yml
📚 Learning: applies to scripts/modules/commands.js : add help text to the command definition and update 'dev_wor...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/commands.js : Add help text to the command definition and update 'dev_workflow.mdc' with command reference when adding a new feature.

Applied to files:

  • .github/workflows/release.yml
📚 Learning: when implementation differs significantly from planned approach, call `node scripts/dev.js update --...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: When implementation differs significantly from planned approach, call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json.

Applied to files:

  • .github/workflows/release.yml
  • .github/scripts/pre-release.mjs
📚 Learning: applies to package.json : add and update test scripts in package.json to include test, test:watch, t...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Applies to package.json : Add and update test scripts in package.json to include test, test:watch, test:coverage, test:unit, test:integration, test:e2e, and test:ci

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/**/*.test.js : test cli and mcp interfaces with real task data, verify en...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/**/*.test.js : Test CLI and MCP interfaces with real task data, verify end-to-end workflows across tag contexts, and test error scenarios and recovery in integration tests.

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/*.js : when implementing project initialization commands, support both cl...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : When implementing project initialization commands, support both CLI and MCP, support non-interactive modes with sensible defaults, handle project metadata, and create necessary files and directories.

Applied to files:

  • .github/scripts/pre-release.mjs
🧬 Code Graph Analysis (4)
.github/scripts/release.mjs (3)
.github/scripts/pre-release.mjs (4)
  • __filename (7-7)
  • __dirname (8-8)
  • rootDir (10-10)
  • preJsonPath (16-16)
.github/scripts/tag-extension.mjs (3)
  • __filename (8-8)
  • __dirname (9-9)
  • rootDir (11-11)
.github/scripts/utils.mjs (2)
  • findRootDir (7-20)
  • runCommand (23-37)
.github/scripts/tag-extension.mjs (1)
.github/scripts/utils.mjs (1)
  • createAndPushTag (63-88)
.github/scripts/utils.mjs (1)
.github/scripts/tag-extension.mjs (3)
  • pkgPath (15-15)
  • pkg (17-17)
  • tag (30-30)
.github/scripts/pre-release.mjs (3)
.github/scripts/release.mjs (4)
  • __filename (7-7)
  • __dirname (8-8)
  • rootDir (10-10)
  • preJsonPath (15-15)
.github/scripts/tag-extension.mjs (3)
  • __filename (8-8)
  • __dirname (9-9)
  • rootDir (11-11)
.github/scripts/utils.mjs (4)
  • findRootDir (7-20)
  • getPackageVersion (40-51)
  • runCommand (23-37)
  • createAndPushTag (63-88)
🪛 YAMLlint (1.37.1)
.github/workflows/extension-pre-release.yml

[warning] 3-3: truthy value should be one of [false, true]

(truthy)


[error] 110-110: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (21)
.github/scripts/utils.mjs (3)

22-37: LGTM - Command execution with proper error handling.

The runCommand function correctly handles command execution with inherited stdio and appropriate error handling by exiting on failure.


39-51: LGTM - Package version reading with error handling.

The getPackageVersion function properly reads and parses package.json with comprehensive error handling.


53-60: LGTM - Git tag existence check.

The tagExistsOnRemote function correctly uses git ls-remote to check for tag existence and handles the command result appropriately.

.github/workflows/release.yml (1)

47-47: LGTM - Workflow updated to use new Node.js release script.

The change correctly replaces the shell script with the new Node.js script while maintaining all necessary environment variables.

.github/workflows/pre-release.yml (3)

12-12: LGTM - Environment configuration for extension release.

Adding the extension-release environment provides appropriate deployment protection for the pre-release process.


54-54: LGTM - Workflow updated to use new Node.js pre-release script.

The change correctly replaces the npm script with the new Node.js script for pre-release publishing.


58-59: LGTM - Added environment variables for marketplace publishing.

The VSCE_PAT and OVSX_PAT environment variables are correctly added to support publishing extensions to VS Code Marketplace and Open VSX Registry.

.github/scripts/release.mjs (4)

1-11: LGTM - Script setup and root directory detection.

The script correctly sets up ES module compatibility and uses the utility function to find the project root directory.


14-19: LGTM - Pre-release mode cleanup with proper logging.

The script correctly removes any existing .changeset/pre.json file as a safety measure to ensure the release is not in pre-release mode, with appropriate warning logging.


21-23: LGTM - Extension tagging with clear documentation.

The script correctly invokes the extension tagging script with good documentation explaining why this prevents changeset from publishing the private package.


25-31: LGTM - Changeset publish and completion logging.

The script correctly runs the changeset publish command and provides clear completion logging with a helpful note about the extension workflow trigger.

.github/scripts/pre-release.mjs (4)

1-12: LGTM - Script setup and path configuration.

The script correctly sets up ES module compatibility, finds the root directory, and constructs the extension package path properly.


15-31: LGTM - Comprehensive RC mode verification.

The script properly verifies the project is in release candidate mode by checking both the existence of .changeset/pre.json and that its tag is "rc", with appropriate error handling and messaging.


33-39: LGTM - Version retrieval and package publishing.

The script correctly gets the extension version using the utility function and publishes npm packages with clear logging.


41-50: LGTM - Extension RC tag creation with workflow trigger.

The script correctly creates the extension-rc@<version> tag using the utility function and provides clear messaging about triggering the extension pre-release workflow.

.github/scripts/tag-extension.mjs (2)

3-6: LGTM! Import changes are well-structured.

All imported functions are properly used throughout the script, and the utility function imports from ./utils.mjs align with the refactoring to centralize common Git operations.


11-33: Excellent refactoring that maintains functionality while improving maintainability.

The script successfully delegates Git operations to shared utilities while preserving all original functionality including error handling and validation.

.github/workflows/extension-pre-release.yml (4)

1-12: Workflow configuration looks good.

The trigger pattern extension-rc@* correctly aligns with the pre-release tagging strategy, and the concurrency key prevents overlapping runs.


13-43: Well-configured job setup following GitHub Actions best practices.

Good use of caching, timeouts, and the extension-release environment for secure token management.


44-74: Solid build and packaging process with good error handling.

The pre-release VSIX creation and filename extraction logic is robust, with appropriate error handling if no VSIX file is generated.


75-91: Publishing steps are correctly configured for pre-release.

Both VS Code Marketplace and Open VSX Registry publishing use appropriate pre-release flags and secure token management.

Comment on lines +32 to +33
// Create and push the tag if it doesn't exist
createAndPushTag(tag);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Good refactoring to use shared utility function.

The delegation to createAndPushTag centralizes Git tag operations and improves maintainability. The utility function handles error cases internally, so the current usage is correct.

Consider capturing the return value for enhanced logging:

-// Create and push the tag if it doesn't exist
-createAndPushTag(tag);
+// Create and push the tag if it doesn't exist
+const wasCreated = createAndPushTag(tag);
+if (!wasCreated) {
+  console.log(`Tag ${tag} already exists, no action taken`);
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Create and push the tag if it doesn't exist
createAndPushTag(tag);
// Create and push the tag if it doesn't exist
const wasCreated = createAndPushTag(tag);
if (!wasCreated) {
console.log(`Tag ${tag} already exists, no action taken`);
}
🤖 Prompt for AI Agents
In .github/scripts/tag-extension.mjs around lines 32 to 33, the call to
createAndPushTag currently does not capture its return value. Modify the code to
capture the return value from createAndPushTag and use it to add enhanced
logging that indicates success or failure of the tag creation and push
operation. This will improve observability without changing the existing error
handling inside the utility function.

Comment on lines 62 to 88
// Create and push a git tag if it doesn't exist
export function createAndPushTag(tag, remote = 'origin') {
// Check if tag already exists
if (tagExistsOnRemote(tag, remote)) {
console.log(`Tag ${tag} already exists on remote, skipping`);
return false;
}

console.log(`Creating new tag: ${tag}`);

// Create the tag locally
const tagResult = spawnSync('git', ['tag', tag]);
if (tagResult.status !== 0) {
console.error('Failed to create tag:', tagResult.error || tagResult.stderr);
process.exit(1);
}

// Push the tag to remote
const pushResult = spawnSync('git', ['push', remote, tag]);
if (pushResult.status !== 0) {
console.error('Failed to push tag:', pushResult.error || pushResult.stderr);
process.exit(1);
}

console.log(`✅ Successfully created and pushed tag: ${tag}`);
return true;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Improve error handling consistency in createAndPushTag.

The function uses different error output sources (tagResult.error || tagResult.stderr) which may not provide consistent error information.

 	// Create the tag locally
-	const tagResult = spawnSync('git', ['tag', tag]);
+	const tagResult = spawnSync('git', ['tag', tag], { encoding: 'utf8' });
 	if (tagResult.status !== 0) {
-		console.error('Failed to create tag:', tagResult.error || tagResult.stderr);
+		console.error('Failed to create tag:', tagResult.stderr || tagResult.error?.message || 'Unknown error');
 		process.exit(1);
 	}
 	
 	// Push the tag to remote
-	const pushResult = spawnSync('git', ['push', remote, tag]);
+	const pushResult = spawnSync('git', ['push', remote, tag], { encoding: 'utf8' });
 	if (pushResult.status !== 0) {
-		console.error('Failed to push tag:', pushResult.error || pushResult.stderr);
+		console.error('Failed to push tag:', pushResult.stderr || pushResult.error?.message || 'Unknown error');
 		process.exit(1);
 	}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Create and push a git tag if it doesn't exist
export function createAndPushTag(tag, remote = 'origin') {
// Check if tag already exists
if (tagExistsOnRemote(tag, remote)) {
console.log(`Tag ${tag} already exists on remote, skipping`);
return false;
}
console.log(`Creating new tag: ${tag}`);
// Create the tag locally
const tagResult = spawnSync('git', ['tag', tag]);
if (tagResult.status !== 0) {
console.error('Failed to create tag:', tagResult.error || tagResult.stderr);
process.exit(1);
}
// Push the tag to remote
const pushResult = spawnSync('git', ['push', remote, tag]);
if (pushResult.status !== 0) {
console.error('Failed to push tag:', pushResult.error || pushResult.stderr);
process.exit(1);
}
console.log(`✅ Successfully created and pushed tag: ${tag}`);
return true;
}
export function createAndPushTag(tag, remote = 'origin') {
// Check if tag already exists
if (tagExistsOnRemote(tag, remote)) {
console.log(`Tag ${tag} already exists on remote, skipping`);
return false;
}
console.log(`Creating new tag: ${tag}`);
// Create the tag locally
const tagResult = spawnSync('git', ['tag', tag], { encoding: 'utf8' });
if (tagResult.status !== 0) {
console.error('Failed to create tag:', tagResult.stderr || tagResult.error?.message || 'Unknown error');
process.exit(1);
}
// Push the tag to remote
const pushResult = spawnSync('git', ['push', remote, tag], { encoding: 'utf8' });
if (pushResult.status !== 0) {
console.error('Failed to push tag:', pushResult.stderr || pushResult.error?.message || 'Unknown error');
process.exit(1);
}
console.log(`✅ Successfully created and pushed tag: ${tag}`);
return true;
}
🤖 Prompt for AI Agents
In .github/scripts/utils.mjs between lines 62 and 88, the error handling in
createAndPushTag is inconsistent because it uses different properties (error or
stderr) to log errors from spawnSync results. To fix this, standardize the error
logging by always checking and logging both stderr and error properties in a
consistent order for both tag creation and push operations, ensuring clear and
reliable error messages.

Comment on lines +92 to +110
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: extension-pre-release-${{ github.ref_name }}
path: |
apps/extension/vsix-build/*.vsix
apps/extension/dist/
retention-days: 30

notify-success:
needs: publish-extension-rc
if: success()
runs-on: ubuntu-latest
steps:
- name: Success Notification
run: |
echo "🚀 Extension ${{ github.ref_name }} successfully published as pre-release!"
echo "📦 Available on VS Code Marketplace (Pre-Release)"
echo "🌍 Available on Open VSX Registry (Pre-Release)" No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Good artifact management and notification setup.

The 30-day retention for artifacts is appropriate, and the notification job provides clear success feedback.

Add a newline at the end of the file to follow standard conventions:

           echo "🌍 Available on Open VSX Registry (Pre-Release)"
+
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: extension-pre-release-${{ github.ref_name }}
path: |
apps/extension/vsix-build/*.vsix
apps/extension/dist/
retention-days: 30
notify-success:
needs: publish-extension-rc
if: success()
runs-on: ubuntu-latest
steps:
- name: Success Notification
run: |
echo "🚀 Extension ${{ github.ref_name }} successfully published as pre-release!"
echo "📦 Available on VS Code Marketplace (Pre-Release)"
echo "🌍 Available on Open VSX Registry (Pre-Release)"
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: extension-pre-release-${{ github.ref_name }}
path: |
apps/extension/vsix-build/*.vsix
apps/extension/dist/
retention-days: 30
notify-success:
needs: publish-extension-rc
if: success()
runs-on: ubuntu-latest
steps:
- name: Success Notification
run: |
echo "🚀 Extension ${{ github.ref_name }} successfully published as pre-release!"
echo "📦 Available on VS Code Marketplace (Pre-Release)"
echo "🌍 Available on Open VSX Registry (Pre-Release)"
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 110-110: no new line character at the end of file

(new-line-at-end-of-file)

🤖 Prompt for AI Agents
In .github/workflows/extension-pre-release.yml around lines 92 to 110, add a
newline character at the end of the file to comply with standard file formatting
conventions.

@Crunchyman-ralph Crunchyman-ralph merged commit 3a852af into next Aug 7, 2025
3 of 4 checks passed
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
.github/scripts/utils.mjs (2)

13-13: Review the project detection logic in findRootDir.

The repository field check is too permissive - any package.json with a repository field will match, potentially matching unrelated projects.


73-84: Improve error handling consistency in createAndPushTag.

The function uses inconsistent error output sources and lacks encoding specification for git commands, while assuming string outputs in error handling.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c932ef and 03b456a.

📒 Files selected for processing (2)
  • .github/scripts/pre-release.mjs (1 hunks)
  • .github/scripts/utils.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (42)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.810Z
Learning: Pull Request descriptions must use the provided template, including Task Overview, Subtasks Completed, Implementation Details, Testing, Breaking Changes, and Related Tasks
Learnt from: eyaltoledano
PR: eyaltoledano/claude-task-master#1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: For PRD-driven feature development, create a dedicated tag, draft a PRD in `.taskmaster/docs/`, parse it into tasks, and add a high-level reference in the master tag.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.810Z
Learning: Pull Request titles must follow the format: Task <ID>: <Task Title>
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-31T22:07:14.034Z
Learning: Import Task Master's development workflow commands and guidelines, treat as if import is in the main CLAUDE.md file.
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Every pull request containing new features, bug fixes, breaking changes, performance improvements, significant refactoring, user-facing documentation updates, dependency updates, or impactful build/tooling changes should include a changeset file.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-07-18T17:10:53.657Z
Learning: Guidelines for integrating new features into the Task Master CLI with tagged system considerations (new_features.mdc).
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Ensure new features trigger migration when needed, handle migration errors gracefully, test feature behavior with pre-migration projects, and do not assume projects are already migrated.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Ensure new features work with existing projects seamlessly, supporting both legacy and tagged task data formats, and support silent migration during feature usage.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Applies to package.json : Add and update test scripts in package.json to include test, test:watch, test:coverage, test:unit, test:integration, test:e2e, and test:ci
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-07-18T17:10:53.657Z
Learning: Guidelines for using Changesets (npm run changeset) to manage versioning and changelogs (changeset.mdc).
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Implement complete migration for all related files in the tagged task system, handle configuration and state file creation, and provide migration status tracking.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: When implementation differs significantly from planned approach, call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Implement silent migration from legacy to tagged format in the readJSON() function, detect legacy format, convert automatically, and preserve all existing task data during migration.
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1095
File: .github/scripts/check-pre-release-mode.mjs:14-14
Timestamp: 2025-08-06T21:17:00.405Z
Learning: CI scripts in `.github/scripts/` are designed to run only in Unix-based CI environments and do not require Windows compatibility, so hard-coded Unix paths like '/' are acceptable.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/**/*.test.js : Test core logic independently with both data formats, mock file system operations, test tag resolution behavior, and verify migration compatibility in unit tests.
📚 Learning: guidelines for using changesets (npm run changeset) to manage versioning and changelogs (changeset.m...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-07-18T17:10:53.657Z
Learning: Guidelines for using Changesets (npm run changeset) to manage versioning and changelogs (changeset.mdc).

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/*.js : ensure new features trigger migration when needed, handle migratio...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Ensure new features trigger migration when needed, handle migration errors gracefully, test feature behavior with pre-migration projects, and do not assume projects are already migrated.

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/*.js : ensure new features work with existing projects seamlessly, suppor...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Ensure new features work with existing projects seamlessly, supporting both legacy and tagged task data formats, and support silent migration during feature usage.

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to package.json : add and update test scripts in package.json to include test, test:watch, t...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-08-03T12:13:33.875Z
Learning: Applies to package.json : Add and update test scripts in package.json to include test, test:watch, test:coverage, test:unit, test:integration, test:e2e, and test:ci

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/*.js : default to current tag when not specified, support explicit tag se...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Default to current tag when not specified, support explicit tag selection in advanced features, validate tag existence before operations, and provide clear messaging about tag context.

Applied to files:

  • .github/scripts/pre-release.mjs
  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/dependency-manager.js : track and report changes made during dependency c...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Track and report changes made during dependency cleanup

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/*.js : when implementing project initialization commands, support both cl...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : When implementing project initialization commands, support both CLI and MCP, support non-interactive modes with sensible defaults, handle project metadata, and create necessary files and directories.

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: in the eyaltoledano/claude-task-master repository, the vs code extension uses a 3-file packaging sys...
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#997
File: apps/extension/package.publish.json:2-8
Timestamp: 2025-07-31T20:49:04.638Z
Learning: In the eyaltoledano/claude-task-master repository, the VS Code extension uses a 3-file packaging system where package.json (with name "extension") is for development within the monorepo, while package.publish.json (with name "task-master-hamster") contains the clean manifest for VS Code marketplace publishing. The different names are intentional and serve distinct purposes in the build and publishing workflow.

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/commands.js : implement version checking to notify users of available upd...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates, use non-blocking version checks, and display update notifications after command completion.

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/task-manager.js : extract tasks from prd documents using ai, create them ...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI, create them in the current tag context (defaulting to 'master'), provide clear prompts to guide AI task generation, and validate/clean up AI-generated tasks.

Applied to files:

  • .github/scripts/pre-release.mjs
  • .github/scripts/utils.mjs
📚 Learning: start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate the initial tasks.json.

Applied to files:

  • .github/scripts/pre-release.mjs
  • .github/scripts/utils.mjs
📚 Learning: applies to {scripts/modules/utils.js,mcp-server/src/core/utils/path-utils.js,mcp-server/src/tools/ut...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to {scripts/modules/utils.js,mcp-server/src/core/utils/path-utils.js,mcp-server/src/tools/utils.js} : Export all utility functions explicitly, group related functions logically, and include new tagged system utilities.

Applied to files:

  • .github/scripts/pre-release.mjs
  • .github/scripts/utils.mjs
📚 Learning: applies to **/*.{test,spec}.{js,ts,jsx,tsx} : create a test file if needed and ensure all tests pass...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.810Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Create a test file if needed and ensure all tests pass before completing a task

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/**/*.test.js : test cli and mcp interfaces with real task data, verify en...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/**/*.test.js : Test CLI and MCP interfaces with real task data, verify end-to-end workflows across tag contexts, and test error scenarios and recovery in integration tests.

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/commands.js : integrate version checking in the cli run function, startin...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-31T22:07:49.716Z
Learning: Applies to scripts/modules/commands.js : Integrate version checking in the CLI run function, starting the update check in the background and displaying notifications after command execution.

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: when implementation differs significantly from planned approach, call `node scripts/dev.js update --...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: When implementation differs significantly from planned approach, call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json.

Applied to files:

  • .github/scripts/pre-release.mjs
📚 Learning: applies to scripts/modules/utils.js : place utilities used primarily by the core `task-master` cli l...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Place utilities used primarily by the core `task-master` CLI logic and command modules (`scripts/modules/*`) into `scripts/modules/utils.js`.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/* : all commands must pass { projectroot, tag } as context to core functi...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : All commands must pass { projectRoot, tag } as context to core functions

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/utils.js : use tag resolution functions for all task data access, provide...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Use tag resolution functions for all task data access, provide backward compatibility with legacy format, and default to 'master' tag when no tag is specified.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/utils.js : use tagged task system aware functions for task finding and ma...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Use tagged task system aware functions for task finding and manipulation, handle both task and subtask operations, and validate task IDs before operations.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to {scripts/modules/utils.js,mcp-server/src/core/utils/path-utils.js,mcp-server/src/tools/ut...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to {scripts/modules/utils.js,mcp-server/src/core/utils/path-utils.js,mcp-server/src/tools/utils.js} : Keep utilities relevant to their location, export all utility functions in a single statement per file, group related exports together, export configuration constants, do not use default exports, and do not create circular dependencies.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/task-manager/* : all core functions in scripts/modules/task-manager/ must...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/task-manager/* : All core functions in scripts/modules/task-manager/ must use readJSON(tasksPath, projectRoot, tag) and writeJSON(tasksPath, data, projectRoot, tag)

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/utils.js : detect circular dependencies, validate dependency references, ...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Detect circular dependencies, validate dependency references, and support cross-tag dependency checking (future enhancement) in dependency analysis utilities.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to mcp-server/src/tools/utils.js : use `normalizeprojectroot(rawpath, log)`, `getrawprojectr...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to mcp-server/src/tools/utils.js : Use `normalizeProjectRoot(rawPath, log)`, `getRawProjectRootFromSession(session, log)`, and `withNormalizedProjectRoot(executeFn)` in `mcp-server/src/tools/utils.js` to ensure project root paths are normalized for MCP tools.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: in the claude task master system, core task-manager functions are designed with fallback mechanisms ...
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#943
File: scripts/modules/task-manager/move-task.js:24-24
Timestamp: 2025-07-18T05:38:17.352Z
Learning: In the Claude Task Master system, core task-manager functions are designed with fallback mechanisms for missing projectRoot parameters using the pattern `const projectRoot = providedProjectRoot || findProjectRoot();`. The readJSON and writeJSON functions have default parameters (projectRoot = null, tag = null) and handle missing parameters gracefully. Adding strict validation to these core functions would break the established flexible architecture pattern.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to mcp-server/src/core/direct-functions/*.js : the *direct function is responsible for findi...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-07-18T17:11:36.732Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : The *Direct function is responsible for finding the exact tasks.json path using findTasksJsonPath, relying on the projectRoot passed in args.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/* : all commands must find projectroot with error handling before proceed...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : All commands must find projectRoot with error handling before proceeding

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/commands.js : for ai-powered commands that benefit from project context, ...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-31T22:07:49.716Z
Learning: Applies to scripts/modules/commands.js : For AI-powered commands that benefit from project context, use the ContextGatherer utility for multi-source context extraction, support task IDs, file paths, custom context, and project tree, implement fuzzy search for automatic task discovery, and display detailed token breakdown for transparency.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to mcp-server/src/core/utils/path-utils.js : call `findtasksjsonpath(args, log)` from within...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to mcp-server/src/core/utils/path-utils.js : Call `findTasksJsonPath(args, log)` from within direct function wrappers in `mcp-server/src/core/direct-functions/` to get the absolute path to the relevant `tasks.json`.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: in monorepos, local packages should use "*" as the version constraint in package.json dependencies, ...
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1090
File: apps/extension/package.json:241-243
Timestamp: 2025-08-07T13:00:22.923Z
Learning: In monorepos, local packages should use "*" as the version constraint in package.json dependencies, as recommended by npm. This ensures the local version from within the same workspace is always used, rather than attempting to resolve from external registries. This applies to packages like task-master-ai within the eyaltoledano/claude-task-master monorepo.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/utils/contextgatherer.js : set reasonable file size limits (50kb default)...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-07-18T17:09:13.815Z
Learning: Applies to scripts/modules/utils/contextGatherer.js : Set reasonable file size limits (50KB default) and limit project tree depth (3-5 levels) when gathering context for AI-powered commands.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/* : do not hard-code tag resolution (e.g., const tag = options.tag || 'ma...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : Do not hard-code tag resolution (e.g., const tag = options.tag || 'master';); always use getCurrentTag

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/commands.js : provide clear error messages for common failures, handle ta...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/commands.js : Provide clear error messages for common failures, handle tagged system migration errors gracefully, include suggestions for resolution, and exit with appropriate codes for scripting in CLI commands.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/*.js : use consistent file naming conventions: 'task_${id.tostring().pads...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Use consistent file naming conventions: 'task_${id.toString().padStart(3, '0')}.txt', use path.join for composing file paths, and use appropriate file extensions (.txt for tasks, .json for data).

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/commands.js : provide specific error handling for common issues, include ...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Provide specific error handling for common issues, include troubleshooting hints for each error type, and use consistent error formatting across all commands.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/**/*.test.js : test core logic independently with both data formats, mock...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/**/*.test.js : Test core logic independently with both data formats, mock file system operations, test tag resolution behavior, and verify migration compatibility in unit tests.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/* : every command that reads or writes tasks.json must be tag-aware...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-07-18T17:13:30.188Z
Learning: Applies to scripts/modules/* : Every command that reads or writes tasks.json must be tag-aware

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to tests/{unit,integration,e2e}/**/*.test.js : explicitly handle all options, including defa...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Explicitly handle all options, including defaults and shorthand flags (e.g., -p for --prompt), and include null/undefined checks in test implementations for parameters that might be optional.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: applies to scripts/modules/commands.js : use path.join() to construct file paths, follow established...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Use path.join() to construct file paths, follow established naming conventions (like task_001.txt), check file existence before deletion, and handle file deletion errors gracefully.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: for cli usage, install taskmaster globally with `npm install -g task-master-ai` or use locally via `...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: For CLI usage, install Taskmaster globally with `npm install -g task-master-ai` or use locally via `npx task-master-ai ...`.

Applied to files:

  • .github/scripts/utils.mjs
📚 Learning: use the global `task-master` cli command instead of directly invoking `node scripts/dev.js` for all ...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Use the global `task-master` CLI command instead of directly invoking `node scripts/dev.js` for all task management operations.

Applied to files:

  • .github/scripts/utils.mjs
🧬 Code Graph Analysis (2)
.github/scripts/pre-release.mjs (3)
.github/scripts/release.mjs (4)
  • __filename (7-7)
  • __dirname (8-8)
  • rootDir (10-10)
  • preJsonPath (15-15)
.github/scripts/tag-extension.mjs (3)
  • __filename (8-8)
  • __dirname (9-9)
  • rootDir (11-11)
.github/scripts/utils.mjs (4)
  • findRootDir (7-20)
  • getPackageVersion (40-51)
  • runCommand (23-37)
  • createAndPushTag (63-88)
.github/scripts/utils.mjs (1)
.github/scripts/tag-extension.mjs (3)
  • pkgPath (15-15)
  • pkg (17-17)
  • tag (30-30)
🔇 Additional comments (7)
.github/scripts/utils.mjs (3)

22-37: LGTM!

The command execution utility is well-implemented with appropriate error handling and logging. The use of stdio: 'inherit' ensures command output is visible to users.


39-51: LGTM!

The package version extraction function has proper error handling and informative error messages. The implementation is clean and appropriate for script usage.


53-60: LGTM!

The tag existence check is implemented correctly, using git ls-remote with proper validation of both exit status and output content.

.github/scripts/pre-release.mjs (4)

1-17: LGTM!

The imports and initial setup are well-structured. The use of fileURLToPath is the correct approach for getting __dirname in ES modules.


20-36: LGTM!

The RC mode verification is well-implemented with proper file existence checks, JSON parsing with error handling, and clear, actionable error messages.


38-44: LGTM!

The package publishing logic is clean and uses the utility functions appropriately. Good logging provides transparency into the process.


46-54: LGTM!

The tag creation and script completion logic is well-implemented with appropriate conditional logging and clear user feedback.

Comment on lines +6 to +20
// Find the root directory by looking for package.json with task-master-ai
export function findRootDir(startDir) {
let currentDir = resolve(startDir);
while (currentDir !== '/') {
const pkgPath = join(currentDir, 'package.json');
try {
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
if (pkg.name === 'task-master-ai' || pkg.repository) {
return currentDir;
}
} catch {}
currentDir = dirname(currentDir);
}
throw new Error('Could not find root directory');
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical cross-platform compatibility issue.

The function uses a hard-coded Unix path check while (currentDir !== '/') which will cause infinite loops on Windows systems where the root is typically C:\ or similar.

Apply this diff to fix cross-platform compatibility:

-	while (currentDir !== '/') {
+	while (currentDir !== dirname(currentDir)) {

This approach checks if we've reached the filesystem root by comparing with the parent directory, which works on all platforms.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Find the root directory by looking for package.json with task-master-ai
export function findRootDir(startDir) {
let currentDir = resolve(startDir);
while (currentDir !== '/') {
const pkgPath = join(currentDir, 'package.json');
try {
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
if (pkg.name === 'task-master-ai' || pkg.repository) {
return currentDir;
}
} catch {}
currentDir = dirname(currentDir);
}
throw new Error('Could not find root directory');
}
export function findRootDir(startDir) {
let currentDir = resolve(startDir);
while (currentDir !== dirname(currentDir)) {
const pkgPath = join(currentDir, 'package.json');
try {
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
if (pkg.name === 'task-master-ai' || pkg.repository) {
return currentDir;
}
} catch {}
currentDir = dirname(currentDir);
}
throw new Error('Could not find root directory');
}
🤖 Prompt for AI Agents
In .github/scripts/utils.mjs around lines 6 to 20, the function findRootDir uses
a hard-coded root directory check with '/' which causes infinite loops on
Windows. Replace the condition while (currentDir !== '/') with a check that
compares currentDir to its parent directory using dirname(currentDir). If they
are equal, it means the root has been reached. Update the loop condition
accordingly to ensure cross-platform compatibility.

@Crunchyman-ralph Crunchyman-ralph deleted the chore/implement.ci.pre.release.extension branch August 7, 2025 13:11
Crunchyman-ralph added a commit to iamladi/claude-task-master that referenced this pull request Aug 11, 2025
* chore: implement pre-release for extensions

* chore: run format
Crunchyman-ralph added a commit to iamladi/claude-task-master that referenced this pull request Aug 11, 2025
* chore: implement pre-release for extensions

* chore: run format
stephanschielke pushed a commit to stephanschielke/cursor-task-master that referenced this pull request Aug 22, 2025
* chore: implement pre-release for extensions

* chore: run format
stephanschielke pushed a commit to stephanschielke/cursor-task-master that referenced this pull request Aug 22, 2025
* chore: implement pre-release for extensions

* chore: run format
This was referenced Sep 17, 2025
sfc-gh-dflippo pushed a commit to sfc-gh-dflippo/task-master-ai that referenced this pull request Dec 4, 2025
* chore: implement pre-release for extensions

* chore: run format
@coderabbitai coderabbitai bot mentioned this pull request Feb 12, 2026
16 tasks
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