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.
1.3 KiB
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 |
|
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
parallelGroupsreturnsstring[][]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
CircularDependencyErrorif the graph is cyclic (delegated totopologicalGenerationsbehavior) - 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