Start work on a task. Use when user says "začni práci na task-XX", "chci pracovat na task-XX", "start task XX", or runs /start-task.
Validate dependencies, perform thorough research & analysis, present implementation proposal with supporting arguments, and get user approval before starting work.
/start-task 02 # Task 02 - stays on main (default)
/start-task 02 --branch # Task 02 - creates feature branch
/start-task task-02 # Explicit task-02
Current branch: !git branch --show-current
Uncommitted changes: !git status --porcelain
Is worktree: !test -f "$(git rev-parse --show-toplevel)/.git" && echo "YES - WORKTREE" || echo "NO - main repo"
The script accepts multiple formats:
02 or 2 - just task number (uses current or default phase)task-02--branch flag - create feature branch instead of staying on mainBefore starting, check:
specification/phase-XX-*/tasks/If blocked, show which tasks need to be completed first.
Mode detection:
IS_WORKTREE=false
if [[ -f "$(git rev-parse --show-toplevel)/.git" ]]; then
IS_WORKTREE=true
fi
Branch handling by mode:
| Mode | Action |
|---|---|
| MAIN (default) | Stay on main, no branch created |
--branch flag | Create phase-XX/task-YY-desc branch from main |
| WORKTREE | Branch already exists, just update status |
Update the task file:
| Status | ⚪ pending | to | Status | 🔵 in_progress |This step is MANDATORY before any implementation begins.
Perform thorough research based on task scope:
Codebase Analysis
Glob and Grep to explore existing patterns in the codebaseWeb Research
WebSearch to find:
WebFetch to read specific documentation pagesRelated Specs Review
Create a structured proposal with:
## Implementation Proposal for [Task Name]
### Approach
[Describe the chosen approach in 2-3 sentences]
### Key Decisions
| Decision | Choice | Rationale |
|----------|--------|-----------|
| [Decision 1] | [Choice] | [Why - with source reference] |
| [Decision 2] | [Choice] | [Why - with source reference] |
### Implementation Steps
1. [Step 1 - specific and actionable]
2. [Step 2 - specific and actionable]
...
### Supporting Evidence
- 📚 [Documentation link or codebase reference]
- ✅ Best practice: [description with source]
- ⚠️ Avoided pitfall: [what we're avoiding and why]
### Alternatives Considered
| Alternative | Why not chosen |
|-------------|----------------|
| [Alt 1] | [Reason] |
### Questions/Clarifications (if any)
- [Question needing user input]
STOP and ask for user confirmation before implementing:
Use AskUserQuestion with options:
Do NOT start implementation without explicit user approval.
After approval, display the task's scope section and begin implementation.
$ARGUMENTS - Task identifier + optional flags
02 - task number--branch - create feature branch (otherwise stays on main)On success (MAIN mode):
Started task task-02: Shared Kernel
Mode: MAIN (commits go directly to main)
Task file: specification/phase-01-foundation/tasks/task-02-shared-kernel.md
Task scope:
- [ ] Implement Entity base class
...
On success (BRANCH mode):
Started task task-02: Shared Kernel
Mode: FEATURE_BRANCH
Branch: phase-01/task-02-shared-kernel
Task file: specification/phase-01-foundation/tasks/task-02-shared-kernel.md
Task scope:
- [ ] Implement Entity base class
...
On error (blocked):
Error: Task task-03 is blocked by: task-02
Complete the blocking tasks first or use /task-status to see the full picture.
After starting a task:
/commit to commit changes with proper [XX-YY] type: format/finish-task when done (behavior depends on mode)/task-status to check progress