A PathPlanner-style autonomous planner for FTC that humans and agents share. Horizon (FTC 36596).
This file is for coding agents working on Zenith itself. People start with CONTRIBUTING.md; both
say the same thing about the rules. The user documentation is site/ (published at
https://libraries.horizon36596.org/zenith/); site/docs/file-format.md is the file-format
reference and site/docs/checks-and-findings.md lists every check.
packages/coreandpackages/schemaare pure: no DOM, no clock, no randomness, no Node APIs.pnpm testgreps forMath.random,Date.now,performance.now,window,documentandprocess.in those packages and fails on any hit. Code that needs one of those belongs in another package, which passes the value in.- Canonical form is a contract. A change that alters it, or the meaning of any field, bumps that file
kind's
formatVersionand ships a migration with a fixture (the old file and the migrated result). Files written by an older version keep loading. - Units in files are inches, radians and seconds, and every numeric key names its unit (
xIn,headingRad,estimateS). Degrees appear only in the UI. - Never invent a number. Every constant in
robot.jsonandfield.jsoncarries a provenance label: MEASURED, SET BY HAND, SPEC, NEEDS MEASUREMENT, CARRIED OVER, PLACEHOLDER, APPROX, SET FROM SIM, SET FROM EDITOR, CALIBRATED FROM SIM or CALIBRATED FROM ROBOT. A value you do not know is PLACEHOLDER, and says so. - Write the test first. A behaviour change comes with the test that shows it.
- Do not assume a fact about Pedro Pathing, SolversLib or the FTC SDK. Check it against the library's source or documentation, and say in the code comment or the pull request where it came from.
- Commits are conventional and small, with no attribution lines or co-author trailers. Code, comments and commit messages are plain full sentences.
- Stack: pnpm workspaces, Node 22, TypeScript 5 strict, Vite, React 18, Canvas 2D, vitest, Playwright. Raise an issue before adding another framework.
- The robot runtime is the Gradle library under
robot/, one published module (:auto-runtime), installed by teams from JitPack. Publishing a second module would change its coordinate. - The web app is served from
/in the desktop app and from/zenith/app/on the public site. Reach every file inapps/web/public/throughimport.meta.env.BASE_URL, never from/.
pnpm install
pnpm build # first: the MCP stdio tests load the built dist
pnpm test # all packages, includes the purity grep
pnpm --filter ./apps/web dev
pnpm zenith -- validate examples/starter/autos/first-auto.auto.json
pnpm --filter ./apps/web test:e2e
pnpm --filter ./apps/web test:e2e:pages # the web build under /zenith/app/
node scripts/build-pages.mjs # the docs site, the web app and the schemas, as Pages serves them
.\robot\gradlew.bat -p robot build # the robot runtime (JDK 17 and the Android SDK)
Run the desktop app's end-to-end tests with ZENITH_HEADLESS=1, so no window appears:
pnpm --filter ./apps/desktop test:e2e