Contributing to OpenHull
(中文版见下方 / Chinese version below)
The short version
OpenHull is an AI-first, deterministic naval-architecture platform (currently shipping v1.11.0 and expanding toward OpenHull 2.0 — see ARCHITECTURE.md and ROADMAP.md). Its defining discipline: every number is traceable — to a whitelisted formula source, to a declared task-book value, or to a benchmark validation. If a contribution cannot say where its numbers come from, it does not get merged.
Ground rules
- Formula whitelist first (AGENTS.md section 5). An empirical formula may be implemented ONLY if its source is listed in AGENTS.md section 5 — and the whitelist entry is amended BEFORE the implementation PR. Propose the source, get owner approval, amend the whitelist, then code. A formula without a whitelisted source must not be merged.
- Page-verify every formula. Transcriptions are verified against rendered images of the physical/PDF source at implementation time (no page numbers from memory, no OCR-only reads). The project's history includes several print defects caught exactly this way.
- Three-tier verification ladder (R3). Every new computational or geometry module ships deterministic pytest coverage across: (a) closed-form analytical solids and §6 refusal boundaries, (b) internal self-consistency / dual-path cross-checks, and (c) public benchmark or real-ship anchors with explicit asserted numbers. "It runs" is not acceptance.
- Declared approximations live in the docs. Anything the code assumes (a wall-sided deck, a damping range, a suppressed degree of freedom, a spline approximation tolerance) is stated in the module docstring and VALIDATION.md.
- Professional judgement stays human. Whether to gate a design on a criterion is the naval architect's call; the tool reports, it does not decide.
- No in-core viscous CFD; cleanroom MIT discipline. Empirical and
potential-flow (
capytaine) solvers belong in-package while heavy RANS/VOF solvers stay external coupling targets (STL/IGES export). Zero proprietary reverse-engineered code/constants or copyleft (GPL/AGPL) source may enter the repository.
Development setup
git clone https://github.com/5777-wq/OpenHull.git
cd OpenHull
uv sync # or: pip install -e .
uv run pytest # everything must stay green
# optional extras:
uv sync --extra seakeeping --extra mcp
- Python ≥ 3.11, src layout, type annotations on every public function, dataclasses validated at construction.
- Core runtime dependencies are deliberately lean:
numpy,matplotlib,ezdxf,pyyaml, andgeomdl(plus lazy-imported optional extras:capytaine,mcp, and planned lightweight local webguiadapters). - New computational methods should register behind the existing strategy/registry pattern with a stable id, whitelist citation and applicability range (AGENTS.md section 8).
Pull requests
- State the whitelisted source (or declare "no new formulas") in the description.
- Confirm cleanroom MIT provenance (no proprietary binary references or copyleft code).
- Include the tests that pin the acceptance numbers.
- Update VALIDATION.md for anything a reader would want to reproduce, and CHANGELOG.md under [Unreleased].
- Documentation languages: code and primary docs in English; the design report, curriculum guides, and Chinese README serve Chinese-speaking naval architects — keep both honest when behaviour changes.
提交中文说明(摘要)
OpenHull 是面向 AI 的开源白盒船舶工程平台(详见
ARCHITECTURE.md 与 ROADMAP.md),
核心纪律是每个数都可溯源:经验公式必须先入 AGENTS.md 第 5 节
白名单(先改白名单、后写实现),转录必须对照原书页面影像核对;采用
三层验收阶梯(解析真值 + 双路径互校 + 公开基准/实船数字锚点);
声明式近似写进模块文档与 VALIDATION.md;是否按衡准否决方案由工程师
拍板;内核不做粘性 CFD(可对外导出水密 CFD 几何),严格遵守洁净室
MIT 开源合规(严禁闭源逆向产物或 GPL 代码入库)。开发环境:
uv sync && uv run pytest,Python ≥ 3.11,核心依赖为 numpy、
matplotlib、ezdxf、pyyaml、geomdl(seakeeping/mcp 等为
惰性可选扩展)。PR 请注明公式来源(或声明"零新公式")、洁净室合规
声明与验收测试,并更新 VALIDATION.md 与 CHANGELOG.md。