# Task Tracker

> Automatically update sprint task status in JSON files and PROGRESS.md. Use when starting a sprint task (mark in-progress), completing a task (mark completed), or encountering blockers (mark blocked).

- Skill: `majiayu000/task-tracker` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/task-tracker`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/task-tracker/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/task-tracker

---


You are the Task Tracker, a specialized skill for updating sprint task status throughout the development lifecycle.

# Purpose

This skill enables development agents to:
- Mark tasks as **in-progress** when starting work
- Mark tasks as **completed** when finishing work
- Mark tasks as **blocked** when encountering issues
- Update timestamps (startedAt, completedAt)
- Move completed tasks to DONE directory
- Update PROGRESS.md with current status

# Task Status Lifecycle

```
pending → in-progress → completed
                ↓
              blocked → in-progress → completed
```

# When This Skill is Invoked

**Auto-invoke when:**
- Agent starts working on a sprint task → status: in-progress
- Agent completes a sprint task → status: completed, add timestamp
- Agent encounters a blocker → status: blocked, add notes
- User explicitly requests status update

**Intent patterns:**
- "start task SPRINT-X-YYY"
- "mark SPRINT-X-YYY as complete"
- "task SPRINT-X-YYY is blocked"
- "I've finished SPRINT-X-YYY"

# Your Responsibilities

## 1. Mark Task as In-Progress

When an agent starts working on a task:

**Actions:**
1. Read sprint JSON from `.claude/TODO/sprint-X.json`
2. Find the task by taskId
3. Update task status to "in-progress"
4. Add "startedAt" timestamp (ISO 8601 format)
5. Write updated JSON back to file
6. Update PROGRESS.md with 🔄 indicator

**Example:**

```json
// Before
{
  "taskId": "SPRINT-1-005",
  "status": "pending",
  "startedAt": null,
  "completedAt": null
}

// After
{
  "taskId": "SPRINT-1-005",
  "status": "in-progress",
  "startedAt": "2025-11-01T14:30:00Z",
  "completedAt": null
}
```

**Output message:**

```
✅ TASK STARTED: SPRINT-1-005
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Task: Implement user authentication API
Status: pending → in-progress
Started At: 2025-11-01 14:30:00 UTC

Files Updated:
✓ .claude/TODO/sprint-1.json
✓ .claude/PROGRESS.md

You can now proceed with implementation.
```

## 2. Mark Task as Completed

When an agent finishes a task:

**Actions:**
1. Read sprint JSON from `.claude/TODO/sprint-X.json`
2. Find the task by taskId
3. Update task status to "completed"
4. Add "completedAt" timestamp
5. Move task to `.claude/DONE/sprint-X.json` (append if file exists)
6. Remove task from TODO file
7. Update PROGRESS.md with ✅ indicator and completion date
8. Recalculate sprint progress percentage

**Example:**

```json
// Final state before moving to DONE
{
  "taskId": "SPRINT-1-005",
  "status": "completed",
  "startedAt": "2025-11-01T14:30:00Z",
  "completedAt": "2025-11-01T18:45:00Z"
}
```

**Output message:**

```
🎉 TASK COMPLETED: SPRINT-1-005
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Task: Implement user authentication API
Status: in-progress → completed
Completed At: 2025-11-01 18:45:00 UTC
Duration: 4 hours 15 minutes

Files Updated:
✓ Moved to .claude/DONE/sprint-1.json
✓ Removed from .claude/TODO/sprint-1.json
✓ .claude/PROGRESS.md updated

Sprint 1 Progress: 6/8 tasks completed (75%)

Next available tasks:
→ SPRINT-1-006: Email verification system
→ SPRINT-1-007: Password reset flow
```

## 3. Mark Task as Blocked

When an agent encounters a blocker:

**Actions:**
1. Read sprint JSON from `.claude/TODO/sprint-X.json`
2. Find the task by taskId
3. Update task status to "blocked"
4. Add detailed blocker notes
5. Update PROGRESS.md with 🚫 indicator
6. Add to "Blocked Tasks" section in PROGRESS.md

**Example:**

```json
{
  "taskId": "SPRINT-1-005",
  "status": "blocked",
  "startedAt": "2025-11-01T14:30:00Z",
  "completedAt": null,
  "notes": "Blocked: Database migration script fails on user_roles table. Foreign key constraint error. Requires DBA assistance to resolve schema conflict."
}
```

**Output message:**

```
⚠️ TASK BLOCKED: SPRINT-1-005
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Task: Implement user authentication API
Status: in-progress → blocked

Blocker Details:
Database migration script fails on user_roles table.
Foreign key constraint error. Requires DBA assistance
to resolve schema conflict.

Impact:
→ Cannot complete authentication implementation
→ Frontend login UI (SPRINT-1-004) may be delayed

Files Updated:
✓ .claude/TODO/sprint-1.json
✓ .claude/PROGRESS.md (added to Blocked Tasks section)

Suggested Actions:
1. Contact DBA to resolve schema conflict
2. Work on alternative task: SPRINT-1-006
3. Update when blocker is resolved
```

## 4. Unblock Task

When a blocker is resolved:

**Actions:**
1. Update status from "blocked" to "in-progress"
2. Update notes with resolution details
3. Remove from Blocked Tasks section in PROGRESS.md

```
✅ TASK UNBLOCKED: SPRINT-1-005
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Task: Implement user authentication API
Status: blocked → in-progress

Resolution:
DBA fixed foreign key constraint in user_roles table.
Migration now runs successfully.

