Skip to content

Contributing

anyeduke11 edited this page Aug 30, 2026 · 1 revision

Contributing

本页为 Wiki 镜像摘录。权威全文在仓库CONTRIBUTING.md。 同步日期:2026-08-30 (v0.7.0)。

环境要求

  • Python 3.11+ / Node 18+
  • SQLite(内置)
  • 代理(可选):backend/proxy_config.json,见 backend/proxy_config.example.json

本地开发

python -m venv .venv && source .venv/bin/activate
pip install -r backend/requirements.txt
python run.py                        # http://127.0.0.1:8000

cd frontend && npm install && npm run dev   # http://localhost:8898

测试

# 后端(3025 用例)
.venv/bin/python3 -m pytest backend/tests/ --tb=short -q

# 前端(309 用例)
cd frontend && npx tsc --noEmit && npx vitest run

提交前检查

  • python scripts/generate_meta.py --check(改动注册代码后必跑)
  • python scripts/harness_analyze.py --check(改动 .agents/skills/ 后必跑)
  • 后端 pytest 全绿;前端 tsc + vitest 全绿
  • 不提交敏感信息(.env / proxy_config.json / *.db 已 gitignore)

Commit 规范

参考 docs/CHANGELOG.md 既有风格,使用 conventional commits:

feat(scope): 描述
fix(scope): 描述
chore(scope): 描述
docs(scope): 描述

Pull Request 流程

  1. Fork 仓库或开分支
  2. 满足上述检查的改动
  3. PR 描述:改动动机、影响面(core / non-core)、测试结果
  4. CI 自动跑:compile + pytest + tsc + vitest + build + generate_meta --check + harness_analyze --check

安全漏洞请走 Security 私密渠道,不要在 Issue/PR 中公开。

完整贡献指南见仓库 CONTRIBUTING.md

Clone this wiki locally