Overview: Before splitting a file, commit the move (`mkdir -p Foo && git mv Foo.tsx Foo/index.tsx`) alone to ensure reviewers can read the extraction diff separately and Git keeps the rename intact. Use `split-large-file` for the full procedure.
Overview: Before starting the audit, ensure that the active harness's metadata (e.g., `disable-model-invocation` or `policy.allow_implicit_invocation` in `agents/openai.yaml`) is verified against explicit-only invocation settings. Additionally, check for any inventory helpers in `package.json` scripts or `.agents/scripts/` to avoid duplicating checks.
Overview: Before exploring the project, ensure you have access to the LobeHub repository and run `ls` in the root directory to see the current set of packages and apps. The tech stack and directory structure may evolve over time, so always refer to the latest `package.json` for exact versions.
Overview: Ensure the global `ModalHost` from `@lobehub/ui/base-ui` is mounted once near the root of the application. Use `onOpenChangeComplete` for cleanup tasks, as `onOpenChange` may not fire correctly when closing via footer buttons.
Overview: Before adding a call, check `TRACING_SCENARIOS` and ensure the scenario aligns with the user-visible workflow and lifecycle stage. Pass `schemaName` for structured generation and relevant entity IDs when available. Use `packages/prompts` for reusable prompts and `apps/server/src/services/aiGeneration` for server-side structured generation.
Overview: Only edit files in `packages/locales/src/default/` and avoid hand-writing translations in `locales/` JSON except for en-US/zh-CN previews. Generated locales should be left to the daily workflow unless translations are needed immediately, in which case `bun run i18n` must be run manually with an `OPENAI_API_KEY`.
Overview: Ensure the `HotkeyId` union is updated in `hotkey.ts` before adding the new shortcut. Also, verify that the `HOTKEYS_REGISTRATION` array includes the new hotkey configuration with the correct scope and key combination.
Overview: Before debugging, ensure the raw CLI output is correct by reviewing the most recent session trace via `cat .heterogeneous-tracing/.last-live-trace`. Verify that the raw output matches the adapter output, and inspect `persistToolBatch`, `persistToolResult`, step transitions, and subagent routing only after confirming the transport/adapter/executor path is sound.
Overview: Before using Elasticsearch, ensure it supports every entity in FTS_SEARCH_BACKEND_ENTITIES through coverage tests. For pg_like, ensure it is explicitly selected and not used as a fallback; missing extensions or unreachable services must fail.
Overview: Ensure the Electron environment is set up with TypeScript support. Create a controller in `apps/desktop/src/main/controllers/`, define IPC types in `packages/electron-client-ipc/src/types/`, and implement a renderer service in `src/services/electron/`. The first deliverable is a registered controller with an IPC method.
Overview: Ensure the environment is set up with the debug package installed. For browser environments, set `localStorage.debug = 'lobe-*'` to enable logging. In Node.js, use `DEBUG=lobe-*` with your development command. In Electron, set `process.env.DEBUG = 'lobe-*'` before running the application.
Overview: Before listing a manual migration command as a release step, inspect the target repository's build and deployment scripts. If its deployment pipeline already applies migrations automatically, do not require a redundant manual run.