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:
48
tasks/implementation/review/complete-library.md
Normal file
48
tasks/implementation/review/complete-library.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
id: review/complete-library
|
||||
name: Final review — validate full library against architecture docs
|
||||
status: pending
|
||||
depends_on:
|
||||
- api/public-exports
|
||||
- review/graph-complete
|
||||
- frontmatter/file-io-and-serialize
|
||||
- cost-benefit/workflow-cost
|
||||
- cost-benefit/risk-analysis
|
||||
scope: broad
|
||||
risk: low
|
||||
impact: project
|
||||
level: review
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Final review of the complete library. Verify the full API surface matches architecture docs, all analysis functions produce correct results, and the library achieves its stated purpose: pure TypeScript task graph library with graphology, replicating and extending the essential graph algorithms and cost-benefit math from the Rust CLI.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] Public API matches [api-surface.md](../../../docs/architecture/api-surface.md) exactly — no missing exports, no extra exports
|
||||
- [ ] All construction paths work: fromTasks, fromRecords, fromJSON, incremental
|
||||
- [ ] DAG-propagation cost model produces results consistent with Python research model examples
|
||||
- [ ] Independent model available as degenerate case (set `propagationMode: 'independent'` or `defaultQualityRetention: 1.0`)
|
||||
- [ ] Frontmatter parsing round-trips correctly: `parseFrontmatter(serializeFrontmatter(task))` ≈ task
|
||||
- [ ] `Value.Clean()` and `Value.Errors()` used correctly throughout (no `Value.Assert()` where structured errors needed)
|
||||
- [ ] No gray-matter, no js-yaml, no Zod anywhere in the dependency tree
|
||||
- [ ] `npm pack` produces a valid package with correct exports
|
||||
- [ ] All tests pass: `npm test`
|
||||
- [ ] TypeScript strict mode compilation succeeds with no errors
|
||||
- [ ] Build output (`dist/`) is correct: ESM + CJS + declarations
|
||||
|
||||
## References
|
||||
|
||||
- docs/architecture/README.md
|
||||
- docs/architecture/api-surface.md
|
||||
- docs/architecture/build-distribution.md
|
||||
- docs/architecture/cost-benefit.md
|
||||
|
||||
## Notes
|
||||
|
||||
> To be filled by implementation agent
|
||||
|
||||
## Summary
|
||||
|
||||
> To be filled on completion
|
||||
53
tasks/implementation/review/graph-complete.md
Normal file
53
tasks/implementation/review/graph-complete.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
id: review/graph-complete
|
||||
name: Review TaskGraph class implementation for correctness and API compliance
|
||||
status: pending
|
||||
depends_on:
|
||||
- graph/construction
|
||||
- graph/mutation
|
||||
- graph/queries
|
||||
- graph/subgraph-and-validation
|
||||
- graph/export
|
||||
- review/schemas-and-errors
|
||||
scope: moderate
|
||||
risk: medium
|
||||
impact: phase
|
||||
level: 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](../../../docs/architecture/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](../../../docs/architecture/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
|
||||
49
tasks/implementation/review/schemas-and-errors.md
Normal file
49
tasks/implementation/review/schemas-and-errors.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
id: review/schemas-and-errors
|
||||
name: Review schema, enum, and error implementations for consistency
|
||||
status: pending
|
||||
depends_on:
|
||||
- schema/enums
|
||||
- schema/input-schemas
|
||||
- schema/graph-schemas
|
||||
- schema/result-types
|
||||
- schema/numeric-methods-and-defaults
|
||||
- error/error-hierarchy
|
||||
scope: narrow
|
||||
risk: low
|
||||
impact: phase
|
||||
level: review
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Review the schema and error layer implementations before building the graph and analysis layers on top. This is a critical checkpoint because everything downstream depends on these types being correct and consistent with the architecture docs.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] All TypeBox schemas match [schemas.md](../../../docs/architecture/schemas.md) exactly
|
||||
- [ ] All `Static<typeof>` type aliases correctly derived — no manual type definitions
|
||||
- [ ] Nullable helper used consistently in TaskInput (not in TaskGraphNodeAttributes)
|
||||
- [ ] Enum values match DB/frontmatter conventions exactly
|
||||
- [ ] Numeric method tables match spec tables exactly
|
||||
- [ ] `resolveDefaults` correctly separates "nullable categorical→default" from "label-only nullable→stays nullable"
|
||||
- [ ] Error class hierarchy is correct: all extend TaskgraphError, all have proper `name` and typed fields
|
||||
- [ ] `InvalidInputError` can be constructed from `Value.Errors()` output
|
||||
- [ ] `CircularDependencyError.cycles` type is `string[][]`
|
||||
- [ ] No Zod, no gray-matter, no js-yaml in any dependency
|
||||
- [ ] `package.json` lists only approved dependencies
|
||||
- [ ] All tests pass
|
||||
|
||||
## References
|
||||
|
||||
- docs/architecture/schemas.md
|
||||
- docs/architecture/errors-validation.md
|
||||
- docs/architecture/frontmatter.md — supply chain constraints
|
||||
|
||||
## Notes
|
||||
|
||||
> To be filled by implementation agent
|
||||
|
||||
## Summary
|
||||
|
||||
> To be filled on completion
|
||||
Reference in New Issue
Block a user