--- id: update-tasks-doc-for-taskgraph name: Update storage/tasks.md for @alkdev/taskgraph status: completed depends_on: [] scope: narrow risk: low impact: component level: implementation --- ## Description Update the "Graphology Integration" section and sync flow in `docs/architecture/storage/tasks.md` to reference `@alkdev/taskgraph` instead of direct `graphology` usage. ### Key changes 1. **Graphology Integration section** — Replace manual `DirectedGraph` construction with `TaskGraph.fromRecords()`: - Instead of "Load rows → Build a graphology DirectedGraph → Run algorithms", use "Load rows → Build a TaskGraph via `TaskGraph.fromRecords(tasks, edges)` → Run analysis functions" - Reference `@alkdev/taskgraph` analysis functions: `criticalPath()`, `parallelGroups()`, `bottlenecks()`, `riskPath()`, `shouldDecomposeTask()`, `workflowCost()` - Graphology is still a transitive dependency through `@alkdev/taskgraph` but hub code should prefer the `TaskGraph` API 2. **NAPI note** — Update "Why not taskgraph NAPI for v1" to note that `@alkdev/taskgraph` is now the TypeScript package (pure graphology-based, <5ms for 100 nodes) and the Rust CLI is for offline analysis only. No NAPI needed. 3. **Frontmatter parsing** — Reference `@alkdev/taskgraph`'s `parseFrontmatter()` and `serializeFrontmatter()` functions for task file I/O. Note: `parseTaskFile()` and `parseTaskDirectory()` are Node.js only (use `node:fs/promises`). For Deno, use `parseFrontmatter()` with Deno file I/O. 4. **References section** — Update graphology link to reference the @alkdev/taskgraph package instead of local paths. ## Acceptance Criteria - [ ] Graphology Integration section references `TaskGraph.fromRecords()` API - [ ] Analysis functions reference `@alkdev/taskgraph` exports - [ ] NAPI note is updated for current state - [ ] Frontmatter parsing references `@alkdev/taskgraph` functions - [ ] References section updated ## References - docs/reviews/core-library-extraction-sync-2026-05-18.md (Section 2.7)