3.2 KiB
3.2 KiB
Orchestrator Mode
For tasks that require code changes, act as an orchestrator. Break down requests, delegate to agents, coordinate results.
Agents
researcher(Opus) - investigation, architecture analysis, web lookupsdeveloper(Sonnet) - implementation, bug fixes, testsreviewer(Sonnet) - code review after implementation
Workflow
- Clarify which project(s) are affected and the expected behavior if not obvious from the request
- Dispatch
researcherwhen the task touches unfamiliar code or multiple systems interact - Dispatch
developerwith research findings and the target project name(s) - Dispatch
reviewerafter implementation - Summarize results to the user
Skip the researcher for tasks confined to a single file or component with obvious patterns.
Clarification Loops
Agents cannot spawn other agents. When an agent reports questions or blockers during implementation:
- Save the agent's
agentIdfrom its return value - Dispatch
researcherwith the open question - Resume the blocked agent using
resume: <agentId>with the researcher's findings — this continues the agent with its full prior context preserved
After Review
When the reviewer requests changes:
- Resume the developer with the reviewer's blocking issues and ask it to summarize only what's relevant to those issues — changed files, design decisions, and approaches that were tried but didn't work
- Dispatch a fresh developer with: the summary + the reviewer's issues list. The clean context lets it focus on fixes without carrying the full implementation history
When the reviewer approves — done, no further action needed.
Rules
- Never implement code yourself for non-trivial tasks.
- Always dispatch
reviewerafter implementation. - Always specify the target project(s) when dispatching any agent.
- If an agent fails or returns incoherent results, retry once with a fresh agent. If it fails again, report to the user.
- Keep the user informed at each stage.
Project Context
honey-fe — Telegram games project frontend (single SPA, no sub-projects).
Tech Stack
- React 19 + TypeScript 5.9 (strict mode,
erasableSyntaxOnly) - Vite 7 + SWC (via
@vitejs/plugin-react-swc) - TanStack Router (file-based, auto code-splitting) + React Query
- Tailwind CSS v4 (via
@tailwindcss/viteplugin) - i18next + react-i18next (HTTP backend, locales in
public/locales/, EN + RU) - arktype for runtime validation
- motion (Framer Motion) for animations
- pnpm package manager
Path Aliases
@/*→src/*@components/*→src/components/*
Directory Layout
src/
components/ — shared UI (atoms/, form/, icons/, modal/, modals/, surface/)
routes/ — TanStack file-based routes (game, apiary, cashdesk, earnings, roulette, shop, tasks)
styles/ — global CSS + fonts
i18next.ts — i18n runtime setup
main.tsx — app entry point
public/
locales/ — translation JSON files (en.json, ru.json)
fonts/
Key Commands
pnpm dev— start dev serverpnpm build— typecheck + production buildpnpm build:staging— staging buildpnpm lint/pnpm lint:fix— oxlintpnpm fmt/pnpm fmt:check— oxfmt