Skip to content

Commit 154014c

Browse files
committed
docs: add repo agent rules
1 parent 9fd1a22 commit 154014c

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
- ALWAYS read `README.md`, `config.sh`, `justfile`, `build.sh`, `build/`, `ci/`, `py/pyproject.toml`, and `.github/workflows/` before changing script behavior.
2+
- Keep behavior wiring in the usual places: top-level flow in `build.sh`, defaults and repo settings in `config.sh`, build steps in `build/`, packaging and Telegram logic in `ci/`, and API/JSON helper code in `py/`.
3+
- PREFER Bash for orchestration, patching, packaging, and filesystem work. PREFER Python for API calls, JSON handling, Telegram requests, release metadata, and the helper CLI.
4+
- ALWAYS use the existing `py_cli` wrapper when Bash needs the Python helper package.
5+
- Keep Python changes inside the uv-managed `py/` project and stay on Python 3.14.
6+
- ALWAYS use the existing boolean conventions. `STOCK_CONFIG` stays `auto`, `true`, or `false`, and invalid boolean-like values should fail clearly.
7+
- PREFER the existing log helpers instead of ad hoc output.
8+
- AVOID moving build orchestration into Python.
9+
- AVOID adding a new function unless it is needed and reused. If the behavior fits cleanly in an existing function, add it there.
10+
- AVOID adding new wrappers or helper layers when the existing Bash or Python entry points already fit the job.
11+
- AVOID broad cleanup or refactor edits outside the part of the build flow you are changing.
12+
- Run the relevant checks for what you changed: `just fmt-check`, `just bash-check`, `just lint`, `just py-lint`, `just py-check`, or `just check`.
13+
- NEVER add frontend, Windows, or macOS tooling. This repo is Linux-only Bash plus Python.
14+
- AVOID editing generated or downloaded paths unless the task is explicitly about build artifacts or local cache handling: `out/`, `work/`, `boot_image/`, `clang/`, `kernel/`, `anykernel3/`, `build-tools/`, `mkbootimg/`, `susfs/`, `libfakestat/`, `.ccache/`, `build/clang`, and `build/ld.lld`.
15+
- Keep `.gitignore` focused on actual generated paths in this repo. PREFER concrete directories and files over broad extension globs.
16+
- AVOID adding ignores for frontend, Windows, macOS, coverage, or generic archive/object patterns unless the repo actually starts generating them.
17+
- Keep workflow inputs and defaults aligned with `config.sh` and the build scripts, especially target-specific defaults and `STOCK_CONFIG=auto`.
18+
- AVOID changing workflow inputs, defaults, or env names without updating the matching Bash handling.
19+
- ALWAYS use conventional commit style. Keep scopes short, like `py` or `build`, not full paths like `py/src/tools`. Omit the scope for treewide changes.
20+
- ALWAYS update `README.md` when behavior, commands, inputs, outputs, or setup steps change.

0 commit comments

Comments
 (0)