Skip to content

fix(expand-task): include parent task context in complexity report variant#1094

Merged
Crunchyman-ralph merged 2 commits intonextfrom
fix/expand-task-context-bug
Aug 6, 2025
Merged

fix(expand-task): include parent task context in complexity report variant#1094
Crunchyman-ralph merged 2 commits intonextfrom
fix/expand-task-context-bug

Conversation

@Crunchyman-ralph
Copy link
Collaborator

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

  • Fixed bug where expand task generated generic authentication subtasks
  • The complexity-report prompt variant now includes parent task details
  • Added comprehensive unit tests to prevent regression
  • Added debug logging to help diagnose similar issues

Previously, when using a complexity report with expansionPrompt, only the
expansion guidance was sent to the AI, missing the actual task context.
This caused the AI to generate unrelated generic subtasks.

Fixes the issue where all tasks would get the same generic auth-related
subtasks regardless of their actual purpose (AWS infrastructure, Docker
containerization, etc.)

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

  • Bug Fixes

    • Resolved an issue where unrelated authentication subtasks were generated during task expansion, ensuring subtasks now accurately reflect the parent task and provided guidance.
  • New Features

    • Improved the clarity and structure of prompts used for task expansion, especially for complexity reports, making subtask generation more explicit and uniform.
  • Tests

    • Added comprehensive tests to verify that task expansion prompts correctly include all necessary task context and formatting for different scenarios.
  • Chores

    • Enhanced debug logging to provide better visibility into the prompt generation process during task expansion.

sadaqat12 and others added 2 commits August 1, 2025 05:47
…riant

- Fixed bug where expand task generated generic authentication subtasks
- The complexity-report prompt variant now includes parent task details
- Added comprehensive unit tests to prevent regression
- Added debug logging to help diagnose similar issues

Previously, when using a complexity report with expansionPrompt, only the
expansion guidance was sent to the AI, missing the actual task context.
This caused the AI to generate unrelated generic subtasks.

Fixes the issue where all tasks would get the same generic auth-related
subtasks regardless of their actual purpose (AWS infrastructure, Docker
containerization, etc.)
@changeset-bot
Copy link

changeset-bot bot commented Aug 6, 2025

🦋 Changeset detected

Latest commit: e183717

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 6, 2025

Walkthrough

This update addresses a bug in the task-master expand command that caused unrelated authentication subtasks to be generated during task expansion. The changes revise the prompt template for complexity-based expansion, add detailed debug logging in the expansion process, and introduce a new test suite to validate prompt generation and context inclusion.

Changes

Cohort / File(s) Change Summary
Bug Fix & Prompt Template Update
.changeset/fuzzy-brooms-mate.md, src/prompts/expand-task.json
Fixes incorrect subtask generation by updating the complexity-report user prompt to explicitly include parent task details and expansion guidance, removing references to codebase analysis tools and conditional logic.
Debug Logging in Expansion Process
scripts/modules/task-manager/expand-task.js
Adds detailed debug logging after prompt variant and parameter loading in the expandTask function to provide visibility into prompt generation before AI subtask creation.
Prompt Template Testing
tests/unit/prompts/expand-task-prompt.test.js
Introduces a new test suite verifying the "expand-task" prompt template, ensuring correct inclusion of task context, formatting, and regression coverage for the complexity-report variant.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI (task-master expand)
    participant ExpandTask Module
    participant PromptManager
    participant AI Engine

    User->>CLI (task-master expand): Run expand command
    CLI (task-master expand)->>ExpandTask Module: expandTask()
    ExpandTask Module->>PromptManager: Load prompt variant & parameters
    Note right of ExpandTask Module: Debug log prompt variant, parameters, system & user prompts
    PromptManager-->>ExpandTask Module: Prompt content
    ExpandTask Module->>AI Engine: Generate subtasks with prompt
    AI Engine-->>ExpandTask Module: Subtasks
    ExpandTask Module-->>CLI (task-master expand): Return expanded tasks
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 59f7676 and e183717.

