Repository navigation
Contributing
This page describes how to prepare a focused contribution, verify it and hand it over for review.
ChemDraft welcomes changes that make drawing more reliable while keeping the core small, testable and legally redistributable. A complete contribution includes its platform behavior, meaningful regression checks and documentation. A feature that works only on macOS or only on Windows is not ready to merge.
- Read
AGENTS.md,PLANS.md,README.md, rootpackage.jsonandpnpm-workspace.yaml. - Read the README for each affected package, plus current architecture notes for the subsystem.
- Check recent entries in
docs/shipped/before treating an older decision as current behavior. - For a new feature, dependency, licensing decision or user-facing surface, consult
PLAN.mdfor scope. - For selection or hit-testing work, read
docs/shipped/selection-policy-refactor.mdfirst.
PLANS.md describes active work, not a general backlog to implement at will. Parked items need a reason recorded before reopening. If the proposed fix needs a broader behavior change, make that scope explicit rather than extending a narrow patch silently.
Some READMEs still describe the foundation milestone. Confirm actual status in code and newer shipped records. The product charter's non-goal list is not proof that a later optional plugin capability does not exist.
Work only in the checkout for your branch. main is protected, and changes land by pull request with green CI. Check the active branch before committing, particularly when multiple contributors share an environment. Stage explicit paths so unrelated work is not included.
Branch builds are separate development applications with separate identifiers, app data and single-instance locks. Never overwrite, rename or unregister the stable installed app. Follow Building from Source and report the worktree label you actually launched.
Use Package Map to choose the right package. In particular:
- Native types, validation and patches belong in
chem-core. - Molecule rendering math and label grammar belong in
layout-engine. - Shared app/CLI/MCP document builders belong in
document-workflow-core. - Operating-system behavior stays behind the desktop native boundary.
- Plugin-facing contracts belong in
plugin-api, with permissions enforced byplugin-host.
Use registered commands or typed host capabilities for every extension action. Do not add a hidden route to React state, private functions or the DOM. Plugin and agent edits go through patches and the appropriate direct-insertion or proposal-review gate.
Preserve chemical meaning across every conversion. Style and layout changes must not change the graph. A conversion that cannot retain a radical, isotope, charge or stereochemical distinction warns or fails; it does not quietly replace the structure.
Shared code is the default. Where the operating system forces a split, implement both sides in the same change. Rust platform branches need their corresponding other-platform behavior and clippy must pass with warnings denied on both hosts.
For TypeScript shortcut differences, accept a platform parameter defaulting to detection so one test host can exercise both branches. Windows paths, file locks, line endings and native focus need their own attention. New cross-platform repository scripts use Node rather than shell-specific syntax.
Native windows and dialogs must be document-owned. Windows attaches menus only to the document window, while macOS uses an application-wide menu. See macOS and Windows Differences before changing this boundary.
Call the application ChemDraft. Do not name or compare commercial competing chemical-drawing products in public prose, commit messages or PR text. File-format names such as CDXML are fine. Reserve MolScribe for the external recognition project and its optional OCSR plugin.
Use original or legally redistributable icons, fixtures, templates and documentation. Add a new vendored binary to NOTICE and the dependency inventory in the same change. Software and dataset licences are separate: an MIT code licence does not automatically license a bundled database.
Analysis values need method contracts and honest status. Label estimates as estimates. Recognition remains experimental and reviewable. Do not publish accuracy percentages without their measured partition and reproducible evidence.
Run the Testing and CI gauntlet, relevant scoped checks and the standing manual checklist for interactive changes. Runtime changes require a build-stamp bump. Launch the result from your worktree, and state exactly which platform checks ran.
Describe the concrete problem and resulting behavior in the PR. A before/after example is useful when it makes the fix reviewable. Include relevant test results and limitations; omit conversational history. A completed implementation slice moves from PLANS.md to docs/shipped/README.md.
Use this closeout format: Summary, Files changed, Tests run, Results, Platforms, Known limitations, and One recommended next task. Name macOS and Windows separately as verified or unverified, with the remaining checks. Skipped checks are not passes.
ChemDraft repository · Apache-2.0 · Home
- Features overview
- Installation
- Quick Start
- Your first molecule
- FAQ
- Troubleshooting
- Glossary
- macOS and Windows differences
- Drawing basics
- Atoms and labels
- Bonds and stereochemistry
- Rings and chains
- Selection and editing
- Charges, radicals, and dative bonds
- Copy, paste, and clipboard
- Keyboard shortcuts
- Toolbars and palettes
- Documents, pages, and tabs
- Arrows and mechanisms
- Art objects and styling
- Publication figures and style presets
- Compound layouts
- Templates and abbreviations
- Chemistry guarantees
- Analysis and properties
- NMR prediction
- Name from structure
- Name to structure
- Structure recognition
- Spin 3D