""" Task definitions for the Shopify Store Audit environment. Tasks define difficulty parameters — issue count, step budget, hint level, and which issue categories to sample from. The IssuePool handles actual issue selection with optional random seeding. """ from __future__ import annotations from dataclasses import dataclass, field from typing import Dict, List, Optional @dataclass class TaskConfig: task_id: str title: str description: str difficulty: str max_steps: int num_issues: int hint_level: str = "full" # full | descriptions | summary issue_categories: Optional[List[str]] = None allow_regressions: bool = True TASK_PRODUCT_QA = TaskConfig( task_id="product_listing_qa", title="Product Listing Quality Assurance", description=( "Audit a real Shopify store catalog loaded from product exports. " "Find and fix 8 product data issues — missing descriptions, $0 prices, " "absent SKUs, negative inventory, draft products. Use query_store_health " "to see issues and their suggested commands, then apply fixes." ), difficulty="easy", max_steps=25, num_issues=8, hint_level="full", issue_categories=["product", "inventory"], allow_regressions=False, ) TASK_SEO_COLLECTIONS = TaskConfig( task_id="seo_collection_optimization", title="SEO & Collection Optimization", description=( "The store's search visibility needs work. Fix 12 issues across SEO " "metadata, image alt text, collection structure, and product tags. " "query_store_health shows issue descriptions — you must figure out " "which commands and parameters to use." ), difficulty="medium", max_steps=35, num_issues=12, hint_level="descriptions", issue_categories=["seo", "collection", "product"], ) TASK_FULL_AUDIT = TaskConfig( task_id="full_store_audit", title="Full Store Health Audit", description=( "Comprehensive audit: 20 issues across product data, SEO, inventory, " "collections, and orders. query_store_health only shows category counts — " "you must explore with query_products, query_inventory, query_orders etc. " "to discover and diagnose issues yourself." ), difficulty="hard", max_steps=50, num_issues=20, hint_level="summary", issue_categories=None, ) ALL_TASKS: Dict[str, TaskConfig] = { TASK_PRODUCT_QA.task_id: TASK_PRODUCT_QA, TASK_SEO_COLLECTIONS.task_id: TASK_SEO_COLLECTIONS, TASK_FULL_AUDIT.task_id: TASK_FULL_AUDIT, } DEFAULT_TASK = TASK_PRODUCT_QA.task_id