📒 Files selected for processing (4)
  • .changeset/fuzzy-brooms-mate.md (1 hunks)
  • scripts/modules/task-manager/expand-task.js (1 hunks)
  • src/prompts/expand-task.json (1 hunks)
  • tests/unit/prompts/expand-task-prompt.test.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (14)
.changeset/*.md

📄 CodeRabbit Inference Engine (.cursor/rules/changeset.mdc)

.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.
The changeset summary should be user-facing, describing what changed in the released version that is relevant to users or consumers of the package.
Do not use your detailed Git commit message body as the changeset summary.

Files:

  • .changeset/fuzzy-brooms-mate.md
.changeset/*

📄 CodeRabbit Inference Engine (.cursor/rules/new_features.mdc)

Create appropriate changesets for new features, use semantic versioning, include tagged system information in release notes, and document breaking changes if any.

Files:

  • .changeset/fuzzy-brooms-mate.md
scripts/modules/task-manager/*.js

📄 CodeRabbit Inference Engine (.cursor/rules/ai_services.mdc)

scripts/modules/task-manager/*.js: Centralize all LLM calls through generateTextService or generateObjectService.
Do not import or call anything from the old ai-services.js, ai-client-factory.js, or ai-client-utils.js files.
Do not initialize AI clients (Anthropic, Perplexity, etc.) directly within core logic (task-manager/) or MCP direct functions.
Do not fetch AI-specific parameters (model ID, max tokens, temp) using config-manager.js getters for the AI call. Pass the role instead.
Do not implement fallback or retry logic outside ai-services-unified.js.
Do not handle API key resolution outside the service layer (it uses utils.js internally).
Determine the appropriate role (main, research, fallback) in your core logic and pass it to the service.
Pass the session object (received in the context parameter, especially from direct function wrappers) to the service call when in MCP context.
Use generateTextService and implement robust manual JSON parsing (with Zod validation after parsing) when structured output is needed, as generateObjectService has shown unreliability with some providers/schemas.
Be aware of potential reliability issues with generateObjectService across different providers and complex schemas. Prefer generateTextService + manual parsing as a more robust alternative for structured data needs.

Files in scripts/modules/task-manager/ should each handle a specific action related to task management (e.g., add-task.js, expand-task.js), supporting the tagged task lists system and backward compatibility.

Files:

  • scripts/modules/task-manager/expand-task.js
scripts/modules/**

📄 CodeRabbit Inference Engine (.cursor/rules/dev_workflow.mdc)

When using the MCP server, restart it if core logic in scripts/modules or MCP tool/direct function definitions change.

Files:

  • scripts/modules/task-manager/expand-task.js
scripts/modules/task-manager/*

📄 CodeRabbit Inference Engine (.cursor/rules/tags.mdc)

scripts/modules/task-manager/*: All core functions in scripts/modules/task-manager/ must accept a context parameter and use it to extract projectRoot and tag
All core functions in scripts/modules/task-manager/ must use readJSON(tasksPath, projectRoot, tag) and writeJSON(tasksPath, data, projectRoot, tag)

Files:

  • scripts/modules/task-manager/expand-task.js
scripts/modules/task-manager/**/*.js

📄 CodeRabbit Inference Engine (.cursor/rules/telemetry.mdc)

scripts/modules/task-manager/**/*.js: Functions in scripts/modules/task-manager/ that invoke AI services must call the appropriate AI service function (e.g., generateObjectService), passing commandName and outputType in the params object.
Core logic functions in scripts/modules/task-manager/ must return an object that includes aiServiceResponse.telemetryData.
If the core logic function handles CLI output (outputFormat === 'text' or 'cli'), and aiServiceResponse.telemetryData is available, it must call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js.

Do not call AI-specific getters (like getMainModelId, getMainMaxTokens) from core logic functions in scripts/modules/task-manager/*; instead, pass the role to the unified AI service.

Files:

  • scripts/modules/task-manager/expand-task.js
**/*.js

📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)

