File size: 2,629 Bytes
362bbff
 
 
329e3d3
 
 
362bbff
 
 
 
 
329e3d3
362bbff
 
 
 
 
 
 
329e3d3
362bbff
329e3d3
 
 
 
362bbff
 
 
 
 
 
329e3d3
 
 
 
362bbff
 
 
329e3d3
 
 
 
362bbff
 
 
 
 
 
329e3d3
 
 
 
362bbff
 
 
329e3d3
 
 
362bbff
 
 
 
 
 
329e3d3
 
 
 
362bbff
 
 
329e3d3
 
 
362bbff
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
"""
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