Task Management
A structured, file-based task tracking system. Each task is an individual markdown file with YAML frontmatter, indexed in a central manifest.
First-Run Setup
Before any operation, ensure the task system exists:
- Check if
~/.claude/tasks/exists — if not, create withmkdir -p ~/.claude/tasks/ - Check if
~/.claude/tasks/TASKS.mdexists — if not, create:
# Task Index
<!-- Auto-maintained. Do not edit manually. -->
## In Progress
## To Do
## Blocked
## Done
Task Schema
Each task is a file at ~/.claude/tasks/TASK-{NNN}.md:
---
id: TASK-001
title: "Short imperative description (max 80 chars)"
status: todo | in-progress | done | blocked
priority: critical | high | medium | low
created: 2026-04-08
updated: 2026-04-08
due: 2026-04-15 # optional — ISO date
completed: null # set to ISO date when done
tags: [feature, backend] # optional — freeform labels
blocked-by: TASK-003 # optional — dependency
source: "gh#45" # optional — link to GitHub issue, PR, or external ref
---
Detailed description of what needs to be done and why.
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
## Notes
- YYYY-MM-DD: Progress note or context update
Operations
Add — $ARGUMENTS starts with "add" or user describes a new task
- Parse input: Extract title, priority, due date, tags from the user's description. Infer what you can; ask only for what's ambiguous.
- Generate ID: Read existing task files to find the highest ID, increment by 1. Pad to 3 digits (e.g.,
TASK-001). - Normalize dates: Convert relative dates to absolute ISO format. Use today's date as reference.
- Default values:
status: todo,priority: medium,created: today,updated: today. - Write task file: Create
~/.claude/tasks/TASK-{NNN}.mdwith full schema. - Update index: Add entry to the appropriate section in
TASKS.md:- [TASK-{NNN}](TASK-{NNN}.md) — {title} ({priority}, due {date}) - Confirm: Show the created task with its ID.
List — $ARGUMENTS starts with "list" or user asks to see tasks
- Read
TASKS.mdand present grouped by status. - Filtering: Support filters from
$ARGUMENTS:list high— filter by prioritylist blocked— filter by statuslist backend— filter by taglist overdue— due date < today and status != done
- Sorting: Within each status group, sort by: priority (critical > high > medium > low), then due date (soonest first), then creation date.
- Output format:
## Tasks (5 total: 1 in-progress, 3 todo, 1 blocked)
### In Progress
- TASK-005: Migrate user table (high, due tomorrow)
### To Do
- TASK-007: Write API docs (medium, no due date)
- TASK-008: Add rate limiting (medium, due 2026-04-20)
- TASK-009: Update onboarding flow (low)
### Blocked
- TASK-006: Deploy auth service — blocked by TASK-005
Done — $ARGUMENTS starts with "done" or user marks a task complete
- Find the task by ID or keyword match. If ambiguous, present options and ask.
- Update the task file:
- Set
status: done - Set
completed: {today} - Set
updated: {today}
- Set
- Move the entry in
TASKS.mdfrom its current section to## Done. - If the completed task was blocking other tasks (
blocked-byreferences), notify the user and offer to unblock them. - Confirm completion.
Update — user wants to change a task's priority, due date, description, or status
- Find the task by ID or keyword.
- Apply the requested changes to the task file frontmatter and/or body.
- Always set
updated: {today}. - Add a timestamped note under
## Notesdescribing the change. - Update
TASKS.mdif the status, priority, or title changed. - Confirm what was updated.
Triage — $ARGUMENTS starts with "triage" or user asks to review tasks
Triage walks through tasks that need attention:
- Identify candidates:
- Overdue:
due < todayandstatus != done - Stale:
updated> 7 days ago andstatusistodoorin-progress - Unestimated: no
duedate andpriorityishighorcritical - Long-running:
in-progressfor > 14 days
- Overdue:
- Present each with context and ask the user to choose an action:
- Reprioritize: change priority
- Reschedule: set or update due date
- Close: mark as done or remove
- Skip: leave as-is for now
- Apply changes as the user decides.
- Summary: After triage, show counts of actions taken.
Delete — $ARGUMENTS starts with "delete" or "remove"
- Find the task by ID or keyword.
- Require explicit confirmation — show the full task before deleting.
- Remove the task file.
- Remove the entry from
TASKS.md. - Check if any other tasks have
blocked-byreferencing this task. If so, warn the user. - Confirm deletion.
Integrity Rules
- Single source of truth: Task files are authoritative.
TASKS.mdis a derived index. - Index repair: If
TASKS.mdis out of sync with task files (missing entries, wrong status), rebuild it from the task files. - No duplicates: Before creating, search existing tasks for similar titles. Warn if a near-duplicate exists.
- ID immutability: Once assigned, a task ID never changes. Deleted IDs are not reused.
- Audit trail: Every status change gets a timestamped note in the task file.
- Atomic updates: Always update both the task file AND
TASKS.mdin the same operation. Never leave them inconsistent.
Quality Checklist
- Output is specific and actionable, not generic
- All relevant inputs have been gathered before producing output
- Recommendations are prioritized by impact
- Stakeholders and audience are identified
- Output format matches the audience's needs
- Key assumptions are documented
- Follow-up actions have clear owners
Edge Cases
- If input data is incomplete, state assumptions explicitly and flag gaps
- For time-sensitive situations, prioritize speed over comprehensiveness
- If multiple stakeholders have conflicting needs, document the tradeoffs
- For first-time use, start with a simplified version and iterate
- Adapt the depth and detail to the audience's expertise level