canina/.ai_agency/memory/backlog.json
parsa aghaei 5e8a919dd0 fix: renumber agents — 00_intake stays 00, others shift +1
00_auditor -> 01_auditor
01_ceo     -> 02_ceo
02_product_manager -> 03_product_manager
03_architect       -> 04_architect
04_dev_backend     -> 05_dev_backend
05_dev_frontend    -> 06_dev_frontend
06_qa_engineer     -> 07_qa_engineer
07_visual_qa       -> 08_visual_qa
08_devops_security -> 09_devops_security
09_tech_writer     -> 10_tech_writer
10_deploy          -> 11_deploy
11_seo_content     -> 12_seo_content

Update all references in AGENCY.md, state.json, backlog.json
2026-07-26 17:34:50 +03:30

314 lines
11 KiB
JSON

{
"tasks": [
{
"id": "TASK-101",
"title": "Prisma Schema & Database Indexing Optimization (PostgreSQL)",
"description": "Add indexes on high-traffic search fields (categorySlug, suitableFor) in Product model. Validate B2B/Wholesale field relations.",
"architectural_layer": "data_persistence",
"assigned_role": "05_dev_backend",
"priority": "HIGH",
"status": "completed",
"max_files_allowed": 2,
"estimated_minutes": 20,
"dependency_task_ids": [],
"acceptance_criteria": [
"افزودن ایندکس روی فیلدهای پرکاربرد جستجو نظیر categorySlug و suitableFor در مدل Product",
"اعتبارسنجی ارجاعات ریلیشن‌ها و پشتیبانی متوازن از فیلدهای B2B/Wholesale"
],
"sub_steps": [
{
"index": 1,
"name": "read_schema",
"description": "Read existing Prisma schema",
"status": "done"
},
{
"index": 2,
"name": "add_indexes",
"description": "Add @@index directives on search fields",
"status": "done"
},
{
"index": 3,
"name": "validate_relations",
"description": "Validate B2B relation integrity",
"status": "done"
}
]
},
{
"id": "TASK-102",
"title": "Seed Data & Official Catalog Sync in Prisma (backend/prisma/seed.ts)",
"description": "Write complete seed.ts with 30 official Canina Germany catalog products including exact retail and wholesale prices. Must run via 'npx prisma db seed' without errors.",
"architectural_layer": "data_persistence",
"assigned_role": "05_dev_backend",
"priority": "HIGH",
"status": "pending",
"max_files_allowed": 2,
"estimated_minutes": 25,
"dependency_task_ids": [
"TASK-101"
],
"acceptance_criteria": [
"همگام‌سازی کامل ۳۰ محصول کاتالوگ رسمی Canina آلمان با قیمت‌های دقیق تک‌فروشی و قیمت عمده همکار",
"اجرای موفقیت‌آمیز npx prisma db seed بدون خطا"
],
"sub_steps": [
{
"index": 1,
"name": "analyze_schema",
"description": "Read schema.prisma Product model for all required fields",
"status": "pending"
},
{
"index": 2,
"name": "write_seed_data",
"description": "Write 30 Canina catalog products with retail+wholesale prices",
"status": "pending"
},
{
"index": 3,
"name": "verify_seed_runs",
"description": "Run npx prisma db seed and fix any errors",
"status": "pending"
}
]
},
{
"id": "TASK-103",
"title": "NestJS Global DTO Validation Pipes & Sanitization (backend/src/main.ts)",
"description": "Enable global ValidationPipe with whitelist and forbidNonWhitelisted. Set up Global Exception Filter for standard API error response structure.",
"architectural_layer": "transport_api",
"assigned_role": "05_dev_backend",
"priority": "HIGH",
"status": "pending",
"max_files_allowed": 3,
"estimated_minutes": 15,
"dependency_task_ids": [
"TASK-102"
],
"acceptance_criteria": [
"فعال‌سازی ValidationPipe سراسری با whitelist و forbidNonWhitelisted",
"تنظیم Global Exception Filter برای ساختار استاندارد پاسخ به خطاهای API"
],
"sub_steps": [
{
"index": 1,
"name": "configure_validation_pipe",
"description": "Add global ValidationPipe to main.ts bootstrap",
"status": "pending"
},
{
"index": 2,
"name": "create_exception_filter",
"description": "Create HttpExceptionFilter class with standardized error response",
"status": "pending"
},
{
"index": 3,
"name": "register_global_filter",
"description": "Register exception filter globally in main.ts",
"status": "pending"
}
]
},
{
"id": "TASK-104",
"title": "NestJS Auth & B2B Wholesale Role Guard Verification (backend/src/auth)",
"description": "Implement RolesGuard for User_Wholesale and ADMIN roles. Hide wholesale prices in product service when guard fails.",
"architectural_layer": "business_logic",
"assigned_role": "05_dev_backend",
"priority": "HIGH",
"status": "pending",
"max_files_allowed": 3,
"estimated_minutes": 20,
"dependency_task_ids": [
"TASK-103"
],
"acceptance_criteria": [
"پیاده‌سازی گارد دسترسی RolesGuard برای نقش‌های User_Wholesale و ADMIN",
"مخفی‌سازی قیمت عمده در سرویس محصولات در صورت عدم تایید گارد احراز هویت"
],
"sub_steps": [
{
"index": 1,
"name": "create_roles_guard",
"description": "Create RolesGuard decorator and guard class",
"status": "pending"
},
{
"index": 2,
"name": "apply_to_product_service",
"description": "Conditionally return wholesalePrice based on user role",
"status": "pending"
},
{
"index": 3,
"name": "write_guard_tests",
"description": "Write Jest tests for RolesGuard with mock user contexts",
"status": "pending"
}
]
},
{
"id": "TASK-105",
"title": "NestJS Admin Orders & B2B Document Approval Service (backend/src/admin)",
"description": "Create service for approving business license documents to upgrade user role to User_Wholesale. Implement controllers for bulk order status and invoice export.",
"architectural_layer": "business_logic",
"assigned_role": "05_dev_backend",
"priority": "HIGH",
"status": "pending",
"max_files_allowed": 3,
"estimated_minutes": 20,
"dependency_task_ids": [
"TASK-104"
],
"acceptance_criteria": [
"ایجاد سرویس تایید مدارک و پروانه کسب خریداران عمده جهت تغییر نقش به User_Wholesale",
"پیاده‌سازی کنترلرهای تغییر وضعیت سفارشات عمده و صادرات فاکتور"
],
"sub_steps": [
{
"index": 1,
"name": "create_admin_module",
"description": "Create NestJS AdminModule with controller and service",
"status": "pending"
},
{
"index": 2,
"name": "implement_approval_service",
"description": "Write document approval logic and role upgrade flow",
"status": "pending"
},
{
"index": 3,
"name": "implement_order_controllers",
"description": "Write bulk order status change and invoice export endpoints",
"status": "pending"
}
]
},
{
"id": "TASK-106",
"title": "Backend Unit & Integration Test Suite (Jest)",
"description": "Write unit tests for Auth and Products controllers. Ensure >80% code coverage for core backend services.",
"architectural_layer": "testing",
"assigned_role": "07_qa_engineer",
"priority": "HIGH",
"status": "pending",
"max_files_allowed": 3,
"estimated_minutes": 20,
"dependency_task_ids": [
"TASK-105"
],
"acceptance_criteria": [
"نوشتن تست‌های واحد کنترلرهای Auth و Products با Jest",
"تضمین درصد پوشش تست (Code Coverage) بالای ۸۰٪ برای سرویس‌های اصلی بک‌اند"
],
"sub_steps": [
{
"index": 1,
"name": "write_auth_tests",
"description": "Write Jest tests for AuthController covering login/logout/register",
"status": "pending"
},
{
"index": 2,
"name": "write_product_tests",
"description": "Write Jest tests for ProductsController with B2B price visibility tests",
"status": "pending"
},
{
"index": 3,
"name": "verify_coverage",
"description": "Run coverage report and ensure >80% for core services",
"status": "pending"
}
]
},
{
"id": "TASK-107",
"title": "Frontend Error Boundaries & Global Loading Skeletal Streaming",
"description": "Strengthen ErrorBoundary in ProductPage and B2BPortal. Add streaming skeletons for better UX.",
"architectural_layer": "presentation_ui",
"assigned_role": "06_dev_frontend",
"priority": "MEDIUM",
"status": "pending",
"max_files_allowed": 3,
"estimated_minutes": 15,
"dependency_task_ids": [
"TASK-106"
],
"acceptance_criteria": [
"تقویت ErrorBoundary در لایه‌های حساس مانند ProductPage و B2BPortal",
"ارتقای تجربه کاربری با اسکلتون‌های استریمینگ متوازن"
],
"sub_steps": [
{
"index": 1,
"name": "create_error_boundary",
"description": "Create or improve ErrorBoundary component",
"status": "pending"
},
{
"index": 2,
"name": "create_skeletons",
"description": "Create ProductSkeleton and B2BPortalSkeleton components",
"status": "pending"
},
{
"index": 3,
"name": "integrate_into_pages",
"description": "Wrap ProductPage and B2BPortal with ErrorBoundary and Suspense",
"status": "pending"
}
]
},
{
"id": "TASK-108",
"title": "B2B Wholesale Matrix & Prescription Direct Quick Order Optimization",
"description": "Connect B2B portal to backend auth service. Optimize bulk order registration with 30% discount for approved wholesalers.",
"architectural_layer": "presentation_ui",
"assigned_role": "06_dev_frontend",
"priority": "MEDIUM",
"status": "pending",
"max_files_allowed": 3,
"estimated_minutes": 20,
"dependency_task_ids": [
"TASK-107"
],
"acceptance_criteria": [
"ارتباط آنی پورتال B2B به سرویس احراز هویت بک‌اند",
"بهینه‌سازی ثبت سفارشات حجمی (Bulk Order) با تخفیف ۳۰٪ برای همکاران تاییدشده"
],
"sub_steps": [
{
"index": 1,
"name": "connect_b2b_auth",
"description": "Wire B2BPortal to backend auth API for role verification",
"status": "pending"
},
{
"index": 2,
"name": "implement_bulk_order",
"description": "Build bulk order form with quantity matrix and auto-discount calculation",
"status": "pending"
},
{
"index": 3,
"name": "write_component_tests",
"description": "Write tests for wholesale discount logic",
"status": "pending"
}
]
}
],
"metadata": {
"total": 8,
"completed": 1,
"in_progress": 0,
"pending": 7,
"generated_at": "2026-07-26T13:20:00Z",
"decomposition_pass": 1
}
}