decompose architecture into 38 atomic tasks across 12 parallel generations

Decompose the reviewed architecture specs into taskgraph-managed tasks:
- 2 setup tasks (project init, test infrastructure)
- 4 schema tasks (enums, node attrs, edge attrs, graph schemas)
- 1 error hierarchy task
- 6 graph tasks (FlowGraph class, 3 construction paths, queries, validation)
- 5 analysis tasks (type-compat, build-type-edges, ordering, template-validation, defaults)
- 5 component tasks (Operation, Sequential, Parallel, Conditional, Map)
- 2 host config tasks (GraphologyHostConfig, ReactiveHostConfig)
- 4 reactive tasks (WorkflowRoot, node-status, max-concurrency, retry-semantics)
- 3 review tasks (foundation, reactive-and-hosts, complete-library)
- 5 meta cluster tasks (schema, graph, component, reactive, analysis layers)
- 1 API exports task

Validated with taskgraph: zero cycles, 38 tasks, 12 parallel generations.
Critical path: 12 tasks through reactive execution layer.
This commit is contained in:
2026-05-21 20:24:44 +00:00
parent 907c33650f
commit 466b121f77
38 changed files with 1623 additions and 0 deletions

55
tasks/host-graphology.md Normal file
View File

@@ -0,0 +1,55 @@
---
id: host/graphology
name: Implement GraphologyHostConfig — render ujsx template to graphology DAG
status: pending
depends_on:
- component/operation
- component/sequential
- component/parallel
- component/conditional
- component/map
- graph/flowgraph-class
- schema/edge-attrs
scope: broad
risk: high
impact: phase
level: implementation
---
## Description
Implement the `GraphologyHostConfig` that renders a ujsx workflow template (`UNode` tree) into a graphology `DirectedGraph` DAG. This is the structural analysis rendering path — it validates templates by producing a DAG that can be checked for cycles, type compatibility, and topological ordering.
## Acceptance Criteria
- [ ] `src/host/graphology.ts` exports `GraphologyHostConfig` implementing ujsx `HostConfig<WorkflowTag, GraphNode, GraphContext>`
- [ ] `WorkflowTag: "operation" | "sequential" | "parallel" | "conditional" | "map"`
- [ ] `GraphNode`: `{ key: string; attributes: OperationNodeAttrs | TemplateNodeAttrs }`
- [ ] `GraphContext`: `{ graph: DirectedGraph; parentStack: string[]; operationRegistry?: OperationRegistry }`
- [ ] `createRootContext`: creates fresh `DirectedGraph` with DAG constraints, empty parentStack
- [ ] `createInstance("operation", props, ctx)`: adds graph node with `OperationNodeAttrs`, returns `GraphNode`
- [ ] `createInstance` for structural containers: returns `GraphNode` with synthetic key `__${tag}_${counter++}`, no graph node created (containers are transparent)
- [ ] `appendChild` for Sequential children: creates sequential edges between consecutive siblings (manages `parentStack`)
- [ ] `appendChild` for Parallel children: no inter-child edges, pushes parallel group marker for successor connections
- [ ] `appendChild` for Conditional: creates conditional edge with `dataFlow: true`
- [ ] Edge attributes include `edgeType` and `dataFlow` inference (conservative strategy: conditional always dataFlow: true, sequential with result references → dataFlow: true, otherwise dataFlow: false)
- [ ] `finalizeInstance`: cleans up parentStack after container children are rendered
- [ ] `removeChild`: removes edge between parent and child (structural containers are transparent)
- [ ] `removeChildFromHost`: removes child node from graph and all attached edges
- [ ] Cycle detection after rendering: if `hasCycle()` returns true, throw `CycleError`
- [ ] Re-exported from `src/host/index.ts`
- [ ] Integration tests: render Sequential → assert node/edge structure, render Parallel → assert no inter-child edges, render Conditional → assert conditional edges with dataFlow, nested compositions, cycle detection
## References
- docs/architecture/host-configs.md — GraphologyHostConfig full specification
- docs/architecture/workflow-templates.md — edge creation rules, root node handling, template→DAG conversion
- docs/architecture/schema.md — TemplateEdgeAttrs, dataFlow inference
## Notes
> To be filled by implementation agent
## Summary
> To be filled on completion