Skip to content

Conversation

@victor-villar
Copy link
Collaborator

@victor-villar victor-villar commented Jan 15, 2026

Add agents.md file for ai assistant coding

@gemini-code-assist
Copy link

Summary of Changes

Hello @victor-villar, 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 foundational documentation for the TwisteRL project, a hybrid Rust/Python Reinforcement Learning framework. The new agents.md file serves as a central guide for developers, outlining the project's structure, setup procedures, coding conventions, testing protocols, and development tips, thereby streamlining onboarding and maintaining consistency across the codebase.

Highlights

  • New Documentation File: A new agents.md file has been added to the repository, providing comprehensive documentation for the TwisteRL hybrid Rust/Python Reinforcement Learning framework.
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.

@victor-villar victor-villar changed the title Add agents.md file for ai assitant coding Add agents.md file for ai assistant coding Jan 15, 2026
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 adds an agents.md file, which serves as a comprehensive guide for developers and AI assistants to understand the TwisteRL project structure, setup, and conventions. The document is well-structured and provides valuable information. I've added a few suggestions to improve clarity and consistency, such as making shell commands safer to execute and aligning the directory structure for better readability. Also, please note the typo 'assitant' in the pull request title and description; it should be 'assistant'.

pip install -e .

# Rust check
cd rust && cargo check && cargo test

Choose a reason for hiding this comment

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

medium

The cd rust && ... command changes the current directory. If a user is copying commands one by one, they will end up in the rust directory, which might not be the intention for subsequent commands. To make the commands safer to copy-paste, consider running the directory-specific commands in a subshell. This ensures the user's shell session remains in the project root.

Suggested change
cd rust && cargo check && cargo test
(cd rust && cargo check && cargo test)

pytest tests/

# Rust unit tests
cd rust && cargo test

Choose a reason for hiding this comment

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

medium

Similar to the setup command, this cd command changes the current directory. Using a subshell makes it safer for users to run these commands from the project root without unexpectedly changing their working directory.

Suggested change
cd rust && cargo test
(cd rust && cargo test)

## Directory Structure

```
twisteRL/

Choose a reason for hiding this comment

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

medium

The project's package name is twisterl (as defined in pyproject.toml and rust/Cargo.toml). The directory structure diagram uses twisteRL/ as the root directory name, which is inconsistent. It should be twisterl/ to accurately reflect the project's naming.

Suggested change
twisteRL/
twisterl/

Comment on lines +47 to +53
├── rust/ # Rust crate (core RL)
│ ├── src/ # Rust source
│ └── Cargo.toml # Rust deps
├── src/twisterl/ # Python package
├── tests/ # Python tests
├── examples/ # Configs and notebooks
└── pyproject.toml # Python build config

Choose a reason for hiding this comment

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

medium

The comments in the directory structure diagram are not vertically aligned, which slightly impacts readability. Aligning them would make the diagram cleaner and easier to parse visually.

Suggested change
├── rust/ # Rust crate (core RL)
│ ├── src/ # Rust source
│ └── Cargo.toml # Rust deps
├── src/twisterl/ # Python package
├── tests/ # Python tests
├── examples/ # Configs and notebooks
└── pyproject.toml # Python build config
├── rust/ # Rust crate (core RL)
│ ├── src/ # Rust source
│ └── Cargo.toml # Rust deps
├── src/twisterl/ # Python package
├── tests/ # Python tests
├── examples/ # Configs and notebooks
└── pyproject.toml # Python build config

Copy link
Member

@cbjuan cbjuan left a comment

Choose a reason for hiding this comment

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

Review: agents.md

Thanks for adding documentation for AI coding assistants. A few issues to address before merging:

Factual Error

Line 28 references TwistableEnv, but this trait doesn't exist. The actual API is the twists() method on the Env trait (rust/src/rl/env.rs:59):

fn twists(&self) -> (Vec<Vec<usize>>, Vec<Vec<usize>>) {(vec![], vec![])}

Suggested fix:

-- **Symmetry**: Implement `TwistableEnv` for environments with symmetries.
+- **Symmetry**: Override the `twists()` method on the `Env` trait for environments with symmetries. See [docs/twists.md](docs/twists.md).

Shell Commands

Lines 17 and 37 use cd rust && ... which changes the working directory permanently. Use subshells instead:

-cd rust && cargo check && cargo test
+(cd rust && cargo check && cargo test)

Missing Content

Consider adding:

  • docs/ directory in the structure diagram
  • Reference to the grid_world custom environment example
  • AlphaZero algorithm support (currently only PPO shown)

Minor

  • Line 46: twisteRL/twisterl/ for consistency with package name
  • Commit message typo: "assitatn" → "assistant"

Everything else looks good — the setup commands, trait path (twisterl::rl::env::Env), and conventions are all accurate.

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