Files
flowgraph/tasks/schema-edge-attrs.md

2.0 KiB

id, name, status, depends_on, scope, risk, impact, level
id name status depends_on scope risk impact level
schema/edge-attrs Define edge attribute schemas (Operation, Triggered, Dependency, Template) and CallResult completed
schema/enums
schema/node-attrs
narrow low component implementation

Description

Define all edge attribute schemas and the CallResult schema. Edge schemas are mode-specific (they do NOT include the universal edgeType field — that's stored separately in graphology alongside the mode-specific attributes). TemplateNodeAttrs is a type alias for OperationNodeAttrs.

Acceptance Criteria

  • src/schema/edge.ts exports all edge schemas and types
  • OperationEdgeAttrs: compatible (boolean), optional detail (string), optional mismatches (Array of {path, expected, actual})
  • TriggeredEdgeAttrs: empty object Type.Object({})
  • DependencyEdgeAttrs: empty object Type.Object({})
  • CallEdgeAttrs: union type TriggeredEdgeAttrs | DependencyEdgeAttrs (discriminated by edgeType at runtime)
  • TemplateEdgeAttrs: edgeType (union of "sequential" | "conditional"), optional condition (Unknown), optional negated (boolean), optional dataFlow (boolean with default false)
  • TemplateNodeAttrs: type alias for OperationNodeAttrs (template nodes carry the same attributes as operation nodes)
  • CallResultSchema: status (NodeStatusEnum), output (Unknown), optional error ({code, message, details?})
  • CallResult: type alias via Static<typeof CallResultSchema>
  • src/schema/index.ts re-exports all edge schemas, CallResult, and TemplateNodeAttrs
  • Unit tests for each schema: valid/invalid shapes, optional fields

References

  • docs/architecture/schema.md — full edge attribute definitions, CallResultSchema, TemplateNodeAttrs, edge key conventions
  • docs/architecture/workflow-templates.md — TemplateEdgeAttrs.condition semantics (string vs function)

Notes

To be filled by implementation agent

Summary

To be filled on completion