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.
2.1 KiB
2.1 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| review/graph-complete | Review TaskGraph class implementation for correctness and API compliance | pending |
|
moderate | medium | phase | review |
Description
Review the TaskGraph class implementation before building analysis functions on top of it. The graph layer is the foundation for all analysis — incorrect behavior here propagates everywhere.
Acceptance Criteria
- Construction methods match graph-model.md error handling table exactly:
fromTasks: silent orphan nodes,DuplicateNodeError, idempotent duplicate edgesfromRecords:TaskNotFoundErrorfor dangling edges,DuplicateNodeError,DuplicateEdgeErrorfromJSON: validated against schema, orphans preservedaddTask:DuplicateNodeErroraddDependency:TaskNotFoundError,DuplicateEdgeError
- Edge direction is prerequisite→dependent throughout (matches Rust CLI convention)
- Deterministic edge keys
${source}->${target}used viaaddEdgeWithKey(ADR-006) topologicalOrderthrowsCircularDependencyErrorwithcyclespopulated (ADR-003)findCyclesreturns actual cycle paths (not just SCCs)subgraphreturns internal-only edges (ADR-007)- Validation methods return arrays, never throw
- Mutation error semantics match errors-validation.md table (no-op for remove, throws for update on nonexistent)
export()/toJSON()round-trips correctlyrawgetter exposed, warning about direct mutation documented in code comments- All tests pass, including edge cases (empty graphs, single-node, cyclic graphs, disconnected components)
References
- docs/architecture/graph-model.md
- docs/architecture/api-surface.md
- docs/architecture/errors-validation.md
Notes
To be filled by implementation agent
Summary
To be filled on completion