**/*.js: Declare and initialize global variables at the top of modules to avoid hoisting issues.
Use proper function declarations to avoid hoisting issues and initialize variables before they are referenced.
Do not reference variables before their declaration in module scope.
Use dynamic imports (import()) to avoid initialization order issues in modules.

Files:

  • scripts/modules/task-manager/expand-task.js
  • tests/unit/prompts/expand-task-prompt.test.js
tests/{unit,integration,e2e,fixtures}/**/*.js

📄 CodeRabbit Inference Engine (.cursor/rules/architecture.mdc)

Test files must be organized as follows: unit tests in tests/unit/, integration tests in tests/integration/, end-to-end tests in tests/e2e/, and test fixtures in tests/fixtures/.

Files:

  • tests/unit/prompts/expand-task-prompt.test.js
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/git_workflow.mdc)

**/*.{test,spec}.{js,ts,jsx,tsx}: Create a test file and ensure all tests pass when all subtasks are complete; commit tests if added or modified
When all subtasks are complete, run final testing using the appropriate test runner (e.g., npm test, jest, or manual testing)

Files:

  • tests/unit/prompts/expand-task-prompt.test.js
**/*.test.js

📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)

**/*.test.js: Never use asynchronous operations in tests. Make all mocks return synchronous values when possible.
Always mock tests properly based on the way the tested functions are defined and used.
Follow the test file organization: mocks must be set up before importing modules under test, and spies on mocked modules should be set up after imports.
Use fixtures from tests/fixtures/ for consistent sample data across tests.
Always declare mocks before importing the modules being tested in Jest test files.
Use jest.spyOn() after imports to create spies on mock functions and reference these spies in test assertions.
When testing functions with callbacks, get the callback from your mock's call arguments, execute it directly with test inputs, and verify the results.
For ES modules, use jest.mock() before static imports and jest.unstable_mockModule() before dynamic imports to mock dependencies.
Reset mock functions (mockFn.mockReset()) before dynamic imports if they might have been called previously.
When verifying console assertions, assert against the actual arguments passed (single formatted string), not multiple arguments.
Use mock-fs to mock file system operations in tests, and restore the file system after each test.
Mock API calls (e.g., Anthropic/Claude) by mocking the entire module and providing predictable responses.
Set mock environment variables in test setup and restore them after each test.
Maintain test fixtures separate from test logic.
Follow the mock-first-then-import pattern for all Jest mocks.
Do not define mock variables before jest.mock() calls (they won't be accessible due to hoisting).
Use test-specific file paths (e.g., 'test-tasks.json') for all file operations in tests.
Mock readJSON and writeJSON to avoid real file system interactions in tests.
Verify file operations use the correct paths in expect statements.
Use different file paths for each test to avoid test interdependence.
Verify modifications on the in-memory task objects passed to w...

Files:

  • tests/unit/prompts/expand-task-prompt.test.js
tests/unit/**/*.test.js

📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)

tests/unit/**/*.test.js: Unit tests must be located in tests/unit/, test individual functions and utilities in isolation, mock all external dependencies, and keep tests small, focused, and fast.
Do not include actual command execution in unit tests.

Files:

  • tests/unit/prompts/expand-task-prompt.test.js
tests/{unit,integration,e2e}/**/*.test.js

📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)

tests/{unit,integration,e2e}/**/*.test.js: When testing CLI commands built with Commander.js, test the command action handlers directly rather than trying to mock the entire Commander.js chain.
When mocking the Commander.js chain, mock ALL chainable methods (option, argument, action, on, etc.) and return this (or the mock object) from all chainable method mocks.
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.
Do not try to use the real action implementation without proper mocking, and do not mock Commander partially—either mock it completely or test the action directly.
Mock the action handlers for CLI commands and verify they're called with correct arguments.
Use sample task fixtures for consistent test data, mock file system operations, and test both success and error paths for task operations.
Mock console output and verify correct formatting in UI function tests. Use flexible assertions like toContain() or toMatch() for formatted output.
Mock chalk functions to return the input text to make testing easier while still verifying correct function calls.

Files:

  • tests/unit/prompts/expand-task-prompt.test.js
