Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 2.18 KB

File metadata and controls

50 lines (31 loc) · 2.18 KB

Development Workflow

Common workflow guidance for AI agents working in the Optimism monorepo. Language-specific details are in go-dev.md and rust-dev.md. For running acceptance tests, see acceptance-tests.md; for writing new ones, see writing-acceptance-tests.md.

Tool Versions

All tool versions are pinned in mise.toml at the repo root. Always access tools through mise — never install or invoke system-global versions directly. Check mise.toml for current pinned versions when you need to know what's available.

If mise reports the repo isn't trusted, ask the user to run mise trust — never trust it automatically.

Setup

Run mise install to install all pinned tools (just, gotestsum, forge, etc.). AI agent shells typically do not have mise activated, so prefix commands with mise exec -- to ensure tools are on PATH:

mise exec -- just <target>

Then install the git hooks (once per clone — the setting is shared across all of a clone's worktrees):

mise exec -- just install-git-hooks

This points core.hooksPath at .githooks/. The pre-push hook blocks pushing unformatted Rust (mirroring CI's rust-fmt gate), so run it before you push any Rust change.

Build System

The repo uses Just as its build system. Shared justfile infrastructure lives in justfiles/. Each component has its own justfile — run just --list in any directory to see available targets.

Before Every PR

After running language-specific commit checks (lint, test):

  1. Run affected tests broadly — don't just test the package/crate you changed. Test packages that depend on it too.

  2. Rebase on develop — this is the default branch, not main:

    git fetch origin develop
    git rebase origin/develop
  3. Follow PR guidelines — see docs/handbook/pr-guidelines.md. Keep the PR description brief — include only what isn't obvious from the diff.

CI

Some tests require CI-only environment variables and are skipped locally. Check the test code for environment variable guards if a test behaves differently than expected.