Files
taskgraph_ts/tasks/implementation/analysis/parallel-groups.md
glm-5.1 131e3e929b Decompose architecture into 28 atomic implementation tasks
Break the @alkdev/taskgraph architecture specs into dependency-ordered
implementation tasks across 8 component directories: setup, schema,
error, graph, analysis, cost-benefit, frontmatter, api, and review.
Each task has clear acceptance criteria referencing specific architecture
docs. Three review tasks serve as quality gates at critical junction
points (schemas-and-errors, graph-complete, complete-library). The
dependency graph is validated acyclic with 9 topological levels enabling
significant parallelism across independent work streams.
2026-04-27 08:30:05 +00:00

1.3 KiB

id, name, status, depends_on, scope, risk, impact, level
id name status depends_on scope risk impact level
analysis/parallel-groups Implement parallelGroups analysis function pending
graph/construction
graph/queries
narrow low component implementation

Description

Implement parallelGroups(graph: TaskGraph): string[][] in src/analysis/index.ts or a dedicated module. This returns groups of tasks that can be executed concurrently — tasks at the same topological depth. Uses graphology-dag.topologicalGenerations.

Acceptance Criteria

  • parallelGroups returns string[][] where each inner array is a generation of tasks at the same depth from sources
  • Uses graphology-dag.topologicalGenerations() for the generation computation
  • Tasks with zero prerequisites are in the first group
  • Throws CircularDependencyError if the graph is cyclic (delegated to topologicalGenerations behavior)
  • Works on disconnected graphs (each connected component sorted independently, then merged by depth)
  • Unit tests: linear chain (each group size 1), diamond graph, disconnected components

References

  • docs/architecture/api-surface.md — parallelGroups signature
  • docs/architecture/graph-model.md — parallel groups definition

Notes

To be filled by implementation agent

Summary

To be filled on completion