Thanks for considering a contribution to zuoge. Please read the Code of Conduct. Security issues go to SECURITY.md — don’t file a public issue.
How to run locally: README.md · docs/deployment-modes.md · docs/self-hosting.md · desktop docs/desktop.md.
Local login: configure Tencent SES in apps/api/.env for email OTP, or set GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET. Credits default on (WALLET_BILLING_ENABLED=true — usually no change needed).
docker compose up -d redis
cp apps/api/.env.example apps/api/.env # fill LLM keys as needed
npm install
npm run install:api # Python API deps
npm run dev:api # http://127.0.0.1:8000
npm run dev:stack # web :3000 + collab :1234
# or separately:
# npm run dev:web
# npm run dev:collab
# optional desktop (Rust + platform toolchain required):
# npm run dev:desktopUseful scripts:
| Command | Purpose |
|---|---|
npm run dev:stack |
Web + collab together |
npm run dev:web / dev:api / dev:worker / dev:collab |
Individual local servers |
npm run check |
Web ESLint + contracts typecheck |
npm run ci:gate |
Local mirror of GitHub CI / gate (check + web/API unit) |
npm run lint / typecheck |
Turbo across JS packages |
npm run dev:desktop / build:desktop |
Tauri desktop (docs/desktop.md) |
npm run test |
Web + API tests |
npm run test:web / test:api |
Scoped tests |
npm run test:e2e |
Playwright (under e2e/) |
npm run build |
Production web build |
Use Conventional Commits: feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert.
husky + commitlint run on commit-msg (also strips Co-authored-by: Cursor). pre-push rejects that trailer if it still lands — same as GitHub no-cursor-coauthor. Examples:
feat(canvas): show mark-region live preview while dragging
fix(api): skip soft min_creates without craft skills
chore: add workspace task runner and shared tsconfigDo not add AI-assistant Co-authored-by trailers (CI rejects Co-authored-by: Cursor).
Cross-cutting changes need an ADR under docs/adr/ (copy the template). Seed docs: monorepo boundaries, RCB canvas, collab. Roadmap: docs/roadmap/platform.md.
- Sync default branch
git fetch origin main
git checkout main
git pull origin mainWork from this main (or a branch created from origin/main). A local main that lagged remote is not “latest.” GitHub CI only runs pushed commits; untracked ?? files under apps/ never reach CI.
- Create a topic branch
git checkout -b feat/short-description
# or: fix/... docs/... chore/...-
Make changes, keep the diff focused. Prefer helpers in the same file unless shared by 3+ call sites.
-
Run checks that match your change
npm run ci:gate # preferred before PR (umbrella)
# or scoped:
npm run test:web
npm run test:api:unit
# optional: npm run test:e2e- Review what you will commit
git status
git diff
git log -5 --oneline # match existing message style- Stage and commit (message: imperative, why over what; 1–2 sentences)
git add path/to/changed/files
git commit -m "$(cat <<'EOF'
Add concise subject in imperative mood.
Optional body: why this change matters.
EOF
)"PowerShell:
git add path/to/changed/files
git commit -m @"
Add concise subject in imperative mood.
Optional body: why this change matters.
"@Examples of good subjects (same style as this repo):
Fix canvas align guides for multi-selectDrop unused assets from apps/web/publicDocument self-host MySQL defaults
- Push and open a PR
git push -u origin HEAD
gh pr create --fill
# or with an explicit body:
gh pr create --title "Your title" --body "$(cat <<'EOF'
## Summary
- …
## Test plan
- [ ] …
EOF
)"Use the checklist in .github/PULL_REQUEST_TEMPLATE.md.
- Address review, then push again on the same branch (
git push). Prefer rebase ontomainif asked; avoid rewriting commits that others already based work on.
| Do | Don’t |
|---|---|
| Small, focused PRs | Mix unrelated refactors with features |
| Verify email before first push | Commit .env, keys, or local IDE folders (.cursor/) |
| Link issues in the PR body | Force-push main / rewrite published history without maintainers |
| Update docs when behavior changes | Leave failing tests on the default branch |
| Document protocols / SDKs / BasicLocal floors | Leave secret keys or .env in the tree |
Design Runtime calls packages/intelligence-client (DesignIntelligenceClient) with BasicLocal only (in-process, no network). There is no separate Intelligence HTTP service in this repo.
Shared wire contract lives in packages/protocol (recombyn-protocol). Bump its version when method names / request keys / usable rules change (ADR 0024).
Open skill pack helpers live in packages/skill-sdk (normalize_pack_meta, parse_extends, …) — see ADR 0019. Open .recombyn-plugin manifest helpers live in packages/plugin-sdk — see ADR 0020. Kernel stage vocabulary lives in packages/agent-sdk — see ADR 0021. Intelligence request helpers live in packages/runtime — see ADR 0022.
- Subject: imperative (
Add,Fix,Remove, …), ~72 chars, no trailing period required. - Body (optional): motivation and user-visible impact.
- Prefer English for commit subjects (matches git history); PR descriptions may be Chinese or English.
By contributing, you agree that your contributions are licensed under the Apache License 2.0.