# Makelore Development Guidance ## Product boundary Makelore is a cross-platform Electron application with four enabled modules: `Makelore Code|AI 编程`, `Makelore Canvas|AI 绘画`, `Makelore Learning|AI 学习`, and `Makelore Robot|AI 机器`. The repository root is the complete product source tree. It does not depend on a sibling source checkout. Do not restore Works gallery, asset gallery, publish/upload, or cloud-deploy workbench pages. `/deliverables` is a project output preview and remains supported. ## Commands Use the exact pnpm version pinned by `packageManager` in `package.json`. | Task | Command | | --- | --- | | Install | `pnpm install --frozen-lockfile` | | Desktop development | `pnpm run dev` | | Local image-workspace development | `pnpm run dev:image-workspace:local` | | Type check | `pnpm run typecheck` | | Lint check | `pnpm run lint:check` | | Unit tests | `pnpm test` | | Production compile | `pnpm run build:vite` | | Electron E2E | `pnpm run test:e2e` | ## Architecture rules - Renderer backend access goes through `src/lib/host-api.ts` or `src/lib/api-client.ts`. - Do not add direct page/component IPC calls or direct local-runtime HTTP requests. - Electron Main owns runtime startup, Host API routes, authentication, providers, secrets, synchronization, proxies, updates, and system integration. - Keep AI programming project state local and project-scoped. - Keep AI painting behind its Main-owned cloud workspace contract. The unpackaged local adapter is development-only and must never become a packaged fallback. - Do not change app id, protocol, global user-data paths, environment variables, request headers, or backend contracts as an incidental part of project-data work. - Keep the product on the single Makelore light visual system. Do not add a dark-theme product mode. ## Agent and project configuration - Project configuration is authoritative in `.makelore/project.json`; do not read or migrate project metadata from `.niancode` or `.opencode`. - Agent definitions are project-owned in `.makelore/project.json`; Pi runtime state must not become an alternative source of project configuration. - Stable Agent ids preserve sessions; display names are editable. - Do not refactor Agent templates, prompts, or the Coding/Pi structure as an incidental part of unrelated work. ## Verification - Add or update focused tests for every behavior change. - Run typecheck and relevant unit tests before the full suite. - Run `pnpm run build:vite` for changes that affect Renderer, Main, Preload, packaging imports, or assets. - User-visible interaction changes should update an Electron E2E spec when the shared fixture is available. - Never commit dependencies, downloaded runtimes, build output, reports, caches, secrets, or local user data. ## Documentation `README.md` is the current product-state document. Keep it synchronized with product behavior and architecture. Do not add task ledgers, historical worklogs, migration diaries, evidence archives, or superseded design plans to this repository.