| name | dex |
| description | Use when tracking complex multi-step tasks, creating task hierarchies, maintaining persistent task state across sessions, building backlogs, or when the user explicitly asks to "use dex" for task management. Dex provides persistent memory for AI agents with GitHub/Shortcut sync capabilities. |
Dex - Persistent Task Tracking for AI Agents
Dex is a task tracking system that acts as a master coordinator for complex work—breaking down tasks, tracking progress, and preserving context across sessions. Unlike ephemeral session tracking, dex tasks are stored as files in the repository.
Installation
npm install -g @zeeg/dex
pnpm add -g @zeeg/dex
bun add -g @zeeg/dex
Core Concepts
- Persistence: Tasks survive beyond the current session as
.dex/ files in the repo
- Context Preservation: Decisions, progress, and rationale are captured
- Hierarchy: 3-level structure (Epic → Task → Subtask)
- Dependencies: Tasks can block other tasks
- GitHub/Shortcut Sync: Optional sync to Issues/Stories for permanent records
Core Commands
Dashboard & Listing
dex
dex status
dex status --json
dex list
dex list --all
dex list --ready
dex list --blocked
dex list --in-progress
dex list --query "auth"
dex list --flat
Creating Tasks
dex create "Task title"
dex create "Task title" --description "Full implementation details..."
dex create "Task title" --description "..." --priority 2
dex create "Task title" --blocked-by <other_task_id>
dex create "Subtask title" --parent <parent_task_id>
Viewing & Editing
dex show <task_id>
dex show abc123 --expand
dex show abc123 --full
dex show abc123 --json
dex edit <task_id> --name "New name"
dex edit <task_id> --description "Updated context"
dex edit <task_id> --add-blocker <other_id>
dex edit <task_id> --remove-blocker <other_id>
Status Management
dex start <task_id>
dex start <task_id> --force
dex complete <task_id> --result "What was accomplished"
dex complete <task_id> --result "..." --commit <sha>
dex complete <task_id> --result "..." --no-commit
dex delete <task_id>
dex archive <task_id>
Planning
dex plan path/to/plan.md
dex plan docs/SPEC.md --priority 2
dex plan feature.md --parent <id>
GitHub Integration
dex sync
dex sync <task_id>
dex sync --dry-run
dex sync --github
dex sync --shortcut
dex import
dex import --all
dex import sc#123
dex export <task_id>
When to Use Dex
Use dex when:
- Work spans multiple sessions or days
- Complex features need breakdown into steps
- Context and decisions must be preserved
- Work might be handed off or revisited
- Building a backlog before execution
Skip dex when:
- Quick, single-session task
- No context needs preserving
- Overhead isn't worth it
Workflow for Agents
Starting New Work
- Create task with full context:
dex create "Add JWT authentication" --description "
## Goal
Implement JWT-based auth for the API.
## Requirements
- Token generation on login
- Verification middleware for protected routes
- Refresh token flow
## Files
- src/middleware/auth.ts
- src/routes/auth.ts
## Acceptance Criteria
- POST /api/auth/login returns JWT
- Protected routes return 401 without valid token
- All 24 tests passing
"
- For complex work, break into subtasks:
dex create "Create auth middleware" --parent <parent_id>
dex create "Add login endpoint" --parent <parent_id>
dex create "Add token refresh flow" --parent <parent_id>
- Mark as in progress:
dex start <task_id>
During Implementation
dex list
dex show <task_id>
dex edit <task_id> --description "Updated: also need refresh tokens"
Completing Tasks
dex complete <task_id> --result "
Added POST /api/auth/login endpoint.
Verifies credentials with bcrypt, returns JWT access token (15m)
and refresh token (7d). All 24 tests passing.
" --commit <sha>
Writing Good Task Context
Include:
- What needs to be done (specific, not vague)
- Why it's needed (background, motivation)
- How to approach it (files to modify, patterns to follow)
- Done when (acceptance criteria)
Good:
"Add rate limiting to /api/auth endpoints. Use express-rate-limit, 5 requests per minute per IP for /login, 20/min for /refresh. Return 429 with Retry-After header. Add to src/middleware/rate-limit.ts, apply in src/routes/auth.ts."
Bad:
"Add rate limiting"
Writing Good Results
Include:
- What changed (implementation summary)
- Key decisions (and why)
- Verification (tests passing, manual testing done)
Good:
"Added rate limiting with express-rate-limit. Login: 5/min, refresh: 20/min. Returns 429 with Retry-After header. Added 6 tests for rate limit scenarios. All 30 tests passing."
Bad:
"Added rate limiting"
Task Hierarchy
- Epic: Large initiatives (5+ tasks). Example: "Add user authentication system"
- Task: Significant work items. Example: "Implement JWT middleware"
- Subtask: Atomic steps. Example: "Add token verification function"
Maximum depth is 3 levels.
Behavior Notes
- Subtasks must complete before parent can be completed
- Blocked tasks CAN be completed (warning shown) for flexibility
- Deleting a parent deletes all children
- Use GitHub issue numbers (permanent) in commits, not task IDs (ephemeral)
Configuration
dex init
dex init -y
dex dir
dex dir --global
dex config --list
dex config sync.github.enabled=true
dex doctor
dex doctor --fix
Session Handoff
When ending a session with incomplete work:
dex edit <task_id> --description "
## Progress
- Completed: JWT middleware added
- In Progress: Login endpoint (70% done)
- Blocked: Need refresh token strategy
## Next Steps
- Finish login endpoint validation
- Add refresh token rotation
"
Keep task in_progress so next session knows to continue.