fix(expand-task): include parent task context in complexity report variant#1094
fix(expand-task): include parent task context in complexity report variant#1094Crunchyman-ralph merged 2 commits intonextfrom
Conversation
…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 detectedLatest 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 |
WalkthroughThis update addresses a bug in the Changes
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (14).changeset/*.md📄 CodeRabbit Inference Engine (.cursor/rules/changeset.mdc)
Files:
.changeset/*📄 CodeRabbit Inference Engine (.cursor/rules/new_features.mdc)
Files:
scripts/modules/task-manager/*.js📄 CodeRabbit Inference Engine (.cursor/rules/ai_services.mdc)
Files:
scripts/modules/**📄 CodeRabbit Inference Engine (.cursor/rules/dev_workflow.mdc)
Files:
scripts/modules/task-manager/*📄 CodeRabbit Inference Engine (.cursor/rules/tags.mdc)
Files:
scripts/modules/task-manager/**/*.js📄 CodeRabbit Inference Engine (.cursor/rules/telemetry.mdc)
Files:
**/*.js📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
Files:
tests/{unit,integration,e2e,fixtures}/**/*.js📄 CodeRabbit Inference Engine (.cursor/rules/architecture.mdc)
Files:
**/*.{test,spec}.{js,ts,jsx,tsx}📄 CodeRabbit Inference Engine (.cursor/rules/git_workflow.mdc)
Files:
**/*.test.js📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
Files:
tests/unit/**/*.test.js📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
Files:
tests/{unit,integration,e2e}/**/*.test.js📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
Files:
**/*.{test,spec}.*📄 CodeRabbit Inference Engine (.cursor/rules/test_workflow.mdc)
Files:
tests/{unit,integration,e2e}/**📄 CodeRabbit Inference Engine (.cursor/rules/test_workflow.mdc)
Files:
🧠 Learnings (29)📓 Common learnings📚 Learning: when breaking down complex tasks in taskmaster, use the `expand_task` command with appropriate flags...Applied to files:
📚 Learning: commands such as `analyze-complexity`, `expand-task`, `update-task`, and `add-task` should consider ...Applied to files:
📚 Learning: break down complex tasks using `task-master expand --id=` with appropriate flags....Applied to files:
📚 Learning: when breaking down complex tasks, use the `expand_task` command with appropriate flags (`--force`, `...Applied to files:
📚 Learning: applies to scripts/modules/task-manager.js : use ai to generate detailed subtasks within the current...Applied to files:
📚 Learning: maintain valid dependency structure with `task-master fix-dependencies` when needed....Applied to files:
📚 Learning: for tasks with complexity analysis, use `node scripts/dev.js expand --id=`. otherwise, use `node...Applied to files:
📚 Learning: use `task-master complexity-report` to display the task complexity analysis report in a formatted, e...Applied to files:
📚 Learning: analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks....Applied to files:
📚 Learning: view specific task details using `task-master show ` to understand implementation requirements....Applied to files:
📚 Learning: generate task files with `task-master generate` after updating tasks.json....Applied to files:
📚 Learning: applies to scripts/modules/task-manager.js : extract tasks from prd documents using ai, create them ...Applied to files:
📚 Learning: when implementation differs significantly from planned approach, call `node scripts/dev.js update --...Applied to files:
📚 Learning: applies to scripts/modules/task-manager.js : use consistent formatting for task files, include all t...Applied to files:
📚 Learning: applies to scripts/modules/task-manager/*.js : files in scripts/modules/task-manager/ should each ha...Applied to files:
📚 Learning: in scripts/modules/task-manager/expand-all-tasks.js, the success flag should always be true when the...Applied to files:
📚 Learning: applies to scripts/modules/commands.js : for ai-powered commands that benefit from project context, ...Applied to files:
📚 Learning: applies to scripts/modules/task-manager/**/*.js : if the core logic function handles cli output (out...Applied to files:
📚 Learning: applies to scripts/modules/task-manager/**/*.js : functions in scripts/modules/task-manager/ that in...Applied to files:
📚 Learning: run `node scripts/dev.js analyze-complexity --research` for comprehensive analysis and review the co...Applied to files:
📚 Learning: use context gathering for ai-powered commands that benefit from project context, when users might wa...Applied to files:
📚 Learning: when using the research tool, follow the research + action pattern: use research to gather informati...Applied to files:
📚 Learning: applies to tests/{unit,integration,e2e}/**/*.test.js : explicitly handle all options, including defa...Applied to files:
📚 Learning: applies to tests/{unit,integration,e2e}/**/*.test.js : use sample task fixtures for consistent test ...Applied to files:
📚 Learning: applies to scripts/modules/**/*.test.js : test cli and mcp interfaces with real task data, verify en...Applied to files:
📚 Learning: applies to **/*.{test,spec}.{js,ts,jsx,tsx} : create a test file if needed and ensure all tests pass...Applied to files:
📚 Learning: applies to **/*.test.js : verify modifications on the in-memory task objects passed to writejson....Applied to files:
📚 Learning: applies to tests/{unit,integration,e2e}/**/*.test.js : mock console output and verify correct format...Applied to files:
🪛 LanguageTool.changeset/fuzzy-brooms-mate.md[grammar] ~5-~5: There might be a mistake here. (QB_NEW_EN_OTHER) [style] ~6-~6: Consider using a different verb for a more formal wording. (FIX_RESOLVE) 🪛 markdownlint-cli2 (0.17.2).changeset/fuzzy-brooms-mate.md5-5: First line in a file should be a top-level heading (MD041, first-line-heading, first-line-h1) 🔇 Additional comments (7)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Credit to @sadaqat12, closes #1067 |
…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>
…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>
…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>
…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>
…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>
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?
Description
Related Issues
How to Test This
# Example commands or stepsExpected result:
Contributor Checklist
npm run changesetnpm testnpm run format-check(ornpm run formatto fix)Changelog Entry
For Maintainers
Summary by CodeRabbit
Bug Fixes
New Features
Tests
Chores