1.1 Working on Tempo
This is the day-to-day workflow for a change to Tempo, and it should be read before opening a first pull request. It covers branches and pull requests, commit messages, the checks to run before pushing, the prose and comment rules, what never gets committed, and a reading order for a first week in the codebase.
Branches and pull requests
Each change goes on its own branch and reaches master through a reviewed pull
request:
- Start each change on a fresh branch from the commit it builds on, and keep unrelated local edits out of it.
- Pull requests target
master. - Never force-push or delete a remote branch.
- A pull request merges once review is done and the gates for every component it touches pass on its latest revision (Building and testing).
Merged branches in the history follow a <kind>/<topic> shape, for example
fix/cpp-tests-windows-macos, docs/home-example-gui-style and
feat/gui-redesign.
Commit messages
Building and testing gives the conventional form:
<type>(<scope>): <description>
# Types: feat, fix, refactor, test, docs, build, chore
# Scope: rust/ffi, java/composer, java/wpi, game-pack, docs, buildMost of the recent history uses a shorter <component>: <change> subject that
names the component and states the behavior in a full clause:
editor: keep the footer on screen in a short window
C++ setlist-links test: stop reading a group through a dead iterator
docs: give every troubleshooting symptom its console lineEither way, keep commits small and focused, with one behavior per commit. Commit
messages are where change is narrated (“stop reading”, “keep”), so the prose
rules below that ban history narration apply to files and not to messages. A commit
that moves a recorded sequencing trace in tests/fixtures/sequencing/ names the
behavior that moved (testing.md).
Before pushing
Tests do not read prose or check fixture closure, so a green suite is not enough. Run these from the repository root before each push:
cargo fmt --manifest-path rust/Cargo.toml --all --check
cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings
python3 tools/packs/sync-bundled-pack.py --check
python3 -m unittest discover -s tools/packs -p 'test_bundled_packs.py'Then run the suites for every language the change reaches (Building and testing), and the 2026 Java sim gate before a merge.
| Command | What it checks |
|---|---|
cargo fmt ... --check | rustfmt formatting of every crate in the rust/ workspace; run it on rust/wasm/Cargo.toml too when the wasm crate changes |
cargo clippy ... -D warnings | Clippy on all targets, warnings as errors |
tools/packs/sync-bundled-pack.py --check | the files generated from assets/fields/manifest.tsv and assets/fields/DEFAULT match (see below) |
tools/packs/test_bundled_packs.py | registry validation and season stability under additions and reordering |
The prose and comment rules below have no command; review checks them.
Generated bundled-pack files
tools/packs/sync-bundled-pack.py reads assets/fields/manifest.tsv (id, game name and
year, tab separated) and assets/fields/DEFAULT (artifact WPILib year -> pack) and
writes:
java/src/main/java/com/tempo/GamePacks.javapython/tempo/game_packs.py,python/tempo/_pack_defaults.py, and copies underpython/tempo/packs/(manifest.tsv,DEFAULT, each pack’s TOML)cpp/include/tempo/GamePacks.h,cpp/src/internal/BundledPacks.h,cpp/src/BundledPacks.cppgui/web/src/features/packs/bundledData.ts
Without --check it rewrites stale files and deletes pack copies no longer
registered, and with --check it lists them and exits 1. Run it without the flag
after editing a pack or the registry, then commit the generated files with the change.
Game packs covers the registry.
API surface snapshots
tests/fixtures/api/{java,python,cpp}.txt record the public declarations of each
binding. For Java that is the public declarations under
java/src/main/java/com/tempo/ outside com/tempo/internal, for Python the public
top-level names and __all__ of non-underscore modules under python/tempo/, and
for C++ the declarations in cpp/include/tempo/ outside namespace detail and
private: or protected: sections. The maintainers regenerate them from the
live sources, so a pull request that changes the public API names the changed
declarations in its description. The binding geometry surface tests read
tests/fixtures/api/wpilibGeometry.json and check every binding’s snapshot
against its banned types. See
Pins and surfaces.
Embedded fixtures
include_str!, include_bytes! and include! need their target at compile time,
so a clone that lacks the file does not build. Before adding an embed site,
check that git ls-files <target> lists its target. Never embed a file Git does
not carry. Existing embed sites stay compile-time inputs.
Prose and comment rules
These rules apply to every tracked Markdown page and every source comment, and the docs style guide explains them.
- Write as if no conversation produced the text. A reader must not be able to tell that a change was requested, argued about, or chose among alternatives.
- Describe what is. History belongs in commit messages and dated records, not in maintained guides or comments.
- State the invariant a check or branch pins, not a label from a review or a plan.
- Keep what a reader can verify: references to public upstream issues and commits, mathematical and physical justifications, and cross-language parity notes. Exact counts, timings and field results belong in dated records with their workload.
- No em dash (U+2014) in prose or comments. Use a period, comma, colon or parentheses.
- No sentence that opens with
**bold**text, except a list item in the**Term**: explanationform. - No decorative comment banners or separator lines made of repeated
=,-or*, and no Unicode arrows. Use->,<-,^,v,<->,=>,<=>. - Contributing pages and comments do not address the reader as
you. Pages underwebsite/src/content/docs/may, since they speak to teams using Tempo. - Website pages also pass
npm run checkinwebsite/, whosecheck:glyphsrejects typographic punctuation in page prose (testing.md).
What never gets committed
Anything tracked is a publication decision, because deleting a file later does not remove it from Git history.
- Working notes, closed review reports, migration checklists and design-history notes.
- Environment files (
.env,.env.*other than.example,.sample,.template), credentials, account details and captured robot logs (*.wpilog,*.log). - Build and dependency caches:
rust/target/,java/build/,cpp/build/,node_modules/,__pycache__/,rust/wasm/pkg/,gui/wasm/,python/dist-wheels/,/dist/and the rest of.gitignore. - Incoming platform archives in
cpp/dist-inbox/and the generatedtests/robot/cpp_docs/vendordeps/Tempo.json.
Machine-specific ignore rules go in .git/info/exclude, because .gitignore
covers project build outputs only. git rm --cached -- <path> untracks a file and
keeps the local copy.
Paths and personal details
Never commit an absolute path that contains a user name, host name or machine
identifier, and record paths relative to the repository root, as every maintainer
page does. /home/<name>/, /Users/<name>/ and C:\Users\<name>\ are fine only
with a generic name such as public, runner, lvuser, systemcore or user, and
standard robot service paths and the Windows public WPILib install path are accepted
conventions. Private keys, access tokens, environment and log files, dependency
caches, symlinks that leave the tracked tree, and relative documentation links whose
target is not tracked never belong in a commit.
Before a push that adds files, review the index:
git diff --cached --stat
git diff --cached --check
git ls-filesA first week in the codebase
Read in this order, where each step names the chapter and the source to open next to it.
Day 1: the shape of the project
- Contributing home and Repository layout: which directory owns what, naming rules, and the shared fixture tree.
- How a route runs: one route from robot code through the C ABI into the core and back as motor output.
- Build everything once with the commands in Building and testing, so later reading can be checked against running code.
Day 2: the Rust core
- Core modules with
rust/core/src/open: game packs, visibility graph, pathfinding, splines, trajectory, rotation, follower. - Replanning and rejoin and
Setlists and route joins:
auto_runtime, connecting drives and the recorded traces intests/fixtures/sequencing/. - Game packs, then Angular constraints.
Day 3: the bindings
- FFI contract with
rust/core/src/ffi.rs: layouts, ownership, the known hazards and how to add a function. - Wrapper policy: Java is the spec, and how Python and C++ follow it.
- Two WPILib seasons: the 2027 source translation,
WpiCompat.h, and the version guards.
Day 4: fixtures and verification
- Fixtures and embeds and Pins and surfaces: conformance fixtures, frozen traces, ABI layouts, the wasm source fingerprint and API snapshots.
- Building and testing.
- Simulation validation.
Day 5: the editor and the docs site
- Web and desktop builds, GUI design guide, Editor design system and GUI authoring coverage.
- Docs site, Docs style guide and Example canon.
- Stability and versioning and Licenses.
A good first change is small and has a test in every binding it touches, like a bug fix with its regression test, a missing parity case, or a docs correction checked against the source. Repository layout lists what a rename across components must update.