Workflow-Driven Agentic Software Factory
The Dark Factory Engine converts human-readable workflow definitions (Markdown) into executable OpenClaw skills that can be deployed as Coolify apps.
Core Concept: workflow.md β skill/ β Coolify deployment β Automated execution
βββββββββββββββββββ
β Workflow.md β (Human-readable process definition)
β (Templates) β
ββββββββββ¬βββββββββ
β Compile
β
βββββββββββββββββββ
β OpenClaw Skill β (Executable code + metadata)
β (Generated) β
ββββββββββ¬βββββββββ
β Deploy
β
βββββββββββββββββββ
β Coolify App β (Running automation)
β (Auto-scaled) β
βββββββββββββββββββ
# 1. Compile a workflow template
./bin/compile workflow-templates/deploy-service.md
# 2. Dry-run β see what would happen
./bin/deploy output/deploy-service-skill/ --dry-run
# 3. Deploy to Coolify (git push + app create + deploy)
./bin/deploy output/deploy-service-skill/
# 4. Monitor deployed skills
./bin/monitor # list all df-* apps
./bin/monitor deploy-service # specific skill status
./bin/monitor deploy-service --logs # tail logs
./bin/monitor --registry # local deployment registryWorkflows are written in Markdown with structured sections:
# Workflow: Deploy Service
## Description
Deploys a service to Coolify with health checks and rollback capability.
## Inputs
- `service_name`: Name of the service to deploy
- `git_repo`: Repository URL
- `branch`: Git branch (default: main)
## Steps
1. **Clone Repository**
- Checkout specified branch
- Validate dockerfile exists
2. **Create Coolify App**
- Generate app configuration
- Set environment variables
- Configure health checks
3. **Deploy & Verify**
- Trigger deployment
- Wait for healthy status
- Run smoke tests
## Outputs
- `deployment_url`: Live service URL
- `health_status`: Service health check result
- `rollback_command`: Command to rollback if needed
## Guardrails
- Max deployment time: 10 minutes
- Auto-rollback on failure
- Requires manual approval for productiondark-factory-engine/
βββ README.md # This file
βββ bin/ # Executable scripts
β βββ compile # Workflow β Skill compiler
β βββ deploy # Skill β Coolify deployer
β βββ monitor # Execution monitor
βββ workflow-templates/ # Sample workflows
β βββ deploy-service.md
β βββ run-tests.md
β βββ backup-data.md
β βββ security-scan.md
βββ compiler/ # Compiler implementation
β βββ parser.py # Markdown parser
β βββ generator.py # Skill generator
β βββ templates/ # Code templates
βββ examples/ # Example generated skills
βββ docs/ # Documentation
- Workflow template parsing
- Basic skill generation
- Coolify integration (
bin/deployβ git push + app create + deploy) - Deployment monitor (
bin/monitorβ live status + logs) - Execution engine (skill triggering via HTTP or cron)
- Meta-agent monitoring
- Multi-workflow orchestration
- Visual workflow builder
- Compliance evidence generation
-
Install Dependencies
pip install -r requirements.txt
-
Test Compilation
python compiler/compile.py workflow-templates/deploy-service.md
-
Deploy First Workflow
# TBD - Coolify integration
This engine integrates with our existing infrastructure:
- OpenClaw: Generated skills run as OpenClaw agents
- Coolify: Auto-deployment and scaling
- Memory System: Execution logs β Qdrant vector memory
- Agent Spawning: Multi-workflow parallel execution
Part of the MachineMachine Dark Software Factory initiative