Skip to content

Package Map

Jeremiah edited this page Oct 22, 2026 · 1 revision

Package Map

This page maps every immediate package, app and tool directory to its responsibility and boundaries.

The workspace globs in pnpm-workspace.yaml include apps/*, packages/* and examples/plugins/*. The tools/ directories are repository tooling, not additional application workspaces. Directory presence alone does not mean a subsystem is a production implementation: some packages deliberately contain only types or scaffolding.

The ownership rules below follow AGENTS.md section 6, package READMEs and current entry points. A “must not” entry is a boundary to preserve when adding code, not a claim that a package has performed that forbidden action.

Shared packages

Paths in this table are relative to packages/.

Package Owns Must not
analysis-core Pure analysis contracts: interpretations, classification flags, methods, results and provenance Import engines, derive chemistry or branch on derivation/claim instead of flags
art-engine Graphic plans, strokes, markers, arrow geometry and boolean operations Own documents, change molecules or copy molecule rendering math
cdx-compat CDXML read/write, best-effort CDX read and unknown-object preservation Become the native model, depend on GPL code or promise perfect compatibility
chem-core Native types, Zod schemas, pages, styles, validation, patches, serialization and migrations Import UI, Tauri, filesystem, concrete engines or plugin loading
chemdraft-cli Headless command modules, validated input and JSON Lines output Import apps/, mix progress with stdout results or silently change chemistry
chemdraft-mcp Local stdio MCP server calling CLI modules in-process Create a second document implementation or bypass CLI validation and warning contracts
chemistry-adapter Engine-neutral chemistry and conformer interfaces Expose concrete engine internals, mutate documents or own UI state
clipboard-adapter Format detection and conversion with compatibility warnings Hide lossy conversions or own desktop native clipboard APIs
document-workflow-core Pure native builders, label expansion, validation bookkeeping and SMILES writing shared by app and agents Import React, Tauri, DOM, apps/, plugin runtime or engine loaders
editor-adapter Abstract editor sessions and capability-gap reporting Own the native document or implement a concrete editor
editor-shell Reserved editor-shell types and coordination scaffold Grow speculatively or become the native document owner
engine3d-api Versioned app-to-sidecar protocol types and guards Add native dependencies or change protocol shape without a version bump
export-engine SVG, PDF and other export orchestration with warnings Diverge from canvas geometry or claim an unimplemented format is complete
fixtures Shared chemistry, compatibility and regression inputs Supply production behavior or include assets without redistribution rights
isospec-adapter Unpatched vendored IsoSpec WebAssembly, checked boundaries and binary-table lookups Patch IsoSpec, retype abundance tables, skip array-length checks or build final envelope results
ketcher-adapter Injected editor wrapper and supported molecule-session load/save Expose editor internals, pretend to support page objects or own document state
layout-engine Molecule geometry, labels, strokes, depth cues, valence/order resolution, growth and arrangement plans Change chemical identity or leave copied rendering math in callers
mechanism-tools Shared mechanism-annotation types Treat editable annotations as opaque SVG; assume this types package contains the working desktop tool implementation
ocl-adapter OpenChemLib depiction, stereochemistry and conformers behind the chemistry contract Leak engine internals or collapse an unrepresentable bond order to single
plugin-api Public manifests, permissions, capability contexts and contribution types Contain app implementation or document mutation logic
plugin-host Validation, shared commands, permission enforcement, storage, lifecycle and patch review Grant undeclared access or run native code/download models without required permission and user action
rdkit-adapter RDKit analysis, isotope-envelope result construction and ETKDGv3 conformers on the custom MinimalLib build Load heavy resources at startup without need or substitute an unreviewed RDKit build
shortcut-engine Command-bound shortcuts, conflicts and platform modifier handling Hide important actions in click handlers
style-compat .cds metadata conversion into native style presets Parse style files in UI, change chemistry or claim partial imports are complete
template-library Original fragments, abbreviation definitions and template data Copy proprietary templates or commit user style-sheet files
test-utils Generic testing helpers Ship production behavior or bury chemistry assertions in unrelated helpers
toolset-registry Toolbar/toolset schemas, layout overrides, menu models and command-ID validation Own chemistry, permissions, native windows or document mutation
ui-kit Reserved original UI components, theme tokens and icons Grow speculatively, contain chemistry logic or copy proprietary artwork
viewport-engine Coordinates, zoom, pan and ruler math Render UI or mutate documents

rdkit-adapter depends on isospec-adapter, never the reverse. The envelope builder belongs to the former. IsoSpec's carbon-13 abundance convention must be disclosed wherever a derived number is shown; Analysis and Properties explains result conventions.

App and repository tools

These are complete immediate directory inventories under apps/ and tools/ for this checkout.

Path Owns Boundary
apps/desktop React desktop orchestration, Tauri native integration, windows and platform adapters Consume shared chemistry and geometry; do not create parallel implementations for agent tools
tools/agent-skill Agent-skill/CLI/MCP consistency and styled-document regression tests Keep automation documentation aligned with implemented capabilities
tools/cdxml-corpus CDXML compatibility corpus checks Assert fixture-backed behavior, not universal format compatibility
tools/codex-prompts Historical implementation-task prompts Do not treat an old prompt as current feature status or policy
tools/plugin-extract Plugin extraction, import-boundary checks, licence gates and ZIP checks Fail closed on invalid packages or missing data-licence declarations
tools/plugin-package Packaging and committed-copy helpers Preserve validated package boundaries rather than bypassing extraction gates
tools/rdkit-oracle Independent Python RDKit test oracle and chemistry/flattening checks Remain test tooling, not a production engine dependency
tools/release Windows update manifest generation, signature verification and release tests Do not fabricate signatures or publish feeds ahead of reachable assets
tools/structure-to-name-benchmark Naming benchmarks, read-back checks and comparison scripts Do not equate a generated name with a verified structural match

tools/bug-audit.test.ts is a standalone test at the tool root, not another package. Native 3D source lives separately in native/avogadro3d-sidecar; build and audit scripts live in scripts/.

Examples and SDK boundaries

The two SDK packages, plugin-api and plugin-host, are MIT-licensed. A plugin itself imports only @chemdraft/plugin-api among ChemDraft packages. Host internals are not a plugin API.

examples/plugins/mass-fragment-demo is the working example and intentionally contains no NMR functionality. advanced-style-pack and journal-style-pack are README-only placeholders. The official NMR and recognition plugins live in separate repositories; do not look for their implementations in the example folders.

See also

Clone this wiki locally