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.
44 lines
1.9 KiB
Markdown
44 lines
1.9 KiB
Markdown
---
|
|
id: schema/enums
|
|
name: Define TypeBox categorical enum schemas and type aliases
|
|
status: pending
|
|
depends_on:
|
|
- setup/project-init
|
|
scope: narrow
|
|
risk: trivial
|
|
impact: component
|
|
level: implementation
|
|
---
|
|
|
|
## Description
|
|
|
|
Define all categorical enum schemas using `Type.Union([Type.Literal(...)])` pattern per [schema.md](../docs/architecture/schema.md). Each enum gets a schema constant (PascalCase + `Enum` suffix) and a `Static<typeof>` type alias (PascalCase, no suffix). Also include the `Nullable` helper.
|
|
|
|
The enums: `CallStatusEnum`, `NodeStatusEnum`, `OperationTypeEnum`, `EdgeTypeEnum`.
|
|
|
|
## Acceptance Criteria
|
|
|
|
- [ ] `src/schema/enums.ts` exports all four enum schemas and their type aliases
|
|
- [ ] Each enum uses `Type.Union([Type.Literal("value"), ...])` pattern per typebox conventions
|
|
- [ ] `CallStatusEnum`: `"pending" | "running" | "completed" | "failed" | "aborted"` with transitions documented in JSDoc
|
|
- [ ] `NodeStatusEnum`: `"idle" | "waiting" | "ready" | "running" | "completed" | "failed" | "skipped" | "aborted"`
|
|
- [ ] `OperationTypeEnum`: `"query" | "mutation" | "subscription"`
|
|
- [ ] `EdgeTypeEnum`: `"triggered" | "depends_on" | "typed" | "sequential" | "conditional"`
|
|
- [ ] Type aliases derived via `Static<typeof>`: `CallStatus`, `NodeStatus`, `OperationType`, `EdgeType`
|
|
- [ ] Naming convention matches spec: `Enum` suffix on schema constants only, never on type aliases
|
|
- [ ] `Nullable` helper exported: `const Nullable = <T extends TSchema>(schema: T) => Type.Union([schema, Type.Null()])`
|
|
- [ ] `src/schema/index.ts` re-exports all schemas and types
|
|
- [ ] Unit tests for each enum: `Value.Check()` validation, compile-time type alias verification
|
|
|
|
## References
|
|
|
|
- docs/architecture/schema.md — enum definitions, naming convention, nullable helper
|
|
- docs/architecture/reactive-execution.md — NodeStatus semantics and transitions
|
|
|
|
## Notes
|
|
|
|
> To be filled by implementation agent
|
|
|
|
## Summary
|
|
|
|
> To be filled on completion |