agentleFS
ConsensysConsensys/linea-monorepo/coordinator/AGENTS.md

linea-monorepo / coordinator

AGENTS.md126 starsChanged 3 months agoApache-2.0View on GitHub

Inherits all rules from root AGENTS.md. Only overrides and additions below. Kotlin-based orchestration service for the Lineth protocol. Manages proof submission, blob submission, finalization monitoring, message anchoring, and gas pricing. Built on Vert.x with Picocli CLI, Hoplite config, and Jackson serialization. Vert.x, Jackson, Hoplite (config), Picocli (CLI), Web3J, jvm-libs workspace projects. check versions in gradle/libs.versions.toml

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test timeout: 5 minutes per test

    line 87
  2. Very specific:

    Run ./gradlew spotlessCheck before proposing Kotlin changes

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md — coordinator

Inherits all rules from root AGENTS.md. Only overrides and additions below.

Package Overview

Kotlin-based orchestration service for the Lineth protocol. Manages proof submission, blob submission, finalization monitoring, message anchoring, and gas pricing. Built on Vert.x with Picocli CLI, Hoplite config, and Jackson serialization.

How to Run

# Build
./gradlew :coordinator:app:build


# Run locally (requires L1/L2 nodes + PostgreSQL)
./gradlew :coordinator:app:run

# Build Docker image
docker buildx build --file coordinator/Dockerfile \
  --build-context libs=./coordinator/app/build/install/coordinator/lib \
  --tag consensys/linea-coordinator:local .

# Run as part of full stack
make start-env-with-tracing-v2 LINEA_COORDINATOR_TAG=local

Test

# Unit tests
./gradlew :coordinator:app:testAllNeeded

# Integration tests (requires PostgreSQL via Docker)
./gradlew :coordinator:app:integrationTest

# Integration tests including all dependencies
./gradlew :coordinator:app:integrationTestAllNeeded

Lint and Format

./gradlew spotlessCheck    # Check Kotlin/Java formatting
./gradlew spotlessApply    # Auto-fix formatting

Kotlin-Specific Conventions

  • Kotlin version: 2.4.0
  • Formatter: ktlint via Spotless (disabled rules: discouraged-comment-location, property-naming, function-naming, function-signature)
  • Build plugin: lineth.kotlin-application-conventions
  • Main class: lineth.coordinator.app.CoordinatorAppMain
  • Warnings as errors unless LINEA_DEV_ALLOW_WARNINGS is set

Directory Structure

coordinator/
├── app/          Main application entry point
├── config/       TOML config parsing (lineth.coordinator.config.v2)
├── core/         Core business logic
├── clients/      Client implementations (prover, smart-contract, web3signer, traces-generator)
├── ethereum/     Ethereum modules (gas-pricing, blob-submitter, finalization-monitor, message-anchoring)
├── persistence/  Database persistence (aggregation, batch, blob, fee history)
└── utilities/    Shared utilities

Configuration Files

  • docker/config/coordinator/coordinator-config-v2.toml — Main configuration
  • docker/config/coordinator/vertx-options.json — Vert.x runtime options
  • docker/config/coordinator/log4j2-dev.xml — Log4j2 logging config
  • docker/config/common/traces-limits-vV.toml — Trace limits
  • coordinator/config/src/main/resources/smart-contract-errors.toml — Bundled smart contract error mappings (--smart-contract-errors <FILE> is an optional override)

Key Dependencies

Vert.x, Jackson, Hoplite (config), Picocli (CLI), Web3J, jvm-libs workspace projects. check versions in gradle/libs.versions.toml

Kotlin-Specific Safety Rules

  • Override toString() on config classes to redact secrets
  • on toString() use TypeArray.encodeHex() over contentString
  • Integration tests require localStackPostgresDbOnly Docker Compose profile
  • Test timeout: 5 minutes per test
  • Parallel test execution with max(runtime.processors, 9) forks

Agent Rules (Overrides)

  • Run ./gradlew spotlessCheck before proposing Kotlin changes
  • Integration tests are Docker-dependent — note this in test instructions
  • Configuration changes to TOML files affect runtime behavior across environments

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.