Close Task
Closes a task by updating its status to completed (or cancelled) and recording the closure.
Workflow
- •
Get task ID:
- •From
$ARGUMENTS - •Or extract from current git branch name
- •Or ask user to specify
- •From
- •
Read task file: Load markdown from Obsidian directory
- •Validate task exists
- •Check current status
- •
Validate completion:
- •Warn if unchecked completion criteria remain
- •For
--cancelflag, skip validation (cancelled tasks don't need criteria met)
- •
Update status:
- •Default:
task_status: ✅ completed - •With
--cancel:task_status: ❌ cancelled - •Update
updatedfield to current date - •Set
completed_timeto current timestamp (YYYY-MM-DD HH:mm)
- •Default:
- •
Add closing log entry under
#### 🧮 Content::markdown##### YYYY-MM-DD - Task completed: [summary of work] - Total commits: N - All completion criteria met
For cancelled tasks:
markdown##### YYYY-MM-DD - Task cancelled: [reason for cancellation]
- •
Update changelog: Add entry to
changelog.md- •Completed:
- ✅ Completed [[TASK-NNN]]: <title> - •Cancelled:
- ❌ Cancelled [[TASK-NNN]]: <title>
- •Completed:
- •
Suggest cleanup commands:
bashgit checkout main git branch -d feat/TASK-NNN-slug
Example Usage
Complete a task:
bash
/pm-close TASK-001
Cancel a task:
bash
/pm-close TASK-002 --cancel
Status Transitions
- •Any status →
✅ completed(if criteria met) - •Any status →
❌ cancelled(with --cancel flag)