@magic-ingredients/tiny-brain-local 0.10.2 → 0.12.2
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/dist/cli/cli-factory.d.ts.map +1 -1
- package/dist/cli/cli-factory.js +49 -0
- package/dist/cli/cli-factory.js.map +1 -1
- package/dist/cli/commands/track-commit.command.d.ts +40 -0
- package/dist/cli/commands/track-commit.command.d.ts.map +1 -0
- package/dist/cli/commands/track-commit.command.js +144 -0
- package/dist/cli/commands/track-commit.command.js.map +1 -0
- package/dist/core/mcp-server.d.ts.map +1 -1
- package/dist/core/mcp-server.js +19 -4
- package/dist/core/mcp-server.js.map +1 -1
- package/dist/prompts/persona/persona.prompt.d.ts.map +1 -1
- package/dist/prompts/persona/persona.prompt.js +4 -5
- package/dist/prompts/persona/persona.prompt.js.map +1 -1
- package/dist/prompts/planning/planning.prompt.js +41 -41
- package/dist/prompts/planning/planning.prompt.js.map +1 -1
- package/dist/services/agent-manager.d.ts.map +1 -1
- package/dist/services/agent-manager.js +5 -2
- package/dist/services/agent-manager.js.map +1 -1
- package/dist/services/analyse-service.d.ts +30 -0
- package/dist/services/analyse-service.d.ts.map +1 -1
- package/dist/services/analyse-service.js +176 -3
- package/dist/services/analyse-service.js.map +1 -1
- package/dist/services/persona-service.d.ts.map +1 -1
- package/dist/services/persona-service.js +25 -18
- package/dist/services/persona-service.js.map +1 -1
- package/dist/services/remote/system-persona-service.d.ts.map +1 -1
- package/dist/services/remote/system-persona-service.js +19 -10
- package/dist/services/remote/system-persona-service.js.map +1 -1
- package/dist/services/repo-service.d.ts +26 -2
- package/dist/services/repo-service.d.ts.map +1 -1
- package/dist/services/repo-service.js +192 -8
- package/dist/services/repo-service.js.map +1 -1
- package/dist/storage/local-filesystem-adapter.d.ts +1 -0
- package/dist/storage/local-filesystem-adapter.d.ts.map +1 -1
- package/dist/storage/local-filesystem-adapter.js +2 -0
- package/dist/storage/local-filesystem-adapter.js.map +1 -1
- package/dist/tools/persona/as.tool.d.ts.map +1 -1
- package/dist/tools/persona/as.tool.js +27 -16
- package/dist/tools/persona/as.tool.js.map +1 -1
- package/dist/tools/persona/persona.tool.d.ts.map +1 -1
- package/dist/tools/persona/persona.tool.js +3 -5
- package/dist/tools/persona/persona.tool.js.map +1 -1
- package/dist/tools/plan/plan.tool.d.ts +2 -0
- package/dist/tools/plan/plan.tool.d.ts.map +1 -1
- package/dist/tools/plan/plan.tool.js +278 -71
- package/dist/tools/plan/plan.tool.js.map +1 -1
- package/dist/utils/package-version.d.ts +11 -0
- package/dist/utils/package-version.d.ts.map +1 -0
- package/dist/utils/package-version.js +26 -0
- package/dist/utils/package-version.js.map +1 -0
- package/package.json +4 -3
- package/templates/adr/0001-record-architecture-decisions.md +223 -0
- package/templates/adr/ADR_CREATION_INSTRUCTIONS.md +234 -0
- package/templates/adr/README.md +243 -0
- package/templates/adr/adr-schema.json +74 -0
- package/templates/adr/adr-template.md +136 -0
- package/templates/prd/PRD_CREATION_INSTRUCTIONS.md +268 -0
- package/templates/prd/README.md +252 -0
- package/templates/prd/_template/feature-template.md +105 -0
- package/templates/prd/_template/prd-template.md +126 -0
- package/templates/prd/example-task-management/features/task-collaboration.md +84 -0
- package/templates/prd/example-task-management/features/task-crud.md +222 -0
- package/templates/prd/example-task-management/features/task-workflow.md +62 -0
- package/templates/prd/example-task-management/prd.md +177 -0
- package/templates/prd/feature-schema.json +54 -0
- package/templates/prd/prd-schema.json +60 -0
|
@@ -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.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: task-crud
|
|
3
|
+
prd_id: task-management-system
|
|
4
|
+
title: "Task Creation and Management"
|
|
5
|
+
status: planned
|
|
6
|
+
created: 2025-01-15
|
|
7
|
+
updated: 2025-01-15
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Feature: Task Creation and Management
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
Implement core CRUD (Create, Read, Update, Delete) operations for tasks. Users should be able to create new tasks with rich metadata, view task details, update task information, and delete tasks when needed. This forms the foundation of the task management system.
|
|
15
|
+
|
|
16
|
+
### Key Capabilities
|
|
17
|
+
- Create tasks with title, description, priority, assignee, and due date
|
|
18
|
+
- View task details in both list and detail views
|
|
19
|
+
- Edit any task field with proper validation
|
|
20
|
+
- Delete tasks with confirmation
|
|
21
|
+
- Auto-save drafts to prevent data loss
|
|
22
|
+
|
|
23
|
+
## Acceptance Criteria
|
|
24
|
+
|
|
25
|
+
- [ ] User can create a task with all required fields (title, description)
|
|
26
|
+
- [ ] User can create a task with optional fields (priority, assignee, due date)
|
|
27
|
+
- [ ] Task title is required and limited to 200 characters
|
|
28
|
+
- [ ] Task description supports markdown formatting
|
|
29
|
+
- [ ] User can view a list of all tasks
|
|
30
|
+
- [ ] User can click a task to view full details
|
|
31
|
+
- [ ] User can edit any field of an existing task
|
|
32
|
+
- [ ] Changes are validated before saving
|
|
33
|
+
- [ ] User can delete a task after confirmation
|
|
34
|
+
- [ ] Deleted tasks are soft-deleted (recoverable for 30 days)
|
|
35
|
+
- [ ] API returns appropriate error messages for invalid data
|
|
36
|
+
- [ ] All operations are logged for audit purposes
|
|
37
|
+
|
|
38
|
+
## Tasks
|
|
39
|
+
|
|
40
|
+
### 1. Create Task Database Schema
|
|
41
|
+
Design and implement the tasks table with all required fields, indexes, and constraints.
|
|
42
|
+
|
|
43
|
+
**Files to modify/create:**
|
|
44
|
+
- `db/migrations/001_create_tasks_table.sql`
|
|
45
|
+
- `db/models/task.ts`
|
|
46
|
+
|
|
47
|
+
**Expected changes:**
|
|
48
|
+
- Create tasks table with fields: id, title, description, status, priority, assignee_id, reporter_id, due_date, created_at, updated_at, deleted_at
|
|
49
|
+
- Add indexes on status, assignee_id, due_date for query performance
|
|
50
|
+
- Add foreign key constraints to users table
|
|
51
|
+
- Create TypeScript type definitions for Task model
|
|
52
|
+
|
|
53
|
+
### 2. Implement Task API Endpoints
|
|
54
|
+
Create RESTful API endpoints for all CRUD operations with proper validation and error handling.
|
|
55
|
+
|
|
56
|
+
**Files to modify/create:**
|
|
57
|
+
- `src/api/routes/tasks.ts`
|
|
58
|
+
- `src/api/controllers/taskController.ts`
|
|
59
|
+
- `src/api/validators/taskValidator.ts`
|
|
60
|
+
|
|
61
|
+
**Expected changes:**
|
|
62
|
+
- POST /api/tasks - Create new task
|
|
63
|
+
- GET /api/tasks - List all tasks (with pagination)
|
|
64
|
+
- GET /api/tasks/:id - Get single task
|
|
65
|
+
- PUT /api/tasks/:id - Update task
|
|
66
|
+
- DELETE /api/tasks/:id - Soft delete task
|
|
67
|
+
- Add request validation using Zod or Joi
|
|
68
|
+
- Add proper error handling and HTTP status codes
|
|
69
|
+
- Add authentication middleware
|
|
70
|
+
|
|
71
|
+
### 3. Build Task Creation UI Component
|
|
72
|
+
Create a form component for creating new tasks with all fields and validation.
|
|
73
|
+
|
|
74
|
+
**Files to modify/create:**
|
|
75
|
+
- `src/components/TaskForm.tsx`
|
|
76
|
+
- `src/components/TaskForm.test.tsx`
|
|
77
|
+
- `src/hooks/useTaskCreate.ts`
|
|
78
|
+
|
|
79
|
+
**Expected changes:**
|
|
80
|
+
- Form with inputs for title, description, priority, assignee, due date
|
|
81
|
+
- Client-side validation matching API validation
|
|
82
|
+
- Loading states and error handling
|
|
83
|
+
- Success feedback (toast/notification)
|
|
84
|
+
- Markdown editor for description field
|
|
85
|
+
- Assignee dropdown populated from team members API
|
|
86
|
+
|
|
87
|
+
### 4. Build Task List View
|
|
88
|
+
Create a component to display all tasks in a filterable, sortable list.
|
|
89
|
+
|
|
90
|
+
**Files to modify/create:**
|
|
91
|
+
- `src/components/TaskList.tsx`
|
|
92
|
+
- `src/components/TaskListItem.tsx`
|
|
93
|
+
- `src/components/TaskList.test.tsx`
|
|
94
|
+
- `src/hooks/useTaskList.ts`
|
|
95
|
+
|
|
96
|
+
**Expected changes:**
|
|
97
|
+
- Fetch and display tasks from API
|
|
98
|
+
- Show key fields: title, status, priority, assignee, due date
|
|
99
|
+
- Click item to view details (navigation)
|
|
100
|
+
- Loading skeleton while fetching
|
|
101
|
+
- Empty state when no tasks
|
|
102
|
+
- Error state with retry option
|
|
103
|
+
- Pagination controls
|
|
104
|
+
|
|
105
|
+
### 5. Build Task Detail and Edit Views
|
|
106
|
+
Create components for viewing and editing individual tasks.
|
|
107
|
+
|
|
108
|
+
**Files to modify/create:**
|
|
109
|
+
- `src/components/TaskDetail.tsx`
|
|
110
|
+
- `src/components/TaskEdit.tsx`
|
|
111
|
+
- `src/components/TaskDetail.test.tsx`
|
|
112
|
+
- `src/hooks/useTaskUpdate.ts`
|
|
113
|
+
- `src/hooks/useTaskDelete.ts`
|
|
114
|
+
|
|
115
|
+
**Expected changes:**
|
|
116
|
+
- Display all task fields in readable format
|
|
117
|
+
- Edit button to switch to edit mode
|
|
118
|
+
- Reuse TaskForm component for editing
|
|
119
|
+
- Delete button with confirmation modal
|
|
120
|
+
- Handle update and delete operations
|
|
121
|
+
- Optimistic UI updates
|
|
122
|
+
|
|
123
|
+
### 6. Write API Integration Tests
|
|
124
|
+
Comprehensive tests for all API endpoints covering success and error cases.
|
|
125
|
+
|
|
126
|
+
**Files to modify/create:**
|
|
127
|
+
- `tests/integration/tasks.test.ts`
|
|
128
|
+
|
|
129
|
+
**Expected changes:**
|
|
130
|
+
- Test task creation with valid data
|
|
131
|
+
- Test validation errors for invalid data
|
|
132
|
+
- Test task retrieval (list and single)
|
|
133
|
+
- Test task updates
|
|
134
|
+
- Test task deletion and soft delete behavior
|
|
135
|
+
- Test authorization (users can only delete own tasks)
|
|
136
|
+
- Test pagination and filtering
|
|
137
|
+
|
|
138
|
+
### 7. Write Component Unit Tests
|
|
139
|
+
Unit tests for all React components using React Testing Library.
|
|
140
|
+
|
|
141
|
+
**Files to modify/create:**
|
|
142
|
+
- Component test files (already listed above)
|
|
143
|
+
|
|
144
|
+
**Expected changes:**
|
|
145
|
+
- Test form submission and validation
|
|
146
|
+
- Test list rendering and interactions
|
|
147
|
+
- Test detail view display
|
|
148
|
+
- Test edit mode toggle
|
|
149
|
+
- Test delete confirmation flow
|
|
150
|
+
- Test loading and error states
|
|
151
|
+
- Test accessibility (ARIA labels, keyboard navigation)
|
|
152
|
+
|
|
153
|
+
## Dependencies
|
|
154
|
+
|
|
155
|
+
- **User Authentication**: Must integrate with existing auth system to identify task reporter
|
|
156
|
+
- **Team Member API**: Need endpoint to fetch list of team members for assignee dropdown
|
|
157
|
+
- **Database**: PostgreSQL database must be available and configured
|
|
158
|
+
|
|
159
|
+
## Testing Strategy
|
|
160
|
+
|
|
161
|
+
### Unit Tests
|
|
162
|
+
- Task model validation logic
|
|
163
|
+
- API controller business logic
|
|
164
|
+
- React component behavior
|
|
165
|
+
- Custom hooks (useTaskCreate, useTaskList, etc.)
|
|
166
|
+
- Form validation functions
|
|
167
|
+
|
|
168
|
+
### Integration Tests
|
|
169
|
+
- Full API endpoint flows (create → read → update → delete)
|
|
170
|
+
- Database operations and constraints
|
|
171
|
+
- Authentication and authorization
|
|
172
|
+
- Error handling across layers
|
|
173
|
+
|
|
174
|
+
### End-to-End Tests
|
|
175
|
+
- Complete user flows: create task → view in list → edit → delete
|
|
176
|
+
- Form validation error messages
|
|
177
|
+
- Navigation between views
|
|
178
|
+
- Cross-browser compatibility
|
|
179
|
+
|
|
180
|
+
### Manual Testing Checklist
|
|
181
|
+
- [ ] Create task with various field combinations
|
|
182
|
+
- [ ] Edit task and verify changes persist
|
|
183
|
+
- [ ] Delete task and confirm soft delete
|
|
184
|
+
- [ ] Test with long titles/descriptions
|
|
185
|
+
- [ ] Test with special characters in text fields
|
|
186
|
+
- [ ] Test date picker with various date formats
|
|
187
|
+
- [ ] Verify markdown rendering in description
|
|
188
|
+
- [ ] Test on mobile viewport sizes
|
|
189
|
+
|
|
190
|
+
## Implementation Notes
|
|
191
|
+
|
|
192
|
+
### Technical Considerations
|
|
193
|
+
- Use optimistic updates for better perceived performance
|
|
194
|
+
- Implement proper loading states to avoid layout shift
|
|
195
|
+
- Add debouncing for auto-save functionality (future enhancement)
|
|
196
|
+
- Consider using React Query for caching and state management
|
|
197
|
+
- Ensure proper SQL injection protection in database queries
|
|
198
|
+
|
|
199
|
+
### UI/UX Guidelines
|
|
200
|
+
- Follow existing design system and component library
|
|
201
|
+
- Maintain consistent spacing and typography
|
|
202
|
+
- Use appropriate loading skeletons matching content layout
|
|
203
|
+
- Provide clear error messages with actionable guidance
|
|
204
|
+
- Ensure keyboard accessibility (Tab navigation, Enter to submit)
|
|
205
|
+
|
|
206
|
+
### Security Considerations
|
|
207
|
+
- Validate all inputs on both client and server
|
|
208
|
+
- Sanitize user-generated content (especially markdown)
|
|
209
|
+
- Implement rate limiting on API endpoints
|
|
210
|
+
- Check user permissions before allowing updates/deletes
|
|
211
|
+
- Log all CRUD operations for audit trail
|
|
212
|
+
|
|
213
|
+
## Success Criteria
|
|
214
|
+
|
|
215
|
+
This feature is complete when:
|
|
216
|
+
- All acceptance criteria are met
|
|
217
|
+
- All tests are passing (unit, integration, E2E)
|
|
218
|
+
- Code review approved
|
|
219
|
+
- Documentation updated
|
|
220
|
+
- Security review passed
|
|
221
|
+
- Performance benchmarks met (API < 200ms, UI < 2s load)
|
|
222
|
+
- Accessibility audit passed (WCAG 2.1 AA compliance)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: task-workflow
|
|
3
|
+
prd_id: task-management-system
|
|
4
|
+
title: "Task Status Workflow"
|
|
5
|
+
status: planned
|
|
6
|
+
created: 2025-01-15
|
|
7
|
+
updated: 2025-01-15
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Feature: Task Status Workflow
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
Implement a clear state machine for task progression through defined statuses: Todo → In Progress → In Review → Done. Include validation rules to ensure tasks follow logical transitions and provide visual indicators for current status.
|
|
15
|
+
|
|
16
|
+
## Acceptance Criteria
|
|
17
|
+
|
|
18
|
+
- [ ] Tasks can transition between statuses: Todo → In Progress → In Review → Done
|
|
19
|
+
- [ ] Invalid transitions are prevented (e.g., Todo → Done directly)
|
|
20
|
+
- [ ] Status changes are logged with timestamp and user
|
|
21
|
+
- [ ] Visual status indicators use consistent colors
|
|
22
|
+
- [ ] Users can view status history for any task
|
|
23
|
+
- [ ] Bulk status updates supported (select multiple tasks)
|
|
24
|
+
- [ ] Status change triggers notifications to assignee and watchers
|
|
25
|
+
|
|
26
|
+
## Tasks
|
|
27
|
+
|
|
28
|
+
### 1. Implement Status State Machine
|
|
29
|
+
Define valid state transitions and validation logic.
|
|
30
|
+
|
|
31
|
+
**Files:** `src/models/taskWorkflow.ts`, `src/models/taskWorkflow.test.ts`
|
|
32
|
+
|
|
33
|
+
### 2. Create Status Update API
|
|
34
|
+
Add endpoint for status changes with validation.
|
|
35
|
+
|
|
36
|
+
**Files:** `src/api/routes/tasks.ts` (PATCH /api/tasks/:id/status)
|
|
37
|
+
|
|
38
|
+
### 3. Build Status UI Components
|
|
39
|
+
Create status badges, dropdown, and transition buttons.
|
|
40
|
+
|
|
41
|
+
**Files:** `src/components/TaskStatus.tsx`, `src/components/StatusHistory.tsx`
|
|
42
|
+
|
|
43
|
+
### 4. Add Status History Tracking
|
|
44
|
+
Log all status changes to audit trail.
|
|
45
|
+
|
|
46
|
+
**Files:** `db/migrations/002_add_task_history.sql`, `src/models/taskHistory.ts`
|
|
47
|
+
|
|
48
|
+
## Dependencies
|
|
49
|
+
|
|
50
|
+
- Task CRUD operations must be implemented first
|
|
51
|
+
- Notification system for status change alerts
|
|
52
|
+
|
|
53
|
+
## Testing Strategy
|
|
54
|
+
|
|
55
|
+
- Unit test all valid and invalid state transitions
|
|
56
|
+
- Test status history recording
|
|
57
|
+
- Test UI components for all status values
|
|
58
|
+
- E2E test complete workflow from Todo to Done
|
|
59
|
+
|
|
60
|
+
## Success Criteria
|
|
61
|
+
|
|
62
|
+
Feature complete when tasks follow clear workflow, invalid transitions are blocked, and status history is fully auditable.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: task-management-system
|
|
3
|
+
title: "Task Management System"
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: not_started
|
|
6
|
+
created: 2025-01-15
|
|
7
|
+
updated: 2025-01-15
|
|
8
|
+
author: Product Team
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<!--
|
|
12
|
+
📚 EXAMPLE PRD
|
|
13
|
+
This is an example PRD showing the recommended structure and content.
|
|
14
|
+
Use this as a reference when creating your own PRDs.
|
|
15
|
+
See ../README.md for full documentation.
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+
# Task Management System
|
|
19
|
+
|
|
20
|
+
## Purpose and Goals
|
|
21
|
+
|
|
22
|
+
Build a task management system that enables team members to:
|
|
23
|
+
- Create and organize tasks efficiently
|
|
24
|
+
- Track progress on work items
|
|
25
|
+
- Collaborate on task completion
|
|
26
|
+
- Meet deadlines consistently
|
|
27
|
+
|
|
28
|
+
**Key Objectives:**
|
|
29
|
+
- Reduce time spent on task organization by 50%
|
|
30
|
+
- Increase team visibility into work progress
|
|
31
|
+
- Improve on-time task completion rate to 90%
|
|
32
|
+
- Enable seamless collaboration across distributed teams
|
|
33
|
+
|
|
34
|
+
## User Needs
|
|
35
|
+
|
|
36
|
+
### Target Audience
|
|
37
|
+
- Software development teams (5-50 members)
|
|
38
|
+
- Project managers coordinating multiple initiatives
|
|
39
|
+
- Individual contributors tracking their workload
|
|
40
|
+
- Team leads monitoring team progress
|
|
41
|
+
|
|
42
|
+
### User Stories
|
|
43
|
+
|
|
44
|
+
1. As a developer, I want to create tasks with clear descriptions so that I know exactly what needs to be done
|
|
45
|
+
2. As a project manager, I want to see all tasks across the team so that I can identify bottlenecks
|
|
46
|
+
3. As a team lead, I want to assign tasks to team members so that work is distributed effectively
|
|
47
|
+
4. As a developer, I want to update task status so that everyone knows what I'm working on
|
|
48
|
+
5. As a user, I want to filter tasks by priority so that I can focus on what's most important
|
|
49
|
+
|
|
50
|
+
## Features and Functionality
|
|
51
|
+
|
|
52
|
+
### Feature 1: Task Creation and Management
|
|
53
|
+
**File**: [features/task-crud.md](features/task-crud.md)
|
|
54
|
+
**Status**: planned
|
|
55
|
+
**Description**: Core functionality for creating, reading, updating, and deleting tasks with rich metadata (title, description, priority, assignee, due date).
|
|
56
|
+
|
|
57
|
+
### Feature 2: Task Status Workflow
|
|
58
|
+
**File**: [features/task-workflow.md](features/task-workflow.md)
|
|
59
|
+
**Status**: planned
|
|
60
|
+
**Description**: State management system with clear transitions (Todo → In Progress → In Review → Done) and validation rules.
|
|
61
|
+
|
|
62
|
+
### Feature 3: Task Assignment and Collaboration
|
|
63
|
+
**File**: [features/task-collaboration.md](features/task-collaboration.md)
|
|
64
|
+
**Status**: planned
|
|
65
|
+
**Description**: Assign tasks to team members, add comments, mention colleagues, and receive notifications on task updates.
|
|
66
|
+
|
|
67
|
+
## Design and User Experience
|
|
68
|
+
|
|
69
|
+
### Data Model
|
|
70
|
+
```
|
|
71
|
+
Task {
|
|
72
|
+
id: string
|
|
73
|
+
title: string
|
|
74
|
+
description: string
|
|
75
|
+
status: 'todo' | 'in_progress' | 'in_review' | 'done'
|
|
76
|
+
priority: 'low' | 'medium' | 'high' | 'urgent'
|
|
77
|
+
assignee: User | null
|
|
78
|
+
reporter: User
|
|
79
|
+
dueDate: Date | null
|
|
80
|
+
createdAt: Date
|
|
81
|
+
updatedAt: Date
|
|
82
|
+
comments: Comment[]
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### User Workflow
|
|
87
|
+
```
|
|
88
|
+
1. User clicks "New Task" button
|
|
89
|
+
2. Fill out task form (title, description, priority, assignee, due date)
|
|
90
|
+
3. Click "Create" → Task appears in task list
|
|
91
|
+
4. Assignee receives notification
|
|
92
|
+
5. Assignee updates status as they work
|
|
93
|
+
6. Team members can view progress in real-time
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Release Criteria
|
|
97
|
+
|
|
98
|
+
### Functional Requirements
|
|
99
|
+
- [ ] Users can create tasks with all required fields
|
|
100
|
+
- [ ] Users can update task status through defined workflow
|
|
101
|
+
- [ ] Users can assign tasks to team members
|
|
102
|
+
- [ ] Users can view all tasks in a list/board view
|
|
103
|
+
- [ ] Users can filter and search tasks
|
|
104
|
+
- [ ] Users can add comments to tasks
|
|
105
|
+
- [ ] Users receive notifications for task updates
|
|
106
|
+
- [ ] Task data persists across sessions
|
|
107
|
+
|
|
108
|
+
### Usability Requirements
|
|
109
|
+
- [ ] Task creation takes less than 30 seconds
|
|
110
|
+
- [ ] Status updates require single click
|
|
111
|
+
- [ ] Task list loads in under 2 seconds
|
|
112
|
+
- [ ] Interface is intuitive without training
|
|
113
|
+
- [ ] Mobile-responsive design
|
|
114
|
+
- [ ] Keyboard shortcuts for common actions
|
|
115
|
+
|
|
116
|
+
### Technical Requirements
|
|
117
|
+
- [ ] RESTful API for all operations
|
|
118
|
+
- [ ] Real-time updates via WebSockets
|
|
119
|
+
- [ ] Data validation on client and server
|
|
120
|
+
- [ ] Secure authentication and authorization
|
|
121
|
+
- [ ] Comprehensive error handling
|
|
122
|
+
- [ ] 99.9% uptime SLA
|
|
123
|
+
- [ ] Database indexes for performant queries
|
|
124
|
+
|
|
125
|
+
## Success Metrics (KPIs)
|
|
126
|
+
|
|
127
|
+
- **Adoption Rate**: 80% of team members create at least one task per week
|
|
128
|
+
- **Task Completion**: 90% of tasks completed by due date
|
|
129
|
+
- **Time to Create Task**: Average < 45 seconds
|
|
130
|
+
- **User Satisfaction**: 4.5/5 rating in user surveys
|
|
131
|
+
- **System Performance**: Page load < 2 seconds, API response < 200ms
|
|
132
|
+
- **Collaboration**: Average 3+ comments per task
|
|
133
|
+
- **Active Usage**: 70% of team members log in daily
|
|
134
|
+
|
|
135
|
+
## Constraints and Dependencies
|
|
136
|
+
|
|
137
|
+
### Technical Constraints
|
|
138
|
+
- Must integrate with existing authentication system
|
|
139
|
+
- Must work on existing tech stack (React, Node.js, PostgreSQL)
|
|
140
|
+
- Must support 500 concurrent users
|
|
141
|
+
- Must be deployed on current AWS infrastructure
|
|
142
|
+
- Must meet company security and data privacy standards
|
|
143
|
+
|
|
144
|
+
### Dependencies
|
|
145
|
+
- User authentication service (existing)
|
|
146
|
+
- Notification system (to be enhanced)
|
|
147
|
+
- Email service (existing)
|
|
148
|
+
- Team member directory API (existing)
|
|
149
|
+
|
|
150
|
+
### Known Limitations
|
|
151
|
+
- Initial version limited to text-based tasks (no file attachments)
|
|
152
|
+
- No offline support in v1.0
|
|
153
|
+
- No recurring tasks in v1.0
|
|
154
|
+
- Task history limited to 90 days
|
|
155
|
+
- Maximum 1000 tasks per user
|
|
156
|
+
|
|
157
|
+
## Notes
|
|
158
|
+
|
|
159
|
+
### Future Enhancements (Post-v1.0)
|
|
160
|
+
- File attachments and media support
|
|
161
|
+
- Recurring tasks and task templates
|
|
162
|
+
- Advanced analytics and reporting
|
|
163
|
+
- Time tracking integration
|
|
164
|
+
- Gantt chart / timeline views
|
|
165
|
+
- Mobile native apps
|
|
166
|
+
- Third-party integrations (Slack, GitHub)
|
|
167
|
+
- Custom fields and task types
|
|
168
|
+
|
|
169
|
+
### Open Questions
|
|
170
|
+
- Should we support task dependencies? (Decision: Not in v1.0)
|
|
171
|
+
- What's the max number of assignees per task? (Decision: 1 assignee, multiple watchers)
|
|
172
|
+
- How long should we keep completed tasks? (Decision: Indefinitely, with archive option)
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
**Related PRDs:**
|
|
177
|
+
This is a standalone PRD for initial launch. Future enhancements may spawn related PRDs for advanced features.
|