Developer Guide · 17
Development Checklist
- All Python imports use
app.*package paths - Do not top-level import
deepagentsoutsideapp/services/agent.py,consumer_agent.py,voice/router.py - Avoid circular imports: use deferred imports inside functions (e.g.,
clear_agent_cacheinprompt.py/subagents.py) - Consumer routes use
get_service_contextdependency (notget_current_user) - Consumer Agent creation must pass
channelparameter (web / wechat / scheduler) - Path operations exclusively through
app.core.path_security.safe_join/ensure_within - File I/O explicitly UTF-8 (
encoding="utf-8") - Always read API URLs through
api_configor env, never hardcode - All sync tools needing asyncio must use
_main_loop+run_coroutine_threadsafe - Service
manage_scheduled_taskscan only operate tasks for the currentconversation_id - Frontend icons use
@phosphor-icons/react(no new@ant-design/iconsreferences) - Frontend components use functional + Hooks (sole exception:
ErrorBoundary) - API calls managed through
services/api.ts - Inline
borderRadiususesvar(--jf-radius-*)variable strings - CSS colors through
var(--jf-*)references; hardcoding only inthemes.cssandthemeContext.tsx - When changing admin chat, check service-chat too: shared
markdown.tsandStreamingMessage.tsx - Adding new SSE event types: update both
streamContext.tsx(admin) andstreamHandler.ts(service) - Never copy
markdown.tsintoservice-chat/for convenience — this was the root cause of the historical<<FILE:>>media bug - Scheduler task creation must include
tz_offset_hours: getTzOffset() - Tauri paths must be processed through
strip_win_extended_prefixto strip\\?\prefix