**/*.{test,spec}.*

📄 CodeRabbit Inference Engine (.cursor/rules/test_workflow.mdc)

Test files should follow naming conventions: .test., .spec., or _test. depending on the language

Files:

  • tests/unit/prompts/expand-task-prompt.test.js
tests/{unit,integration,e2e}/**

📄 CodeRabbit Inference Engine (.cursor/rules/test_workflow.mdc)

Organize test directories by test type (unit, integration, e2e) and mirror source structure where possible

Files:

  • tests/unit/prompts/expand-task-prompt.test.js
🧠 Learnings (29)
📓 Common learnings
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: Commands such as `analyze-complexity`, `expand-task`, `update-task`, and `add-task` should consider adopting the context gathering pattern for improved AI-powered assistance.
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: 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.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:02.683Z
Learning: When breaking down complex tasks in Taskmaster, use the `expand_task` command with appropriate flags (`--num`, `--research`, `--force`, `--prompt`) and review generated subtasks for accuracy.
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: When breaking down complex tasks, use the `expand_task` command with appropriate flags (`--force`, `--research`, `--num`, `--prompt`) and review generated subtasks for accuracy.
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 AI to generate detailed subtasks within the current tag context, considering complexity analysis for subtask counts and ensuring proper IDs for newly created subtasks.
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: When implementing AI-powered commands that benefit from project context, use the context gathering pattern: validate parameters, initialize `ContextGatherer`, auto-discover relevant tasks with `FuzzyTaskSearch` if none specified, gather context with token breakdown, and display token breakdown for CLI.
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: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks.
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: Test commits should be separated and use the format: test(task-X): Add comprehensive tests for [feature], with a detailed body
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Break down complex tasks using `task-master expand --id=<id>` with appropriate flags.
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: Document testing setup and progress in TaskMaster subtasks using task-master update-subtask commands
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-12T06:21:41.224Z
Learning: Log detailed implementation plans and progress for each subtask using `update_subtask` / `task-master update-subtask --id=<subtaskId> --prompt='<details>'`, ensuring all findings, code snippets, and decisions are recorded in the subtask's `details` field.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: For tasks with complexity analysis, use `node scripts/dev.js expand --id=<id>`. Otherwise, use `node scripts/dev.js expand --id=<id> --subtasks=<number>`.
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: Use the Taskmaster command set (`task-master` CLI or MCP tools) for all task management operations: listing, expanding, updating, tagging, and status changes.
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: 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.
📚 Learning: when breaking down complex tasks in taskmaster, use the `expand_task` command with appropriate flags...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:02.683Z
Learning: When breaking down complex tasks in Taskmaster, use the `expand_task` command with appropriate flags (`--num`, `--research`, `--force`, `--prompt`) and review generated subtasks for accuracy.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
  • scripts/modules/task-manager/expand-task.js
  • src/prompts/expand-task.json
  • tests/unit/prompts/expand-task-prompt.test.js
📚 Learning: commands such as `analyze-complexity`, `expand-task`, `update-task`, and `add-task` should consider ...
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: Commands such as `analyze-complexity`, `expand-task`, `update-task`, and `add-task` should consider adopting the context gathering pattern for improved AI-powered assistance.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
  • scripts/modules/task-manager/expand-task.js
  • src/prompts/expand-task.json
📚 Learning: break down complex tasks using `task-master expand --id=` with appropriate flags....
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Break down complex tasks using `task-master expand --id=<id>` with appropriate flags.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
  • src/prompts/expand-task.json
📚 Learning: when breaking down complex tasks, use the `expand_task` command with appropriate flags (`--force`, `...
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: When breaking down complex tasks, use the `expand_task` command with appropriate flags (`--force`, `--research`, `--num`, `--prompt`) and review generated subtasks for accuracy.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
  • scripts/modules/task-manager/expand-task.js
  • src/prompts/expand-task.json
  • tests/unit/prompts/expand-task-prompt.test.js
📚 Learning: applies to scripts/modules/task-manager.js : use ai to generate detailed subtasks within the current...
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 AI to generate detailed subtasks within the current tag context, considering complexity analysis for subtask counts and ensuring proper IDs for newly created subtasks.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
  • scripts/modules/task-manager/expand-task.js
  • src/prompts/expand-task.json
📚 Learning: maintain valid dependency structure with `task-master fix-dependencies` when needed....
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Maintain valid dependency structure with `task-master fix-dependencies` when needed.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
📚 Learning: for tasks with complexity analysis, use `node scripts/dev.js expand --id=`. otherwise, use `node...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: For tasks with complexity analysis, use `node scripts/dev.js expand --id=<id>`. Otherwise, use `node scripts/dev.js expand --id=<id> --subtasks=<number>`.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
  • scripts/modules/task-manager/expand-task.js
  • src/prompts/expand-task.json
  • tests/unit/prompts/expand-task-prompt.test.js
📚 Learning: use `task-master complexity-report` to display the task complexity analysis report in a formatted, e...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Use `task-master complexity-report` to display the task complexity analysis report in a formatted, easy-to-read way.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
  • src/prompts/expand-task.json
📚 Learning: analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks....
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
  • src/prompts/expand-task.json
📚 Learning: view specific task details using `task-master show ` to understand implementation requirements....
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: View specific task details using `task-master show <id>` to understand implementation requirements.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
📚 Learning: generate task files with `task-master generate` after updating tasks.json....
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Generate task files with `task-master generate` after updating tasks.json.

Applied to files:

  • .changeset/fuzzy-brooms-mate.md
📚 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:

  • scripts/modules/task-manager/expand-task.js
  • src/prompts/expand-task.json
  • tests/unit/prompts/expand-task-prompt.test.js
📚 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:

  • scripts/modules/task-manager/expand-task.js
  • src/prompts/expand-task.json
  • tests/unit/prompts/expand-task-prompt.test.js
📚 Learning: applies to scripts/modules/task-manager.js : use consistent formatting for task files, include all t...
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.

Applied to files:

  • scripts/modules/task-manager/expand-task.js
  • src/prompts/expand-task.json
  • tests/unit/prompts/expand-task-prompt.test.js
📚 Learning: applies to scripts/modules/task-manager/*.js : files in scripts/modules/task-manager/ should each ha...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-07-18T17:07:39.336Z
Learning: Applies to scripts/modules/task-manager/*.js : Files in scripts/modules/task-manager/ should each handle a specific action related to task management (e.g., add-task.js, expand-task.js), supporting the tagged task lists system and backward compatibility.

Applied to files:

  • scripts/modules/task-manager/expand-task.js
  • tests/unit/prompts/expand-task-prompt.test.js
📚 Learning: in scripts/modules/task-manager/expand-all-tasks.js, the success flag should always be true when the...
Learnt from: rtmcrc
PR: eyaltoledano/claude-task-master#933
File: scripts/modules/task-manager/expand-all-tasks.js:0-0
Timestamp: 2025-07-21T02:41:13.453Z
Learning: In scripts/modules/task-manager/expand-all-tasks.js, the success flag should always be true when the expansion process completes successfully, even if individual tasks fail due to LLM errors. Failed tasks are designed to be expanded on subsequent iterations, so individual task failures don't constitute overall operation failure.

Applied to files:

  • scripts/modules/task-manager/expand-task.js
  • tests/unit/prompts/expand-task-prompt.test.js
📚 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:

  • scripts/modules/task-manager/expand-task.js
📚 Learning: applies to scripts/modules/task-manager/**/*.js : if the core logic function handles cli output (out...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-07-18T17:14:54.131Z
Learning: Applies to scripts/modules/task-manager/**/*.js : If the core logic function handles CLI output (outputFormat === 'text' or 'cli'), and aiServiceResponse.telemetryData is available, it must call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js.

Applied to files:

  • scripts/modules/task-manager/expand-task.js
📚 Learning: applies to scripts/modules/task-manager/**/*.js : functions in scripts/modules/task-manager/ that in...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-07-18T17:14:54.131Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Functions in scripts/modules/task-manager/ that invoke AI services must call the appropriate AI service function (e.g., generateObjectService), passing commandName and outputType in the params object.

Applied to files:

  • scripts/modules/task-manager/expand-task.js
📚 Learning: run `node scripts/dev.js analyze-complexity --research` for comprehensive analysis and review the co...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Run `node scripts/dev.js analyze-complexity --research` for comprehensive analysis and review the complexity report in scripts/task-complexity-report.json.

Applied to files:

  • src/prompts/expand-task.json
📚 Learning: use context gathering for ai-powered commands that benefit from project context, when users might wa...
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: Use context gathering for AI-powered commands that benefit from project context, when users might want to reference specific tasks or files, or for research, analysis, or generation commands. Do not use for simple CRUD operations that don't need AI context.

Applied to files:

  • src/prompts/expand-task.json
📚 Learning: when using the research tool, follow the research + action pattern: use research to gather informati...
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-07-31T22:08:16.039Z
Learning: When using the research tool, follow the Research + Action Pattern: use research to gather information, update_subtask to commit findings, update_task to incorporate research, and add_task with research flag for informed task creation.

Applied to files:

  • src/prompts/expand-task.json
📚 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:

  • tests/unit/prompts/expand-task-prompt.test.js
📚 Learning: applies to tests/{unit,integration,e2e}/**/*.test.js : use sample task fixtures for consistent test ...
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 : Use sample task fixtures for consistent test data, mock file system operations, and test both success and error paths for task operations.

Applied to files:

  • tests/unit/prompts/expand-task-prompt.test.js
📚 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:

  • tests/unit/prompts/expand-task-prompt.test.js
📚 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:

  • tests/unit/prompts/expand-task-prompt.test.js
📚 Learning: applies to **/*.test.js : verify modifications on the in-memory task objects passed to writejson....
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 **/*.test.js : Verify modifications on the in-memory task objects passed to writeJSON.

Applied to files:

  • tests/unit/prompts/expand-task-prompt.test.js
📚 Learning: applies to tests/{unit,integration,e2e}/**/*.test.js : mock console output and verify correct format...
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 : Mock console output and verify correct formatting in UI function tests. Use flexible assertions like toContain() or toMatch() for formatted output.

Applied to files:

  • tests/unit/prompts/expand-task-prompt.test.js
🪛 LanguageTool
.changeset/fuzzy-brooms-mate.md

[grammar] ~5-~5: There might be a mistake here.
Context: ...xpand task generating unrelated generic subtasks Fixed an issue where `task-master expand...

(QB_NEW_EN_OTHER)


[style] ~6-~6: Consider using a different verb for a more formal wording.
Context: ... generating unrelated generic subtasks Fixed an issue where task-master expand wou...

(FIX_RESOLVE)

🪛 markdownlint-cli2 (0.17.2)
.changeset/fuzzy-brooms-mate.md

5-5: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🔇 Additional comments (7)
src/prompts/expand-task.json (1)

72-72: Excellent fix for the task context bug!

The updated prompt structure now explicitly includes the parent task details (ID, title, description, details) before the expansion guidance, ensuring the AI has proper context when generating subtasks. This directly addresses the bug where generic authentication subtasks were being generated regardless of the actual task domain.

The new format is clearer and more structured than the previous conditional approach.

.changeset/fuzzy-brooms-mate.md (1)

5-7: Minor style improvements suggested.

The changeset content clearly describes the fix. Consider these optional improvements for better readability:

  • Add a line break after the title on line 5
  • Consider "resolved" instead of "Fixed" for a more formal tone

However, the content effectively communicates the bug fix and its impact.

⛔ Skipped due to learnings
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 : The changeset summary should be user-facing, describing what changed in the released version that is relevant to users or consumers of the package.
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.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Do not add a changeset for trivial chores such as very minor code cleanup, adding comments that don't clarify behavior, or typo fixes in non-user-facing code or internal docs.
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/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Do not add a changeset for non-impactful test updates, such as minor refactoring of tests or adding tests for existing functionality without fixing bugs.
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1035
File: .changeset/quiet-rabbits-bathe.md:5-10
Timestamp: 2025-07-23T16:03:42.784Z
Learning: For changeset files (.changeset/*.md), avoid suggesting punctuation for bullet points as the project intentionally omits punctuation to make the generated changelog feel more natural.
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.
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: 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/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.810Z
Learning: Subtask commit messages must follow the format: feat(task-X): Complete subtask X.Y - [Subtask Title] with a detailed body describing implementation, key changes, and notes
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:02.683Z
Learning: When breaking down complex tasks in Taskmaster, use the `expand_task` command with appropriate flags (`--num`, `--research`, `--force`, `--prompt`) and review generated subtasks for accuracy.
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: When breaking down complex tasks, use the `expand_task` command with appropriate flags (`--force`, `--research`, `--num`, `--prompt`) and review generated subtasks for accuracy.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Break down complex tasks using `task-master expand --id=<id>` with appropriate flags.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: For tasks with complexity analysis, use `node scripts/dev.js expand --id=<id>`. Otherwise, use `node scripts/dev.js expand --id=<id> --subtasks=<number>`.
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: Commands such as `analyze-complexity`, `expand-task`, `update-task`, and `add-task` should consider adopting the context gathering pattern for improved AI-powered assistance.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Use `task-master complexity-report` to display the task complexity analysis report in a formatted, easy-to-read way.
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 AI to generate detailed subtasks within the current tag context, considering complexity analysis for subtask counts and ensuring proper IDs for newly created subtasks.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks.
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: Document testing setup and progress in TaskMaster subtasks using task-master update-subtask commands
Learnt from: rtmcrc
PR: eyaltoledano/claude-task-master#933
File: assets/rules/agentllm.mdc:48-49
Timestamp: 2025-07-19T19:54:07.455Z
Learning: The `expand_all` tool already submits all eligible tasks for expansion, so there is no need to call `get_tasks` before using `expand_all` or `update` tools as it would be redundant.
scripts/modules/task-manager/expand-task.js (1)

531-541: Excellent debugging enhancement!

This debug logging provides valuable visibility into the prompt generation process, which will help diagnose issues like the one being fixed. The logs show:

  1. Selected variant for transparency
  2. Complete prompt parameters for verification
  3. Preview of both system and user prompts

This will be particularly helpful for ensuring the "complexity-report" variant correctly includes task context going forward.

tests/unit/prompts/expand-task-prompt.test.js (4)

4-27: Well-structured test setup.

The test setup properly initializes the PromptManager and defines realistic test data. The AWS infrastructure theme in the test task aligns well with the PR's focus on preventing generic authentication subtasks for domain-specific tasks.


29-55: Comprehensive variant testing.

Good coverage of both default and research variants, ensuring they properly include task context with appropriate formatting and labels.


57-80: Excellent validation of the complexity-report fix.

This test directly validates the bug fix by ensuring the complexity-report variant includes:

  • Structured parent task information
  • All task details (ID, title, description, details)
  • Expansion guidance from complexity analysis

This confirms the prompt template changes are working as intended.


103-133: Outstanding regression test!

This regression test is particularly valuable as it:

  1. Prevents Future Bugs: Ensures task context is always included, not just expansion prompts
  2. Quantitative Validation: Counts occurrences of task-specific content
  3. Content Length Validation: Verifies the prompt contains substantial content beyond just the expansion guidance

This test will catch any future regressions where the complexity-report variant might lose task context.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/expand-task-context-bug

🪧 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.

@Crunchyman-ralph Crunchyman-ralph changed the title Fix/expand-task-context-bug fix(expand-task): include parent task context in complexity report variant Aug 6, 2025
@Crunchyman-ralph
Copy link
Collaborator Author

Credit to @sadaqat12, closes #1067

@Crunchyman-ralph Crunchyman-ralph merged commit 4357af3 into next Aug 6, 2025
4 checks passed
@Crunchyman-ralph Crunchyman-ralph deleted the fix/expand-task-context-bug branch August 6, 2025 19:00
@coderabbitai coderabbitai bot mentioned this pull request Aug 7, 2025
16 tasks
@github-actions github-actions bot mentioned this pull request Aug 8, 2025
Crunchyman-ralph added a commit to iamladi/claude-task-master that referenced this pull request Aug 11, 2025
…riant (eyaltoledano#1094)

- Fixed bug where expand task generated generic authentication subtasks
- The complexity-report prompt variant now includes parent task details
- Added comprehensive unit tests to prevent regression
- Added debug logging to help diagnose similar issues

Previously, when using a complexity report with expansionPrompt, only the
expansion guidance was sent to the AI, missing the actual task context.
This caused the AI to generate unrelated generic subtasks.

Fixes the issue where all tasks would get the same generic auth-related
subtasks regardless of their actual purpose (AWS infrastructure, Docker
containerization, etc.)

Co-authored-by: Sadaqat Ali <32377500+sadaqat12@users.noreply.github.com>
Crunchyman-ralph added a commit to iamladi/claude-task-master that referenced this pull request Aug 11, 2025
…riant (eyaltoledano#1094)

- Fixed bug where expand task generated generic authentication subtasks
- The complexity-report prompt variant now includes parent task details
- Added comprehensive unit tests to prevent regression
- Added debug logging to help diagnose similar issues

Previously, when using a complexity report with expansionPrompt, only the
expansion guidance was sent to the AI, missing the actual task context.
This caused the AI to generate unrelated generic subtasks.

Fixes the issue where all tasks would get the same generic auth-related
subtasks regardless of their actual purpose (AWS infrastructure, Docker
containerization, etc.)

Co-authored-by: Sadaqat Ali <32377500+sadaqat12@users.noreply.github.com>
stephanschielke pushed a commit to stephanschielke/cursor-task-master that referenced this pull request Aug 22, 2025
…riant (eyaltoledano#1094)

- Fixed bug where expand task generated generic authentication subtasks
- The complexity-report prompt variant now includes parent task details
- Added comprehensive unit tests to prevent regression
- Added debug logging to help diagnose similar issues

Previously, when using a complexity report with expansionPrompt, only the
expansion guidance was sent to the AI, missing the actual task context.
This caused the AI to generate unrelated generic subtasks.

Fixes the issue where all tasks would get the same generic auth-related
subtasks regardless of their actual purpose (AWS infrastructure, Docker
containerization, etc.)

Co-authored-by: Sadaqat Ali <32377500+sadaqat12@users.noreply.github.com>
stephanschielke pushed a commit to stephanschielke/cursor-task-master that referenced this pull request Aug 22, 2025
…riant (eyaltoledano#1094)

- Fixed bug where expand task generated generic authentication subtasks
- The complexity-report prompt variant now includes parent task details
- Added comprehensive unit tests to prevent regression
- Added debug logging to help diagnose similar issues

Previously, when using a complexity report with expansionPrompt, only the
expansion guidance was sent to the AI, missing the actual task context.
This caused the AI to generate unrelated generic subtasks.

Fixes the issue where all tasks would get the same generic auth-related
subtasks regardless of their actual purpose (AWS infrastructure, Docker
containerization, etc.)

Co-authored-by: Sadaqat Ali <32377500+sadaqat12@users.noreply.github.com>
This was referenced Nov 3, 2025
sfc-gh-dflippo pushed a commit to sfc-gh-dflippo/task-master-ai that referenced this pull request Dec 4, 2025
…riant (eyaltoledano#1094)

- Fixed bug where expand task generated generic authentication subtasks
- The complexity-report prompt variant now includes parent task details
- Added comprehensive unit tests to prevent regression
- Added debug logging to help diagnose similar issues

Previously, when using a complexity report with expansionPrompt, only the
expansion guidance was sent to the AI, missing the actual task context.
This caused the AI to generate unrelated generic subtasks.

Fixes the issue where all tasks would get the same generic auth-related
subtasks regardless of their actual purpose (AWS infrastructure, Docker
containerization, etc.)

Co-authored-by: Sadaqat Ali <32377500+sadaqat12@users.noreply.github.com>
@coderabbitai coderabbitai bot mentioned this pull request Dec 19, 2025
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.

2 participants