Skip to content

docs: add AGENTS.md for AI coding agent guidance#3914

Merged
sveitser merged 1 commit intomainfrom
ma/claude-md
Jan 29, 2026
Merged

docs: add AGENTS.md for AI coding agent guidance#3914
sveitser merged 1 commit intomainfrom
ma/claude-md

Conversation

@sveitser
Copy link
Collaborator

@sveitser sveitser commented Jan 28, 2026

The CLAUDE.md file is loaded into context by claude code (among other things). So having some overall description of the projects should help it find stuff and guide it into the right direction. A more recent product agnostic name for such a file is AGENTS.md so I added that instead and symlinked CLAUDE.md.

  • Critical Rules: MUST/NEVER markers for common pitfalls (OOM, storage backends, L1 reorgs)
  • Architecture: HotShot vs Sequencer separation, internal components, L1 integration
  • Catchup: sparse merkle trees, on-demand proof fetching from local DB or peers
  • Testing philosophy: correctness over coverage for blockchain infrastructure
  • Storage layer: three backends (PostgreSQL, SQLite, filesystem), migration workflow
  • Code style: Rust imports, error handling, Solidity upgrade patterns
  • Commands: package-specific cargo commands, contract testing, E2E demos

Includes CLAUDE.md symlink for Claude Code compatibility.

- Critical Rules: MUST/NEVER markers for common pitfalls (OOM, storage backends, L1 reorgs)
- Architecture: HotShot vs Sequencer separation, internal components, L1 integration
- Catchup: sparse merkle trees, on-demand proof fetching from local DB or peers
- Testing philosophy: correctness over coverage for blockchain infrastructure
- Storage layer: three backends (PostgreSQL, SQLite, filesystem), migration workflow
- Code style: Rust imports, error handling, Solidity upgrade patterns
- Commands: package-specific cargo commands, contract testing, E2E demos

Includes CLAUDE.md symlink for Claude Code compatibility.
@gemini-code-assist
Copy link

Summary of Changes

Hello @sveitser, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new AGENTS.md document, designed to serve as a comprehensive guide for AI coding agents contributing to the Espresso Network repository. The document aims to standardize AI interactions by outlining essential rules, architectural insights, development workflows, and best practices across various components like Rust, Solidity, and the storage layer. This initiative enhances the clarity and efficiency of AI-assisted development within the project, complemented by a CLAUDE.md symlink for specific AI agent compatibility.

Highlights

  • New AI Agent Guidance Document: A new AGENTS.md file has been added, providing comprehensive guidance for AI coding agents interacting with the repository. This document covers critical rules, architectural overviews, command usage, code style, testing philosophy, storage layer details, API development, and debugging tips.
  • Claude AI Compatibility: A symlink CLAUDE.md has been created, pointing to AGENTS.md, to ensure compatibility and easy access for Claude AI agents.
  • Detailed Development Guidelines: The AGENTS.md document includes specific instructions for Rust and Solidity development, such as cargo commands, error handling, contract upgrade patterns, and a detailed testing philosophy emphasizing correctness over coverage.
  • Storage and API Best Practices: Guidelines for updating all three storage backends (PostgreSQL, SQLite, filesystem) during persistence changes and a checklist for adding new API endpoints using tide-disco are provided.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces AGENTS.md, a comprehensive guide for AI coding agents, which is a valuable addition for navigating this complex repository. The document is well-structured and covers critical aspects from architecture to development workflows. My review identifies a key issue where CLAUDE.md is not implemented as a symlink as intended, and a minor inaccuracy in the AGENTS.md file that could be improved for clarity.

@@ -0,0 +1 @@
AGENTS.md No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The pull request description mentions that CLAUDE.md should be a symlink to AGENTS.md. However, this file has been added as a regular text file containing the string "AGENTS.md", not as a symbolic link. This will not work as intended. Please replace this file with a proper symlink.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/gemini isn't that what a symlink looks like in git?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great question, sveitser! While the content of a symlink file in Git is indeed the path to its target (in this case, AGENTS.md), Git also tracks a special file mode to distinguish a symlink from a regular file. If you simply create a text file named CLAUDE.md with the content AGENTS.md, Git will treat it as a regular file, not a symbolic link.

To create a proper symbolic link that Git recognizes, you need to use the ln -s command and then add it to Git. Here's how you can fix it:

  1. Remove the existing file:
    git rm CLAUDE.md
  2. Create the symbolic link:
    ln -s AGENTS.md CLAUDE.md
  3. Add the symbolic link to Git:
    git add CLAUDE.md

After these steps, git status should show CLAUDE.md as a new file with a special mode (e.g., new file: CLAUDE.md -> AGENTS.md), indicating it's a symlink.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a symlink 😒


- Modify V1 contract storage layout (V2 inherits V1; changing V1 breaks upgrades)
- Combine `embedded-db` feature with default features (sqlx feature conflict)
- Use `just test` during iteration (compiles everything; use `cargo test -p <package>`)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The explanation for why just test should not be used during iteration is slightly inaccurate. It states that it "compiles everything", but the justfile shows that just test actually excludes some packages (sequencer-sqlite, hotshot-testing, slow-tests, espresso-dev-node). While the advice to use package-specific tests for faster iteration is excellent, the reason could be clarified to be more precise, for example, by stating it builds and tests most of the workspace.

@sveitser sveitser marked this pull request as ready for review January 28, 2026 16:02
@sveitser sveitser merged commit 67c2885 into main Jan 29, 2026
152 of 154 checks passed
@sveitser sveitser deleted the ma/claude-md branch January 29, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants