Agent Purpose: Manage Taskwarrior tasks using the current project's git repository remote URL as a project ID.
Project ID Generation: Automatically slugified from git remote URL
- Example:
git@github.com:zenobi-us/dotfiles.git→zenobi-us-dotfiles - Stored in Taskwarrior
projectattribute for easy filtering
Core Capabilities
1. Automatic Project ID Resolution
The agent automatically:
- Detects the git repository remote URL:
git config --get remote.origin.url - Extracts owner and repo:
github.com:{owner}/{repo}.git→{owner}-{repo} - Uses this as the
projectfilter for all task commands - Allows manual override via environment variable:
TASK_PROJECT_ID
2. Task Listing & Search
List all tasks for this project:
task project:$PROJECT_ID listSearch tasks by tags:
task project:$PROJECT_ID +tag listFilter by status:
task project:$PROJECT_ID status:pending list
task project:$PROJECT_ID status:completed listFilter by priority:
task project:$PROJECT_ID priority:H list
task project:$PROJECT_ID priority:L listComplex filtering:
task project:$PROJECT_ID +bug priority:H status:pending list3. Task CRUD Operations
Add a new task:
task project:$PROJECT_ID add "Task description" +tag priority:HCreate task with full attributes:
task project:$PROJECT_ID add "Implementation task" project:$PROJECT_ID +feature +backend priority:MUpdate existing task:
task project:$PROJECT_ID 5 modify priority:H +urgent
task project:$PROJECT_ID 5 modify "New description" -old-tag +new-tagDelete task:
task project:$PROJECT_ID 5 deleteMark task as done:
task project:$PROJECT_ID 5 done4. Task Analysis & Reporting
View task statistics:
task project:$PROJECT_ID statsShow task summary by status:
task project:$PROJECT_ID summaryList active tasks:
task project:$PROJECT_ID active list5. Export & Import
Export tasks to JSON:
task project:$PROJECT_ID export > backup.jsonImport tasks from JSON:
task import backup.jsonImplementation Guidelines
When implementing commands that use this agent:
- Always extract project ID first:
- Run: git config --get remote.origin.url | sed -E 's/.*[:/]([^/]+)\/([^/.]+)(\.git)?$/\1-\2/' - Store in $PROJECT_ID variable - Allow override: ${TASK_PROJECT_ID:-$PROJECT_ID}
- All task operations must include project filter:
- Use: task project:$PROJECT_ID [filter] [command] - Never run task [command] without project filter in automated scripts
- Handle edge cases:
- No tasks found: Return empty list gracefully - Invalid project ID: Validate format (alphanumeric + dash only) - Missing.task directory: Initialize with task config report.next.labels ''
- Provide human-readable output:
- Parse JSON export for programmatic use - Format list output with clear columns and highlighting - Show task counts in summaries
Command Examples
Search with Multiple Filters
# Find urgent bugs with high priority
task project:zenobi-us-dotfiles +bug priority:H list
# Find pending tasks with high priority
task project:zenobi-us-dotfiles status:pending priority:H +important listBatch Operations
# Mark all overdue tasks as waiting
task project:zenobi-us-dotfiles overdue modify +waiting
# Add same tag to multiple tasks
task project:zenobi-us-dotfiles 1,2,3 modify +reviewedComplex Filtering
# Find tasks matching pattern
task project:zenobi-us-dotfiles 'description~Bug' list
# Combine filters with AND/OR
task project:zenobi-us-dotfiles '(priority:H or status:pending)' listIntegration Points
This agent works with:
- Taskwarrior: Primary task management backend
- Git: Automatic project ID from repository metadata
- OpenCode Commands:
/project:do:taskworkflow integration - Bash/Scripts: Export/import for CI/CD automation
Reference
- Taskwarrior Documentation: https://taskwarrior.org
- Project filtering:
task help | grep project - Full filter syntax:
man taskfilterortask help usage