Skill: task-capture
Purpose
Provides minimal-friction task capture that processes natural language input into structured tasks. Focuses on SPEED over perfectionism - get it captured, refine later if needed.
Trigger Conditions
- Slash command:
/capture [text]
- Natural phrases: ["I need to...", "remind me to...", "add task", "new todo", "capture this", "jag måste...", "lägg till uppgift", "fånga detta", "kom ihåg att...", "todo:", "task:"]
- Auto-trigger: When user expresses something they need to do
Required Context (gather BEFORE starting workflow)
- Active roles via
roles getActiveRoles → returns Role[] for role inference
- Active projects via
projects getActiveProjects → returns Project[] for project linking (optional)
How to gather context:
# Get active roles (for role inference/selection)
bun run src/aida-cli.ts roles getActiveRoles
# Get active projects (optional, for project association)
bun run src/aida-cli.ts projects getActiveProjects
Workflow Steps
Step 1: Parse Input
See PARSING-RULES.md for detailed parsing rules.
- Action: Extract task title, deadline hints, role hints, project hints, energy hints, priority hints
- Output to user: None (internal processing)
- Wait for: Continue immediately
Step 2: Infer Role
See ROLE-INFERENCE.md for detailed inference rules.
- Action: Match keywords, project context, or conversation context to determine role
- Output to user: If ambiguous, ask "Vilken roll gäller detta?" with role options
- Wait for: User selects role (only if ambiguous)
Step 3: Check for Duplicates (Optional)
- Action: Search existing tasks via
tasks searchTasks "[parsed title]"
- Output to user: If similar task found, warn: "Det finns redan en liknande uppgift: [title]. Vill du lägga till ändå?"
- Wait for: User confirms or cancels
Step 4: Create Task
- Action: Create task via
tasks createTask {...}
- CLI call:
bun run src/aida-cli.ts tasks createTask '{
"title": "[parsed title]",
"role_id": [inferred/selected role id],
"deadline": "[parsed date or null]",
"priority": [0-3, default 0],
"energy_requirement": "[low/medium/high or null]",
"project_id": [associated project or null]
}'
- Output to user: None yet
- Wait for: Continue immediately
Step 5: Create Journal Entry
Step 6: Confirm & Suggest Next Step
Output Format
- Language: Swedish (default)
- Style: Quick confirmation, minimal text
- Confirmation: Always show captured task with role and deadline (if set)
Example output:
✅ Fångat: "Ringa tandläkaren"
Roll: Förälder
Sparad! Något mer?
Example with deadline:
✅ Fångat: "Skicka rapporten till chefen"
Roll: Systemutvecklare
Deadline: 2025-12-20
Sparad med deadline! 📅
Error Handling
- If
roles getActiveRoles returns empty: Show error "Inga roller finns. Du behöver skapa roller först via profile-management."
- If role inference fails and no clarification: Use first active role as default and inform user "Sparad i [role name]. Om det är fel roll kan du ändra senare."
- If
tasks createTask fails: Show error message with details, ask user if they want to retry
- If
journal createEntry fails: Task is still created, just log warning to console and continue
- If duplicate task found: Warn user and ask for confirmation before proceeding
- If project not found: Ignore project_id and create task without project association
Anti-patterns
- NEVER create task without role_id - always infer or ask for role
- NEVER use non-existent project_id - validate project exists before associating
- NEVER over-ask - infer as much as possible, only ask if truly ambiguous
- NEVER force all fields - capture with minimal info, user can refine later
- NEVER modify existing tasks - only create new ones
- NEVER change task status - tasks are created with status='captured'
- NEVER use direct SQL - always use aida-cli.ts
- NEVER run query modules directly (e.g.,
bun run src/database/queries/tasks.ts)
Tool Contract
Allowed CLI Operations:
- tasks: createTask, searchTasks (duplicate check)
- roles: getActiveRoles, getRoleById (READ ONLY)
- projects: searchProjects, getActiveProjects (READ ONLY)
- journal: createEntry (type: task)
Forbidden Operations:
- Updating existing tasks
- Changing task status
- Deleting tasks
- Any profile operations
- Any plan operations
Default Task Values:
- status:
captured
- priority: inferred or null
- energy_requirement: inferred or null
File Access:
- No file reads needed
- No file writes - All operations via CLI
Supporting Documentation
- PARSING-RULES.md - How to parse natural language input
- ROLE-INFERENCE.md - Rules for inferring roles
- QUICK-CAPTURE.md - Minimal-friction capture flow
Design Principles
- Speed over perfection - Capture now, refine later
- Minimal questions - Infer as much as possible
- Non-blocking - Don't force user to fill in all fields
- Confirm, don't interrogate - Show what was captured, offer to adjust
1---2name: task-capture3description: Quick, structured task capture with automatic processing. Use when user wants to capture a task, add a todo, or remember something. Auto-triggers on phrases like "I need to...", "remind me to...", "add task", "new todo", "capture this", "jag måste...", "lägg till uppgift", "fånga detta".4---5
6# Skill: task-capture
7
8## Purpose
9
10Provides minimal-friction task capture that processes natural language input into structured tasks. Focuses on SPEED over perfectionism - get it captured, refine later if needed.
11
12## Trigger Conditions
13
14- **Slash command:** `/capture [text]`
15- **Natural phrases:** ["I need to...", "remind me to...", "add task", "new todo", "capture this", "jag måste...", "lägg till uppgift", "fånga detta", "kom ihåg att...", "todo:", "task:"]
16- **Auto-trigger:** When user expresses something they need to do
17
18## Required Context (gather BEFORE starting workflow)
19
201. Active roles via `roles getActiveRoles` → returns Role[] for role inference
212. Active projects via `projects getActiveProjects` → returns Project[] for project linking (optional)
22
23**How to gather context:**
24```bash
25# Get active roles (for role inference/selection)
26bun run src/aida-cli.ts roles getActiveRoles
27
28# Get active projects (optional, for project association)
29bun run src/aida-cli.ts projects getActiveProjects
30```
31
32## Workflow Steps
33
34### Step 1: Parse Input
35
36See [PARSING-RULES.md](PARSING-RULES.md) for detailed parsing rules.
37
38- **Action:** Extract task title, deadline hints, role hints, project hints, energy hints, priority hints
39- **Output to user:** None (internal processing)
40- **Wait for:** Continue immediately
41
42### Step 2: Infer Role
43
44See [ROLE-INFERENCE.md](ROLE-INFERENCE.md) for detailed inference rules.
45
46- **Action:** Match keywords, project context, or conversation context to determine role
47- **Output to user:** If ambiguous, ask "Vilken roll gäller detta?" with role options
48- **Wait for:** User selects role (only if ambiguous)
49
50### Step 3: Check for Duplicates (Optional)
51
52- **Action:** Search existing tasks via `tasks searchTasks "[parsed title]"`
53- **Output to user:** If similar task found, warn: "Det finns redan en liknande uppgift: [title]. Vill du lägga till ändå?"
54- **Wait for:** User confirms or cancels
55
56### Step 4: Create Task
57
58- **Action:** Create task via `tasks createTask {...}`
59- **CLI call:**
60 ```bash
61 bun run src/aida-cli.ts tasks createTask '{
62 "title": "[parsed title]",
63 "role_id": [inferred/selected role id],
64 "deadline": "[parsed date or null]",
65 "priority": [0-3, default 0],
66 "energy_requirement": "[low/medium/high or null]",
67 "project_id": [associated project or null]
68 }'
69 ```
70- **Output to user:** None yet
71- **Wait for:** Continue immediately
72
73### Step 5: Create Journal Entry
74
75- **Action:** Log capture via `journal createEntry {...}`
76- **CLI call:**
77 ```bash
78 bun run src/aida-cli.ts journal createEntry '{
79 "entry_type": "task",
80 "content": "Fångade: [task title]",
81 "related_task_id": [created task id]
82 }'
83 ```
84- **Output to user:** None yet
85- **Wait for:** Continue immediately
86
87### Step 6: Confirm & Suggest Next Step
88
89- **Output to user:**
90 ```
91 ✅ Fångat: "[task title]"
92 Roll: [role name]
93 [Deadline: datum] (if set)
94
95 Vill du göra något mer med den? (annars är den sparad i captured-status)
96 ```
97- **Optional follow-ups:**
98 - "Vill du sätta en deadline?"
99 - "Ska vi aktivera den nu?" (triggers task-activation)
100 - "Finns det fler saker att fånga?"
101- **Wait for:** User input (optional)
102
103## Output Format
104
105- **Language:** Swedish (default)
106- **Style:** Quick confirmation, minimal text
107- **Confirmation:** Always show captured task with role and deadline (if set)
108
109**Example output:**
110```
111✅ Fångat: "Ringa tandläkaren"
112 Roll: Förälder
113
114Sparad! Något mer?
115```
116
117**Example with deadline:**
118```
119✅ Fångat: "Skicka rapporten till chefen"
120 Roll: Systemutvecklare
121 Deadline: 2025-12-20
122
123Sparad med deadline! 📅
124```
125
126## Error Handling
127
128- **If `roles getActiveRoles` returns empty:** Show error "Inga roller finns. Du behöver skapa roller först via profile-management."
129- **If role inference fails and no clarification:** Use first active role as default and inform user "Sparad i [role name]. Om det är fel roll kan du ändra senare."
130- **If `tasks createTask` fails:** Show error message with details, ask user if they want to retry
131- **If `journal createEntry` fails:** Task is still created, just log warning to console and continue
132- **If duplicate task found:** Warn user and ask for confirmation before proceeding
133- **If project not found:** Ignore project_id and create task without project association
134
135## Anti-patterns
136
137- **NEVER create task without role_id** - always infer or ask for role
138- **NEVER use non-existent project_id** - validate project exists before associating
139- **NEVER over-ask** - infer as much as possible, only ask if truly ambiguous
140- **NEVER force all fields** - capture with minimal info, user can refine later
141- **NEVER modify existing tasks** - only create new ones
142- **NEVER change task status** - tasks are created with status='captured'
143- **NEVER use direct SQL** - always use aida-cli.ts
144- **NEVER run query modules directly** (e.g., `bun run src/database/queries/tasks.ts`)
145
146## Tool Contract
147
148**Allowed CLI Operations:**
149- **tasks:** createTask, searchTasks (duplicate check)
150- **roles:** getActiveRoles, getRoleById (READ ONLY)
151- **projects:** searchProjects, getActiveProjects (READ ONLY)
152- **journal:** createEntry (type: task)
153
154**Forbidden Operations:**
155- Updating existing tasks
156- Changing task status
157- Deleting tasks
158- Any profile operations
159- Any plan operations
160
161**Default Task Values:**
162- status: `captured`
163- priority: inferred or null
164- energy_requirement: inferred or null
165
166**File Access:**
167- **No file reads needed**
168- **No file writes** - All operations via CLI
169
170## Supporting Documentation
171
172- [PARSING-RULES.md](PARSING-RULES.md) - How to parse natural language input
173- [ROLE-INFERENCE.md](ROLE-INFERENCE.md) - Rules for inferring roles
174- [QUICK-CAPTURE.md](QUICK-CAPTURE.md) - Minimal-friction capture flow
175
176## Design Principles
177
1781. **Speed over perfection** - Capture now, refine later
1792. **Minimal questions** - Infer as much as possible
1803. **Non-blocking** - Don't force user to fill in all fields
1814. **Confirm, don't interrogate** - Show what was captured, offer to adjust