A production-grade, AI-powered workflow orchestration engine with a visual builder UI, dynamic component hot-reload, comprehensive observability, and real-world application examples including a multi-service chat platform.
Commits: bcf15ee..8e23274
- Workflow engine with BuildFromConfig, TriggerWorkflow lifecycle
- HTTP/Messaging/State Machine/Event workflow handlers
- HTTP/Schedule/Event trigger system
- Module factory pattern for extensible module types
- Switch from GoCodeAlone/modular to CrisisTextLine/modular fork (v1.11.11)
- Integrate all modular modules: httpserver, httpclient, chimux, scheduler, eventbus, eventlogger, cache, database, auth, jsonschema, reverseproxy
- Interpreter pool with sandboxed execution
- Component registry with lifecycle management
- File watcher for hot-reload
- Source validation (stdlib-only imports)
- Loader with directory/file/string sources
- WorkflowGenerator interface with LLM + Copilot SDK backends
- Anthropic Claude direct API client with tool use
- GitHub Copilot SDK integration with session management
- Deploy service bridging AI generation to dynamic components
- Prompt engineering: system prompt, component prompts, dynamic format
- Drag-and-drop node palette with categorized modules
- Property panel for node configuration
- YAML import/export with round-trip fidelity
- Undo/redo with history management
- Validation (local + server)
- Zustand state management
- Unit tests: module 73%, ai/llm 85%, dynamic 74%
- Playwright E2E: app-load, node-operations, connections, import-export, toolbar
- Vitest component tests: 100 tests across 6 files
- MetricsCollector - Prometheus metrics with 6 pre-registered vectors
- HealthChecker - /health, /ready, /live endpoints
- RequestIDMiddleware - X-Request-ID propagation with UUID generation
- WorkflowDatabase wrapping database/sql with Query/Execute/Insert/Update/Delete
- DatabaseIntegrationConnector adapter for integration workflows
- SQL builder helpers (BuildInsertSQL, BuildUpdateSQL, BuildDeleteSQL)
- DataTransformer with named pipelines (extract, map, filter, convert)
- WebhookSender with exponential backoff retry and dead letter queue
- Validator with compile-test-retry cycle
- ValidateAndFix integrating AI regeneration on failure
- ContextEnrichedPrompt for module/service-aware generation
- ModuleAdapter wrapping DynamicComponent as modular.Module
- Configurable provides/requires for dependency injection
- Engine integration via "dynamic.component" module type
- 2 new categories: Database, Observability
- 6 new MODULE_TYPES (29 total)
- Updated tests for new types/categories
- Mock-based unit tests for all Copilot client methods
- Tool handler invocation tests with realistic payloads
- Session lifecycle tests (create, send, destroy)
- Error path coverage (CLI not found, session failure, empty response, malformed JSON)
- Integration verification with mock Copilot server
- Update moduleTypeMap in all e2e specs with 6 new module types
- Update category count assertions (8 -> 10)
- New category visibility tests (Database, Observability)
- Drag-and-drop tests for new module types
- Property panel tests for new module config fields
- Complex workflow builder: multi-category, 5+ node workflows
- Screenshot-driven visual regression for all categories
- Keyboard shortcuts and accessibility testing
- ROADMAP.md
PR #18 merged
- EventBusBridge adapter (MessageBroker -> EventBus)
- WorkflowEventEmitter with lifecycle events (workflow.started, workflow.completed, workflow.failed, step.started, step.completed, step.failed)
- EventBusTrigger for native EventBus subscriptions
- Configure with topics, event filtering, async mode
- Start/Stop with subscription lifecycle management
- Engine integration with workflow/step event emission
- canHandleTrigger support for "eventbus" trigger type
- TriggerWorkflow emits start/complete/fail events
- messaging.broker.eventbus module type in NodePalette (30 total)
PR #19 merged
- cmd/server/main.go with HTTP mux and AI handler registration
- CLI flags for config, address, AI provider configuration
- Graceful shutdown with signal handling
- initAIService with conditional Anthropic/Copilot provider registration
- cmd/server/main_test.go with route verification tests
- Root package (engine_test.go): 68.6% -> 80%+
- Module package: 77.1% -> 80%+
- Dynamic package: 75.4% -> 80%+
- AI packages: maintain 85%+
- Shared helpers (helpers.ts) with complete module type map
- deep-module-coverage.spec.ts: All 30 module types verified
- deep-complex-workflows.spec.ts: Multi-node workflow tests
- deep-property-editing.spec.ts: All field types tested
- deep-keyboard-shortcuts.spec.ts: Shortcut verification
- deep-ai-panel.spec.ts: AI Copilot panel tests
- deep-component-browser.spec.ts: Component Browser tests
- deep-import-export.spec.ts: Complex round-trip tests
- deep-edge-cases.spec.ts: Edge case coverage
- deep-accessibility.spec.ts: A11y testing
- deep-toast-notifications.spec.ts: Toast behavior tests
- deep-visual-regression.spec.ts: Visual regression baselines
- HTTP modules (10): http.server, http.router, http.handler, http.middleware.auth/cors/logging/ratelimit/requestid, http.proxy, http.simple_proxy
- Messaging modules (6): messaging.broker, messaging.broker.eventbus, messaging.handler, messaging.nats, messaging.kafka, notification.slack
- State machine modules (4): statemachine.engine, state.tracker, state.connector, processing.step
- Modular framework modules (10): httpserver, httpclient, chimux, scheduler, auth, eventbus, cache, database, eventlogger, jsonschema
- Storage/persistence modules (4): database.workflow, persistence.store, storage.s3, static.fileserver
- Observability modules (3): metrics.collector, health.checker, observability.otel
- Data/integration modules (4): data.transformer, api.handler, webhook.sender, dynamic.component
- Auth modules (2): auth.jwt, auth.modular
- Reverse proxy modules (2): reverseproxy, http.proxy
- Trigger types (5): http, schedule, event, eventbus, mock
- 10+ module YAML config with HTTP servers, routers, handlers, data transformers, state machines, brokers, and observability
- End-to-end pipeline demonstrating module composition
- Multi-service Docker Compose architecture (gateway, API, conversation, Kafka, Prometheus, Grafana)
- 18 dynamic components: ai_summarizer, pii_encryptor, survey_engine, risk_tagger, conversation_router, message_processor, keyword_matcher, escalation_handler, followup_scheduler, data_retention, notification_sender, webchat_handler, twilio_provider, aws_provider, partner_provider
- Full SPA with role-based views: admin, responder, supervisor dashboards
- Queue health monitoring with per-program metrics
- Conversation state machine (queued -> assigned -> active -> wrap_up -> closed)
- Real-time risk assessment with keyword pattern matching (5 categories: self-harm, suicidal-ideation, crisis-immediate, substance-abuse, domestic-violence)
- PII masking in UI (phone numbers, identifiers)
- Webchat widget for web-based texters
- Seed data system (users, affiliates, programs, keywords, surveys)
- Architecture docs, user guide, and screenshots
- JWTAuthModule with user registration, login, token generation/validation
- Seed file loading with bcrypt password hashing
- Role-based metadata in JWT claims and login response
- Auth middleware integration for endpoint protection
- AES-256-GCM FieldEncryptor with SHA-256 key derivation
- Configurable field-level encryption (encrypt specific fields, leave others plaintext)
- Integration with PersistenceStore (encrypt on save, decrypt on load)
- Integration with KafkaBroker (encrypt/decrypt Kafka message payloads)
- 15 sub-tests covering encrypt/decrypt, round-trip, key rotation, edge cases
- View handler pattern: sourceResourceName + stateFilter for cross-resource views
- Queue health endpoint with per-program aggregation
- Sub-action support for nested resources (e.g., /conversations/{id}/messages)
- Inline risk assessment on message append and conversation creation
- Dockerfile for chat-platform (builder/runtime stages, Alpine Linux, CGO_ENABLED=0)
- Dockerfile for ecommerce-app
- Docker Compose with health checks, volume mounts, and service dependencies
- Prometheus metrics collection with custom dashboard
- Grafana dashboards for chat platform monitoring
- Health check endpoints integrated with Docker orchestration
- FieldMapping type with fallback chains and primary/resolve/set operations
- Schema-agnostic field mapping for REST API handler modules (42+ references refactored)
- Runtime field resolution from workflow context via FieldMapping.Resolve()
- Configurable field aliases in YAML (fieldMapping, transitionMap, summaryFields)
- Engine integration: fieldMapping/transitionMap/summaryFields wired from YAML config
- 18 unit tests for FieldMapping type
- Component-level field contracts: FieldContract type, ContractRegistry, pre-execution validation
- 4 chat platform components updated with contracts (keyword_matcher, conversation_router, escalation_handler, ai_summarizer)
- JSON Schema generation from WorkflowConfig structs (schema/ package)
- Validation at load time with descriptive error messages (integrated into BuildFromConfig)
- Schema export endpoint (GET /api/schema)
- 41 tests covering schema generation, validation rules, and HTTP endpoint
- IntegrationWorkflowHandler: database connector path, nil/stale connector
- ExecuteIntegrationWorkflow: retry logic, variable substitution, error handlers
- ExecuteWorkflow: multi-step dispatch
- Service helper edge cases (FixMessagingHandlerServices, PatchAppServiceCalls)
- 29 new tests, integration.go/service_helper.go/app_helper.go at 100%
- Interpreter pool benchmarks (creation ~2.4ms, execute ~1.5us, pool contention negligible)
- Concurrent workflow stress tests (100+ concurrent, ~28K workflows/sec, zero goroutine leaks)
- UI rendering performance with 50+ nodes (Playwright E2E)
- Helm chart for Kubernetes (monolith/distributed modes, HPA, ServiceMonitor)
- Configuration via environment variables (WORKFLOW_CONFIG, WORKFLOW_ADDR, etc.)
- CI/CD pipelines (test matrix, Docker build, Helm lint, release workflow)
- Multi-stage Dockerfile
- Input validation middleware (size limits, content-type, JSON well-formedness)
- Dynamic component resource limits (execution timeout, output size)
- Rate limiting with IP/token/combined strategies and stale cleanup
- Audit logging with structured JSON (auth, admin, escalation, data access events)
- README.md rewrite with 48 module types, chat platform, full feature set
- CHANGELOG.md with Phase 2-6 entries
- API documentation for REST endpoints (docs/API.md)
- Responder-to-Responder direct messaging (DM threads with real-time polling)
- Supervisor-to-Responder real-time chat (shared DM system)
- Shared resource panel (15 canned responses, search/filter, copy/insert)
- Conversation transfer with live chat handoff (visual indicators, history)
- Plugin registry with manifest validation and HTTP CRUD API
- Component versioning with semver constraints and compatibility checking
- Plugin SDK with template generator and documentation generator
- Community submission validator with 8 checks and review checklist
- Response suggestion engine with LLM + template fallback and caching
- Conversation classifier with 4 categories, priority scoring, 14 rules
- Sentiment analysis with lexicon fallback, trend detection, sharp-drop alerts
- Supervisor alert engine with hybrid rule-based + AI detection, 4 alert types
- Worker pool with auto-scaling and consistent hash partitioning
- Per-tenant quota enforcement with token bucket rate limiting
- Multi-region routing with data residency compliance
- Generic connection pool and LRU cache with TTL
- OpenTelemetry distributed tracing (HTTP spans, workflow spans, context propagation)
- 3 Grafana dashboards (workflow overview, chat platform, dynamic components)
- 7 Prometheus alerting rules with runbooks
- SLA monitoring with uptime/latency/error budget tracking
- Integration test suite (12 E2E tests: config loading, lifecycle, workflow execution, module wiring)
- Chaos testing (6 tests: random component failures, concurrent chaos, recovery validation)
- Load testing (6 tests: ~27K workflows/sec, concurrent dispatch, cache/pool performance)
- Regression testing (10 tests: validates all 34 example YAML configs load correctly)
- CLI tool
wfctlwith validate, inspect, run, plugin, schema subcommands - Interactive workflow debugger with breakpoints, step/continue, variable inspection, HTTP API
- Plugin development hot-reload watcher (file system monitoring, auto-reload on change)
- Webhook retry with exponential backoff, max retries, dead letter store with HTTP endpoints
- Cron scheduler with job CRUD, expression parsing, concurrent execution control
- Workflow versioning with version store, rollback, diff comparison, HTTP API
- Environment promotion pipeline (dev -> staging -> prod) with approval gates
- OAuth2/OIDC provider with token validation, auth code flow, JWKS endpoint
- RBAC middleware with permission model (action + resource), role definitions, enforcement
- Compliance reporting for SOC2 and HIPAA (23 controls, evidence collection, PDF-ready output)
- Secret management with provider interface (env, file, Vault stub), secret:// URI resolver
- OpenAPI 3.0 specification (2245 lines, 65+ endpoints, full schema definitions)
- Tutorial series: getting started, building plugins, scaling workflows, chat platform walkthrough
- 5 Architecture Decision Records (YAML config, modular framework, Yaegi, hybrid AI, field contracts)
- CONTRIBUTING.md with development setup, PR process, coding standards
- CODE_OF_CONDUCT.md (Contributor Covenant v2.1)
- JWT claims enrichment with affiliateId/programIds from user metadata
- handleGetAll() filtering by affiliate/program query params with JWT defaults
- Conversation router with real routing logic (keyword → program → affiliate mapping)
- Queue health scoping by affiliate (non-admin users see only their affiliate's data)
- Initialize messages array on conversation creation (fix empty chat views)
- Ensure messages sub-action handler creates slice before appending
- Responder view: pass affiliate/program params in API calls
- Supervisor view: filter users and conversations by affiliate
- Queue view: scope queue health by affiliate
- Chat view: filter transfer responder list by affiliate
- Display program/affiliate context badges in conversation cards
- Add EU-West users (responder + supervisor for aff-003/prog-004)
- Add PARTNER keyword for prog-004
- Playwright multi-agent QA: texters send keywords, verify routing to correct programs
- Cross-affiliate isolation: responders see only their affiliate's conversations
- Supervisor scoping: supervisors see only their affiliate's responders
- Multi-message flow verification with screenshots
- Queue health per-affiliate validation
- Fix instance ID mismatch (double "conv-" prefix between webhooks-api and conversations-api)
- Fix field name normalization (Twilio "Body" to lowercase "body" for contract validation)
- Fix auto-transition state sync (assigned to active not reflected in resource data)
- Fix bridgeToConversation initial state (was hardcoding "queued", now uses "new")
- Login flow: verify all 8 seed users can log in with correct roles
- Conversation routing: send messages with HELLO/TEEN/WELLNESS/PARTNER keywords, verify routing
- Cross-affiliate isolation: login as aff-001 responder, verify only aff-001 conversations visible
- Supervisor view: verify supervisors see only their affiliate's responders and conversations
- Message flow: send messages both directions, verify real-time updates
- Multi-chat: open multiple conversations simultaneously, verify messages route correctly
- Queue health: verify per-affiliate program stats display correctly
- Transfer flow: transfer conversation between responders, verify handoff
- Escalation flow: test medical/police escalation state transitions
- Screenshot documentation: 21 QA screenshots captured
- Accept Conversation banner for queued conversations in chat view
- Tags sidebar auto-refresh after applying tags
- Error handling improvements for edge cases discovered during QA
- Performance profiling of conversation routing under load (~20ms creation, ~6ms queries)
- Documentation updates based on QA findings
| Category | Count | Types |
|---|---|---|
| HTTP | 10 | http.server, http.router, http.handler, http.middleware.{auth,cors,logging,ratelimit,requestid}, http.proxy, http.simple_proxy |
| Messaging | 6 | messaging.broker, messaging.broker.eventbus, messaging.handler, messaging.nats, messaging.kafka, notification.slack |
| State Machine | 4 | statemachine.engine, state.tracker, state.connector, processing.step |
| Modular Framework | 10 | httpserver, httpclient, chimux, scheduler, auth, eventbus, cache, database, eventlogger, jsonschema |
| Storage/Persistence | 4 | database.workflow, persistence.store, storage.s3, static.fileserver |
| Observability | 3 | metrics.collector, health.checker, observability.otel |
| Data/Integration | 4 | data.transformer, api.handler, webhook.sender, dynamic.component |
| Auth | 2 | auth.jwt, auth.modular |
| Reverse Proxy | 2 | reverseproxy, http.proxy |
| Total | 48 |
| Type | Description |
|---|---|
| http | HTTP request triggers |
| schedule | Cron-based scheduled triggers |
| event | Generic event triggers |
| eventbus | Native EventBus subscription triggers |
| mock | Test/mock triggers |
The example/ directory contains 37+ YAML configurations demonstrating different workflow patterns, plus two full application examples:
| Example | Description |
|---|---|
order-processing-pipeline.yaml |
E-commerce pipeline with 10+ modules across 5 categories |
chat-platform/ |
Production-grade mental health chat platform with 73 files, multi-service Docker Compose, 18 dynamic components, full SPA |