@magic-ingredients/tiny-brain-local 0.11.0 → 0.13.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.
Files changed (89) hide show
  1. package/dist/cli/cli-factory.d.ts.map +1 -1
  2. package/dist/cli/cli-factory.js +81 -2
  3. package/dist/cli/cli-factory.js.map +1 -1
  4. package/dist/cli/commands/analyse.command.d.ts +11 -0
  5. package/dist/cli/commands/analyse.command.d.ts.map +1 -1
  6. package/dist/cli/commands/analyse.command.js +31 -0
  7. package/dist/cli/commands/analyse.command.js.map +1 -1
  8. package/dist/cli/commands/config.command.d.ts +10 -2
  9. package/dist/cli/commands/config.command.d.ts.map +1 -1
  10. package/dist/cli/commands/config.command.js +171 -3
  11. package/dist/cli/commands/config.command.js.map +1 -1
  12. package/dist/cli/commands/track-commit.command.d.ts +52 -0
  13. package/dist/cli/commands/track-commit.command.d.ts.map +1 -0
  14. package/dist/cli/commands/track-commit.command.js +239 -0
  15. package/dist/cli/commands/track-commit.command.js.map +1 -0
  16. package/dist/cli/commands/validate-commit-message.command.d.ts +47 -0
  17. package/dist/cli/commands/validate-commit-message.command.d.ts.map +1 -0
  18. package/dist/cli/commands/validate-commit-message.command.js +223 -0
  19. package/dist/cli/commands/validate-commit-message.command.js.map +1 -0
  20. package/dist/core/mcp-server.d.ts +1 -0
  21. package/dist/core/mcp-server.d.ts.map +1 -1
  22. package/dist/core/mcp-server.js +10 -0
  23. package/dist/core/mcp-server.js.map +1 -1
  24. package/dist/prompts/planning/planning.prompt.d.ts.map +1 -1
  25. package/dist/prompts/planning/planning.prompt.js +36 -45
  26. package/dist/prompts/planning/planning.prompt.js.map +1 -1
  27. package/dist/services/adr-service.d.ts +70 -0
  28. package/dist/services/adr-service.d.ts.map +1 -0
  29. package/dist/services/adr-service.js +242 -0
  30. package/dist/services/adr-service.js.map +1 -0
  31. package/dist/services/agent-manager.d.ts.map +1 -1
  32. package/dist/services/agent-manager.js +5 -2
  33. package/dist/services/agent-manager.js.map +1 -1
  34. package/dist/services/analyse-service.d.ts +31 -0
  35. package/dist/services/analyse-service.d.ts.map +1 -1
  36. package/dist/services/analyse-service.js +192 -5
  37. package/dist/services/analyse-service.js.map +1 -1
  38. package/dist/services/repo-service.d.ts +38 -4
  39. package/dist/services/repo-service.d.ts.map +1 -1
  40. package/dist/services/repo-service.js +364 -10
  41. package/dist/services/repo-service.js.map +1 -1
  42. package/dist/tools/config/config.tool.d.ts +10 -0
  43. package/dist/tools/config/config.tool.d.ts.map +1 -0
  44. package/dist/tools/config/config.tool.js +199 -0
  45. package/dist/tools/config/config.tool.js.map +1 -0
  46. package/dist/tools/config/index.d.ts +2 -0
  47. package/dist/tools/config/index.d.ts.map +1 -0
  48. package/dist/tools/config/index.js +2 -0
  49. package/dist/tools/config/index.js.map +1 -0
  50. package/dist/tools/persona/as.tool.d.ts +4 -0
  51. package/dist/tools/persona/as.tool.d.ts.map +1 -1
  52. package/dist/tools/persona/as.tool.js +58 -11
  53. package/dist/tools/persona/as.tool.js.map +1 -1
  54. package/dist/tools/plan/plan.tool.d.ts +4 -1
  55. package/dist/tools/plan/plan.tool.d.ts.map +1 -1
  56. package/dist/tools/plan/plan.tool.js +486 -157
  57. package/dist/tools/plan/plan.tool.js.map +1 -1
  58. package/dist/utils/adr-pattern-detector.d.ts +38 -0
  59. package/dist/utils/adr-pattern-detector.d.ts.map +1 -0
  60. package/dist/utils/adr-pattern-detector.js +158 -0
  61. package/dist/utils/adr-pattern-detector.js.map +1 -0
  62. package/dist/utils/adr-suggestion-generator.d.ts +50 -0
  63. package/dist/utils/adr-suggestion-generator.d.ts.map +1 -0
  64. package/dist/utils/adr-suggestion-generator.js +63 -0
  65. package/dist/utils/adr-suggestion-generator.js.map +1 -0
  66. package/dist/utils/commit-parser.d.ts +25 -0
  67. package/dist/utils/commit-parser.d.ts.map +1 -0
  68. package/dist/utils/commit-parser.js +46 -0
  69. package/dist/utils/commit-parser.js.map +1 -0
  70. package/dist/utils/package-version.d.ts +11 -0
  71. package/dist/utils/package-version.d.ts.map +1 -0
  72. package/dist/utils/package-version.js +26 -0
  73. package/dist/utils/package-version.js.map +1 -0
  74. package/package.json +4 -3
  75. package/templates/adr/README.md +243 -0
  76. package/templates/adr/_template/0001-record-architecture-decisions.md +223 -0
  77. package/templates/adr/_template/ADR_CREATION_INSTRUCTIONS.md +234 -0
  78. package/templates/adr/_template/adr-schema.json +74 -0
  79. package/templates/adr/_template/adr-template.md +136 -0
  80. package/templates/prd/PRD_CREATION_INSTRUCTIONS.md +268 -0
  81. package/templates/prd/README.md +252 -0
  82. package/templates/prd/_template/feature-template.md +105 -0
  83. package/templates/prd/_template/prd-template.md +126 -0
  84. package/templates/prd/example-task-management/features/task-collaboration.md +84 -0
  85. package/templates/prd/example-task-management/features/task-crud.md +222 -0
  86. package/templates/prd/example-task-management/features/task-workflow.md +62 -0
  87. package/templates/prd/example-task-management/prd.md +177 -0
  88. package/templates/prd/feature-schema.json +54 -0
  89. package/templates/prd/prd-schema.json +60 -0
