Files
taskgraph_ts/tasks/implementation/review/graph-complete.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

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
graph/construction
graph/mutation
graph/queries
graph/subgraph-and-validation
graph/export
review/schemas-and-errors
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 edges
    • fromRecords: TaskNotFoundError for dangling edges, DuplicateNodeError, DuplicateEdgeError
    • fromJSON: validated against schema, orphans preserved
    • addTask: DuplicateNodeError
    • addDependency: TaskNotFoundError, DuplicateEdgeError
  • Edge direction is prerequisite→dependent throughout (matches Rust CLI convention)
  • Deterministic edge keys ${source}->${target} used via addEdgeWithKey (ADR-006)
  • topologicalOrder throws CircularDependencyError with cycles populated (ADR-003)
  • findCycles returns actual cycle paths (not just SCCs)
  • subgraph returns 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 correctly
  • raw getter 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