Task Assignment Skill
This skill guides you through creating and assigning tasks to the painting-goblin task processing system. The system uses a file-based workflow with Publisher and Subscriber components to process tasks automatically.
Quick Start
To add a task to the painting-goblin system, simply place a task file in the todo directory:
$PAINTING_GOBLIN_DIR\tasks\todo\
Understanding the System Architecture
The painting-goblin system consists of:
- Publisher: Monitors the
tododirectory and moves tasks todoingdirectory - Subscriber: Executes tasks from
doingdirectory and moves them todoneorfailedbased on results - Directory Structure:
todo/: Tasks waiting to be processeddoing/: Tasks currently being executeddone/: Successfully completed tasksfailed/: Tasks that failed during execution.log/: Task execution logs
How to Create a Task
Step 1: Prepare the Task File
Task files can be in .md format. The system automatically adds timestamps to track processing.
Task file content should include:
- Clear description of what needs to be done
- Any required parameters or inputs
- Expected outputs or results
- Dependencies or prerequisites
Step 2: Place the Task File
Copy or move your task file to the todo directory:
# Example: Create a simple task
echo "Generate weekly sales report" > "$AGENT_CWD\tasks\todo\print-42.md"
Step 3: System Processing
Once a file is placed in the todo directory, the system automatically:
- Publisher detects the new task
- Moves task to
doingdirectory (adds "B" timestamp prefix) - Subscriber executes the task using OpenCode
- Moves completed task to
donedirectory (adds "E" timestamp prefix) - If execution fails, moves task to
faileddirectory
Monitoring Task Status
Check Task Progress
# View pending tasks
dir "$AGENT_CWD\tasks\todo\"
# View tasks in progress
dir "$AGENT_CWD\tasks\doing\"
# View completed tasks
dir "$AGENT_CWD\tasks\done\"
# View failed tasks
dir "$AGENT_CWD\tasks\failed\"
Understanding Timestamps
The system adds timestamps to track task lifecycle:
- B prefix: Beginning timestamp (when task starts processing)
- E prefix: Ending timestamp (when task completes)
Example: weekly_report.B20241215143045.md means the task started processing at 2024-12-15 14:30:45
Best Practices
1. Task Naming
- Use descriptive names:
generate_monthly_report.mdnottask1.md - Include context:
customer_data_analysis_Q4.md - Avoid special characters that might cause file system issues
2. Task Content
- Be specific about requirements
- Include expected outputs
- Specify any dependencies or prerequisites
- Add deadlines if time-sensitive
3. File Management
- Keep tasks focused on single objectives
- Split complex tasks into multiple smaller tasks
- Remove completed tasks from monitoring directories periodically
Troubleshooting
Common Issues and Solutions
Issue: Task not being processed
- Check if publisher is running:
python executor.py config.ini - Verify task file is in correct directory:
$AGENT_CWD\tasks\todo\ - Check file permissions: Ensure system can read/write files
Issue: Task stuck in doing directory
- Check subscriber status in logs
- Verify OpenCode executable path in config.ini
- Look for errors in task execution logs
Issue: Task moved to failed directory
- Check
$AGENT_CWD\tasks\.log\for execution logs - Review task content for errors or missing information
- Verify all dependencies are available
System Logs
Logs are stored in:
- Executor logs:
$AGENT_CWD\log\executor.log - Task execution logs:
$AGENT_CWD\tasks\.log\
Check logs for detailed error information:
# View recent executor activity
tail -f "$AGENT_CWD\log\executor.log"
# View specific task execution log
type "$AGENT_CWD\tasks\.log\task_name.md.log"
Getting Help
If you encounter issues:
- Check system logs:
$AGENT_CWD\log\executor.log - Verify configuration:
config.ini - Ensure OpenCode is installed and accessible
- Check file system permissions
For persistent issues, review the executor.py source code or consult system documentation.
Remember: The painting-goblin system processes tasks in order of modification time (oldest first) and supports parallel processing based on subscriber count configuration.