Skip to content

Nudge task expansion and dependency mapping toward critical path reduction#1623

Merged
Crunchyman-ralph merged 3 commits intoeyaltoledano:nextfrom
bjcoombs:1622-critical-path-prompts
Feb 7, 2026
Merged

Nudge task expansion and dependency mapping toward critical path reduction#1623
Crunchyman-ralph merged 3 commits intoeyaltoledano:nextfrom
bjcoombs:1622-critical-path-prompts

Conversation

@bjcoombs
Copy link
Contributor

@bjcoombs bjcoombs commented Feb 7, 2026

Summary

  • Replace serial-by-default bias in expand-task AI prompts ("implemented sequentially") with guidance to maximize subtask independence and reduce critical path duration
  • Update add-dependency prompts to challenge dependency necessity and warn about serialization impact, rather than suggesting additional dependencies
  • Sync changes across all three prompt surfaces (AI system prompt JSON, plugin command markdown, tm-profiles TypeScript)

Problem

The expand-task AI system prompt explicitly instructed "break down into subtasks that can be implemented sequentially", and the add-dependency prompt encouraged "suggest related dependencies". This over-constrains dependency graphs so the critical path (longest dependency chain) equals total work — zero parallelism.

Changes

src/prompts/expand-task.json (all 3 variants: default, research, complexity-report):

  • System prompt: "maximize subtask independence, only add dependencies where output genuinely blocks input, prefer parallel-ready subtasks to reduce critical path"
  • Dependencies field description: "only add where output genuinely blocks input"

packages/claude-code-plugin/commands/expand-task.md + packages/tm-profiles/.../expand-task.ts:

  • Subtask generation: prefer independence over serial chains
  • Smart breakdown: identify parallel components
  • Post-expansion: show critical path analysis, flag fully-serial expansions

packages/claude-code-plugin/commands/add-dependency.md + packages/tm-profiles/.../add-dependency.ts:

  • Validation: challenge necessity (hard data dependency vs preferred ordering), assess critical path impact
  • Smart features: warn on serialization instead of suggesting more dependencies
  • Example: show critical path impact instead of suggesting additional dependencies

Test plan

  • Existing expand-task-prompt.test.js tests pass (5/5)
  • TypeScript typecheck passes across all packages (9/9)
  • Manual: run task-master expand on a task and verify subtasks have fewer inter-dependencies than before
  • Manual: run add-dependency and verify prompt challenges necessity

Closes #1622


Note

Low Risk
Text-only prompt/documentation updates with no runtime logic changes; main risk is behavior shifts in AI-generated task graphs and dependency suggestions.

Overview
Updates task expansion and dependency-creation prompts to bias toward parallelizable work: expand-task now explicitly asks for independent subtasks with minimal dependencies and adds post-expansion guidance to show a dependency graph, identify parallel vs sequential subtasks, and surface the critical path.

Refines add-dependency guidance to challenge whether a dependency is truly blocking and to warn about unnecessary serialization by reporting critical-path impact and suggesting narrower alternatives, with synced wording across expand-task.json, plugin markdown docs, and tm-profiles slash-command strings. Adds a patch changeset for release.

Written by Cursor Bugbot for commit 1c53562. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • New Features

    • Subtask expansion now includes dependency graphs and critical-path analysis
    • Shows which subtasks can run in parallel vs sequentially
  • Improvements

    • Validation now assesses necessity and impact on the critical path
    • Guidance favors independent, parallelizable subtasks and warns against unnecessary serialization
    • Suggests narrower alternatives to reduce blocking work

…h reduction

Replace serial-by-default bias in expand-task AI prompts with guidance to
maximize subtask independence and reduce critical path duration. Update
add-dependency prompts to challenge necessity and warn about serialization
impact rather than suggesting additional dependencies.

Closes eyaltoledano#1622
@changeset-bot
Copy link

changeset-bot bot commented Feb 7, 2026

🦋 Changeset detected

Latest commit: 1c53562

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 Feb 7, 2026

📝 Walkthrough

Walkthrough

Prompts, docs, and two slash-command implementations were updated to prefer subtask independence and parallelism, and to require explicit justification when adding dependencies by assessing critical-path impact rather than defaulting to serial ordering. No public APIs or exported declarations changed.

Changes

Cohort / File(s) Summary
Documentation & Guidance
packages/claude-code-plugin/commands/add-dependency.md, packages/claude-code-plugin/commands/expand-task.md
Rewrote validation and smart-feature wording to challenge dependency necessity, emphasize critical-path impact, and prefer independent/parallel subtasks over serial ordering.
Slash-Command Implementations
packages/tm-profiles/src/slash-commands/commands/solo/add-dependency.ts, packages/tm-profiles/src/slash-commands/commands/solo/expand-task.ts
Mirrored docs’ textual updates in command prompts and messaging: validation steps, smart-feature output, and post-operation examples now reference critical-path analysis and subtask independence.
Prompt JSON
src/prompts/expand-task.json
Behavioral prompt changes across branches (default, complexity-report, research): prefer minimal inter-subtask coupling, add dependencies only when output blocks input, prioritize parallelizable subtasks, and require critical-path information; JSON shape unchanged.
Release Notes / Changeset
.changeset/critical-path-prompts.md
New changeset entry describing the shift toward subtask independence and critical-path reduction for task expansion/dependency prompts.

Sequence Diagram(s)

(omitted — changes are wording/prompt guidance and do not introduce a new multi-component control flow that requires visualization)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • eyaltoledano
  • Crunchyman-ralph
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: nudging task expansion and dependency mapping toward critical path reduction, which matches the core objective.
Linked Issues check ✅ Passed The PR fully addresses issue #1622 objectives: expand-task prompts now emphasize independence and critical path, add-dependency prompts challenge necessity, and no new complexity systems or workflow commands were introduced.
Out of Scope Changes check ✅ Passed All changes remain within scope: prompt/documentation updates across expand-task and add-dependency surfaces, no runtime algorithms or data structure modifications introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Crunchyman-ralph Crunchyman-ralph changed the base branch from main to next February 7, 2026 13:11
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph left a comment

Choose a reason for hiding this comment

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

nice one

@Crunchyman-ralph Crunchyman-ralph merged commit a1c0161 into eyaltoledano:next Feb 7, 2026
10 checks passed
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.

Nudge task expansion and dependency mapping toward critical path reduction

2 participants