From 8cc4d3a5c1f6053c22265a1109ea4161bd448c6c Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 16 Aug 2026 20:11:35 -0700 Subject: [PATCH] docs: update AGENTS.md in subdirectories Update subproject AGENTS.md guidelines to always include the top-level AGENTS.md. Assisted-by: Gemini 3.7 Flash --- AGENTS.md | 2 +- app/AGENTS.md | 3 ++- native/AGENTS.md | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 2286a8c01..d9fede399 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,7 +25,7 @@ Guidelines and instructions for AI models and automated agents operating in the ## 4. Guidelines for AI Models -1. **Git / Commit Control:** NEVER commit changes or amend an existing git commit without the user's explicit request or approval. When explicitly requested to commit changes, follow the 50/72 rule for commit messages (subject line <= 50 characters, blank line before body, wrap body lines at 72 characters) and include an `Assisted-by: ` trailer in the commit message body (using a pretty name, e.g., `Assisted-by: Gemini 3.6 Flash`). +1. **Git / Commit Control:** NEVER commit changes or amend an existing git commit without the user's explicit request or approval. When explicitly requested to commit changes, follow the 50/72 rule for commit messages (subject line <= 50 characters, blank line before body, wrap body lines at 72 characters) and include an `Assisted-by: ` trailer in the commit message body. 2. **Build Invocation:** Execute `./build.py ` directly without `scripts/env.py`. Prefix standalone tool executions (like `./gradlew` or raw `cargo`) with `scripts/env.py`. 3. **Pre-build Native Code:** Before modifying code in `native/`, build native binaries at least once with `./build.py native` to generate required bindings and header files. 4. **App Subproject Context:** Refer to [`app/AGENTS.md`](app/AGENTS.md) when working inside the `app/` subproject. diff --git a/app/AGENTS.md b/app/AGENTS.md index e38909770..47088213d 100644 --- a/app/AGENTS.md +++ b/app/AGENTS.md @@ -1,9 +1,10 @@ # AGENTS.md (app subproject) -Guidelines for AI models operating inside the `app/` subproject. +Guidelines for AI models operating inside the `app/` subproject. Always include and follow the top-level [`AGENTS.md`](../AGENTS.md). ## 1. Environment & Gradle Setup +- **General Guidelines:** Always follow the top-level [`AGENTS.md`](../AGENTS.md) for general repository rules, environment execution setup, and commit control policies. - **Working Directory:** Set working directory to `app/` when working on app code. - **Environment Wrapper:** Standalone `./gradlew` commands MUST be prefixed with `../scripts/env.py` (e.g., `../scripts/env.py ./gradlew assembleDebug`), or run `./build.py app` from root. diff --git a/native/AGENTS.md b/native/AGENTS.md index b0e1fcd2d..b3f403361 100644 --- a/native/AGENTS.md +++ b/native/AGENTS.md @@ -1,9 +1,10 @@ # AGENTS.md (native subproject) -Guidelines for AI models operating inside the `native/` subproject. +Guidelines for AI models operating inside the `native/` subproject. Always include and follow the top-level [`AGENTS.md`](../AGENTS.md). ## 1. Environment & Build Requirements +- **General Guidelines:** Always follow the top-level [`AGENTS.md`](../AGENTS.md) for general repository rules, environment execution setup, and commit control policies. - **Working Directory:** Execute commands from repo root via `./build.py`. - **Pre-build Requirement:** ALWAYS run `./build.py native` at least once before editing native sources to generate FFI bindings, headers, and flags (`flags.h`, `flags.rs`, `*-rs.hpp`, `*-rs.cpp`, protobuf generated modules).