This project uses bd (beads) for issue tracking. Run bd onboard to get started.
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work atomically
bd close <id> # Complete work
bd sync # Sync with gitProcessDsl is a multi-language Business Process Management (BPM) platform that lets developers define workflows in a text-based DSL (.bpm files) paired with OpenAPI specs (.yaml), then automatically generates:
- BPMN XML deployable to Camunda Zeebe
- C# microservices from OpenAPI specifications
- TypeScript job workers for entity validation
- Automatic diagram layouts with professional positioning
.bpm file + .yaml spec
│
▼
Lark Parser (Python)
│
▼
AST Nodes
│
┌───┴───┐
▼ ▼
Validator BPMN Generator → Layout Engine → .bpmn XML
│
▼
Camunda Zeebe
│
┌───────────────┼──────────────┐
▼ ▼ ▼
C# Orchestration TypeScript Generated
Library Job Workers Microservices
ProcessDsl/
├── src/
│ ├── bpm_dsl/ # Core Python DSL engine
│ │ ├── grammar.lark # EBNF grammar definition
│ │ ├── parser.py # Lark parser + AST transformer
│ │ ├── ast_nodes.py # Dataclass AST node definitions
│ │ ├── bpmn_generator.py # BPMN XML generation (Zeebe namespaces)
│ │ ├── layout_engine.py # Graph-based automatic layout
│ │ ├── validator.py # Multi-level process validation
│ │ └── cli.py # Click CLI (convert, validate, info)
│ │
│ ├── ProcessDsl.Orchestration/ # C# NuGet library (v1.1.0, .NET 8.0)
│ │ ├── CamundaClient.cs # Zeebe gRPC client wrapper
│ │ ├── ProcessOrchestrator.cs # High-level orchestration service
│ │ ├── ICamundaClient.cs # Client interface
│ │ ├── IProcessOrchestrator.cs # Orchestrator interface
│ │ ├── ServiceCollectionExtensions.cs # DI registration
│ │ └── Models/ # Configuration, request, response types
│ │
│ ├── ProcessDsl.EntityValidation/ # C# Zeebe job worker (entity validation)
│ │ ├── EntitySchemaValidator.cs # NJsonSchema-based entity validation
│ │ ├── ProcessEntityValidatorWorker.cs # Zeebe worker hosted service
│ │ └── Models/ # Configuration, validation result types
│ │
│ └── microservices/ # Auto-generated C# APIs (gitignored)
│
├── tests/
│ ├── test_parser.py # Python parser tests
│ ├── test_bpmn_generator.py # BPMN generation tests
│ └── ProcessDsl.Orchestration.Tests/ # C# xUnit tests (27 tests)
│
├── examples/ # Sample .bpm processes and .yaml specs
│ └── demos/ # Python demo scripts
│ ├── demo.py
│ ├── demo_advanced_layout.py
│ ├── demo_default_flows.py
│ └── demo_service_task.py
│
├── templates/ # OpenAPI Generator custom templates
│ ├── aspnetcore-default/
│ └── aspnetcore-processdsl/
│
├── scripts/ # Deployment and generation scripts
│ ├── generate_microservice.sh
│ ├── deploy_to_camunda.sh
│ ├── test_microservice.sh
│ └── extract_process_metadata.py
│
└── docs/
├── DSL_GRAMMAR.md # Grammar specification
├── DSL_V2_DESIGN.md # DSL v2 design proposal
├── LAYOUT_ALGORITHM.md # Layout engine details
├── PROCESS_ENTITY_VALIDATION.md # Validation pattern
├── OPENAPI_VALIDATION.md # OpenAPI pairing rules
├── MICROSERVICES_WORKFLOW.md # Microservice generation
├── END_TO_END_TESTING.md # E2E testing guide
├── QUICKSTART.md # Quick start guide
└── roadmap.md # Project roadmap
| Component | Language | Key Dependencies |
|---|---|---|
| DSL Engine | Python 3.8+ | lark 1.1.7, lxml 4.9.3, PyYAML 6.0.1, click 8.1.7 |
| Orchestration Library | C# / .NET 8.0 | zb-client 2.9.0, Newtonsoft.Json 13.0.3, Microsoft.Extensions.* |
| Job Workers | TypeScript 5.0 | zeebe-node 8.3.0, ajv 8.12.0, js-yaml 4.1.0 |
# Install dependencies
pip install -r requirements.txt
pip install -e . # Dev mode install
# Run tests
python -m pytest tests/ -v
python -m pytest tests/ --cov=src/bpm_dsl --cov-report=html
# Linting & formatting
black src/ tests/
flake8 src/ tests/
mypy src/
# CLI usage
python -m bpm_dsl.cli convert examples/process_entity_demo.bpm --output result.bpmn
python -m bpm_dsl.cli validate examples/process_entity_demo.bpm
python -m bpm_dsl.cli info examples/process_entity_demo.bpm# Build
dotnet build src/ProcessDsl.Orchestration/
# Test (27 unit tests)
dotnet test tests/ProcessDsl.Orchestration.Tests/
dotnet test tests/ProcessDsl.Orchestration.Tests/ /p:CollectCoverage=truecd src/ProcessDsl.EntityValidation
dotnet run # Run locally
dotnet publish -c Release # Build for deployment# Generate a C# microservice from OpenAPI spec
./scripts/generate_microservice.sh examples/process_entity_demo.yaml ProcessEntityDemoprocess "My Process" {
id: "my-process"
version: "1.0"
start "Begin" {}
processEntity "Load Data" { # Auto-generates validation flow
entityName: "Customer"
}
scriptCall "Calculate" {
script: "result = compute(input)"
inputVars: ["input"]
outputVars: ["result"]
}
serviceTask "Call API" {
taskType: "api-call"
retries: 3
headers: { "url": "https://api.example.com" }
}
gateway "Check Result" {
type: xor
}
end "Done" {}
flow {
"begin" -> "load-data"
"load-data" -> "calculate"
"calculate" -> "call-api"
"call-api" -> "check-result"
"check-result" -> "done" [when: "result > 0"]
"check-result" -> "begin" [otherwise]
}
}
Key rules:
- Every
.bpmfile must have a matching.yaml(OpenAPI) file with the same basename - Element IDs are auto-generated from names in kebab-case
processEntityelements automatically generate validation service tasks and error-handling XOR gateways in BPMN output
- Pipeline: DSL text → Lark parse → AST transform → validate → generate BPMN → layout
- Visitor/Transformer: Lark transformer walks parse tree into AST dataclasses
- Builder: BPMNGenerator constructs XML element by element
- DI: C# orchestration uses Microsoft.Extensions.DependencyInjection
- Job Worker: TypeScript workers subscribe to Zeebe task types
- Python: formatted with
black, linted withflake8, type-checked withmypy - C#: nullable enabled, implicit usings, .NET 8.0
- IDs: kebab-case auto-generated from display names (e.g., "Load Customer" →
load-customer) - Tests: pytest for Python, xUnit for C#
- Commit messages: prefixed with
feat:,fix:,refactor:,docs:,chore:
ALWAYS use non-interactive flags with file operations to avoid hanging on confirmation prompts.
Shell commands like cp, mv, and rm may be aliased to include -i (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input.
Use these forms instead:
# Force overwrite without prompting
cp -f source dest # NOT: cp source dest
mv -f source dest # NOT: mv source dest
rm -f file # NOT: rm file
# For recursive operations
rm -rf directory # NOT: rm -r directory
cp -rf source dest # NOT: cp -r source destOther commands that may prompt:
scp- use-o BatchMode=yesfor non-interactivessh- use-o BatchMode=yesto fail instead of promptingapt-get- use-yflagbrew- useHOMEBREW_NO_AUTO_UPDATE=1env var
IMPORTANT: This project uses bd (beads) for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods.
- Dependency-aware: Track blockers and relationships between issues
- Version-controlled: Built on Dolt with cell-level merge
- Agent-optimized: JSON output, ready work detection, discovered-from links
- Prevents duplicate tracking systems and confusion
Check for ready work:
bd ready --jsonCreate new issues:
bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json
bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --jsonClaim and update:
bd update <id> --claim --json
bd update bd-42 --priority 1 --jsonComplete work:
bd close bd-42 --reason "Completed" --jsonbug- Something brokenfeature- New functionalitytask- Work item (tests, docs, refactoring)epic- Large feature with subtaskschore- Maintenance (dependencies, tooling)
0- Critical (security, data loss, broken builds)1- High (major features, important bugs)2- Medium (default, nice-to-have)3- Low (polish, optimization)4- Backlog (future ideas)
- Check ready work:
bd readyshows unblocked issues - Claim your task atomically:
bd update <id> --claim - Work on it: Implement, test, document
- Discover new work? Create linked issue:
bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:<parent-id>
- Complete:
bd close <id> --reason "Done"
bd automatically syncs with git:
- Exports to
.beads/issues.jsonlafter changes (5s debounce) - Imports from JSONL when newer (e.g., after
git pull) - No manual export/import needed!
- ✅ Use bd for ALL task tracking
- ✅ Always use
--jsonflag for programmatic use - ✅ Link discovered work with
discovered-fromdependencies - ✅ Check
bd readybefore asking "what should I work on?" - ❌ Do NOT create markdown TODO lists
- ❌ Do NOT use external issue trackers
- ❌ Do NOT duplicate tracking systems
For more details, see README.md and docs/QUICKSTART.md.
When ending a work session, you MUST complete ALL steps below. Work is NOT complete until git push succeeds.
MANDATORY WORKFLOW:
- File issues for remaining work - Create issues for anything that needs follow-up
- Run quality gates (if code changed) - Tests, linters, builds
- Update issue status - Close finished work, update in-progress items
- PUSH TO REMOTE - This is MANDATORY:
git pull --rebase bd sync git push git status # MUST show "up to date with origin" - Clean up - Clear stashes, prune remote branches
- Verify - All changes committed AND pushed
- Hand off - Provide context for next session
CRITICAL RULES:
- Work is NOT complete until
git pushsucceeds - NEVER stop before pushing - that leaves work stranded locally
- NEVER say "ready to push when you are" - YOU must push
- If push fails, resolve and retry until it succeeds