/tasks — Task Management (SQLite-backed)
First: Read LEARNINGS.md (in this skill's directory) before proceeding.
Primary store: tasks.db (in workspace root). Markdown export at state/backlog.md (read-only, regenerated on changes).
Arguments: $ARGUMENTS
Routing
| Input |
Action |
(empty) or status |
Show Status |
add <description> |
Add Task |
review |
Review & Reprioritize |
done T### |
Complete Task |
metrics |
Show Metrics |
Show Status
# Active tasks sorted by priority
sqlite3 ~/claude-assistant/tasks.db -header -column \
"SELECT id, name, priority, status, effort, problems FROM tasks WHERE status != 'done' ORDER BY CASE priority WHEN 'P1' THEN 1 WHEN 'P2' THEN 2 WHEN 'P3' THEN 3 ELSE 4 END, id"
# Blocked tasks
sqlite3 ~/claude-assistant/tasks.db -header -column \
"SELECT id, name, blocked_by, blocked_reason FROM tasks WHERE blocked_by IS NOT NULL AND status != 'done'"
# Counts
sqlite3 ~/claude-assistant/tasks.db \
"SELECT (SELECT COUNT(*) FROM tasks WHERE status NOT IN ('done')) AS active, (SELECT COUNT(*) FROM tasks WHERE status='done') AS completed, (SELECT COUNT(*) FROM tasks WHERE blocked_by IS NOT NULL AND status != 'done') AS blocked"
Flag:
- Any P1 task not
in_progress -- prompt to start it
- Any task
in_progress for 7+ days (check updated_at) -- suggest reviewing
Add Task
- Parse
<description> from arguments
- Get next ID:
sqlite3 ~/claude-assistant/tasks.db "SELECT value FROM config WHERE key='next_id'"
- Read
knowledge/problems/00-overview.md to know the user's problems
- Ask: which problems (by number) does this relate to? Effort (S/M/L)? Which subgoal?
- Evaluate priority:
- Problems >= 3 -- strong P1 candidate
- Problems >= 2 + urgency -- P2
- Problems == 1 or no urgency -- P3
- Problems == 0 -- flag: "Is this drift?"
- On approval, insert via sqlite3:
sqlite3 ~/claude-assistant/tasks.db "INSERT INTO tasks (id, name, priority, problems, effort, status, subgoal, created_at, updated_at) VALUES ('T###', 'Name', 'P2', '1,4', 'M', 'pending', 'S1', '$(date +%Y-%m-%d)', '$(date -u +%Y-%m-%dT%H:%M:%SZ)')"
- Increment next_id:
sqlite3 ~/claude-assistant/tasks.db "UPDATE config SET value='T###' WHERE key='next_id'"
- Re-export:
python3 ~/claude-assistant/scripts/db.py export
Review & Reprioritize
- Show all active tasks
- Read
knowledge/problems/00-overview.md and knowledge/user/goals.md
- For each task: priority still correct? Stale? Blocking others? Connected to active subgoal?
- Present proposed changes:
| ID | Current P | Proposed P | Reason |
- On approval, update and re-export
Complete Task
- Parse task ID
- Update:
sqlite3 ~/claude-assistant/tasks.db "UPDATE tasks SET status='done', completed_at='$(date +%Y-%m-%d)', updated_at='$(date -u +%Y-%m-%dT%H:%M:%SZ)' WHERE id='T###'"
- Re-export:
python3 ~/claude-assistant/scripts/db.py export
- Show: task name, problems addressed, days from created to done
- Suggest next task based on priority
Show Metrics
# Completed this week
sqlite3 ~/claude-assistant/tasks.db "SELECT COUNT(*) as done_this_week FROM tasks WHERE status='done' AND completed_at >= date('now', '-7 days')"
# Active count by priority
sqlite3 ~/claude-assistant/tasks.db "SELECT priority, COUNT(*) as count FROM tasks WHERE status != 'done' GROUP BY priority ORDER BY priority"
# Average days to complete
sqlite3 ~/claude-assistant/tasks.db "SELECT ROUND(AVG(julianday(completed_at) - julianday(created_at)), 1) as avg_days FROM tasks WHERE status='done' AND completed_at IS NOT NULL"
Task Conventions
- IDs:
T + 3-digit counter (T001, T002, ...), monotonic, never reused
- Priority: P1 (now), P2 (this week), P3 (this month), BL (backlog)
- Effort: S (< 1 session), M (2-3 sessions), L (4+ sessions)
- Status: pending, in_progress, done, blocked
- Problems: comma-separated numbers referencing the user's 12 problems
- Subgoal: S1, S2, etc. from goals.md
Before Substantive Work
When the user requests work that will take more than ~5 minutes:
- Check active tasks -- does this map to one?
- If NO -- flag: "This doesn't map to an active task. Want to add it, or continue anyway?"
- If the work touches zero problems -- flag: "This isn't connected to any of your problems. Proceed?"
1---2name: tasks3description: Manage the task backlog — add, review, complete, and measure tasks against the 12 Favorite Problems. Run /tasks to see current status.4---56# /tasks — Task Management (SQLite-backed)78**First:** Read `LEARNINGS.md` (in this skill's directory) before proceeding.910Primary store: `tasks.db` (in workspace root). Markdown export at `state/backlog.md` (read-only, regenerated on changes).1112**Arguments:** `$ARGUMENTS`1314---1516## Routing1718| Input | Action |19|---|---|20| (empty) or `status` | Show Status |21| `add <description>` | Add Task |22| `review` | Review & Reprioritize |23| `done T###` | Complete Task |24| `metrics` | Show Metrics |2526---2728## Show Status2930```bash31# Active tasks sorted by priority32sqlite3 ~/claude-assistant/tasks.db -header -column \33 "SELECT id, name, priority, status, effort, problems FROM tasks WHERE status != 'done' ORDER BY CASE priority WHEN 'P1' THEN 1 WHEN 'P2' THEN 2 WHEN 'P3' THEN 3 ELSE 4 END, id"3435# Blocked tasks36sqlite3 ~/claude-assistant/tasks.db -header -column \37 "SELECT id, name, blocked_by, blocked_reason FROM tasks WHERE blocked_by IS NOT NULL AND status != 'done'"3839# Counts40sqlite3 ~/claude-assistant/tasks.db \41 "SELECT (SELECT COUNT(*) FROM tasks WHERE status NOT IN ('done')) AS active, (SELECT COUNT(*) FROM tasks WHERE status='done') AS completed, (SELECT COUNT(*) FROM tasks WHERE blocked_by IS NOT NULL AND status != 'done') AS blocked"42```4344Flag:45- Any P1 task not `in_progress` -- prompt to start it46- Any task `in_progress` for 7+ days (check updated_at) -- suggest reviewing4748---4950## Add Task51521. Parse `<description>` from arguments532. Get next ID: `sqlite3 ~/claude-assistant/tasks.db "SELECT value FROM config WHERE key='next_id'"`543. Read `knowledge/problems/00-overview.md` to know the user's problems554. Ask: which problems (by number) does this relate to? Effort (S/M/L)? Which subgoal?565. Evaluate priority:57 - Problems >= 3 -- strong P1 candidate58 - Problems >= 2 + urgency -- P259 - Problems == 1 or no urgency -- P360 - Problems == 0 -- flag: "Is this drift?"616. On approval, insert via sqlite3:6263```bash64sqlite3 ~/claude-assistant/tasks.db "INSERT INTO tasks (id, name, priority, problems, effort, status, subgoal, created_at, updated_at) VALUES ('T###', 'Name', 'P2', '1,4', 'M', 'pending', 'S1', '$(date +%Y-%m-%d)', '$(date -u +%Y-%m-%dT%H:%M:%SZ)')"65```66677. Increment next_id: `sqlite3 ~/claude-assistant/tasks.db "UPDATE config SET value='T###' WHERE key='next_id'"`688. Re-export: `python3 ~/claude-assistant/scripts/db.py export`6970---7172## Review & Reprioritize73741. Show all active tasks752. Read `knowledge/problems/00-overview.md` and `knowledge/user/goals.md`763. For each task: priority still correct? Stale? Blocking others? Connected to active subgoal?774. Present proposed changes: `| ID | Current P | Proposed P | Reason |`785. On approval, update and re-export7980---8182## Complete Task83841. Parse task ID852. Update:8687```bash88sqlite3 ~/claude-assistant/tasks.db "UPDATE tasks SET status='done', completed_at='$(date +%Y-%m-%d)', updated_at='$(date -u +%Y-%m-%dT%H:%M:%SZ)' WHERE id='T###'"89```90913. Re-export: `python3 ~/claude-assistant/scripts/db.py export`924. Show: task name, problems addressed, days from created to done935. Suggest next task based on priority9495---9697## Show Metrics9899```bash100# Completed this week101sqlite3 ~/claude-assistant/tasks.db "SELECT COUNT(*) as done_this_week FROM tasks WHERE status='done' AND completed_at >= date('now', '-7 days')"102103# Active count by priority104sqlite3 ~/claude-assistant/tasks.db "SELECT priority, COUNT(*) as count FROM tasks WHERE status != 'done' GROUP BY priority ORDER BY priority"105106# Average days to complete107sqlite3 ~/claude-assistant/tasks.db "SELECT ROUND(AVG(julianday(completed_at) - julianday(created_at)), 1) as avg_days FROM tasks WHERE status='done' AND completed_at IS NOT NULL"108```109110---111112## Task Conventions113114- **IDs:** `T` + 3-digit counter (T001, T002, ...), monotonic, never reused115- **Priority:** P1 (now), P2 (this week), P3 (this month), BL (backlog)116- **Effort:** S (< 1 session), M (2-3 sessions), L (4+ sessions)117- **Status:** pending, in_progress, done, blocked118- **Problems:** comma-separated numbers referencing the user's 12 problems119- **Subgoal:** S1, S2, etc. from goals.md120121## Before Substantive Work122123When the user requests work that will take more than ~5 minutes:1241. Check active tasks -- does this map to one?1252. If NO -- flag: "This doesn't map to an active task. Want to add it, or continue anyway?"1263. If the work touches zero problems -- flag: "This isn't connected to any of your problems. Proceed?"