plan(backend): Update task list
Generated by: Planning Agent Timestamp: 2025-11-21T23:30:28.060034+00:00 Component: backend
This commit is contained in:
parent
dbf28ecadd
commit
bbddbe6d15
1 changed files with 235 additions and 3 deletions
|
|
@ -2,7 +2,239 @@
|
|||
"project": "mnemo_cards_backend",
|
||||
"component": "backend",
|
||||
"version": "1.0",
|
||||
"generated_at": "2025-11-21T01:00:13.845013+00:00",
|
||||
"generated_at": "2025-11-21T23:29:11.898583+00:00",
|
||||
"generated_by": "planning_agent",
|
||||
"tasks": [ ]
|
||||
}
|
||||
"tasks": [
|
||||
{
|
||||
"id": "BACKEND-001",
|
||||
"title": "Write unit tests for statistics models",
|
||||
"priority": "high",
|
||||
"status": "pending",
|
||||
"estimated_hours": 3.0,
|
||||
"description": "Create comprehensive unit tests for all statistics-related Isar models (PackProgressModel, AchievementModel, StudySessionModel) to ensure proper serialization, deserialization, and data integrity. Tests should cover edge cases, null handling, and JSON conversion.",
|
||||
"acceptance_criteria": [
|
||||
"Unit tests created for PackProgressModel with >90% coverage",
|
||||
"Unit tests created for AchievementModel with >90% coverage",
|
||||
"Unit tests created for StudySessionModel with >90% coverage",
|
||||
"All tests pass with proper assertions for serialization/deserialization",
|
||||
"Edge cases covered (null values, empty collections, boundary conditions)",
|
||||
"15+ test cases total across all models"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/test/models/pack_progress_model_test.dart",
|
||||
"mnemo_cards_backend/test/models/achievement_model_test.dart",
|
||||
"mnemo_cards_backend/test/models/study_session_model_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-002",
|
||||
"title": "Write integration tests for TasksApiV2",
|
||||
"priority": "high",
|
||||
"status": "pending",
|
||||
"estimated_hours": 4.0,
|
||||
"description": "Create comprehensive integration tests for TasksApiV2 covering all endpoints: getTasks, getTask, startTask, completeTask, getUserProgress, and getTaskCategories. Tests should verify authentication, filtering, pagination, status transitions, reward distribution, and error handling.",
|
||||
"acceptance_criteria": [
|
||||
"Integration tests created for all 6 TasksApiV2 endpoints",
|
||||
"Tests cover authenticated and unauthenticated scenarios",
|
||||
"Tests verify filtering (type, difficulty, status, tags)",
|
||||
"Tests verify pagination (limit, offset)",
|
||||
"Tests verify task status transitions (available -> in_progress -> completed)",
|
||||
"Tests verify reward distribution on task completion",
|
||||
"Tests verify error handling (404, 400, 401, 500)",
|
||||
"Tests verify user progress tracking and updates",
|
||||
"20+ test cases total, all passing"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/test/api/v2/tasks_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-003",
|
||||
"title": "Complete statistics integration tests coverage",
|
||||
"priority": "high",
|
||||
"status": "pending",
|
||||
"estimated_hours": 3.0,
|
||||
"description": "Review and complete any missing integration tests for statistics API endpoints. Ensure all endpoints have comprehensive test coverage including edge cases, error scenarios, and data validation. Verify tests align with actual API behavior.",
|
||||
"acceptance_criteria": [
|
||||
"All statistics endpoints have integration tests",
|
||||
"Tests cover edge cases (empty data, null values, invalid parameters)",
|
||||
"Tests verify authentication requirements",
|
||||
"Tests verify response format and data structure",
|
||||
"Tests verify error handling for all error scenarios",
|
||||
"Integration test coverage >85% for statistics endpoints",
|
||||
"All existing tests pass, no regressions"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/test/api/v2/users_api_v2_statistics_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-004",
|
||||
"title": "Update OpenAPI specification for statistics endpoints",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.0,
|
||||
"description": "Update the OpenAPI specification file to include all new statistics endpoints with proper request/response schemas, parameters, authentication requirements, and example responses. Ensure the spec accurately reflects the current API implementation.",
|
||||
"acceptance_criteria": [
|
||||
"OpenAPI spec includes all statistics endpoints with correct paths",
|
||||
"Request/response schemas match actual DTOs",
|
||||
"Query parameters documented with types and descriptions",
|
||||
"Authentication requirements specified (Bearer token)",
|
||||
"Example responses provided for success and error cases",
|
||||
"Error response schemas documented (400, 401, 404, 500)",
|
||||
"OpenAPI spec validates without errors"
|
||||
],
|
||||
"dependencies": ["BACKEND-003"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/public/open_api.yaml"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-005",
|
||||
"title": "Create STATISTICS_API.md documentation",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.5,
|
||||
"description": "Create comprehensive API documentation for the statistics system including endpoint descriptions, request/response examples, authentication requirements, error codes, and usage patterns. Document the automatic tracking system and achievement mechanics.",
|
||||
"acceptance_criteria": [
|
||||
"STATISTICS_API.md created with complete endpoint documentation",
|
||||
"All 6 statistics endpoints documented with examples",
|
||||
"Request/response formats clearly explained",
|
||||
"Authentication and authorization requirements documented",
|
||||
"Error codes and handling documented",
|
||||
"Automatic tracking system explained",
|
||||
"Achievement system mechanics documented",
|
||||
"Code examples provided for common use cases"
|
||||
],
|
||||
"dependencies": ["BACKEND-004"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/STATISTICS_API.md"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-006",
|
||||
"title": "Improve task creation and management mechanism",
|
||||
"priority": "high",
|
||||
"status": "pending",
|
||||
"estimated_hours": 3.0,
|
||||
"description": "Enhance the tasks system by adding better task creation validation, expiration handling, and status management. Implement automatic task expiration checks, validate task data on creation, and improve the task lifecycle management. This addresses the requirement to improve task creation and execution mechanism.",
|
||||
"acceptance_criteria": [
|
||||
"Task expiration validation implemented (expired tasks marked inactive)",
|
||||
"Task creation validation added (required fields, valid dates, reward validation)",
|
||||
"Automatic task status updates based on expiration dates",
|
||||
"Task lifecycle properly managed (available -> in_progress -> completed)",
|
||||
"Error handling improved for invalid task operations",
|
||||
"Unit tests added for validation logic (10+ tests)",
|
||||
"Integration tests verify expiration handling"
|
||||
],
|
||||
"dependencies": ["BACKEND-002"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/tasks_api_v2.dart",
|
||||
"mnemo_cards_backend/test/api/v2/tasks_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-007",
|
||||
"title": "Add admin API for task management",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 4.0,
|
||||
"description": "Create admin-only API endpoints for task management: create tasks, update tasks, delete tasks, and manage task availability. This allows administrators to dynamically create and manage tasks without code changes. Include proper authorization checks and validation.",
|
||||
"acceptance_criteria": [
|
||||
"POST /api/v2/admin/tasks endpoint for creating tasks",
|
||||
"PUT /api/v2/admin/tasks/<taskId> endpoint for updating tasks",
|
||||
"DELETE /api/v2/admin/tasks/<taskId> endpoint for deleting tasks",
|
||||
"PATCH /api/v2/admin/tasks/<taskId>/activate endpoint for toggling availability",
|
||||
"All endpoints require admin authentication",
|
||||
"Proper validation for task data (required fields, date ranges, rewards)",
|
||||
"Comprehensive integration tests (15+ test cases)",
|
||||
"Error handling for unauthorized access, invalid data, not found"
|
||||
],
|
||||
"dependencies": ["BACKEND-006"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/admin_tasks_api_v2.dart",
|
||||
"mnemo_cards_backend/test/api/v2/admin_tasks_api_v2_test.dart",
|
||||
"mnemo_cards_backend/lib/api/mnemo_shelf.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-008",
|
||||
"title": "Update PROGRESS.md and TODO.md with completed work",
|
||||
"priority": "low",
|
||||
"status": "pending",
|
||||
"estimated_hours": 1.5,
|
||||
"description": "Update PROGRESS.md with completed statistics system work and update TODO.md to reflect current project state. Mark completed items, add new priorities, and ensure documentation is current.",
|
||||
"acceptance_criteria": [
|
||||
"PROGRESS.md updated with statistics system completion",
|
||||
"All completed statistics tasks marked in PROGRESS.md",
|
||||
"TODO.md updated with current priorities",
|
||||
"Completed items marked in TODO.md",
|
||||
"New tasks added to TODO.md if needed",
|
||||
"Documentation is accurate and up-to-date"
|
||||
],
|
||||
"dependencies": ["BACKEND-001", "BACKEND-003", "BACKEND-005"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/PROGRESS.md",
|
||||
"mnemo_cards_backend/TODO.md"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-009",
|
||||
"title": "Add task execution tracking and analytics",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 3.5,
|
||||
"description": "Enhance task execution tracking by adding analytics endpoints to track task completion rates, popular tasks, user engagement metrics, and reward distribution statistics. This helps understand task system usage and effectiveness.",
|
||||
"acceptance_criteria": [
|
||||
"GET /api/v2/admin/tasks/analytics endpoint for task statistics",
|
||||
"Analytics include: completion rates, popular tasks, average completion time",
|
||||
"User engagement metrics (active users, task starts vs completions)",
|
||||
"Reward distribution statistics",
|
||||
"Proper admin authentication required",
|
||||
"Integration tests for analytics endpoint (8+ test cases)",
|
||||
"Response includes aggregated data with proper formatting"
|
||||
],
|
||||
"dependencies": ["BACKEND-007"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/admin_tasks_api_v2.dart",
|
||||
"mnemo_cards_backend/test/api/v2/admin_tasks_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-010",
|
||||
"title": "Improve task reward distribution system",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.5,
|
||||
"description": "Enhance the reward distribution system to properly integrate with user XP and coins. Ensure rewards are correctly added to user accounts, validate reward amounts, and add proper transaction handling. Verify rewards are persisted correctly.",
|
||||
"acceptance_criteria": [
|
||||
"Reward distribution properly updates user XP and coins",
|
||||
"Rewards are validated before distribution (positive amounts, valid types)",
|
||||
"Transaction handling ensures atomicity (all-or-nothing)",
|
||||
"User balance updates are persisted correctly",
|
||||
"Achievement rewards properly unlock achievements",
|
||||
"Integration tests verify reward distribution (10+ test cases)",
|
||||
"Error handling for invalid rewards and failed transactions"
|
||||
],
|
||||
"dependencies": ["BACKEND-002"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/tasks_api_v2.dart",
|
||||
"mnemo_cards_backend/lib/user/user_manager.dart",
|
||||
"mnemo_cards_backend/test/api/v2/tasks_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue