44** Priority** : P0 (Critical)
55** Phase** : 1 (Week 1-2)
66** Owner** : AI (Claude) with Human review
7- ** Status** : Not Started
7+ ** Status** : Complete (2026-01-30)
88
99---
1010
@@ -83,18 +83,18 @@ This creates:
8383## 5. User Stories
8484
8585### Story E1-S1: Eliminate SSH Settings Duplicate
86- ** Priority** : P0 | ** Points** : 3 | ** Status** : Not Started
86+ ** Priority** : P0 | ** Points** : 3 | ** Status** : Complete
8787
8888** As a** developer,
8989** I want** a single source of truth for SSH settings endpoints,
9090** So that** I don't have conflicting implementations.
9191
9292** Acceptance Criteria** :
93- - [ ] ` routes/ssh/settings.py ` contains all SSH settings functionality
94- - [ ] ` routes/ssh_settings.py ` is deleted
95- - [ ] All imports updated (grep finds no references to old file)
96- - [ ] All tests pass
97- - [ ] API behavior unchanged (verified with curl)
93+ - [x ] ` routes/ssh/settings.py ` contains all SSH settings functionality
94+ - [x ] ` routes/ssh_settings.py ` is deleted
95+ - [x ] All imports updated (grep finds no references to old file)
96+ - [x ] All tests pass
97+ - [x ] API behavior unchanged (verified with curl)
9898
9999** Implementation Notes** :
1001001 . Compare both files for differences
@@ -106,53 +106,53 @@ This creates:
106106---
107107
108108### Story E1-S2: Eliminate SSH Debug Duplicate
109- ** Priority** : P0 | ** Points** : 2 | ** Status** : Not Started
109+ ** Priority** : P0 | ** Points** : 2 | ** Status** : Complete
110110
111111** As a** developer,
112112** I want** a single source of truth for SSH debug endpoints,
113113** So that** debugging tools work consistently.
114114
115115** Acceptance Criteria** :
116- - [ ] ` routes/ssh/debug.py ` contains all SSH debug functionality
117- - [ ] ` routes/ssh_debug.py ` is deleted
118- - [ ] All imports updated
119- - [ ] All tests pass
120- - [ ] API behavior unchanged
116+ - [x ] ` routes/ssh/debug.py ` contains all SSH debug functionality
117+ - [x ] ` routes/ssh_debug.py ` is deleted
118+ - [x ] All imports updated
119+ - [x ] All tests pass
120+ - [x ] API behavior unchanged
121121
122122---
123123
124124### Story E1-S3: Eliminate Scan Config Duplicate
125- ** Priority** : P0 | ** Points** : 3 | ** Status** : Not Started
125+ ** Priority** : P0 | ** Points** : 3 | ** Status** : Complete
126126
127127** As a** developer,
128128** I want** a single source of truth for scan configuration endpoints,
129129** So that** scan configuration is consistent.
130130
131131** Acceptance Criteria** :
132- - [ ] ` routes/scans/config.py ` contains all scan config functionality
133- - [ ] ` routes/scan_config_api.py ` is deleted
134- - [ ] All imports updated
135- - [ ] All tests pass
136- - [ ] API behavior unchanged
132+ - [x ] ` routes/scans/config.py ` contains all scan config functionality
133+ - [x ] ` routes/scan_config_api.py ` is deleted
134+ - [x ] All imports updated
135+ - [x ] All tests pass
136+ - [x ] API behavior unchanged
137137
138138---
139139
140140### Story E1-S4: Create Auth Route Package
141- ** Priority** : P1 | ** Points** : 5 | ** Status** : Not Started
141+ ** Priority** : P1 | ** Points** : 5 | ** Status** : Complete
142142
143143** As a** developer,
144144** I want** authentication routes organized in a package,
145145** So that** auth-related code is easy to find and maintain.
146146
147147** Acceptance Criteria** :
148- - [ ] ` routes/auth/ ` directory created with ` __init__.py `
149- - [ ] ` routes/auth/login.py ` - Login/logout endpoints
150- - [ ] ` routes/auth/mfa.py ` - MFA endpoints (from ` mfa.py ` )
151- - [ ] ` routes/auth/api_keys.py ` - API key endpoints (from ` api_keys.py ` )
152- - [ ] ` routes/auth/sessions.py ` - Session management
153- - [ ] Old flat files deleted
154- - [ ] All imports updated
155- - [ ] All tests pass
148+ - [x ] ` routes/auth/ ` directory created with ` __init__.py `
149+ - [x ] ` routes/auth/login.py ` - Login/logout endpoints
150+ - [x ] ` routes/auth/mfa.py ` - MFA endpoints (from ` mfa.py ` )
151+ - [x ] ` routes/auth/api_keys.py ` - API key endpoints (from ` api_keys.py ` )
152+ - [x ] ` routes/auth/sessions.py ` - Session management
153+ - [x ] Old flat files deleted
154+ - [x ] All imports updated
155+ - [x ] All tests pass
156156
157157** Package Structure** :
158158```
@@ -167,104 +167,104 @@ routes/auth/
167167---
168168
169169### Story E1-S5: Create Rules Route Package
170- ** Priority** : P1 | ** Points** : 5 | ** Status** : Not Started
170+ ** Priority** : P1 | ** Points** : 5 | ** Status** : Complete
171171
172172** As a** developer,
173173** I want** rule-related routes organized in a package,
174174** So that** rule management code is cohesive.
175175
176176** Acceptance Criteria** :
177- - [ ] ` routes/rules/ ` directory created
178- - [ ] ` routes/rules/crud.py ` - Basic rule CRUD
179- - [ ] ` routes/rules/management.py ` - From ` rule_management.py `
180- - [ ] ` routes/rules/scanning.py ` - From ` rule_scanning.py `
181- - [ ] ` routes/rules/compliance.py ` - From ` compliance_rules_api.py `
182- - [ ] Old flat files deleted
183- - [ ] All imports updated
184- - [ ] All tests pass
177+ - [x ] ` routes/rules/ ` directory created
178+ - [x ] ` routes/rules/crud.py ` - Basic rule CRUD
179+ - [x ] ` routes/rules/management.py ` - From ` rule_management.py `
180+ - [x ] ` routes/rules/scanning.py ` - From ` rule_scanning.py `
181+ - [x ] ` routes/rules/compliance.py ` - From ` compliance_rules_api.py `
182+ - [x ] Old flat files deleted
183+ - [x ] All imports updated
184+ - [x ] All tests pass
185185
186186---
187187
188188### Story E1-S6: Create Admin Route Package
189- ** Priority** : P2 | ** Points** : 3 | ** Status** : Not Started
189+ ** Priority** : P2 | ** Points** : 3 | ** Status** : Complete
190190
191191** As a** developer,
192192** I want** admin routes organized in a package,
193193** So that** administrative functions are grouped.
194194
195195** Acceptance Criteria** :
196- - [ ] ` routes/admin/ ` directory created
197- - [ ] ` routes/admin/users.py ` - From ` users.py `
198- - [ ] ` routes/admin/audit.py ` - From ` audit.py `
199- - [ ] ` routes/admin/settings.py ` - System settings
200- - [ ] Old flat files deleted
201- - [ ] All imports updated
202- - [ ] All tests pass
196+ - [x ] ` routes/admin/ ` directory created
197+ - [x ] ` routes/admin/users.py ` - From ` users.py `
198+ - [x ] ` routes/admin/audit.py ` - From ` audit.py `
199+ - [x ] ` routes/admin/settings.py ` - System settings
200+ - [x ] Old flat files deleted
201+ - [x ] All imports updated
202+ - [x ] All tests pass
203203
204204---
205205
206206### Story E1-S7: Create Content Route Package
207- ** Priority** : P2 | ** Points** : 4 | ** Status** : Not Started
207+ ** Priority** : P2 | ** Points** : 4 | ** Status** : Complete
208208
209209** As a** developer,
210210** I want** SCAP content routes organized in a package,
211211** So that** content management is cohesive.
212212
213213** Acceptance Criteria** :
214- - [ ] ` routes/content/ ` directory created
215- - [ ] ` routes/content/scap.py ` - From ` content.py `
216- - [ ] ` routes/content/import_.py ` - From ` scap_import.py `
217- - [ ] ` routes/content/xccdf.py ` - From ` xccdf_api.py `
218- - [ ] Old flat files deleted
219- - [ ] All imports updated
220- - [ ] All tests pass
214+ - [x ] ` routes/content/ ` directory created
215+ - [x ] ` routes/content/scap.py ` - From ` content.py `
216+ - [x ] ` routes/content/import_.py ` - From ` scap_import.py `
217+ - [x ] ` routes/content/xccdf.py ` - From ` xccdf_api.py `
218+ - [x ] Old flat files deleted
219+ - [x ] All imports updated
220+ - [x ] All tests pass
221221
222222---
223223
224224### Story E1-S8: Remove Legacy Host Routes
225- ** Priority** : P0 | ** Points** : 2 | ** Status** : Not Started
225+ ** Priority** : P0 | ** Points** : 2 | ** Status** : Complete
226226
227227** As a** developer,
228228** I want** legacy host routes removed,
229229** So that** there's no confusion about which endpoints to use.
230230
231231** Acceptance Criteria** :
232- - [ ] Verified ` routes/hosts/ ` has all necessary functionality
233- - [ ] ` routes/hosts_legacy.py ` deleted
234- - [ ] No other legacy host files remain
235- - [ ] All imports updated
236- - [ ] All tests pass
237- - [ ] Frontend verified to work correctly
232+ - [x ] Verified ` routes/hosts/ ` has all necessary functionality
233+ - [x ] ` routes/hosts_legacy.py ` deleted
234+ - [x ] No other legacy host files remain
235+ - [x ] All imports updated
236+ - [x ] All tests pass
237+ - [x ] Frontend verified to work correctly
238238
239239---
240240
241241### Story E1-S9: Consolidate MongoDB Scan Routes
242- ** Priority** : P2 | ** Points** : 3 | ** Status** : Not Started
242+ ** Priority** : P2 | ** Points** : 3 | ** Status** : Complete
243243
244244** As a** developer,
245245** I want** MongoDB scan routes in the scans package,
246246** So that** all scan routes are in one place.
247247
248248** Acceptance Criteria** :
249- - [ ] Functionality from ` mongodb_scan_api.py ` merged into ` routes/scans/ `
250- - [ ] ` mongodb_scan_api.py ` deleted
251- - [ ] All imports updated
252- - [ ] All tests pass
249+ - [x ] Functionality from ` mongodb_scan_api.py ` merged into ` routes/scans/ `
250+ - [x ] ` mongodb_scan_api.py ` deleted
251+ - [x ] All imports updated
252+ - [x ] All tests pass
253253
254254---
255255
256256### Story E1-S10: Update main.py Router Registration
257- ** Priority** : P0 | ** Points** : 2 | ** Status** : Not Started
257+ ** Priority** : P0 | ** Points** : 2 | ** Status** : Complete
258258
259259** As a** developer,
260260** I want** main.py to only register modular route packages,
261261** So that** the router configuration is clean and consistent.
262262
263263** Acceptance Criteria** :
264- - [ ] main.py includes only package routers (not individual files)
265- - [ ] All routes accessible via ` /api ` prefix
266- - [ ] OpenAPI docs reflect correct structure
267- - [ ] All tests pass
264+ - [x ] main.py includes only package routers (not individual files)
265+ - [x ] All routes accessible via ` /api ` prefix
266+ - [x ] OpenAPI docs reflect correct structure
267+ - [x ] All tests pass
268268
269269---
270270
@@ -305,24 +305,24 @@ graph TD
305305
306306## 8. Acceptance Criteria (Epic Level)
307307
308- - [ ] Zero duplicate route files
309- - [ ] All routes in modular packages (except truly standalone utilities)
310- - [ ] ` main.py ` router registration is clean
311- - [ ] All tests pass
312- - [ ] Frontend fully functional
313- - [ ] OpenAPI docs accurate
314- - [ ] No deprecation warnings in logs
308+ - [x ] Zero duplicate route files
309+ - [x ] All routes in modular packages (except truly standalone utilities)
310+ - [x ] ` main.py ` router registration is clean
311+ - [x ] All tests pass
312+ - [x ] Frontend fully functional
313+ - [x ] OpenAPI docs accurate
314+ - [x ] No deprecation warnings in logs
315315
316316---
317317
318318## 9. Definition of Done
319319
320- - [ ] All stories completed
321- - [ ] Code reviewed and approved
322- - [ ] Tests pass (unit + integration)
323- - [ ] Documentation updated
324- - [ ] No regressions introduced
325- - [ ] Committed with proper messages
320+ - [x ] All stories completed
321+ - [x ] Code reviewed and approved
322+ - [x ] Tests pass (unit + integration)
323+ - [x ] Documentation updated
324+ - [x ] No regressions introduced
325+ - [x ] Committed with proper messages
326326
327327---
328328
0 commit comments