Skip to content

Latest commit

 

History

History
175 lines (125 loc) · 6.29 KB

CONTRIBUTING.md

File metadata and controls

175 lines (125 loc) · 6.29 KB

Contributing

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).

Setup

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:desktop

Useful 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

Commits

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 tsconfig

Do not add AI-assistant Co-authored-by trailers (CI rejects Co-authored-by: Cursor).

Architecture decisions (ADR)

Cross-cutting changes need an ADR under docs/adr/ (copy the template). Seed docs: monorepo boundaries, RCB canvas, collab. Roadmap: docs/roadmap/platform.md.

Git identity (required)

Branch & pull request flow (CLI)

  1. Sync default branch
git fetch origin main
git checkout main
git pull origin main

Work 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.

  1. Create a topic branch
git checkout -b feat/short-description
# or: fix/...  docs/...  chore/...
  1. Make changes, keep the diff focused. Prefer helpers in the same file unless shared by 3+ call sites.

  2. 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
  1. Review what you will commit
git status
git diff
git log -5 --oneline      # match existing message style
  1. 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-select
  • Drop unused assets from apps/web/public
  • Document self-host MySQL defaults
  1. 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.

  1. Address review, then push again on the same branch (git push). Prefer rebase onto main if asked; avoid rewriting commits that others already based work on.

Do / don’t

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 agent floors

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.

Commit message conventions

  • 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.

License

By contributing, you agree that your contributions are licensed under the Apache License 2.0.