Task Metadata Generator
Create and validate task metadata for parallel-safe execution in Ralph.
The Job
- •Generate or validate
tasks.yamlv1 metadata - •Ensure unique task IDs
- •Validate dependencies exist
- •Check mutex against catalog
- •Output clear errors for invalid metadata
Do NOT: schedule tasks, merge branches, or review design.
tasks.yaml v1 Format
yaml
version: 1
tasks:
- id: US-001
title: "Short descriptive title"
completed: false
dependsOn: [] # Array of task IDs that must complete first
mutex: [] # Array of mutex names from catalog
touches: [] # Optional: paths/globs this task modifies
contracts: # Optional: interface contracts
produces: []
consumes: []
mergeNotes: "" # Optional: hints for conflict resolution
verify: [] # Optional: verification commands
Required Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier (e.g., US-001, TASK-1) |
title | string | Human-readable task name |
completed | boolean | Task completion status |
dependsOn | array | Task IDs that must complete before this one |
mutex | array | Mutex names from the catalog |
Mutex Catalog
Valid mutex names (check mutex-catalog.json):
- •
db-migrations- Database schema changes - •
lockfile- Package lock files (package-lock.json, yarn.lock, etc.) - •
router- Route configuration files - •
global-config- Global configuration files - •
contract:*- Interface contracts (e.g.,contract:auth-api)
Validation Checklist
When validating tasks.yaml:
- •
version: 1is present - • Every task has
id,title,completed,dependsOn,mutex - • All
idvalues are unique - • All
dependsOnreferences exist as task IDs - • No circular dependencies
- • All
mutexvalues exist in catalog
Output Format
Valid Metadata
code
✓ tasks.yaml v1 valid - 5 tasks - 3 unique mutex - 2 dependency chains
Invalid Metadata
code
✗ tasks.yaml validation failed: - Line 12: Duplicate id "US-001" - Line 25: dependsOn "US-999" not found - Line 30: Unknown mutex "invalid-mutex" - Cycle detected: US-002 → US-003 → US-002
Example
Input request: "Create metadata for a user auth feature"
Output:
yaml
version: 1
tasks:
- id: AUTH-001
title: Add users table migration
completed: false
dependsOn: []
mutex: ["db-migrations"]
touches: ["db/migrations/**"]
- id: AUTH-002
title: Create auth middleware
completed: false
dependsOn: ["AUTH-001"]
mutex: ["contract:auth-api"]
touches: ["src/auth/**"]
contracts:
produces: ["contract:auth-api"]
consumes: []