Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
11 KiB
11 KiB
Specs And ADRs
The repository carries two useful design-history systems:
- ADRs in doc/adr, which document durable architecture decisions.
- Spec Kit feature specs in specs, which document planned and recently implemented feature work.
Use both before making architectural changes. Specs often explain the "why now"; ADRs explain decisions intended to outlive a single feature.
ADR Index
The table of contents is doc/adr/toc.md.
Current ADRs:
| ADR | Topic |
|---|---|
| 0001 | Record architecture decisions. |
| 0002 | Fault propagation from child to parent activities. |
| 0003 | Direct bookmark management in WorkflowExecutionContext. |
| 0004 | Activity execution snapshots. |
| 0005 | Token-centric flowchart execution. |
| 0006 | Tenant deleted event. |
| 0007 | Explicit merge modes for flowchart joins. |
| 0008 | Empty string as default tenant ID. |
| 0009 | Asterisk sentinel value for tenant-agnostic entities. |
| 0010 | Default admin user bootstrap for initial identity access. |
| 0011 | Output conversion occurs synchronously at the binding boundary. |
| 0012 | Output converters use explicit stable identities. |
| 0013 | Output converter discovery is server-owned. |
Active And Recent Specs
| Spec | Area | Why it matters |
|---|---|---|
| 001 shell reload API | Shell management | Explains reload behavior for modular/shell hosts. |
| 002 graceful shutdown | Runtime | Defines quiescence, ingress sources, drain orchestration, interrupted recovery, and runtime admin endpoints. |
| 003 live server logs | Diagnostics precursor | Earlier live server logs work that led to structured diagnostics. |
| 004 diagnostics structured logs | Diagnostics | Refactors server logs into structured log diagnostics with semantic ILogger capture. |
| 005 structured log persistence | Diagnostics persistence | Adds storage abstraction, relational persistence, SQLite durability, migrations, write queue, and retention. |
| 006 diagnostics console logs | Diagnostics | Defines capture, buffering, endpoints, SignalR hub, permissions, source identity, and redaction for raw console output. |
| 006 state machine activity | Workflow core | Adds a state machine activity with named states and trigger-driven transitions to the workflow engine. |
| 007 secrets module | Secrets | Revamps the secrets module with named secrets, pluggable stores, extensible secret types, secret picker UX, permissions, import/export encryption support, and migration from existing sensitive fields. |
| 008 diagnostics OpenTelemetry | Diagnostics | Defines the first-party OTLP ingestion backend, trace/metric/log storage and query APIs, live SignalR streaming, and Studio-facing telemetry investigation. |
| 008 Weaver AI copilot | AI | Implements Weaver, an agentic workflow assistant with streaming chat, context resolution, reviewable proposals, audit, and Studio integration. |
| 009 operational dashboard | Dashboard API | PRD for a read-only backend dashboard API module exposing workflow activity aggregates, health signals, and operational summaries without requiring Studio to orchestrate many separate requests. |
| 010 workflow JSON hardening | Workflow core | Introduces dedicated type aliases for workflow JSON, rejects unknown/unsafe CLR names, and preserves backward-compatible reads for selected legacy identifiers. |
| 011 persistence vNext | Persistence | Provider-neutral module-owned storage manifests, portable document/index store, relational and MongoDB physicalization, and schema versioning without per-provider migration packages. |
| 012 output converters | Workflow core | Extensible, explicitly-identified output converters that transform an activity's native output at the binding boundary before writing the destination variable or workflow output. |
| 012 external authentication | Security | Server-brokered external identity providers: Identity Provider Connections, OpenID Connect adapter, linked identity resolution, configurable unlinked-identity policies, and EF Core persistence across all providers. |
| 012 weaver grounding tools | AI | Grounds Weaver in real Elsa server data: activity registry discovery, workflow definition inspection, instance and incident investigation, and proposal-based workflow authoring with validation. |
Each spec folder usually contains:
spec.md: product/user-facing requirementsplan.md: architecture and implementation planresearch.md: decisions and tradeoffsdata-model.md: domain modelcontracts: API/provider contractsquickstart.md: usage validationtasks.md: implementation backlogchecklists/requirements.md: requirement quality checks
Reading Order For Runtime Work
For runtime behavior, read in this order:
- Workflow Runtime wiki page
- specs/002-graceful-shutdown/plan.md
- ADR 0003
- ADR 0004
- affected runtime service and tests
Reading Order For Flowchart Work
- Workflow Core wiki page
- ADR 0005
- ADR 0007
- Flowchart activities
- flowchart unit/integration tests
Reading Order For Tenancy Work
- Identity, Tenancy, And Security
- ADR 0008
- ADR 0009
- tenant feature and persistence code
- tenant unit tests
Reading Order For Diagnostics Work
- Diagnostics Structured Logs
- specs/004-diagnostics-structured-logs/plan.md
- specs/005-structured-log-persistence/plan.md
- structured logs core package
- relational and SQLite persistence packages
- structured logs unit/integration tests
Reading Order For Secrets Work
- Identity, Tenancy, And Security — Secrets section
- specs/007-secrets-module/spec.md
- specs/007-secrets-module/plan.md
Elsa.Secretsfeature and contracts- secrets unit tests
Reading Order For Output Converters Work
- Output Converters wiki page
- ADR 0011
- ADR 0012
- ADR 0013
- specs/012-output-converters/plan.md
- output converter contracts and implementation in
Elsa.Workflows.Core
Reading Order For AI Copilot Work
- specs/008-weaver-ai-copilot/spec.md
- specs/008-weaver-ai-copilot/plan.md
Elsa.AI.AbstractionscontractsElsa.AI.Hostfeature and endpointsElsa.AI.Copilotadapter and options- AI unit and integration tests
Reading Order For External Authentication Work
- specs/012-external-authentication/spec.md
- specs/012-external-authentication/plan.md
- Identity, Tenancy, And Security
Elsa.ExternalAuthenticationfeature and contractsElsa.ExternalAuthentication.OpenIdConnectadapterElsa.ExternalAuthentication.Persistence.EFCoreand provider packages
Reading Order For BPMN Work
- bpmn-workflows.md
Elsa.Bpmn/Activities/BpmnProcess.cs— the scope activityElsa.Bpmn/Hosting/BpmnWorkLedger.csandBpmnWorkBinder.cs— work tracking and bindingElsa.Bpmn.Interchange/Binding/BpmnActivityBindingFormat.cs—elsa:vendor extensionElsa.Bpmn.Interchange/Features/BpmnInterchangeFeature.cs— feature registrationtest/integration/Elsa.Bpmn.IntegrationTestsandElsa.Bpmn.Interchange.IntegrationTests
Reading Order For Persistence vNext Work
- Persistence wiki page — Persistence vNext section
- specs/011-persistence-vnext/spec.md
- specs/011-persistence-vnext/roadmap.md
Elsa.Persistence.VNextcore abstractionsElsa.Persistence.VNext.Relational,Sqlite,PostgreSql,SqlServer,MongoDbproviders
When To Write An ADR
Write or update an ADR when a decision:
- changes workflow execution semantics
- changes persisted data conventions
- changes tenant/security behavior
- introduces a durable architectural boundary
- rejects an obvious alternative that future contributors may ask about
- affects multiple modules or provider packages
Feature-specific decisions can stay in specs/*/research.md unless they are expected to outlive the feature or guide unrelated future work.