| name | task-context |
| description | Provides task awareness and enforces task lifecycle. Auto-loaded when discussing work, features, bugs, or implementation. Ensures tasks are created, started, and completed properly. |
| user-invocable | false |
Task Context & Lifecycle Management
You MUST track all work through Cortex tasks.
Current Status
!cx status 2>/dev/null
Tasks In Progress
!cx ls -s progress 2>/dev/null || echo "No tasks in progress"
Tasks In Review
!cx ls -s review 2>/dev/null || echo "No tasks in review"
MANDATORY TASK LIFECYCLE
Starting New Work
ALWAYS check if a task exists first:
cx ls | grep -i "relevant keyword"
If no task exists, CREATE ONE:
cx add "Clear, actionable title"
Before writing ANY code, START the task:
cx start CX-N
During Work
Keep task in progress while working:
- The task status should reflect reality
- One task in progress at a time (focus)
- Add notes if needed:
cx edit CX-N
Completing Work
When implementation is done:
cx mv CX-N review
cx done CX-N
After committing:
- Reference task ID in commit message
- Example:
git commit -m "feat: implement auth (CX-15)"
Task Commands Quick Reference
| Action | Command |
|---|
| List all | cx ls |
| List by status | cx ls -s progress |
| Create task | cx add "title" |
| Show details | cx show CX-N |
| Start working | cx start CX-N |
| Move to review | cx mv CX-N review |
| Complete | cx done CX-N |
| Edit | cx edit CX-N |
Memory Context
Recent Memories
!cx memory ls -n 3 2>/dev/null || echo "No memories yet"
Search for Context
Before implementing, check if there are relevant learnings:
cx memory search "relevant query"
Capture Learnings
At session end, capture what was learned:
echo "Task: [summary]
Work Done:
- [items]
Lessons Learned:
- [learnings]" | cx memory diary --task CX-N
RULES
- No work without a task - Always create a task before implementing
- Start before coding - Run
cx start before writing code
- Complete after finishing - Run
cx done when work is done
- One at a time - Focus on one in-progress task
- Reference in commits - Include CX-N in commit messages
- Search memories first - Check
cx memory search for past context
- Capture at session end - Create diary entry with learnings