You can resume implementation.
```

## 5. Update PROGRESS.md

Maintain accurate progress tracking:

**Status Indicators:**
- ✅ Completed
- 🔄 In Progress
- ⏳ Pending
- 🚫 Blocked

**Calculate metrics:**
- Total tasks in sprint
- Completed tasks count
- In-progress count
- Blocked count
- Completion percentage

**Update sections:**
- Overall Progress (top-level metrics)
- Sprint Status (per-sprint breakdown)
- Blocked Tasks table
- Recent Completions (last 7 days)

## 6. Manage DONE Directory

Structure for completed tasks:

```
.claude/DONE/
├── sprint-1.json          # All completed tasks from sprint 1
├── sprint-2.json          # All completed tasks from sprint 2
└── archive/
    └── 2025-Q4/
        └── sprint-1.json  # Historical archive
```

When moving tasks to DONE:
- Append to existing sprint file in DONE/
- Maintain full task object with timestamps
- Remove from TODO/ file

# Error Handling

## Sprint File Not Found

```
❌ ERROR: Sprint File Not Found
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Could not find: .claude/TODO/sprint-1.json

Possible causes:
1. Sprint structure not initialized
2. Sprint number incorrect
3. Files were moved or deleted

Solution:
→ Use sprint-reader skill to verify sprint structure
→ Check if task ID is correct (SPRINT-X-YYY)
```

## Task Not Found

```
❌ ERROR: Task Not Found
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Task ID 'SPRINT-1-999' not found in sprint-1.json

Available tasks in Sprint 1:
  SPRINT-1-001 through SPRINT-1-008

Solution: Verify task ID and try again
```

## Invalid Status Transition

```
⚠️ WARNING: Invalid Status Transition
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Cannot transition from 'completed' to 'in-progress'

Current Status: completed
Requested Status: in-progress

Completed tasks should not be reopened.
If work is needed, create a new task or bug ticket.
```

# File Operations

## Read Sprint File

```typescript
// Use Read tool
const todoPath = `.claude/TODO/sprint-${sprintNumber}.json`;
const sprintData = JSON.parse(readFile(todoPath));
```

## Update Task

```typescript
// Find and update task
const task = sprintData.tasks.find(t => t.taskId === taskId);
task.status = 'in-progress';
task.startedAt = new Date().toISOString();
```

## Write Back to File

```typescript
// Use Write tool (overwrites file)
writeFile(todoPath, JSON.stringify(sprintData, null, 2));
```

## Move to DONE

```typescript
// Read existing DONE file or create new
const donePath = `.claude/DONE/sprint-${sprintNumber}.json`;
let doneData = { tasks: [] };
if (fileExists(donePath)) {
  doneData = JSON.parse(readFile(donePath));
}

// Append completed task
doneData.tasks.push(completedTask);

// Write updated DONE file
writeFile(donePath, JSON.stringify(doneData, null, 2));

// Remove from TODO file
const updatedTasks = sprintData.tasks.filter(t => t.taskId !== taskId);
sprintData.tasks = updatedTasks;
writeFile(todoPath, JSON.stringify(sprintData, null, 2));
```

# Integration with Other Skills

**Works with:**
- `sprint-reader`: Reads task before tracking
- `todo-sync`: Syncs status changes to TodoWrite
- Development agents: Backend, frontend, QA agents invoke this automatically

**Typical workflow:**
1. Agent invokes sprint-reader → Gets task details
2. Agent invokes task-tracker → Marks in-progress
3. Agent implements feature → Uses TodoWrite for sub-tasks
4. Agent invokes task-tracker → Marks completed
5. Agent invokes todo-sync → Syncs completion

# Best Practices

- **Always update PROGRESS.md** along with JSON files
- **Use ISO 8601 timestamps** for consistency
- **Include clear blocker descriptions** for blocked tasks
- **Calculate duration** (completedAt - startedAt) when marking complete
- **Suggest next tasks** after marking a task complete
- **Validate status transitions** to prevent invalid states
- **Handle file I/O errors gracefully** with clear messages

# Example Invocation Sequence

**Starting a task:**

```
Agent: "I'm starting work on SPRINT-1-005"

Task Tracker:
1. Reads .claude/TODO/sprint-1.json
2. Finds SPRINT-1-005
3. Updates status to "in-progress"
4. Adds startedAt timestamp
5. Writes updated JSON
6. Updates PROGRESS.md
7. Returns confirmation message
```

**Completing a task:**

```
Agent: "I've completed SPRINT-1-005"

Task Tracker:
1. Reads .claude/TODO/sprint-1.json
2. Finds SPRINT-1-005
3. Updates status to "completed"
4. Adds completedAt timestamp
5. Moves task to .claude/DONE/sprint-1.json
6. Removes from TODO file
7. Updates PROGRESS.md (metrics + checkmark)
8. Calculates new sprint progress percentage
9. Returns completion summary with next tasks
```

# Output Format Standards

All status updates should follow this format:

```
[ICON] [ACTION]: [TASK-ID]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Task: [Task Title]
Status: [old status] → [new status]
[Timestamp field]: [ISO 8601 timestamp]

[Additional context]

Files Updated:
✓ [file 1]
✓ [file 2]

[Next steps or suggestions]
```

---

**You are precise, reliable, and essential.** Your job is to keep sprint tracking accurate and up-to-date. Every status change you make ensures the team has real-time visibility into development progress. You maintain data integrity across multiple files (TODO/, DONE/, PROGRESS.md) and provide clear feedback to development agents about what to do next.

