rbin-task-flow 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.json +3 -0
- package/.claude/settings.local.json +8 -0
- package/.cursor/rules/code_comments.mdc +138 -0
- package/.cursor/rules/commit_practices.mdc +141 -0
- package/.cursor/rules/cursor_rules.mdc +53 -0
- package/.cursor/rules/git_control.mdc +88 -0
- package/.cursor/rules/self_improve.mdc +72 -0
- package/.cursor/rules/task_analysis.mdc +190 -0
- package/.cursor/rules/task_execution.mdc +124 -0
- package/.cursor/rules/task_generation.mdc +118 -0
- package/.cursor/rules/task_refactor.mdc +84 -0
- package/.cursor/rules/task_review.mdc +75 -0
- package/.cursor/rules/task_status.mdc +45 -0
- package/.cursor/rules/task_work.mdc +205 -0
- package/.cursor/settings.json +3 -0
- package/.gemini/settings.json +5 -0
- package/.model-versions.json +17 -0
- package/.task-flow/README.md +66 -0
- package/.task-flow/tasks.input.txt +14 -0
- package/.task-flow/tasks.status.md +21 -0
- package/CLAUDE.md +30 -0
- package/GEMINI.md +30 -0
- package/README.md +381 -0
- package/bin/cli.js +56 -0
- package/lib/install.js +280 -0
- package/lib/utils.js +45 -0
- package/lib/version.js +114 -0
- package/package.json +51 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Sync .task-flow-tasks.txt with task system and analyze codebase for new tasks
|
|
3
|
+
globs: **/*
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
- **Task Sync - Complete Synchronization:**
|
|
8
|
+
- **FASTEST FORMAT**: `task-flow: sync` → Complete sync of tasks.input.txt with system
|
|
9
|
+
- When user says "task-flow: sync" or "task-flow sync":
|
|
10
|
+
- **READ**: `.task-flow/tasks.input.txt` to find all tasks
|
|
11
|
+
- **READ**: `.task-flow/.internal/tasks.json` and `.task-flow/.internal/status.json` to see existing tasks and their status
|
|
12
|
+
- **SYNC**: Fully synchronize tasks and status between tasks.input.txt and system files
|
|
13
|
+
- **PRESERVE**: Keep status of existing tasks (done/pending/in_progress) when possible
|
|
14
|
+
|
|
15
|
+
- **Complete Sync Process:**
|
|
16
|
+
1. **Read files**:
|
|
17
|
+
- Read `.task-flow/tasks.input.txt` (all tasks from user input)
|
|
18
|
+
- Read `.task-flow/.internal/tasks.json` (existing generated tasks)
|
|
19
|
+
- Read `.task-flow/.internal/status.json` (existing task status)
|
|
20
|
+
|
|
21
|
+
2. **Compare and identify changes**:
|
|
22
|
+
- **New tasks**: Tasks in tasks.input.txt that don't exist in tasks.json (by comparing `originalRequest`)
|
|
23
|
+
- **Removed tasks**: Tasks in tasks.json that don't exist in tasks.input.txt
|
|
24
|
+
- **Modified tasks**: Tasks that exist in both but `originalRequest` changed (text modified)
|
|
25
|
+
- **Unchanged tasks**: Tasks that exist in both with same `originalRequest`
|
|
26
|
+
|
|
27
|
+
3. **Process new tasks**:
|
|
28
|
+
- For each new task in tasks.input.txt:
|
|
29
|
+
- Generate subtasks following [task_generation.mdc](mdc:.cursor/rules/task_generation.mdc) rules
|
|
30
|
+
- Add to tasks.json with sequential ID
|
|
31
|
+
- Add to status.json with "pending" status for task and all subtasks
|
|
32
|
+
- Add to tasks.status.md with `- [ ]` format
|
|
33
|
+
|
|
34
|
+
4. **Process removed tasks**:
|
|
35
|
+
- For each task in tasks.json not found in tasks.input.txt:
|
|
36
|
+
- Remove from tasks.json
|
|
37
|
+
- Remove from status.json
|
|
38
|
+
- Remove from tasks.status.md
|
|
39
|
+
|
|
40
|
+
5. **Process modified tasks**:
|
|
41
|
+
- For each task where `originalRequest` changed:
|
|
42
|
+
- Update title and description in tasks.json based on new text
|
|
43
|
+
- Regenerate subtasks (following task_generation.mdc rules)
|
|
44
|
+
- **PRESERVE STATUS**: Keep existing status from status.json (task and subtasks)
|
|
45
|
+
- Update tasks.status.md with new subtasks but preserve status marks (`- [x]` for done, `- [ ]` for pending)
|
|
46
|
+
|
|
47
|
+
6. **Process unchanged tasks**:
|
|
48
|
+
- Keep tasks.json unchanged
|
|
49
|
+
- Keep status.json unchanged
|
|
50
|
+
- Keep tasks.status.md unchanged (preserve all status marks)
|
|
51
|
+
|
|
52
|
+
7. **Synchronize status between files**:
|
|
53
|
+
- Read current `status.json` to get all existing statuses
|
|
54
|
+
- Read current `tasks.status.md` to get status marks
|
|
55
|
+
- **Compare and sync**: Ensure `status.json` and `tasks.status.md` are perfectly aligned
|
|
56
|
+
- If there are inconsistencies:
|
|
57
|
+
- Use `status.json` as source of truth for status values
|
|
58
|
+
- Update `tasks.status.md` to match `status.json` (convert "done" → `- [x]`, "pending" → `- [ ]`)
|
|
59
|
+
- Ensure both files reflect the same status for all tasks and subtasks
|
|
60
|
+
|
|
61
|
+
8. **Rebuild files**:
|
|
62
|
+
- Rebuild tasks.json with all tasks in correct order (matching tasks.input.txt order)
|
|
63
|
+
- Rebuild status.json preserving all existing statuses (or updating if needed)
|
|
64
|
+
- Rebuild tasks.status.md with all tasks and correct status marks (synchronized with status.json)
|
|
65
|
+
- **ALWAYS regenerate summary section** at the top of tasks.status.md:
|
|
66
|
+
- Count completed tasks (all subtasks done)
|
|
67
|
+
- Count in-progress tasks (some subtasks done)
|
|
68
|
+
- Total remaining subtasks
|
|
69
|
+
- List each task with status and remaining subtasks count
|
|
70
|
+
|
|
71
|
+
**Critical Rules:**
|
|
72
|
+
- ✅ Always preserve status of existing tasks/subtasks when possible
|
|
73
|
+
- ✅ **SYNC STATUS**: Ensure `status.json` and `tasks.status.md` are always synchronized
|
|
74
|
+
- ✅ Use `status.json` as source of truth, update `tasks.status.md` to match
|
|
75
|
+
- ✅ When regenerating subtasks for modified tasks, try to match existing subtasks by title/description
|
|
76
|
+
- ✅ If subtasks change significantly, mark new ones as "pending" but keep old ones as "done" if they were done
|
|
77
|
+
- ✅ Maintain sequential task IDs (1, 2, 3...) matching order in tasks.input.txt
|
|
78
|
+
- ✅ When removing tasks, remove all associated data (subtasks, status)
|
|
79
|
+
- ✅ After any status change, update BOTH `status.json` and `tasks.status.md` to keep them in sync
|
|
80
|
+
|
|
81
|
+
- **Task Analysis - Suggest New Tasks:**
|
|
82
|
+
- **FAST FORMAT**: `task-flow: think` → Analyze codebase and suggest new tasks
|
|
83
|
+
- When user says "task-flow: think", "analyze if there are new tasks to create", "check for new tasks", or "suggest tasks":
|
|
84
|
+
- **ANALYZE**: Current codebase, recent changes, TODOs, FIXMEs, and project structure
|
|
85
|
+
- **SUGGEST**: New tasks that should be added to `.task-flow/tasks.input.txt`
|
|
86
|
+
- **FORMAT**: Use RBIN Task Flow format: `- Task description` (no [ ] needed)
|
|
87
|
+
- **ASK**: Always ask user if they want to add the suggested tasks
|
|
88
|
+
- **ONLY ACTION**: If user confirms, add tasks to `.task-flow/tasks.input.txt` - nothing else
|
|
89
|
+
- **DON'T**: Automatically add tasks without confirmation
|
|
90
|
+
|
|
91
|
+
- **Analysis Process:**
|
|
92
|
+
1. **Read existing tasks**: Check `.task-flow/tasks.input.txt` to see what's already planned
|
|
93
|
+
2. **Analyze codebase**: Look for:
|
|
94
|
+
- TODO/FIXME comments in code
|
|
95
|
+
- Missing tests or incomplete test coverage
|
|
96
|
+
- Incomplete features or half-implemented functionality
|
|
97
|
+
- Code quality issues (refactoring opportunities)
|
|
98
|
+
- Missing documentation
|
|
99
|
+
- Security improvements needed
|
|
100
|
+
- Performance optimizations
|
|
101
|
+
- Missing error handling
|
|
102
|
+
3. **Check recent changes**: Review git history or recent file modifications
|
|
103
|
+
4. **Identify gaps**: Compare what exists vs what should exist
|
|
104
|
+
5. **Suggest tasks**: Propose specific, actionable tasks
|
|
105
|
+
|
|
106
|
+
- **Task Suggestion Format:**
|
|
107
|
+
```markdown
|
|
108
|
+
## Suggested Tasks for tasks.input.txt
|
|
109
|
+
|
|
110
|
+
- Add unit tests for UserService
|
|
111
|
+
- Implement error handling in API endpoints
|
|
112
|
+
- Refactor authentication middleware
|
|
113
|
+
- Add API documentation with Swagger
|
|
114
|
+
- Optimize database queries in ReportService
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
- **When User Confirms:**
|
|
118
|
+
- If user wants to add suggested tasks:
|
|
119
|
+
- Read `.task-flow/tasks.input.txt`
|
|
120
|
+
- Append new tasks (maintaining existing format)
|
|
121
|
+
- Don't remove or modify existing tasks
|
|
122
|
+
- Keep one task per line with `- ` format (no [ ] needed)
|
|
123
|
+
|
|
124
|
+
- **Natural Language Phrases:**
|
|
125
|
+
- **FAST FORMAT**: `task-flow: sync` or `task-flow sync` → Sync tasks.input.txt with system
|
|
126
|
+
- **FAST FORMAT**: `task-flow: think` or `task-flow think` → Analyze and suggest new tasks
|
|
127
|
+
- "sync tasks" → Same as task-flow: sync
|
|
128
|
+
- "sincronizar tasks" → Same as task-flow: sync
|
|
129
|
+
- "analise se tem tasks novas para criar" → Same as task-flow: think
|
|
130
|
+
- "check for new tasks" → Same as task-flow: think
|
|
131
|
+
- "suggest tasks" → Same as task-flow: think
|
|
132
|
+
- "what tasks should I add?" → Same as task-flow: think
|
|
133
|
+
- "analyze codebase for tasks" → Same as task-flow: think
|
|
134
|
+
- "find missing tasks" → Same as task-flow: think
|
|
135
|
+
|
|
136
|
+
- **Example Workflows:**
|
|
137
|
+
```
|
|
138
|
+
User: "task-flow: sync"
|
|
139
|
+
|
|
140
|
+
AI Action (Complete Sync):
|
|
141
|
+
1. Read .task-flow/tasks.input.txt:
|
|
142
|
+
- Task 1: "Create auth system" (exists, unchanged)
|
|
143
|
+
- Task 2: "Add database" (MODIFIED - was "Setup database")
|
|
144
|
+
- Task 3: "New feature" (NEW - not in tasks.json)
|
|
145
|
+
- Task 4: REMOVED (was in tasks.json, not in tasks.input.txt)
|
|
146
|
+
|
|
147
|
+
2. Read .task-flow/.internal/tasks.json:
|
|
148
|
+
- Task 1: exists, status: done
|
|
149
|
+
- Task 2: exists, status: in_progress (subtask 2.1 done, 2.2 pending)
|
|
150
|
+
- Task 4: exists, status: pending
|
|
151
|
+
|
|
152
|
+
3. Process changes:
|
|
153
|
+
- Task 1: Unchanged → Keep as is, preserve status "done"
|
|
154
|
+
- Task 2: Modified → Update title/description, regenerate subtasks, PRESERVE status (2.1 done, 2.2 pending)
|
|
155
|
+
- Task 3: New → Generate subtasks, add with status "pending"
|
|
156
|
+
- Task 4: Removed → Remove from all files
|
|
157
|
+
|
|
158
|
+
4. Sync status between files:
|
|
159
|
+
- Compare status.json and tasks.status.md
|
|
160
|
+
- Ensure both reflect same status (done → `- [x]`, pending → `- [ ]`)
|
|
161
|
+
- Update tasks.status.md to match status.json if inconsistencies found
|
|
162
|
+
|
|
163
|
+
5. Rebuild files:
|
|
164
|
+
- tasks.json: Tasks 1, 2 (updated), 3 (new) - in order
|
|
165
|
+
- status.json: Preserve Task 1 (done), Task 2 (in_progress with preserved subtask status), Task 3 (pending)
|
|
166
|
+
- tasks.status.md: Reflect all changes with correct status marks, synchronized with status.json
|
|
167
|
+
|
|
168
|
+
User: "task-flow: think"
|
|
169
|
+
AI Action (Analyze):
|
|
170
|
+
1. Read .task-flow/tasks/tasks.input.txt (existing tasks)
|
|
171
|
+
2. Analyze codebase for TODOs, missing features, etc.
|
|
172
|
+
3. Suggest new tasks:
|
|
173
|
+
- Add input validation to login endpoint
|
|
174
|
+
- Create migration for user preferences table
|
|
175
|
+
- Write tests for PaymentService
|
|
176
|
+
4. Ask: "Do you want to add these tasks to tasks.input.txt? [y/N]"
|
|
177
|
+
5. If user confirms (y): Add tasks to tasks.input.txt
|
|
178
|
+
6. If user declines (n): Do nothing, just show suggestions
|
|
179
|
+
|
|
180
|
+
User: "analise se tem tasks novas para criar no task flow"
|
|
181
|
+
AI Action: Same as task-flow: think
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
- **Integration:**
|
|
185
|
+
- Works with [task_generation.mdc](mdc:.cursor/rules/task_generation.mdc) - after adding tasks, user can generate subtasks
|
|
186
|
+
- Follows [task_execution.mdc](mdc:.cursor/rules/task_execution.mdc) workflow
|
|
187
|
+
- Respects [git_control.mdc](mdc:.cursor/rules/git_control.mdc) - never commit automatically
|
|
188
|
+
|
|
189
|
+
- **Principle:**
|
|
190
|
+
> **Analyze the codebase intelligently to suggest meaningful tasks. Don't add tasks automatically - let the user review and decide. Focus on actionable, specific tasks that improve the project.**
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Task management workflow with RBIN Task Flow
|
|
3
|
+
globs: **/*
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
- **RBIN Task Flow - AI-Powered Task Management:**
|
|
8
|
+
- This project uses **RBIN Task Flow** for task tracking and management
|
|
9
|
+
- **IMPORTANT**: When user mentions "task flow", they always refer to **RBIN Task Flow**
|
|
10
|
+
- Tasks are defined in plain text: `.task-flow/tasks.input.txt`
|
|
11
|
+
- Task data is stored in: `.task-flow/.internal/` (do not edit directly - internal system files)
|
|
12
|
+
- Task files: `.internal/tasks.json` (definitions), `.internal/status.json` (progress tracking), and `tasks.status.md` (human-readable status)
|
|
13
|
+
|
|
14
|
+
- **Task Definition:**
|
|
15
|
+
- Edit `.task-flow/tasks.input.txt` to define tasks
|
|
16
|
+
- Use simple format: `- Task description` (no [ ] needed)
|
|
17
|
+
- AI will generate detailed subtasks from descriptions
|
|
18
|
+
- Keep descriptions clear and actionable
|
|
19
|
+
|
|
20
|
+
- **AI Commands:**
|
|
21
|
+
- `task-flow: sync` - Sync new tasks from tasks.input.txt
|
|
22
|
+
- `task-flow: think` - Analyze codebase and suggest new tasks
|
|
23
|
+
- `task-flow: run next X` - Work on next X subtasks sequentially
|
|
24
|
+
- `task-flow: run task X` - Work on all pending subtasks of task X
|
|
25
|
+
- `task-flow: status` - Show current task status
|
|
26
|
+
- `task-flow: review` - Review completed tasks
|
|
27
|
+
- `task-flow: refactor` - Refactor code from current commit
|
|
28
|
+
|
|
29
|
+
- **Workflow Example:**
|
|
30
|
+
```markdown
|
|
31
|
+
1. Add tasks to `.task-flow/tasks.input.txt`:
|
|
32
|
+
- Implement user authentication
|
|
33
|
+
- Add database migrations
|
|
34
|
+
- Create API endpoints
|
|
35
|
+
|
|
36
|
+
2. Use AI command: task-flow: sync (generates detailed subtasks)
|
|
37
|
+
3. Use AI command: task-flow: status (view all tasks and progress)
|
|
38
|
+
4. Use AI command: task-flow: run next X (work on next X subtasks)
|
|
39
|
+
5. Tasks are automatically marked as done when completed
|
|
40
|
+
6. Use AI command: task-flow: review (verify completed tasks)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- **Commit Workflow:**
|
|
44
|
+
- After completing tasks, follow [commit_practices.mdc](mdc:.cursor/rules/commit_practices.mdc)
|
|
45
|
+
- Never execute git commands directly - follow [git_control.mdc](mdc:.cursor/rules/git_control.mdc)
|
|
46
|
+
- Suggest commits with descriptive messages referencing completed tasks
|
|
47
|
+
|
|
48
|
+
- **Commit Message Format:**
|
|
49
|
+
```bash
|
|
50
|
+
git add .
|
|
51
|
+
git commit -m "feat(module): Complete tasks from RBIN Task Flow
|
|
52
|
+
|
|
53
|
+
- Task 1: [description]
|
|
54
|
+
- Task 2: [description]
|
|
55
|
+
|
|
56
|
+
Completed via RBIN Task Flow"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- **Integration with Other Rules:**
|
|
60
|
+
- Follow [commit_practices.mdc](mdc:.cursor/rules/commit_practices.mdc) for commit format
|
|
61
|
+
- Follow [git_control.mdc](mdc:.cursor/rules/git_control.mdc) - NEVER execute git, only suggest
|
|
62
|
+
- See `CLAUDE.md` for complete RBIN Task Flow documentation
|
|
63
|
+
- See `README.md` for installation and setup instructions
|
|
64
|
+
|
|
65
|
+
- **Best Practices:**
|
|
66
|
+
- Keep task descriptions concise but clear
|
|
67
|
+
- Let AI generate detailed implementation steps
|
|
68
|
+
- Review generated subtasks before starting work
|
|
69
|
+
- Update task status regularly through the menu
|
|
70
|
+
- Commit work frequently referencing task progress
|
|
71
|
+
|
|
72
|
+
- **Task Generation:**
|
|
73
|
+
- See [task_generation.mdc](mdc:.cursor/rules/task_generation.mdc) for direct task generation rules
|
|
74
|
+
- When generating tasks, be efficient: read tasks.input.txt, generate JSONs, save files
|
|
75
|
+
- No need to explore codebase or read other files
|
|
76
|
+
|
|
77
|
+
- **Task Analysis:**
|
|
78
|
+
- See [task_analysis.mdc](mdc:.cursor/rules/task_analysis.mdc) for analyzing codebase to suggest new tasks
|
|
79
|
+
- When user asks to analyze for new tasks, intelligently scan codebase and suggest additions
|
|
80
|
+
|
|
81
|
+
- **Simplified Task Work:**
|
|
82
|
+
- See [task_work.mdc](mdc:.cursor/rules/task_work.mdc) for simplified "do next X subtasks" commands
|
|
83
|
+
- When user says "faça as próximas X subtasks", automatically find and implement them
|
|
84
|
+
|
|
85
|
+
- **Task Review:**
|
|
86
|
+
- See [task_review.mdc](mdc:.cursor/rules/task_review.mdc) for reviewing completed tasks
|
|
87
|
+
- When user says "task-flow: review", verify if completed tasks are actually done
|
|
88
|
+
|
|
89
|
+
- **Task Refactor:**
|
|
90
|
+
- See [task_refactor.mdc](mdc:.cursor/rules/task_refactor.mdc) for refactoring code from current commit
|
|
91
|
+
- When user says "task-flow: refactor", improve code quality without changing functionality
|
|
92
|
+
|
|
93
|
+
- **Task Flow Commands - Natural Language Interpretation:**
|
|
94
|
+
- **CRITICAL**: When user mentions **"task flow"**, they **ALWAYS** refer to **RBIN Task Flow**
|
|
95
|
+
- Common phrases that mean "work on RBIN Task Flow subtasks":
|
|
96
|
+
- "trabalhe nas próximas x subtasks do task flow"
|
|
97
|
+
- "work on next x subtasks from task flow"
|
|
98
|
+
- "próximas subtasks do task flow"
|
|
99
|
+
- "task flow subtasks"
|
|
100
|
+
- Any variation mentioning "task flow" + "subtasks"
|
|
101
|
+
|
|
102
|
+
- **When User Asks to Work on Subtasks:**
|
|
103
|
+
- **STEP 1**: Read `.task-flow/.internal/tasks.json` and `.task-flow/.internal/status.json`
|
|
104
|
+
- **STEP 2**: Find next X pending subtasks in sequential order:
|
|
105
|
+
- Order: Task 1 → Subtask 1, 2, 3... → Task 2 → Subtask 1, 2, 3...
|
|
106
|
+
- Only count subtasks with status "pending"
|
|
107
|
+
- Skip subtasks already "done" or "in_progress"
|
|
108
|
+
- **STEP 3**: For each subtask:
|
|
109
|
+
- Read instructions from `.internal/tasks.json`
|
|
110
|
+
- Implement following step-by-step instructions
|
|
111
|
+
- After completion: Update `.internal/status.json` (subtask → "done") and `tasks.status.md` (mark as `- [x]`)
|
|
112
|
+
- **STEP 4**: If all subtasks of a task are done, update task status to "done" in both files
|
|
113
|
+
|
|
114
|
+
- **Example:**
|
|
115
|
+
- User: "trabalhe nas próximas 3 subtasks do task flow"
|
|
116
|
+
- Interpretation: Work on next 3 pending subtasks from RBIN Task Flow
|
|
117
|
+
- Action:
|
|
118
|
+
1. Read `.task-flow/.internal/tasks.json` and `.task-flow/.internal/status.json`
|
|
119
|
+
2. Find first 3 pending subtasks (e.g., 1.1, 1.2, 1.3 if all pending)
|
|
120
|
+
3. Work on 1.1 → mark done in .internal/status.json and tasks.status.md → work on 1.2 → mark done → work on 1.3 → mark done
|
|
121
|
+
4. Update both .internal/status.json and tasks.status.md after each completion
|
|
122
|
+
|
|
123
|
+
- **Principle:**
|
|
124
|
+
> **Use RBIN Task Flow's AI commands for all task management. Define tasks in plain text, let AI generate details, track progress through tasks.status.md, and commit work with descriptive messages.**
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Direct task generation from tasks.input.txt - be efficient and direct
|
|
3
|
+
globs: .task-flow/tasks.input.txt, .task-flow/.internal/tasks.json, .task-flow/.internal/status.json
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
- **Task Generation - Direct and Efficient:**
|
|
8
|
+
- When user asks to "Read tasks.input.txt and generate detailed subtasks updating task status":
|
|
9
|
+
- **READ ONLY**: `.task-flow/tasks.input.txt`
|
|
10
|
+
- **GENERATE**: Two JSON files and one markdown file with the exact structure below
|
|
11
|
+
- **SAVE**: All files to `.task-flow/`
|
|
12
|
+
- **DON'T**: Read other files, check existing JSONs, explore codebase, or ask questions
|
|
13
|
+
|
|
14
|
+
- **Required Actions:**
|
|
15
|
+
1. Read `tasks.input.txt` (ignore comments, only process lines starting with `- `)
|
|
16
|
+
2. For each task line, create a task with sequential ID starting at 1
|
|
17
|
+
3. Generate 3-8 subtasks per task with:
|
|
18
|
+
- Clear title
|
|
19
|
+
- Brief description
|
|
20
|
+
- Step-by-step instructions (3-5 steps)
|
|
21
|
+
4. Create `.task-flow/.internal/tasks.json` with structure below
|
|
22
|
+
5. Create `.task-flow/.internal/status.json` with all tasks/subtasks as "pending"
|
|
23
|
+
6. Create `.task-flow/tasks.status.md` with all tasks and subtasks marked as `- [ ]` (pending)
|
|
24
|
+
7. Write all three files immediately
|
|
25
|
+
|
|
26
|
+
- **tasks.json Structure:**
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"tasks": [
|
|
30
|
+
{
|
|
31
|
+
"id": 1,
|
|
32
|
+
"title": "Task Title",
|
|
33
|
+
"description": "Task description",
|
|
34
|
+
"originalRequest": "- Task description from tasks.input.txt",
|
|
35
|
+
"createdAt": "ISO 8601 timestamp",
|
|
36
|
+
"subtasks": [
|
|
37
|
+
{
|
|
38
|
+
"id": 1,
|
|
39
|
+
"title": "Subtask Title",
|
|
40
|
+
"description": "What this subtask does",
|
|
41
|
+
"instructions": "Step 1: Action\nStep 2: Action\nStep 3: Verify"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- **status.json Structure:**
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"tasks": {
|
|
53
|
+
"1": {
|
|
54
|
+
"status": "pending",
|
|
55
|
+
"subtasks": {
|
|
56
|
+
"1": "pending",
|
|
57
|
+
"2": "pending"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- **tasks.status.md Structure:**
|
|
65
|
+
```markdown
|
|
66
|
+
# Task Status
|
|
67
|
+
|
|
68
|
+
<!-- ⚠️ AVISO: Este arquivo é atualizado automaticamente pela IA. NÃO edite manualmente. -->
|
|
69
|
+
|
|
70
|
+
## 📊 Resumo
|
|
71
|
+
|
|
72
|
+
- ✅ **Tasks Completas**: 0
|
|
73
|
+
- ⏳ **Tasks em Andamento**: 2
|
|
74
|
+
- 📝 **Subtasks Restantes**: 8
|
|
75
|
+
|
|
76
|
+
**Tasks:**
|
|
77
|
+
- ✅ Task 1: First task (completa)
|
|
78
|
+
- ⏳ Task 2: Second task (3 subtasks restantes de 5)
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Tasks
|
|
83
|
+
|
|
84
|
+
- [x] First task
|
|
85
|
+
|
|
86
|
+
- [x] Subtask Title 1
|
|
87
|
+
- [x] Subtask Title 2
|
|
88
|
+
|
|
89
|
+
- [ ] Second task
|
|
90
|
+
|
|
91
|
+
- [x] Subtask Title 1
|
|
92
|
+
- [ ] Subtask Title 2
|
|
93
|
+
- [ ] Subtask Title 3
|
|
94
|
+
```
|
|
95
|
+
- **ALWAYS include summary section** at the top with:
|
|
96
|
+
- ✅ Tasks completas (all subtasks done)
|
|
97
|
+
- ⏳ Tasks em andamento (some subtasks done)
|
|
98
|
+
- 📝 Total de subtasks restantes
|
|
99
|
+
- Lista de tasks com status e quantas subtasks faltam
|
|
100
|
+
- All tasks and subtasks start as `- [ ]` (pending)
|
|
101
|
+
- Format: Task title with `- [ ]` or `- [x]`, then subtasks indented with ` - [ ]` or ` - [x]`
|
|
102
|
+
- **CRITICAL**: Always regenerate summary when updating tasks.status.md
|
|
103
|
+
|
|
104
|
+
- **Example:**
|
|
105
|
+
- Input (`tasks.input.txt`): `- Create authentication system`
|
|
106
|
+
- Output: Task with ID 1, 5 subtasks (setup database, create models, implement login, add JWT, test)
|
|
107
|
+
|
|
108
|
+
- **Critical Rules:**
|
|
109
|
+
- ✅ Be direct: Read → Generate → Save
|
|
110
|
+
- ✅ No unnecessary file reads
|
|
111
|
+
- ✅ No exploration of codebase
|
|
112
|
+
- ✅ No questions - just generate
|
|
113
|
+
- ✅ Use current timestamp for `createdAt`
|
|
114
|
+
- ✅ All statuses start as "pending"
|
|
115
|
+
- ✅ Subtask IDs are sequential per task (1, 2, 3...)
|
|
116
|
+
|
|
117
|
+
- **Principle:**
|
|
118
|
+
> **When generating tasks, be fast and direct. Read tasks.input.txt, generate JSONs and tasks.status.md with proper structure, save files. No exploration needed.**
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Refactor code from current commit tasks without changing functionality
|
|
3
|
+
globs: **/*
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
- **Task Refactor - Improve Code Quality:**
|
|
8
|
+
- **FAST FORMAT**: `task-flow: refactor` → Refactor code from current commit
|
|
9
|
+
- When user says "task-flow: refactor" or "refactor current tasks":
|
|
10
|
+
- **IDENTIFY**: Files changed in current commit (or staged changes)
|
|
11
|
+
- **REFACTOR**: Improve code quality without changing functionality
|
|
12
|
+
- **REMOVE**: All explanatory comments (following code_comments.mdc rules)
|
|
13
|
+
- **PRESERVE**: Only separation comments in format: `// ────────────────────────────────`
|
|
14
|
+
- **IMPROVE**: Code structure, naming, organization, but keep behavior identical
|
|
15
|
+
|
|
16
|
+
- **Refactoring Rules:**
|
|
17
|
+
1. **No Functional Changes**: Code must behave exactly the same
|
|
18
|
+
2. **Remove Comments**: Remove all explanatory comments
|
|
19
|
+
3. **Keep Separation Comments**: Preserve comments that separate code blocks:
|
|
20
|
+
```typescript
|
|
21
|
+
// ────────────────────────────────
|
|
22
|
+
// Section Name
|
|
23
|
+
// ────────────────────────────────
|
|
24
|
+
```
|
|
25
|
+
4. **Improve Code Quality**:
|
|
26
|
+
- Better variable/function names
|
|
27
|
+
- Extract repeated code
|
|
28
|
+
- Improve code organization
|
|
29
|
+
- Better error handling
|
|
30
|
+
- Remove dead code
|
|
31
|
+
- Simplify complex logic
|
|
32
|
+
5. **Follow Project Rules**: Respect [code_comments.mdc](mdc:.cursor/rules/code_comments.mdc)
|
|
33
|
+
|
|
34
|
+
- **Comment Removal:**
|
|
35
|
+
- ❌ Remove: `// This function does X`
|
|
36
|
+
- ❌ Remove: `// Check if user exists`
|
|
37
|
+
- ❌ Remove: `// TODO: fix this later`
|
|
38
|
+
- ✅ Keep: `// ────────────────────────────────`
|
|
39
|
+
- ✅ Keep: `// ────────────────────────────────\n// Section Name\n// ────────────────────────────────`
|
|
40
|
+
|
|
41
|
+
- **Process:**
|
|
42
|
+
1. Identify files changed in current commit/staged changes
|
|
43
|
+
2. Read each file
|
|
44
|
+
3. Refactor:
|
|
45
|
+
- Remove explanatory comments
|
|
46
|
+
- Improve code structure
|
|
47
|
+
- Better naming
|
|
48
|
+
- Extract functions if needed
|
|
49
|
+
- Simplify logic
|
|
50
|
+
4. Verify: Code still works the same way
|
|
51
|
+
5. Show summary of changes
|
|
52
|
+
|
|
53
|
+
- **Natural Language Phrases:**
|
|
54
|
+
- **FAST FORMAT**: `task-flow: refactor` or `task-flow refactor`
|
|
55
|
+
- "refactor current tasks"
|
|
56
|
+
- "refactor code from commit"
|
|
57
|
+
- "improve code quality"
|
|
58
|
+
- "clean up code"
|
|
59
|
+
- Any variation asking to refactor/improve code
|
|
60
|
+
|
|
61
|
+
- **Example:**
|
|
62
|
+
```
|
|
63
|
+
User: "task-flow: refactor"
|
|
64
|
+
|
|
65
|
+
AI Action:
|
|
66
|
+
1. Check git diff or staged files
|
|
67
|
+
2. Identify files changed in current commit
|
|
68
|
+
3. For each file:
|
|
69
|
+
- Remove explanatory comments
|
|
70
|
+
- Improve code structure
|
|
71
|
+
- Better naming
|
|
72
|
+
- Simplify logic
|
|
73
|
+
4. Preserve separation comments
|
|
74
|
+
5. Verify functionality unchanged
|
|
75
|
+
6. Show refactoring summary
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- **Integration:**
|
|
79
|
+
- Follows [code_comments.mdc](mdc:.cursor/rules/code_comments.mdc) - comment removal rules
|
|
80
|
+
- Works with [task_execution.mdc](mdc:.cursor/rules/task_execution.mdc) workflow
|
|
81
|
+
- Respects [git_control.mdc](mdc:.cursor/rules/git_control.mdc) - never commit automatically
|
|
82
|
+
|
|
83
|
+
- **Principle:**
|
|
84
|
+
> **Refactor code to improve quality without changing behavior. Remove explanatory comments, keep only separation comments, improve structure and naming. Code must work exactly the same.**
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review completed tasks to verify they are actually done or erroneously marked
|
|
3
|
+
globs: **/*
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
- **Task Review - Verify Completed Tasks:**
|
|
8
|
+
- **FAST FORMAT**: `task-flow: review` → Review all completed tasks
|
|
9
|
+
- When user says "task-flow: review" or "review completed tasks":
|
|
10
|
+
- **READ**: `.task-flow/.internal/tasks.json` and `.task-flow/.internal/status.json`
|
|
11
|
+
- **IDENTIFY**: All tasks/subtasks marked as "done"
|
|
12
|
+
- **VERIFY**: Check if each completed task/subtask is actually implemented
|
|
13
|
+
- **REPORT**: List tasks that are erroneously marked as done
|
|
14
|
+
- **SUGGEST**: Mark incorrectly completed tasks back to "pending" or "in_progress"
|
|
15
|
+
|
|
16
|
+
- **Review Process:**
|
|
17
|
+
1. Read `.task-flow/.internal/tasks.json` to get all task definitions
|
|
18
|
+
2. Read `.task-flow/.internal/status.json` to get completion status
|
|
19
|
+
3. For each task/subtask marked as "done":
|
|
20
|
+
- Check if the implementation exists in codebase
|
|
21
|
+
- Verify if implementation matches the task requirements
|
|
22
|
+
- Check if tests exist (if required by task)
|
|
23
|
+
- Verify if documentation is updated (if required)
|
|
24
|
+
4. Identify discrepancies:
|
|
25
|
+
- Task marked "done" but code doesn't exist
|
|
26
|
+
- Task marked "done" but implementation incomplete
|
|
27
|
+
- Task marked "done" but tests missing
|
|
28
|
+
- Task marked "done" but requirements not met
|
|
29
|
+
5. Report findings and ask user if they want to correct status
|
|
30
|
+
|
|
31
|
+
- **Review Report Format:**
|
|
32
|
+
```
|
|
33
|
+
📋 Task Review Results:
|
|
34
|
+
|
|
35
|
+
✅ Correctly Completed:
|
|
36
|
+
- Task 1.2: User authentication (verified)
|
|
37
|
+
- Task 2.1: Database migration (verified)
|
|
38
|
+
|
|
39
|
+
⚠️ Erroneously Marked as Done:
|
|
40
|
+
- Task 1.3: API endpoint - Code exists but tests missing
|
|
41
|
+
- Task 2.4: Error handling - Implementation incomplete
|
|
42
|
+
|
|
43
|
+
Do you want to update status for erroneous tasks? [y/N]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- **Natural Language Phrases:**
|
|
47
|
+
- **FAST FORMAT**: `task-flow: review` or `task-flow review`
|
|
48
|
+
- "review completed tasks"
|
|
49
|
+
- "verify done tasks"
|
|
50
|
+
- "check if tasks are really done"
|
|
51
|
+
- "review task status"
|
|
52
|
+
- Any variation asking to review/verify completed tasks
|
|
53
|
+
|
|
54
|
+
- **Example:**
|
|
55
|
+
```
|
|
56
|
+
User: "task-flow: review"
|
|
57
|
+
|
|
58
|
+
AI Action:
|
|
59
|
+
1. Read tasks.json and status.json
|
|
60
|
+
2. Find all "done" tasks/subtasks
|
|
61
|
+
3. Verify each one:
|
|
62
|
+
- Check if files exist
|
|
63
|
+
- Check if code matches requirements
|
|
64
|
+
- Check if tests exist
|
|
65
|
+
4. Report findings
|
|
66
|
+
5. Ask if user wants to correct status
|
|
67
|
+
6. If confirmed, update status.json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
- **Integration:**
|
|
71
|
+
- Works with [task_execution.mdc](mdc:.cursor/rules/task_execution.mdc) workflow
|
|
72
|
+
- Respects [git_control.mdc](mdc:.cursor/rules/git_control.mdc) - never commit automatically
|
|
73
|
+
|
|
74
|
+
- **Principle:**
|
|
75
|
+
> **Review completed tasks to ensure quality. Verify that "done" means actually done, not just marked. Help maintain accurate task status.**
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show task status from tasks.status.md - simple and direct
|
|
3
|
+
globs: **/*
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
- **Task Status - Show Current Status:**
|
|
8
|
+
- **FAST FORMAT**: `task-flow: status` → Show current task status
|
|
9
|
+
- When user says "task-flow: status" or "task-flow status":
|
|
10
|
+
- **READ**: `.task-flow/tasks.status.md`
|
|
11
|
+
- **DISPLAY**: Show the current status of all tasks and subtasks
|
|
12
|
+
- **FORMAT**: Display in a clear, readable format showing done/pending tasks
|
|
13
|
+
|
|
14
|
+
- **Status Display:**
|
|
15
|
+
- Read `.task-flow/tasks.status.md` file
|
|
16
|
+
- Show tasks marked as `- [x]` (done) and `- [ ]` (pending)
|
|
17
|
+
- Display subtasks with their status
|
|
18
|
+
- Show progress summary if available
|
|
19
|
+
|
|
20
|
+
- **Natural Language Phrases:**
|
|
21
|
+
- **FAST FORMAT**: `task-flow: status` or `task-flow status`
|
|
22
|
+
- "show task status"
|
|
23
|
+
- "status das tasks"
|
|
24
|
+
- "ver status"
|
|
25
|
+
- "task status"
|
|
26
|
+
- Any variation asking to show/display task status
|
|
27
|
+
|
|
28
|
+
- **Example:**
|
|
29
|
+
```
|
|
30
|
+
User: "task-flow: status"
|
|
31
|
+
|
|
32
|
+
AI Action:
|
|
33
|
+
1. Read .task-flow/tasks.status.md
|
|
34
|
+
2. Display current status showing:
|
|
35
|
+
- Tasks marked as done [x]
|
|
36
|
+
- Tasks marked as pending [ ]
|
|
37
|
+
- Subtasks status
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- **Integration:**
|
|
41
|
+
- Works with [task_execution.mdc](mdc:.cursor/rules/task_execution.mdc) workflow
|
|
42
|
+
- Status is maintained in tasks.status.md file
|
|
43
|
+
|
|
44
|
+
- **Principle:**
|
|
45
|
+
> **Show task status quickly and clearly. Read tasks.status.md and display in a readable format.**
|