c3649256cc
feat(graph/subgraph-and-validation): implement subgraph and validation methods
...
- Add subgraph() method using graphology-operators.subgraph (ADR-007: internal-only edges)
- Add validateSchema() using TypeBox Value.Check/Value.Errors
- Add validateGraph() detecting cycles and dangling references
- Add validate() combining both validations
- Define ValidationError, GraphValidationError, AnyValidationError types in error module
- Add standalone validation functions in src/graph/validation.ts
- Export validation module from src/graph/index.ts
- Add 43 unit tests for subgraph filtering and validation
2026-04-27 12:41:51 +00:00
b0d943f4e6
Merge graph/queries: 7 query methods with 45 tests
...
# Conflicts:
# src/graph/construction.ts
2026-04-27 12:13:15 +00:00
95c8146af7
Merge graph/construction: fromTasks, fromRecords, fromJSON, addTask, addDependency
...
# Conflicts:
# src/graph/construction.ts
2026-04-27 12:07:41 +00:00
98cc05d266
feat(graph/queries): implement query methods — hasCycles, findCycles, topologicalOrder, dependencies, dependents, taskCount, getTask
...
- hasCycles(): uses graphology-dag.hasCycle() as fast boolean check
- findCycles(): SCC pre-check + custom 3-color DFS for cycle path extraction
- topologicalOrder(): graphology-dag.topologicalSort + CircularDependencyError on cycle
- dependencies/dependents: inNeighbors/outNeighbors with TaskNotFoundError
- taskCount(): graph.order, getTask(): node attributes or undefined
- 45 unit tests covering all acceptance criteria
2026-04-27 12:00:17 +00:00
8d384a7b3e
feat(graph/construction): implement TaskGraph construction methods
...
- fromTasks: bulk import via serialized blob, orphan nodes for dangling refs,
DuplicateNodeError for duplicates, edge dedup, null→undefined stripping
- fromRecords: strict validation (TaskNotFoundError for dangling refs,
DuplicateEdgeError for duplicate edges), per-edge qualityRetention
- fromJSON: TypeBox Value.Check validation, InvalidInputError on schema failure,
orphan nodes preserved
- addTask: throws DuplicateNodeError if ID exists
- addDependency: throws TaskNotFoundError/DuplicateEdgeError, deterministic
edge keys per ADR-006, default qualityRetention 0.9
- taskInputToNodeAttrs: strips null→undefined for categorical fields,
drops non-graph fields (tags, assignee, due, created, modified)
- 47 new unit tests (304 total, all passing)
2026-04-27 11:59:56 +00:00
aabc9e2fb5
Merge graph/mutation: removeTask, removeDependency, updateTask, updateEdgeAttributes
2026-04-27 11:53:42 +00:00
5adc712193
feat(graph/mutation): implement removeTask, removeDependency, updateTask, updateEdgeAttributes
2026-04-27 11:51:57 +00:00
34e227464c
feat(graph/export): implement export() and toJSON() methods on TaskGraph
2026-04-27 11:49:11 +00:00
e155e1e08a
feat(graph/taskgraph-class): implement TaskGraph class skeleton with graphology DirectedGraph
2026-04-27 11:29:59 +00:00
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