Skip to content

feat: add explicit task dependency declarations and execution wave DA…#2091

Open
Quratulain-bilal wants to merge 3 commits intogithub:mainfrom
Quratulain-bilal:feat/explicit-task-dependencies
Open

feat: add explicit task dependency declarations and execution wave DA…#2091
Quratulain-bilal wants to merge 3 commits intogithub:mainfrom
Quratulain-bilal:feat/explicit-task-dependencies

Conversation

@Quratulain-bilal
Copy link
Copy Markdown
Contributor

Summary

  • Add (depends on T###) suffix to task format for explicit inter-task dependency tracking
  • Replace prose-only Parallel Example section with structured Execution Wave DAG showing tasks
    grouped by dependency resolution
  • Document dependency syntax in format section and notes

Closes #1934

Changes

File Change
templates/tasks-template.md Document dependency suffix in format, add annotations to sample tasks,
add Execution Wave DAG
templates/commands/tasks.md Add dependency suffix as format component #6, instruct Wave DAG
generation

Design decisions

  • Dependency suffix is optional (omit if no deps) to avoid noise on independent tasks
  • Wave DAG groups tasks by resolution order so agents can schedule parallel execution
  • Pure template change — no Python code or test changes needed

github#1934)

Add `(depends on T###)` suffix to the task format for explicit
inter-task dependency tracking. This enables AI agents to identify
which tasks can run in parallel and which must wait.

Changes:
- tasks-template.md: Document dependency suffix in format section,
  add dependency annotations to sample tasks, replace Parallel
  Example section with structured Execution Wave DAG
- commands/tasks.md: Add dependency suffix as format component github#6,
  instruct task generation to include Wave DAG section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the tasks/spec templates to support explicit inter-task dependency declarations and to document an execution-wave view of the dependency graph for parallelizable scheduling.

Changes:

  • Add optional (depends on T###, ...) suffix to the documented task checklist format.
  • Update sample tasks to include dependency annotations.
  • Replace the prior “Parallel Example” section with an Execution Wave DAG example grouped by dependency resolution.
Show a summary per file
File Description
templates/tasks-template.md Documents dependency suffix, annotates sample tasks, and adds an Execution Wave DAG example.
templates/commands/tasks.md Updates task-generation instructions to include dependency suffixes and the Execution Wave DAG section.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

templates/tasks-template.md:240

  • In the Execution Wave DAG, Wave 8 shows T016/T017 as [P], but in the User Story 1 checklist those tasks are not marked [P]. Please make the DAG and the checklist agree (either mark them [P] in the checklist or drop the [P] annotation here).
Wave 8:
  T016  [US1] Validation (depends on T015)  [P]
  T017  [US1] Logging (depends on T015)     [P]
  T023  [US2] Integrate with US1 (depends on T022)
  • Files reviewed: 2/2 changed files
  • Comments generated: 4

Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Please address Copilot feedback. If not applicable, please explain why

…AG consistency

- Change [Story] to [Story?] in format heading (optional for non-story phases)
- Update [P] definition: can run in parallel once dependencies satisfied
- Add [P] to T008, T009 in Phase 2 checklist to match Wave DAG
- Replace 'parallel execution examples' with Wave DAG instruction in step 3
@Quratulain-bilal
Copy link
Copy Markdown
Contributor Author

Addressed all 4 Copilot review comments:

  1. [Story] → [Story?] in format heading — updated in both tasks-template.md and commands/tasks.md to
    clarify the story label is only required for user story phases
  2. [P] definition updated to "Can run in parallel with other ready tasks once any listed dependencies are
    satisfied" — aligned across format heading, command template, and Notes section
  3. Added [P] to T008 and T009 in the Phase 2 checklist to match their [P] markers in the Execution Wave
    DAG
  4. Replaced "Create parallel execution examples per user story" in step 3 of commands/tasks.md with
    "Build an Execution Wave DAG that groups tasks into waves by dependency resolution

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the task authoring templates to support explicit inter-task dependency declarations and to present task execution order as a dependency-resolved “Execution Wave DAG” to enable parallel scheduling.

Changes:

  • Adds optional (depends on T###, ...) suffix to the documented task checklist format.
  • Replaces the prior parallel-examples prose with an Execution Wave DAG section in the tasks template.
  • Updates /tasks command guidance to instruct dependency suffix usage and Wave DAG generation.
Show a summary per file
File Description
templates/tasks-template.md Documents dependency suffix syntax, annotates sample tasks with dependencies, and adds an Execution Wave DAG section.
templates/commands/tasks.md Updates task generation rules to include dependency suffix and directs generation of an Execution Wave DAG.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

templates/tasks-template.md:216

  • In the Wave 3 heading, the text implies T004/T005/T006/T008/T009 depend on completion of T002 and T003, but those dependencies aren’t shown on the tasks themselves (despite the template introducing an explicit (depends on ...) syntax). Either add explicit (depends on T002, T003) to the relevant tasks in this example, or reword the wave heading so it doesn’t assert undeclared dependencies.
Wave 3 (Phase 2 — T002, T003 done):
  T004  Setup database schema
  T005  Implement auth framework          [P]
  T006  Setup API routing                 [P]
  T008  Configure error handling          [P]
  T009  Setup environment config          [P]
  • Files reviewed: 2/2 changed files
  • Comments generated: 3

@mnriem mnriem self-requested a review April 7, 2026 12:40
Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Please address Copilot feedback

- Remove phase-scoped language from (depends on ...) definition: now says
  "any earlier task IDs" instead of "within its phase"
- Move [P] marker in Wave DAG to match checklist format (after task ID,
  before story label) for consistency
- Update commands/tasks.md dependency rule to explicitly allow cross-phase
  references
@Quratulain-bilal
Copy link
Copy Markdown
Contributor Author

Addressed all 3 Copilot comments:

  1. Removed phase-scoped wording from (depends on ...) — now reads "Explicit dependency on any earlier task IDs. Omit if the task has no explicit dependencies." Updated in both tasks-template.md (definition + Notes section) and commands/tasks.md
  2. Moved [P] marker in Execution Wave DAG to match checklist format — now appears right after task ID (e.g., T005 [P] Implement auth framework) instead of trailing at end of line
  3. Updated commands/tasks.md rule shell scripts in the scripts directory fail to execute #6 to explicitly allow cross-phase dependencies: "including tasks from
    earlier phases when applicable

@mnriem mnriem requested a review from Copilot April 7, 2026 17:59
@mnriem mnriem requested review from Copilot and removed request for Copilot April 7, 2026 18:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds explicit inter-task dependency notation to the tasks template/command docs and introduces an “Execution Wave DAG” representation to help agents schedule parallelizable work based on dependency resolution order.

Changes:

  • Extend task checklist format to optionally include a (depends on T###, ...) suffix for explicit task-level dependencies.
  • Replace the prior prose “Parallel Example” with a structured Execution Wave DAG section in the tasks template.
  • Update /tasks command guidance to require dependency suffixes for dependent tasks and to generate the Execution Wave DAG.
Show a summary per file
File Description
templates/tasks-template.md Updates task format documentation, annotates sample tasks with dependency suffixes, and adds an Execution Wave DAG example.
templates/commands/tasks.md Updates generation instructions and checklist format to include dependency suffix and require generating an Execution Wave DAG.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

templates/tasks-template.md:228

  • The Execution Wave DAG example appears to be a complete grouping of the sample tasks, but it omits several sample task IDs that are defined above (e.g., T019, T024–T028). This can confuse readers/agents trying to validate that every listed task is represented in the DAG. Consider either including all sample tasks in the DAG or explicitly stating that the DAG is a partial illustration.
Wave 5 (Phase 2 complete — User Stories can begin in parallel):
  T010 [P] [US1] Contract test
  T011 [P] [US1] Integration test
  T012 [P] [US1] Create Entity1 model
  T013 [P] [US1] Create Entity2 model
  T018 [P] [US2] Contract test
  T020 [P] [US2] Create Entity model

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

- [P] tasks = different files, no dependencies
- [P] tasks = can run in parallel with other ready tasks once any listed dependencies are satisfied
- (depends on ...) = explicit dependency on any earlier task IDs; omit if no explicit dependencies
- [Story] label maps task to specific user story for traceability
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The Notes section still refers to a "[Story] label", but the format description now uses "[Story?]" to indicate optionality outside user-story phases. Update the Notes wording to match the updated format terminology for consistency.

Suggested change
- [Story] label maps task to specific user story for traceability
- [Story?] label maps task to specific user story for traceability when applicable

Copilot uses AI. Check for mistakes.
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.

[Feature]: Explicit task dependency declarations in tasks.md to enable parallel execution

3 participants