Tasks are created by the coordinator agent using MCP tools. You don’t call these tools directly—instead, you describe work in natural language, and the coordinator plans and creates the appropriate tasks or executions.
1
User describes work
You type a request in the TUI chat:
Fix the bug where users can't upload files larger than 1MB
2
Coordinator explores
The coordinator reads relevant code to understand context:
Upload handling code
Configuration files (size limits)
Error logs or issue descriptions
3
Coordinator creates execution
The coordinator calls enki_execution_create with steps:
{ "steps": [ { "id": "fix_upload_limit", "title": "Increase upload size limit", "description": "Update nginx.conf client_max_body_size and app config MAX_FILE_SIZE to 10MB. Update error messages to reflect new limit.", "tier": "light", "needs": [] }, { "id": "test_upload", "title": "Test large file upload", "description": "Write integration test for 5MB file upload. Verify success and check error handling for 11MB file.", "tier": "standard", "needs": ["fix_upload_limit"] } ]}
4
Workers execute automatically
The orchestrator spawns workers for ready tasks. No manual trigger needed.
Dependencies between tasks (“B needs A to finish first”)
Parallel work opportunities (both B and C can run after A)
Checkpoints for review/approval between phases
Always prefer executions over standalone tasks for multi-part work. Executions track relationships, enable parallelism, and provide better observability.
Title: Implement user profile endpointDescription: Add GET /api/users/:id endpoint in src/routes/users.ts. Return JSON with {id, name, email, created_at}. Use existing User model from src/models/user.ts. Add authentication middleware. Return 404 if user not found, 403 if requesting user doesn't match ID (unless admin).Tier: standard
Title: Add database indexes for query performanceDescription: Based on slow query log analysis, add indexes to users(email), posts(user_id, created_at), and comments(post_id). Run EXPLAIN on the three slow queries from the performance report to verify index usage. Migration file in db/migrations/.Tier: light
Title: Debug intermittent test flake in auth test suiteDescription: The "concurrent login requests" test fails ~30% of the time with "database locked" error. Reproduce locally by running test 10x. Investigate transaction handling and connection pooling. Fix the race condition.Tier: heavy
Modify the authentication logic in src/auth/middleware.ts to support API keys in addition to JWT tokens.
This reduces exploration time and ensures workers focus on the right code.
Specify acceptance criteria
Define what “done” looks like:
Add validation to the registration form. Email must be valid format, password must be 8+ chars with 1 number. Display inline error messages. All existing tests must pass.
Reference upstream context
Workers can’t see each other’s branches—only completed outputs. Reference what they need:
Using the database schema from the "scaffold" step, implement the UserRepository class with methods for create, findById, findByEmail, and update.
Keep tasks focused
Each task should change no more than a few files. If you’re describing changes to 5+ files, split into multiple steps:
✓ Step 1: Update User model with profile fields✓ Step 2: Add profile endpoints (depends: 1)✓ Step 3: Update UI to display profile (depends: 2)
Modifies files in its isolated copy (.enki/copies/<task-id>/)
Enki commits changes to a branch (task/<task-id>)
The branch is fetched and merged via the refinery
Downstream steps see merged changes on main
Workers include a summary in [OUTPUT]...[/OUTPUT] tags:
[OUTPUT]Added JWT authentication middleware to src/auth/jwt.ts. Updated routes in src/routes/auth.ts to use the middleware. All auth tests passing.[/OUTPUT]
This summary is captured and passed to dependent steps as context.