@@ -0,0 +1,252 @@
1
+ # Product Requirements Documents (PRDs)
2
+
3
+ This directory contains Product Requirements Documents (PRDs) for tiny-brain features and capabilities. PRDs provide structured documentation of product requirements with clear feature breakdown and implementation tracking.
4
+
5
+ ## Purpose
6
+
7
+ PRDs in tiny-brain serve to:
8
+ - **Document requirements systematically** - Capture product needs with clear acceptance criteria
9
+ - **Organize features hierarchically** - Break down complex projects into manageable features and tasks
10
+ - **Track implementation progress** - Monitor completion through git commit integration
11
+ - **Maintain project history** - Preserve planning decisions and implementation details in the repository
12
+
13
+ ## Directory Structure
14
+
15
+ ```
16
+ docs/prd/
17
+ ├── README.md # This file
18
+ ├── _template/ # Templates for creating new PRDs
19
+ │ ├── prd-template.md # Blank PRD template
20
+ │ └── feature-template.md # Blank feature template
21
+
22
+ └── {prd-id}/ # Each PRD gets its own directory
23
+ ├── prd.md # Main PRD document
24
+ └── features/ # Feature subdirectory
25
+ ├── feature-1.md # Feature implementation plan
26
+ ├── feature-2.md # Feature implementation plan
27
+ └── ...
28
+ ```
29
+
30
+ ## Creating a New PRD
31
+
32
+ ### Method 1: Using the Plan Tool (Recommended)
33
+
34
+ The easiest way to create a PRD is through the tiny-brain plan tool:
35
+
36
+ ```bash
37
+ # Start planning mode and describe your PRD
38
+ # The tool will help you create the PRD structure interactively
39
+ ```
40
+
41
+ When using the plan tool with Claude Code:
42
+ 1. Describe your project requirements in a planning discussion
43
+ 2. Use `plan accept` to create the PRD from your discussion
44
+ 3. Use `plan feature` to add individual features
45
+ 4. Use `plan implement` to start task-by-task implementation
46
+
47
+ ### Method 2: Manual Creation
48
+
49
+ You can also create PRDs manually by copying the templates:
50
+
51
+ 1. **Copy the template directory:**
52
+ ```bash
53
+ cp -r _template/ your-prd-name/
54
+ ```
55
+
56
+ 2. **Rename files:**
57
+ ```bash
58
+ cd your-prd-name/
59
+ mv prd-template.md prd.md
60
+ mkdir features
61
+ ```
62
+
63
+ 3. **Fill in the template:**
64
+ - Update YAML frontmatter with your PRD details
65
+ - Replace placeholders with your content
66
+ - Create feature files in the `features/` subdirectory
67
+
68
+ ## PRD Document Structure
69
+
70
+ ### YAML Frontmatter
71
+
72
+ Every PRD must include YAML frontmatter at the top:
73
+
74
+ ```yaml
75
+ ---
76
+ id: unique-prd-id # Unique identifier (kebab-case)
77
+ title: Human Readable Title # Display title
78
+ version: 1.0.0 # Semantic version
79
+ status: not_started # not_started | in_progress | complete
80
+ created: YYYY-MM-DD # Creation date (ISO format)
81
+ updated: YYYY-MM-DD # Last update date (ISO format)
82
+ author: Author Name # Who created this PRD
83
+ ---
84
+ ```
85
+
86
+ ### Required Sections
87
+
88
+ 1. **Purpose and Goals** - What problem are you solving and why?
89
+ 2. **User Needs** - Who are the users and what do they need?
90
+ 3. **Features and Functionality** - List of features with links to feature files
91
+ 4. **Release Criteria** - What defines "done" for this PRD?
92
+ 5. **Success Metrics** - How will you measure success?
93
+ 6. **Constraints and Dependencies** - Technical and external considerations
94
+
95
+ See `_template/prd-template.md` for the full structure with placeholders.
96
+
97
+ ## Feature Document Structure
98
+
99
+ ### YAML Frontmatter
100
+
101
+ Every feature must include YAML frontmatter:
102
+
103
+ ```yaml
104
+ ---
105
+ id: feature-id # Unique identifier (kebab-case)
106
+ prd_id: parent-prd-id # Reference to parent PRD
107
+ title: Feature Title # Display title
108
+ status: planned # planned | in_progress | complete
109
+ created: YYYY-MM-DD # Creation date (ISO format)
110
+ updated: YYYY-MM-DD # Last update date (ISO format)
111
+ ---
112
+ ```
113
+
114
+ ### Required Sections
115
+
116
+ 1. **Description** - What does this feature do?
117
+ 2. **Acceptance Criteria** - Testable requirements (use checkboxes)
118
+ 3. **Tasks** - Implementation tasks with file details
119
+ 4. **Dependencies** - Other features or systems this depends on
120
+ 5. **Testing Strategy** - How will you test this?
121
+
122
+ See `_template/feature-template.md` for the full structure with placeholders.
123
+
124
+ ## Task Tracking with Git Commits
125
+
126
+ Features support automatic commit SHA tracking through git hooks. When you follow the TDD (Test-Driven Development) workflow with conventional commit messages, your tasks will automatically track commit SHAs.
127
+
128
+ ### Commit Message Convention
129
+
130
+ Use these prefixes for automatic tracking:
131
+
132
+ - **`test:`** - Writing tests (Red phase)
133
+ - Tracked in: `testCommitSha` field
134
+ - Example: `test: add user authentication tests`
135
+
136
+ - **`feat:`** - Implementing feature (Green phase)
137
+ - Tracked in: `commitSha` field
138
+ - Example: `feat: implement user authentication`
139
+
140
+ - **`refactor:`** - Refactoring code (Refactor phase)
141
+ - Tracked in: `refactorCommitSha` field
142
+ - Example: `refactor: simplify authentication logic`
143
+
144
+ ### How It Works
145
+
146
+ 1. You commit with a structured message (e.g., `feat: add login button`)
147
+ 2. A post-commit git hook captures the commit SHA and message
148
+ 3. The hook calls `tiny-brain track-commit` to update feature markdown files
149
+ 4. The appropriate SHA field is updated based on the commit prefix
150
+ 5. Your feature file shows progress with commit references
151
+
152
+ ### Example Task Tracking
153
+
154
+ In your feature markdown:
155
+
156
+ ```markdown
157
+ ### 1. Add user authentication (test: abc1234, impl: def5678, refactor: ghi9012)
158
+ ✅ **Status**: complete
159
+ ```
160
+
161
+ The SHAs are automatically populated as you commit with the appropriate prefixes.
162
+
163
+ ## Example PRD
164
+
165
+ The `plan-system-refactoring/` directory contains a complete, real-world example PRD that demonstrates all the concepts:
166
+
167
+ - **Main PRD**: `plan-system-refactoring/prd.md`
168
+ - **6 Features**: In `plan-system-refactoring/features/`
169
+ - **Complete structure**: Shows all sections properly filled in
170
+ - **Active tracking**: Being actively worked on with commit SHAs
171
+
172
+ Use this as a reference when creating your own PRDs.
173
+
174
+ ## Integration with Tiny-Brain
175
+
176
+ ### Storage Locations
177
+
178
+ PRDs live in two places:
179
+
180
+ 1. **Repository**: `docs/prd/{prd-id}/` (markdown files - version controlled)
181
+ - Contains the PRD structure, features, and tasks
182
+ - Tracked in git for history and collaboration
183
+
184
+ 2. **Tiny-Brain Storage**: `~/.tiny-brain/{persona}/plans/` (JSON - progress tracking)
185
+ - Contains current state, progress metrics, and metadata
186
+ - Updated in real-time as work progresses
187
+ - References the PRD markdown files
188
+
189
+ ### Plan Tool Operations
190
+
191
+ The plan tool provides several operations for working with PRDs:
192
+
193
+ - **`plan accept`** - Create a new PRD from planning discussion
194
+ - **`plan feature`** - Add a feature to the current PRD
195
+ - **`plan implement`** - Start implementing tasks one by one
196
+ - **`plan status`** - Show current progress
197
+ - **`plan list`** - List all plans
198
+
199
+ ### Dashboard Integration
200
+
201
+ The tiny-brain dashboard displays:
202
+ - All PRDs with their current status
203
+ - Feature breakdown and progress
204
+ - Task-level detail with commit SHAs
205
+ - Real-time updates via Server-Sent Events (SSE)
206
+
207
+ ## Best Practices
208
+
209
+ ### 1. Keep PRDs Focused
210
+ - One PRD per major feature or capability
211
+ - Break large projects into multiple PRDs
212
+ - Each PRD should have a clear, single purpose
213
+
214
+ ### 2. Write Clear Acceptance Criteria
215
+ - Make criteria testable and measurable
216
+ - Use checkboxes to track completion
217
+ - Be specific about what "done" means
218
+
219
+ ### 3. Break Features into Tasks
220
+ - Each task should be completable in one session
221
+ - Tasks should be small enough for a single commit (or TDD cycle)
222
+ - Include file paths and expected changes
223
+
224
+ ### 4. Follow TDD Workflow
225
+ - Write tests first (`test:` commit)
226
+ - Implement to pass tests (`feat:` commit)
227
+ - Refactor if needed (`refactor:` commit)
228
+ - Git hooks will track your progress automatically
229
+
230
+ ### 5. Keep PRDs Updated
231
+ - Update status as features complete
232
+ - Add new features as scope evolves
233
+ - Document decisions and changes
234
+ - Commit PRD updates along with code changes
235
+
236
+ ### 6. Link Related Work
237
+ - Reference related PRDs in dependencies
238
+ - Link to external documentation
239
+ - Cross-reference features that interact
240
+ - Maintain a clear hierarchy
241
+
242
+ ## Questions?
243
+
244
+ For more information about the tiny-brain planning system:
245
+ - See the main README at the repository root
246
+ - Check the dashboard for visual progress tracking
247
+ - Review `plan-system-refactoring/` as a working example
248
+ - Use the plan tool for interactive guidance
249
+
250
+ ---
251
+
252
+ **Note**: This PRD system is part of the tiny-brain planning refactoring project. The templates and structure are designed to support interactive PRD creation with Claude Code and automatic progress tracking through git hooks.
@@ -0,0 +1,105 @@
1
+ ---
2
+ id: feature-id
3
+ prd_id: parent-prd-id
4
+ title: Feature Title
5
+ status: defined
6
+ created: YYYY-MM-DD
7
+ updated: YYYY-MM-DD
8
+ ---
9
+
10
+ # Feature: [Feature Title]
11
+
12
+ ## Description
13
+
14
+ [Provide a comprehensive description of what this feature does, why it's needed, and how it fits into the larger PRD. Be specific about the functionality it provides.]
15
+
16
+ ## Acceptance Criteria
17
+
18
+ [List the specific, testable criteria that must be met for this feature to be considered complete. Use checkboxes for tracking.]
19
+
20
+ - [ ] Criterion 1: [Specific requirement]
21
+ - [ ] Criterion 2: [Specific requirement]
22
+ - [ ] Criterion 3: [Specific requirement]
23
+ - [ ] Criterion 4: [Specific requirement]
24
+
25
+ ## Tasks
26
+
27
+ [List all implementation tasks. Each task should be a discrete unit of work that can be completed with a single commit (or small set of commits for TDD: test/impl/refactor). Tasks will automatically track commit SHAs when using git hooks with conventional commit messages.]
28
+
29
+ ### 1. Task Name
30
+ [Brief description of what needs to be done]
31
+
32
+ **Files to modify/create:**
33
+ - `path/to/file1.ts`
34
+ - `path/to/file2.ts`
35
+
36
+ **Expected changes:**
37
+ - Change 1: [Description]
38
+ - Change 2: [Description]
39
+ - Change 3: [Description]
40
+
41
+ ### 2. Task Name
42
+ [Brief description of what needs to be done]
43
+
44
+ **Files to modify/create:**
45
+ - `path/to/file1.ts`
46
+
47
+ **Expected changes:**
48
+ - Change 1: [Description]
49
+ - Change 2: [Description]
50
+
51
+ [Add more tasks as needed. Each task will track:
52
+ - testCommitSha: When you commit with "test: ..." prefix
53
+ - commitSha: When you commit with "feat: ..." prefix
54
+ - refactorCommitSha: When you commit with "refactor: ..." prefix]
55
+
56
+ ## Dependencies
57
+
58
+ [List any dependencies this feature has on other features or external systems]
59
+
60
+ - **Feature/System 1**: [Description of dependency]
61
+ - **Feature/System 2**: [Description of dependency]
62
+
63
+ ## Testing Strategy
64
+
65
+ [Describe how this feature will be tested]
66
+
67
+ ### Unit Tests
68
+ - Test scenario 1
69
+ - Test scenario 2
70
+ - Test scenario 3
71
+
72
+ ### Integration Tests
73
+ - Integration scenario 1
74
+ - Integration scenario 2
75
+
76
+ ### Manual Testing
77
+ - Manual test case 1
78
+ - Manual test case 2
79
+
80
+ ## Implementation Notes
81
+
82
+ [Optional: Add any technical notes, considerations, or important details for implementers]
83
+
84
+ - Note 1: [Important consideration]
85
+ - Note 2: [Technical detail]
86
+ - Note 3: [Edge case to handle]
87
+
88
+ ## Workflow Example
89
+
90
+ [Optional: If this feature involves a specific workflow or process, document it here]
91
+
92
+ ```bash
93
+ # Example command or workflow
94
+ step 1
95
+ step 2
96
+ step 3
97
+ ```
98
+
99
+ ## Benefits
100
+
101
+ [Optional: Highlight the key benefits this feature provides]
102
+
103
+ - ✅ Benefit 1
104
+ - ✅ Benefit 2
105
+ - ✅ Benefit 3
@@ -0,0 +1,126 @@
1
+ ---
2
+ id: your-prd-id-here
3
+ title: Your PRD Title Here
4
+ version: 1.0.0
5
+ status: not_started
6
+ created: YYYY-MM-DD
7
+ updated: YYYY-MM-DD
8
+ author: Your Name or Claude Code
9
+ ---
10
+
11
+ # [PRD Title]
12
+
13
+ ## Purpose and Goals
14
+
15
+ [Describe the purpose of this PRD and the high-level goals it aims to achieve. What problem are you solving? What value will this provide?]
16
+
17
+ Example:
18
+ - Enable [capability X]
19
+ - Provide [benefit Y]
20
+ - Support [use case Z]
21
+
22
+ ## User Needs
23
+
24
+ ### Target Audience
25
+ [Who are the primary users? Who will benefit from this work?]
26
+
27
+ Example:
28
+ - Software developers using [product] for [purpose]
29
+ - Teams needing [capability]
30
+ - Individual users tracking [activity]
31
+
32
+ ### User Stories
33
+ [List user stories in the format: "As a [role], I want [action] so that [benefit]"]
34
+
35
+ 1. As a [role], I want to [action] so that [benefit]
36
+ 2. As a [role], I want to [action] so that [benefit]
37
+ 3. As a [role], I want to [action] so that [benefit]
38
+
39
+ ## Features and Functionality
40
+
41
+ [List all features that make up this PRD. Each feature should have its own markdown file in the features/ subdirectory]
42
+
43
+ ### Feature 1: [Feature Name]
44
+ **File**: [features/feature-name.md](features/feature-name.md)
45
+ **Status**: planned | in_progress | complete
46
+ **Description**: [Brief description of what this feature does]
47
+
48
+ ### Feature 2: [Feature Name]
49
+ **File**: [features/feature-name.md](features/feature-name.md)
50
+ **Status**: planned | in_progress | complete
51
+ **Description**: [Brief description of what this feature does]
52
+
53
+ [Add more features as needed]
54
+
55
+ ## Design and User Experience
56
+
57
+ [Optional: Describe the overall design approach, user experience considerations, directory structures, or workflows]
58
+
59
+ ### Directory Structure
60
+ [If applicable, show how files/folders are organized]
61
+
62
+ ```
63
+ example/
64
+ directory/
65
+ structure/
66
+ ```
67
+
68
+ ### Workflow Visualization
69
+ [If applicable, show the user workflow or process flow]
70
+
71
+ ```
72
+ 1. Step 1 → Action
73
+ 2. Step 2 → Action
74
+ 3. Step 3 → Result
75
+ ```
76
+
77
+ ## Release Criteria
78
+
79
+ ### Functional Requirements
80
+ [List must-have functional requirements that define "done"]
81
+
82
+ - [ ] Requirement 1
83
+ - [ ] Requirement 2
84
+ - [ ] Requirement 3
85
+
86
+ ### Usability Requirements
87
+ [List user experience and usability requirements]
88
+
89
+ - [ ] Requirement 1
90
+ - [ ] Requirement 2
91
+ - [ ] Requirement 3
92
+
93
+ ### Technical Requirements
94
+ [List technical constraints and requirements]
95
+
96
+ - [ ] Requirement 1
97
+ - [ ] Requirement 2
98
+ - [ ] Requirement 3
99
+
100
+ ## Success Metrics (KPIs)
101
+
102
+ [Define measurable success criteria]
103
+
104
+ - Metric 1: [target value]
105
+ - Metric 2: [target value]
106
+ - Metric 3: [target value]
107
+
108
+ ## Constraints and Dependencies
109
+
110
+ ### Technical Constraints
111
+ [List technical limitations or constraints]
112
+
113
+ - Constraint 1
114
+ - Constraint 2
115
+
116
+ ### Dependencies
117
+ [List external dependencies or prerequisites]
118
+
119
+ - Dependency 1
120
+ - Dependency 2
121
+
122
+ ### Known Limitations
123
+ [List known limitations or trade-offs]
124
+
125
+ - Limitation 1
126
+ - Limitation 2
@@ -0,0 +1,84 @@
1
+ ---
2
+ id: task-collaboration
3
+ prd_id: task-management-system
4
+ title: "Task Assignment and Collaboration"
5
+ status: planned
6
+ created: 2025-01-15
7
+ updated: 2025-01-15
8
+ ---
9
+
10
+ # Feature: Task Assignment and Collaboration
11
+
12
+ ## Description
13
+
14
+ Enable team collaboration on tasks through assignment, comments, mentions, and notifications. Users can assign tasks to team members, discuss implementation details in comments, mention colleagues for input, and receive real-time notifications on updates.
15
+
16
+ ## Acceptance Criteria
17
+
18
+ - [ ] Users can assign tasks to any team member
19
+ - [ ] Users can reassign tasks to different team members
20
+ - [ ] Assignee receives notification when assigned
21
+ - [ ] Users can add comments to tasks
22
+ - [ ] Comments support @mentions to notify specific users
23
+ - [ ] Comments support markdown formatting
24
+ - [ ] Users can edit their own comments
25
+ - [ ] Users can delete their own comments
26
+ - [ ] Notifications appear in-app and via email
27
+ - [ ] Users can subscribe/unsubscribe to task updates (watchers)
28
+ - [ ] Comment count displayed on task list items
29
+
30
+ ## Tasks
31
+
32
+ ### 1. Implement Task Assignment Logic
33
+ Add assignee field and assignment change tracking.
34
+
35
+ **Files:** `src/api/controllers/taskController.ts`, `src/models/task.ts`
36
+
37
+ ### 2. Build Assignment UI
38
+ Create assignee dropdown and assignment interface.
39
+
40
+ **Files:** `src/components/TaskAssignee.tsx`, `src/hooks/useTaskAssign.ts`
41
+
42
+ ### 3. Implement Comments System
43
+ Database schema and API for task comments.
44
+
45
+ **Files:** `db/migrations/003_add_task_comments.sql`, `src/api/routes/comments.ts`
46
+
47
+ ### 4. Build Comments UI
48
+ Comment thread display and creation interface.
49
+
50
+ **Files:** `src/components/TaskComments.tsx`, `src/components/CommentForm.tsx`
51
+
52
+ ### 5. Add @Mention Functionality
53
+ Parse @mentions and notify mentioned users.
54
+
55
+ **Files:** `src/utils/mentionParser.ts`, `src/services/notificationService.ts`
56
+
57
+ ### 6. Implement Notification System
58
+ Real-time and email notifications for task updates.
59
+
60
+ **Files:** `src/services/notificationService.ts`, `src/api/websocket/taskUpdates.ts`
61
+
62
+ ### 7. Add Watchers Feature
63
+ Allow users to watch tasks they're interested in.
64
+
65
+ **Files:** `db/migrations/004_add_task_watchers.sql`, `src/api/routes/watchers.ts`
66
+
67
+ ## Dependencies
68
+
69
+ - Task CRUD operations must exist
70
+ - User directory API for assignee selection
71
+ - Email service for email notifications
72
+ - WebSocket infrastructure for real-time updates
73
+
74
+ ## Testing Strategy
75
+
76
+ - Test assignment notifications
77
+ - Test comment creation and mentions
78
+ - Test notification delivery (in-app and email)
79
+ - Test watchers subscription
80
+ - E2E test full collaboration workflow
81
+
82
+ ## Success Criteria
83
+
84
+ Feature complete when users can effectively collaborate on tasks through assignments, comments, and notifications with high engagement metrics.