| 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
- Repository-local storage: Before planning inside a project, run
dex dir. If it points at global storage such as ~/.config/dex/local, the current directory is not being treated as a repo-local Dex workspace. Initialize or enter the project repo, ensure .dex/ exists if needed, then re-run dex dir before creating backlog items.
- Context Preservation: Decisions, progress, and rationale are captured
- Hierarchy: 3-level structure (Epic → Task → Subtask)
- Configuration: Tasks can block other tasks
- GitHub/Shortcut Sync: Optional sync to Issues/Stories for permanent records
Related reference: references/content-audit-and-devtools-gates.md covers content-completeness audit scripts plus Chrome DevTools MCP verification gates for content-model epics.
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
Repository-local storage check
Before creating a project backlog, verify Dex is using repository-local storage:
dex dir
Expected for a project backlog: <repo>/.dex. If it resolves to a global path (for example ~/.config/dex/local), make the project a git repo first:
git init
mkdir -p .dex
dex dir
Dex may have a global config already, so dex init -y can fail with "Config file already exists"; that is not the fix. The durable fix is ensuring the project is a git repo so Dex scopes storage locally. Keep .dex/ project-local for epics/task lists that belong to the repo.
Starting New Work
- Verify storage scope before creating anything:
dex dir
If it prints a global path (for example ~/.config/dex/local) while you are planning project work, stop and fix the workspace first: enter the correct repo or initialize git for the project, create .dex/ if needed, then re-run dex dir until it points inside the project. Do not create project epics in global Dex by accident.
- 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)
- Verification gates for risky/big-bang work: content audits, build/check commands, and browser verification steps. If Chrome DevTools MCP is available, name the exact flows it must verify rather than leaving “browser tested” vague.
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)
For browser-app implementation tasks, especially Scott's SvelteKit projects, record concrete Chrome DevTools MCP evidence in the Dex completion result. Do not write generic "browser tested". Name the route/page, the clicked flow, observed state changes, console result, and screenshot path if layout/highlighting was visually checked. See references/devtools-mcp-verification.md.
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."
Good browser-task result:
"npm run check passed; npm run build passed; Chrome DevTools MCP verified /op-xy loads, selecting Move 5 updates Touch Now, completing all Moves reaches 100%, console has no runtime errors, screenshot saved at /tmp/flow.png."
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
Repo-local storage guardrail
For project planning, prefer repo-local Dex storage so tasks live with the project instead of the global store.
Before creating an epic/task list:
git rev-parse --is-inside-work-tree || git init
mkdir -p .dex
dex dir
Proceed only after dex dir prints <project>/.dex. If it prints something under ~/.config/dex/local, the current directory is not being treated as the project store yet — initialize/enter the git repo and re-check. This matters for Scott: project Dex planning should be local, not global.
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.