/work-item - Universal Work Item Command
Universal command for querying and managing any work item type in the CODITECT hierarchy.
Usage
# Show any work item by ID
/work-item show P001|SP001|E001|F001|T0001|ST0001
# Search work items
/work-item search "query" [--type epic|feature|task] [--status STATUS]
# List recent work items
/work-item recent [--limit 20]
# My work items
/work-item mine [--status in_progress]
# Progress report
/work-item progress P001|E001|F001
# Hierarchy view
/work-item tree P001
# Update any item
/work-item update ID --status STATUS --priority N
# Delete item (with confirmation)
/work-item delete ID
# Bulk status update
/work-item bulk-update --ids T0001,T0002,T0003 --status completed
# Export to markdown
/work-item export P001 --format markdown
# Dashboard
/work-item dashboard
System Prompt
System Prompt
⚠️ EXECUTION DIRECTIVE: When the user invokes this command, you MUST:
- IMMEDIATELY execute - no questions, no explanations first
- ALWAYS show full output from script/tool execution
- ALWAYS provide summary after execution completes
DO NOT:
- Say "I don't need to take action" - you ALWAYS execute when invoked
- Ask for confirmation unless
requires_confirmation: truein frontmatter - Skip execution even if it seems redundant - run it anyway
The user invoking the command IS the confirmation.
You are managing CODITECT work items using the Work Item Hierarchy system (ADR-006).
ID Detection: The command auto-detects work item type from ID pattern:
- P{NNN} → Project
- SP{NNN} → Sub-Project
- E{NNN} → Epic
- F{NNN} → Feature
- T{NNNN} → Task
- ST{NNNN} → Subtask
- S{NN} → Sprint
Available Actions:
Show Any Item
python3 scripts/work_items.py show "$ID"
Search
python3 scripts/work_items.py search "$QUERY" --type "$TYPE" --status "$STATUS"
Progress Report
python3 scripts/work_items.py progress "$ID"
Tree View
python3 scripts/work_items.py tree "$ID"
Dashboard
python3 scripts/work_items.py dashboard
Export
python3 scripts/work_items.py export "$ID" --format markdown|json|csv
Output Format - Dashboard:
CODITECT Work Item Dashboard
============================
Active Projects: 3
P001: CODITECT v2.0 (75%)
P002: AI Syllabus (40%)
P003: Documentation (90%)
Current Sprint: S01 (Day 5/14)
Progress: 62% (21/34 points)
Blockers: 1
My Work:
In Progress: 3 items
└── T0001: Implement OAuth flow (F001)
└── T0042: Write unit tests (F003)
└── T0089: Update documentation (F010)
Review: 1 item
└── T0050: Code review pending
Recent Activity:
[2h ago] T0040 completed by developer
[4h ago] F002 moved to review
[1d ago] E001 completed (100%)
Examples
Quick Status Check
/work-item show T0001
Output:
T0001: Implement OAuth flow
Type: Task
Parent: F001 (OAuth Integration)
Path: P001 → E001 → F001 → T0001
Status: in_progress
Priority: 70
Hours: 4h est / 2h actual
Assignee: developer@example.com
Sprint: S01
Sessions: 2 linked
Search for Blocked Items
/work-item search "" --status blocked
Full Hierarchy Export
/work-item export P001 --format markdown
Output (saved to file):
# P001: CODITECT v2.0
**Status:** active | **Progress:** 75%
## SP001: Backend (80%)
### E001: API Redesign (100%) ✓
#### F001: Schema Design (100%) ✓
- [x] T0001: Define types (2h)
- [x] T0002: Create resolvers (3h)
- [x] T0003: Write tests (2h)
#### F002: Query Implementation (80%)
- [x] T0004: User queries (2h)
- [x] T0005: Project queries (2h)
- [ ] T0006: Search queries (3h)
...
Bulk Complete Tasks
/work-item bulk-update --ids T0001,T0002,T0003 --status completed
Output:
Bulk update complete:
✓ T0001: Implement OAuth flow → completed
✓ T0002: Configure callbacks → completed
✓ T0003: Store tokens → completed
Parent progress updated:
F001: 60% → 100% ✓
E001: 80% → 100% ✓
Action Policy
<default_behavior> This command queries and modifies work items. Provides:
- Work item display and search
- Progress tracking and tree views
- Bulk updates and exports
Modifying commands (update, delete, bulk-update) change state. </default_behavior>
Success Output
When work item operation completes:
✅ COMMAND COMPLETE: /work-item
Action: <show|search|update|export>
Item(s): <ID(s)>
Result: <details>
Completion Checklist
Before marking complete:
- Item(s) located/created/updated
- Output formatted correctly
- Progress calculated
- Hierarchy maintained
Failure Indicators
This command has FAILED if:
- ❌ Work item not found
- ❌ Invalid ID format
- ❌ Database unavailable
- ❌ Update failed
When NOT to Use
Do NOT use when:
- Need session context (use /cx)
- Need git status (use git status)
- Tracking one-off tasks (use TodoWrite)
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Orphan items | Lost in hierarchy | Always link to parent |
| Skip updates | Stale status | Update status regularly |
| Ignore blockers | Stuck work | Address blockers first |
Principles
This command embodies:
- #6 Clear, Understandable - Structured work hierarchy
- #9 Based on Facts - Tracks actual work state
Full Standard: CODITECT-STANDARD-AUTOMATION.md
Script: scripts/work_items.py
Standard: CODITECT-CORE-STANDARDS/CODITECT-STANDARD-WORK-ITEMS.md
Version: 1.0.0