File size: 5,638 Bytes
9c1645f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# SupportOps Arena - Task Management

## Project Overview
Building an OpenEnv-compliant RL environment for enterprise IT support simulation.

---

## Phase 1: Project Foundation & Structure
**Status**: ✅ Complete

### Tasks:
- [x] Create directory structure (env/, adversary/, graders/, baseline/, tests/, app/)
- [x] Setup requirements.txt with all dependencies
- [x] Create .env.example file
- [x] Setup basic __init__.py files

---

## Phase 2: Core Pydantic Models
**Status**: ✅ Complete

### Tasks:
- [x] Create env/state.py with all Pydantic v2 models
- [x] Define enums (NetworkStatus, VPNStatus, AuthStatus, etc.)
- [x] Define sub-models (UserContext, LogEntry, ActionRecord)
- [x] Define core models (EnvObservation, HiddenState, EnvState, StepResult)

---

## Phase 3: Action System
**Status**: ⏳ Pending

### Tasks:
- [ ] Create env/actions.py with ActionType enum (all 15 actions)
- [ ] Define ActionMetadata dataclass
- [ ] Create ACTION_METADATA dictionary with all action specifications

---

## Phase 4: Scenarios & Task Definitions
**Status**: ⏳ Pending

### Tasks:
- [ ] Create env/scenarios.py with TicketGenerator class
- [ ] Define TASK_EASY_ROOT_CAUSES (6+ scenarios)
- [ ] Define TASK_MEDIUM_ROOT_CAUSES (6+ scenarios)
- [ ] Define TASK_HARD_ROOT_CAUSES (6+ scenarios)
- [ ] Implement ticket generation logic with noise/misleading entries

---

## Phase 5: Rewards System
**Status**: ⏳ Pending

### Tasks:
- [ ] Create env/rewards.py with REWARD_EVENTS dictionary
- [ ] Implement RewardCalculator class
- [ ] Implement reward calculation logic with breakdown
- [ ] Add normalization logic for episode scores

---

## Phase 6: State Machine & Transitions
**Status**: ⏳ Pending

### Tasks:
- [ ] Create env/transitions.py with StateMachine class
- [ ] Implement transition() method with all precondition rules
- [ ] Implement observation updates for each action type
- [ ] Add noise model for inspect_logs
- [ ] Add escalation unlock logic

---

## Phase 7: Core Environment
**Status**: ⏳ Pending

### Tasks:
- [ ] Create env/environment.py with SupportOpsArena class
- [ ] Implement async reset() method
- [ ] Implement async step() method with full logic
- [ ] Implement async state() method
- [ ] Add episode termination logic
- [ ] Integrate with all other modules

---

## Phase 8: Adaptive Adversary
**Status**: ⏳ Pending

### Tasks:
- [ ] Create adversary/policy_tracker.py with PolicyTracker class
- [ ] Create adversary/adversary.py with AdaptiveAdversary class
- [ ] Implement policy weak-point detection
- [ ] Implement sampling weight adjustment
- [ ] Add cross-episode tracking

---

## Phase 9: Grading System
**Status**: ⏳ Pending

### Tasks:
- [ ] Create graders/programmatic.py with ProgrammaticGrader
- [ ] Create graders/llm_grader.py with LLMGrader (async)
- [ ] Create graders/adversarial_grader.py with AdversarialGrader
- [ ] Implement grading logic for all three types
- [ ] Add LLM-based quality assessment

---

## Phase 10: Baseline Agent
**Status**: ⏳ Pending

### Tasks:
- [ ] Create baseline/baseline_agent.py with BaselineAgent class
- [ ] Implement rule-based heuristic logic
- [ ] Add support for all action types
- [ ] Implement diagnostic → remediation flow

---

## Phase 11: FastAPI Server
**Status**: ⏳ Pending

### Tasks:
- [ ] Create app/server.py with FastAPI app
- [ ] Implement /api/openenv/v1/env/reset endpoint
- [ ] Implement /api/openenv/v1/env/step endpoint
- [ ] Implement /api/openenv/v1/env/state endpoint (auth required)
- [ ] Implement /api/openenv/v1/metrics endpoint
- [ ] Add health check endpoint /health
- [ ] Add static file serving for frontend

---

## Phase 12: Frontend Dashboard
**Status**: ⏳ Pending

### Tasks:
- [ ] Create app/static/index.html
- [ ] Implement episode controls UI
- [ ] Implement live observation display
- [ ] Implement action history table
- [ ] Implement reward tracking chart
- [ ] Add metrics visualization
- [ ] Apply glassmorphism design system

---

## Phase 13: Configuration Files
**Status**: ⏳ Pending

### Tasks:
- [ ] Create openenv.yaml with full metadata
- [ ] Create Dockerfile (multi-stage if needed)
- [ ] Verify Docker build and run commands

---

## Phase 14: Inference Script
**Status**: ⏳ Pending

### Tasks:
- [ ] Create inference.py at root level
- [ ] Implement episode runner logic
- [ ] Add metric calculation and reporting
- [ ] Support multiple episodes with different seeds

---

## Phase 15: Testing Suite
**Status**: ⏳ Pending

### Tasks:
- [ ] Create tests/conftest.py with fixtures
- [ ] Create tests/test_env.py with environment tests
- [ ] Create tests/test_graders.py with grader tests
- [ ] Create tests/test_transitions.py with state machine tests
- [ ] Create tests/test_adversary.py with adversary tests
- [ ] Ensure all tests pass with pytest

---

## Phase 16: Documentation
**Status**: ⏳ Pending

### Tasks:
- [ ] Create comprehensive README.md
- [ ] Add quickstart guide
- [ ] Document API endpoints
- [ ] Add task examples with difficulty levels
- [ ] Include environment details and metrics
- [ ] Add troubleshooting section

---

## Phase 17: Final Validation
**Status**: ⏳ Pending

### Tasks:
- [ ] Run full test suite
- [ ] Test Docker build and deployment
- [ ] Verify all endpoints work
- [ ] Test baseline agent performance
- [ ] Validate OpenEnv compliance
- [ ] Check Hugging Face Spaces compatibility
- [ ] Complete pre-submission checklist

---

## Notes
- Follow PRD.md strictly for all specifications
- Use Pydantic v2 syntax exclusively
- All async code properly implemented
- No hardcoded credentials
- Proper error handling throughout