- ALWAYS read
README.md,config.sh,justfile,build.sh,build/,ci/,py/pyproject.toml, and.github/workflows/before changing script behavior. - Keep behavior wiring in the usual places: top-level flow in
build.sh, defaults and repo settings inconfig.sh, build steps inbuild/, packaging and Telegram logic inci/, and API/JSON helper code inpy/. - PREFER Bash for orchestration, patching, packaging, and filesystem work. PREFER Python for API calls, JSON handling, Telegram requests, release metadata, and the helper CLI.
- ALWAYS use the existing
py_cliwrapper when Bash needs the Python helper package. - Keep Python changes inside the uv-managed
py/project and stay on Python 3.14. - ALWAYS use the existing boolean conventions.
STOCK_CONFIGstaysauto,true, orfalse, and invalid boolean-like values should fail clearly. - PREFER the existing log helpers instead of ad hoc output.
- AVOID moving build orchestration into Python.
- AVOID adding a new function unless it is needed and reused. If the behavior fits cleanly in an existing function, add it there.
- AVOID adding new wrappers or helper layers when the existing Bash or Python entry points already fit the job.
- AVOID broad cleanup or refactor edits outside the part of the build flow you are changing.
- Run the relevant checks for what you changed:
just fmt-check,just bash-check,just lint,just py-lint,just py-check, orjust check. - NEVER add frontend, Windows, or macOS tooling. This repo is Linux-only Bash plus Python.
- 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, andbuild/ld.lld. - Keep
.gitignorefocused on actual generated paths in this repo. PREFER concrete directories and files over broad extension globs. - AVOID adding ignores for frontend, Windows, macOS, coverage, or generic archive/object patterns unless the repo actually starts generating them.
- Keep workflow inputs and defaults aligned with
config.shand the build scripts, especially target-specific defaults andSTOCK_CONFIG=auto. - AVOID changing workflow inputs, defaults, or env names without updating the matching Bash handling.
- ALWAYS use conventional commit style. Keep scopes short, like
pyorbuild, not full paths likepy/src/tools. Omit the scope for treewide changes. - ALWAYS update
README.mdwhen behavior, commands, inputs, outputs, or setup steps change.