Welcome, chrononaut! Echo thrives when timelines collaborate. Please read this guide before diving in.
Echo is a deterministic, renderer-agnostic engine. We prioritize:
- Determinism: every change must preserve reproducible simulations.
- Documentation: specs live alongside code.
- Temporal Tooling: features support branching timelines and merges.
- Clone the repo and run
cargo checkto ensure the Rust workspace builds. - Read
docs/architecture-outline.md. - Review
docs/AGENTS.mdfor collaboration norms before touching runtime code. - Optional: develop inside the devcontainer for toolchain parity with CI.
- Open in VS Code → "Reopen in Container" (requires the Dev Containers extension).
- The container includes Rust 1.90.0 (via
rust-toolchain.toml), clippy/rustfmt, Node, and gh. - Post-create installs the pinned toolchain (no override); wasm32 target and components are added automatically.
- Keep
mainpristine. Create feature branches likeecho/<feature>ortimeline/<experiment>. - Before starting work, ensure
git statusis clean. If not, resolve or coordinate with the human operator. - PR review loops are procedural: follow
docs/procedures/PR-SUBMISSION-REVIEW-LOOP.mdand usedocs/procedures/EXTRACT-PR-COMMENTS.mdto extract actionable CodeRabbitAI feedback per round.
- Write tests before or alongside code changes.
cargo testmust pass locally before PR submission.- Add unit/integration coverage for new logic; Rhai/TypeScript tooling will regain coverage when reintroduced.
- For WASM / living specs:
- Install toolchain target:
rustup target add wasm32-unknown-unknown. - Install Trunk once:
cargo install --locked trunk. - Dev loop for Spec-000: from repo root run
make spec-000-dev(hot reload athttp://127.0.0.1:8080). - Release build:
make spec-000-build(outputs tospecs/spec-000-rewrite/dist/).
- Install toolchain target:
- Update relevant docs in
docs/whenever behavior or architecture changes. - Record major architectural decisions in ADRs (
docs/adr/) or PR descriptions.
- Run
cargo fmt,cargo clippy, andcargo test. - Commit with conventional commit messages:
type(scope): summary(e.g.,fix(warp-core): prevent NaN propagation). - Push your branch and open a PR. Include:
- Summary of changes and motivation.
- Tests performed.
- Any timeline or determinism considerations.
- Request review from maintainers (see CODEOWNERS).
- Rust code must pass
cargo fmtandcargo clippywithout warnings. - Rhai scripts should remain deterministic (no uncontrolled globals, RNG via engine services).
- TypeScript packages live in
packages/andapps/; follow local lint configs. - Avoid non-deterministic APIs (no wall-clock, no uncontrolled randomness). Use Echo’s deterministic services.
- Install repo hooks once:
make hooks(configurescore.hooksPathto.githooks). - Pre-commit runs:
- cargo fmt (auto-fix by default; set
ECHO_AUTO_FMT=0for check-only) - Toolchain pin verification (matches
rust-toolchain.toml)
- cargo fmt (auto-fix by default; set
- To auto-fix formatting on commit:
ECHO_AUTO_FMT=1 git commit -m "message"
- rustfmt formats entire files, not only staged hunks. To preserve index integrity, our pre-commit hook now aborts the commit if running
cargo fmtwould change any files. It first checks withcargo fmt --check, and if changes are needed it applies them and exits with a helpful message. - Workflow when this happens:
- Review formatting changes:
git statusandgit diff. - Restage intentionally formatted files (e.g.,
git add -Aorgit add -p). - Commit again.
- Review formatting changes:
- Tips:
- If you need to keep a partial-staged commit, do two commits: first commit the formatter-only changes, then commit your code changes.
- You can switch to check-only with
ECHO_AUTO_FMT=0(commit will still fail on formatting issues, but nothing is auto-applied).
- Do not bypass hooks. The repo runs fmt, clippy, tests, and rustdoc on the pinned toolchain before push.
- Toolchain: pinned to Rust 1.90.0. Ensure your local override matches:
- rustup toolchain install 1.90.0
- rustup override set 1.90.0
- The repo tracks a minimal .vscode/settings.json for project-safe tooling settings only.
- Keep personal editor preferences such as theme, font family, and UI layout in your user-level VS Code settings, not the tracked workspace file.
- The tracked Rust Analyzer target dir uses the repo-local ignored
target-ra/path to avoid fighting the default Cargo build directory during background checks.
- Rely on GitHub discussions or issues for longer-form proposals.
- Respect the temporal theme—leave the codebase cleaner for the next timeline traveler.
Thanks for helping forge Echo’s spine. 🌀