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.
This commit is contained in:
43
tasks/implementation/error/error-hierarchy.md
Normal file
43
tasks/implementation/error/error-hierarchy.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
id: error/error-hierarchy
|
||||
name: Implement typed error class hierarchy
|
||||
status: pending
|
||||
depends_on:
|
||||
- setup/project-init
|
||||
scope: narrow
|
||||
risk: trivial
|
||||
impact: phase
|
||||
level: implementation
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Implement the custom error classes in `src/error/index.ts` per [errors-validation.md](../../../docs/architecture/errors-validation.md). All errors extend `TaskgraphError` which extends `Error`. Each subclass adds typed fields for programmatic error recovery.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] `src/error/index.ts` exports:
|
||||
- `TaskgraphError extends Error` — base class
|
||||
- `TaskNotFoundError extends TaskgraphError` with `taskId: string` field
|
||||
- `CircularDependencyError extends TaskgraphError` with `cycles: string[][]` field
|
||||
- `InvalidInputError extends TaskgraphError` with `field: string` and `message: string` fields
|
||||
- `DuplicateNodeError extends TaskgraphError` with `taskId: string` field
|
||||
- `DuplicateEdgeError extends TaskgraphError` with `prerequisite: string` and `dependent: string` fields
|
||||
- [ ] Each error class sets `this.name` to the class name
|
||||
- [ ] Each error class properly extends the prototype chain (`Object.setPrototypeOf(this, new.target.prototype)`)
|
||||
- [ ] `InvalidInputError` supports construction from TypeBox `Value.Errors()` output (receives structured field/path/value info)
|
||||
- [ ] `CircularDependencyError` receives `string[][]` where each inner array is an ordered cycle path
|
||||
- [ ] Unit tests verifying: correct `instanceof` chain, field access, `.name` property, 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
|
||||
Reference in New Issue
Block a user