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.7 KiB
1.7 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | |
|---|---|---|---|---|---|---|---|---|
| error/error-hierarchy | Implement typed error class hierarchy | pending |
|
narrow | trivial | phase | implementation |
Description
Implement the custom error classes in src/error/index.ts per errors-validation.md. All errors extend TaskgraphError which extends Error. Each subclass adds typed fields for programmatic error recovery.
Acceptance Criteria
src/error/index.tsexports:TaskgraphError extends Error— base classTaskNotFoundError extends TaskgraphErrorwithtaskId: stringfieldCircularDependencyError extends TaskgraphErrorwithcycles: string[][]fieldInvalidInputError extends TaskgraphErrorwithfield: stringandmessage: stringfieldsDuplicateNodeError extends TaskgraphErrorwithtaskId: stringfieldDuplicateEdgeError extends TaskgraphErrorwithprerequisite: stringanddependent: stringfields
- Each error class sets
this.nameto the class name - Each error class properly extends the prototype chain (
Object.setPrototypeOf(this, new.target.prototype)) InvalidInputErrorsupports construction from TypeBoxValue.Errors()output (receives structured field/path/value info)CircularDependencyErrorreceivesstring[][]where each inner array is an ordered cycle path- Unit tests verifying: correct
instanceofchain, field access,.nameproperty, error messages
References
- docs/architecture/errors-validation.md — error types, when each is thrown
- docs/architecture/api-surface.md — error documentation on specific methods
Notes
To be filled by implementation agent
Summary
To be filled on completion