Makelore 2.0 initial clean snapshot

This commit is contained in:
inman
2026-07-29 17:22:35 +08:00
commit b8ca3f8eea
694 changed files with 139782 additions and 0 deletions

51
AGENTS.md Normal file
View File

@@ -0,0 +1,51 @@
# Makelore Development Guidance
## Product boundary
Makelore is a cross-platform Electron application with two visible modules: `Makelore CodeAI 编程` and `Makelore CanvasAI 绘画`. 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.
- Preserve internal `niancode` compatibility identifiers unless a separately approved migration covers app id, protocol, storage, environment, headers, backend contracts, and installed-user data.
- 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 `.niancode/project.json`.
- Agent definitions and generated `.opencode/agent/` files are project-owned.
- Stable Agent ids preserve sessions; display names are editable.
- Do not refactor Agent templates, prompts, or OpenCode 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.