Cross-tool instructions for AI coding agents (Google Antigravity, Cursor, OpenAI Codex,
and any agent that follows the AGENTS.md convention). Claude Code has its own richer
copy in CLAUDE.md; GitHub Copilot reads .github/copilot-instructions.md. Keep the
three in sync when you change shared facts.
rocketserializer converts OpenRocket .ork files into RocketPy simulations:
.ork → parameters.json (+ thrust_source.csv, drag_curve.csv) → optional RocketPy
Jupyter notebook. Two console scripts are exposed: ork2json and ork2notebook
(see [project.scripts] in pyproject.toml).
- Install:
make install - Format (always run before committing):
make format—ruff check --select I --fixthenruff format . - Lint:
make lint—ruff check+pylint examples/ rocketserializer/ tests/ - Test:
make tests(pytest); CI usespytest tests/ -v --timeout=120 - One test:
pytest tests/acceptance/test_ork_extractor.py -k valetudo -v - Run CLI:
ork2json --filepath "examples/EPFL--BellaLui--2020/rocket.ork" --verbose
- Java is required — OpenRocket runs in a JVM via JPype. OpenRocket 23+ needs Java 17;
older jars need Java 8.
rocketserializer/openrocket_runtime.pyauto-detects a JDK on Windows. - OpenRocket jars live in the repo root (
OpenRocket-22.02.jar,OpenRocket-23.09.jar); tests usetests/OpenRocket-15.03.jar. They are large binaries — do not add new ones without maintainer sign-off.
rocketserializer/cli.py— Click CLI. Validates input, unzips the.ork(it is a zip containingrocket.orkXML), enforces the English-only guard, opens anOpenRocketSession, callsork_extractor, writesparameters.json.ork2notebookcallsork2jsonthenNotebookBuilder.rocketserializer/ork_extractor.py— the core. Reads from two sources at once: the BeautifulSoup XML tree (bs, for simulation datapoints/numbers) and the live Java OpenRocket document (ork, for geometry/positions). Each component search is wrapped in_safe_searchso one failure doesn't abort the run. Produces thesettingsdict.rocketserializer/components/*.py— one module per rocket concern, each withsearch_*functions.drag_curve.pyandmotor.pyalso write CSVs.open_rocket_wrangler.pytraverses the Java component tree.rocketserializer/openrocket_runtime.py—OpenRocketSessioncontext manager (JVM lifecycle, jar selection, Java-version compatibility). Handles both legacynet.sf.openrocketand moderninfo.openrocketpackage namespaces.rocketserializer/nb_builder.py—NotebookBuilderturnsparameters.jsoninto a RocketPy notebook vianbformat.
- JPype is pinned
<1.5and cannot restart a JVM in one process. Never callshutdownJVM()inOpenRocketSession.__exit__, and never open a second session inside a test —tests/conftest.pyopens one session and caches all example settings. - Acceptance tests compare full extraction output against committed
examples/<name>/parameters.jsongolden files. If you intentionally change output, regenerate and review those files. - Supported inputs only:
.orksaved in English, containing ≥1 run simulation, with a single stage, single motor, single nose cone.
- Formatter/linter: ruff (line length 88, black-compatible) + pylint (disables in
pyproject.toml). - Docstrings: NumPy style (Parameters / Returns / Raises).
- Every module uses
logger = logging.getLogger(__name__); CLI messages are prefixed like[ork2json].
Reusable, task-specific playbooks live in .agents/skills/ (Antigravity) and mirror the
Claude Code skills in .claude/skills/. See them for deeper guidance on RocketPy, the
OpenRocket/JPype interop, adding a new component extractor, and Python conventions.