Project AGENTS.md Guide

This AGENTS.md file provides comprehensive guidance for AI agents working with this codebase.

Project Structure for AI agents Navigation

  • /app/MobileRT: C++ native code of MobileRT

  • /app/Components: C++ native code of components for MobileRT

  • /app/Scenes: C++ native code of some test scenes for MobileRT

  • /app/System_dependent: C++ native code to integrate MobileRT with Qt and Android JNI

  • /app/third_party: C++ native code of third party submodules that are used by MobileRT

  • /app/Unit_Testing: C++ native code of unit tests of MobileRT

  • /app/web-server: Simple web server code in Rust for MobileRT

  • /app/src: Source Android code that uses MobileRT

    • /main: The production code

    • /androidTest: Android instrumentation tests

    • /test: Android unit tests

  • /scripts: Shell scripts used by CI

  • /scripts/test: Unit tests for shell scripts used by CI

  • /.github: Github Actions

  • /.github/workflows: Github Actions workflows

  • /.github/codeql: CodeQL configurations

  • /deploy: Take the compiled code and package it inside a Docker image, in its distributable format, such as an executable with MobileRT native library

Coding Conventions for AI agents

General Conventions

  • Ensure all files have an empty line at the end of the file

  • Ensure the commments are not deleted, but updated instead when updating the codebase

C++ Conventions

  • Avoid using auto keyword and always set the type explicitly

Java Conventions

  • Always use final keyword whenever possible except on interfaces and on try-with-resources

Kotlin Conventions

  • Always use builder pattern with private constructors

Rust Conventions

  • Avoid using unsafe keyword

Pull Request Guidelines for AI agents

When AI agent help create a pull request, please ensure it:

  1. Includes a clear description of the changes as guided by AGENTS.md

  2. References any related issues that AI agent is addressing

  3. Ensures all tests pass for code generated by AI agent

  4. Includes screenshots for UI changes implemented with AI agent

  5. Keeps pull requests focused on a single concern as specified in AGENTS.md

  6. Commit messages should follow the pattern:

  • Title format: {type}({scope}): {title}

    • Possible types: ci/build/chore/fix/feat/refactor/docs/style/perf/test

    • Scopes should be the module updated, or the file name if it makes sense

    • Titles should always start with an upper case and do not finish with terminal punctuation marks

  • Always add a description text after the title with 1 empty line in between

  • After the description, always add a section for the test plan

  1. Never approve or merge the opened pull requests, even if all the tests passed

Testing Requirements for AI agents

AI agents should make sure the Github Actions workflows were executed and all tests passed:

  • Android

    • If C++ native or Android code was modified

  • Native

    • If C++ native code was modified

  • Code Analysis

    • If C++ native or Android code was modified

  • Docker

    • If C++ native code was modified All checks must pass and never approve or merge the opened pull requests, even if all the tests passed. AGENTS.md helps ensure AI agent follows these requirements.

Release notes Conventions for AI agents

AI agents should focus only on commits that change MobileRT source code, including C++ ray tracing engine, C++ components that use MobileRT, and the interface layer like Qt, JNI and Android code. All the commits that only update CI pipelines can be aggregated into a single sentence / bullet mentioning that CI was improved. Again, only 1 short sentence / bullet should be written to summarize all improvements made on CI. Do not write duplicated lines / bullets, ever. Also, if duplicated sentences/bullets exist, then merge them into a single sentence / bullet. And, if multiple bullets mention update of the same dependency, then merge them together into a single bullet mentioning only the latest version that was updated. The title of the release notes can be: ## Release Notes And for each module, like MobileRT, Components, Android and Qt can have the changelog inside each section. E.g.:

MobileRT

  • Improved something

  • Updated something

  • Added something

  • Can only contain C/C++ dependencies

Components

  • Improved something

  • Updated something

  • Added something

  • Components do not contain any dependencies

Android

  • Improved something

  • Updated something

  • Added something

  • Can only contain Java/Android dependencies

Qt

  • Improved something

  • Updated something

  • Added something

  • Can only contain C++ Qt dependency

Docker

  • Improved something

  • Updated something

  • Added something

Others

The others section can have the release notes related to other things besides MobileRT, like:

  • Dependencies of conanfiles should be here

Web Server

  • Improved something

  • Updated something

  • Added something

CI

  • Improved/updated/added something (just 1 bullet should be written regarding CI. Don't write more than 1 bullet at most.)

  • Shell script updates should only appear in this CI section

  • Can only contain Github actions dependencies

Testing

  • Improved/updated/added something

Documentation

  • Improved something

  • Updated something

  • Added something And again, for CI just write at most 1 small sentence/bullet to mention improvements / changes. And for the modules that don't have any changes, don't write any bullet and even don't write the section for it, which means the modules without changes should not appear in the release notes. Leave a small disclaimer at the end of the release notes stating that those were written by AI.

Last updated