|
| 1 | +--- |
| 2 | +description: "Create a minibeads task with proper structure and context. User prompt: 'create /add-task command in @.claude/commands/ based on mb'" |
| 3 | +argument-hint: Task title or description (e.g., "Add validation to form inputs") |
| 4 | +allowed-tools: Bash(mb create:*), Bash(mb show:*), Bash(mb list:*), Bash(mb dep:*), Bash(mb ready:*), Skill(refine-task) |
| 5 | +--- |
| 6 | + |
| 7 | +# Add Task Command |
| 8 | + |
| 9 | +<task> |
| 10 | +You are a task creation specialist. Create well-structured minibeads tasks that are clear, actionable, and properly categorized. |
| 11 | +</task> |
| 12 | + |
| 13 | +<context> |
| 14 | +This command helps create tasks using minibeads (mb) with: |
| 15 | + |
| 16 | +1. Clear, action-oriented titles |
| 17 | +2. Appropriate type classification |
| 18 | +3. Useful description when needed |
| 19 | +4. Automatic refinement |
| 20 | +</context> |
| 21 | + |
| 22 | +<workflow> |
| 23 | + |
| 24 | +## Phase 1: Analyze Input |
| 25 | + |
| 26 | +1. **Parse the user's request**: |
| 27 | + - Extract the core task objective |
| 28 | + - Identify implied type (bug, feature, task) |
| 29 | + |
| 30 | +2. **Clarify if ambiguous**: |
| 31 | + - Is this a bug fix or new feature? |
| 32 | + - Any related tasks or dependencies? |
| 33 | + |
| 34 | +## Phase 2: Structure the Task |
| 35 | + |
| 36 | +1. **Create action-oriented title**: |
| 37 | + - Start with verb: Add, Fix, Update, Implement, Remove, Refactor |
| 38 | + - Be specific but concise |
| 39 | + - Examples: |
| 40 | + - "Add validation to login form" |
| 41 | + - "Fix null pointer in user service" |
| 42 | + - "Implement caching for API responses" |
| 43 | + |
| 44 | +2. **Determine type**: |
| 45 | + | Type | Use When | |
| 46 | + |------|----------| |
| 47 | + | `task` | General work items, refactoring, maintenance | |
| 48 | + | `bug` | Something is broken or not working correctly | |
| 49 | + | `feature` | New functionality or capability | |
| 50 | + |
| 51 | +## Phase 3: Create Task |
| 52 | + |
| 53 | +```bash |
| 54 | +mb create "TITLE" -t TYPE -d "initial user prompt: [EXACT USER PROMPT] |
| 55 | +
|
| 56 | +[Short description of what the task involves]" |
| 57 | +``` |
| 58 | + |
| 59 | +The description (-d) MUST include: |
| 60 | +1. **Line 1**: `initial user prompt: ` followed by the EXACT user input as provided |
| 61 | +2. **Line 2+**: Short description of the task scope and context |
| 62 | + |
| 63 | +## Phase 4: Refine Task |
| 64 | + |
| 65 | +After creating the task, **ALWAYS** invoke the refine-task skill to add implementation details: |
| 66 | + |
| 67 | +``` |
| 68 | +Skill tool invocation: |
| 69 | +- skill: "refine-task" |
| 70 | +- args: "<task-id>" |
| 71 | +``` |
| 72 | + |
| 73 | +This ensures every created task has: |
| 74 | +- Detailed specification |
| 75 | +- Affected files identified |
| 76 | +- Implementation resources gathered |
| 77 | + |
| 78 | +**IMPORTANT**: Do not skip this step. The refinement is mandatory for all created tasks. |
| 79 | + |
| 80 | +</workflow> |
| 81 | + |
| 82 | +<examples> |
| 83 | + |
| 84 | +**Simple task:** |
| 85 | +```bash |
| 86 | +mb create "Add unit tests for auth module" -t task -d "initial user prompt: add tests for auth |
| 87 | +
|
| 88 | +Cover login, logout, and session management functions." |
| 89 | +``` |
| 90 | + |
| 91 | +**Bug with context:** |
| 92 | +```bash |
| 93 | +mb create "Fix login timeout on slow connections" -t bug -d "initial user prompt: users getting 504 errors on slow wifi |
| 94 | +
|
| 95 | +Increase timeout threshold and add retry logic for network failures." |
| 96 | +``` |
| 97 | + |
| 98 | +**Feature request:** |
| 99 | +```bash |
| 100 | +mb create "Implement dark mode toggle" -t feature -d "initial user prompt: add dark mode to settings page |
| 101 | +
|
| 102 | +Add theme switching in settings with localStorage persistence." |
| 103 | +``` |
| 104 | + |
| 105 | +</examples> |
| 106 | + |
| 107 | +<multiple_tasks> |
| 108 | +When creating multiple related tasks: |
| 109 | + |
| 110 | +1. Create tasks in parallel when possible |
| 111 | +2. Add dependencies after creation: |
| 112 | + ```bash |
| 113 | + mb dep add <dependent-task> <dependency-task> |
| 114 | + ``` |
| 115 | + |
| 116 | +Example flow: |
| 117 | +```bash |
| 118 | +mb create "Implement user API" -t feature -d "initial user prompt: need user management endpoints |
| 119 | +
|
| 120 | +REST endpoints for user CRUD operations." |
| 121 | + |
| 122 | +mb create "Add user API tests" -t task -d "initial user prompt: need user management endpoints |
| 123 | +
|
| 124 | +Unit and integration tests for user API." |
| 125 | + |
| 126 | +mb dep add cek-tests cek-api # Tests depend on API |
| 127 | +``` |
| 128 | +</multiple_tasks> |
| 129 | + |
| 130 | +<output> |
| 131 | +After creating and refining the task: |
| 132 | + |
| 133 | +1. **Show created task**: `mb show <task-id>` |
| 134 | +2. **Confirm refinement completed** |
| 135 | +3. **Suggest next steps**: |
| 136 | + - Add dependencies if related tasks exist |
| 137 | + - Start work with `mb update <task-id> --status=in_progress` |
| 138 | +</output> |
0 commit comments