From 85a35c58ceddc5ba81e78d1ff0b2281ba4cc7431 Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:13:28 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20update=20AGENTS.md=20=E2=80=94=20generi?= =?UTF-8?q?c=20build=20section,=20remove=20system-specific=20rules=20(#499?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace machine-specific build instructions (/opt/android-sdk paths) with generic gradle commands any contributor can use - Remove Ronia-specific agent-author rule that would confuse external contributors - Remove kanban-internal bug annotation format from commit conventions - Reword stale 'no SDK' caveat in Things to Avoid to match new build section --- AGENTS.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 899bd568..a3d1d775 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,23 +17,27 @@ dashboard's REST API and WebSocket TUI Gateway (JSON-RPC 2.0) over a trusted LAN ## Build & Test Commands -### ⚠ No local Android SDK — CI is the only compilation truth engine +### ✅ Local Android SDK — if available -`./gradlew assembleDebug`, `./gradlew test`, `./gradlew ktlintCheck` all fail locally -(no Android SDK installed). **CI verifies compilation, lint, and tests.** Push small -and watch CI. - -### What you CAN run locally +If you have a local Android SDK (`ANDROID_HOME` set), these work: ```bash -# Standalone ktlint binary (no SDK needed) — the PRIMARY local check +./gradlew assembleDebug # full APK build +./gradlew testDebugUnitTest # unit tests (MockK) +./gradlew ktlintCheck # style check +``` + +**ktlint standalone** (no SDK needed): +```bash +# Download the matching binary curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.2.1/ktlint chmod +x ktlint -./ktlint # check one file -./ktlint --format # auto-fix import ordering, indent, trailing commas -find app/src -name '*.kt' | xargs ./ktlint --format # fix all +./ktlint # check one file +./ktlint --format # auto-fix ``` +**No SDK? CI handles everything** — push small and watch the checks below. + ### CI pipeline (`.github/workflows/android.yml`) | Job | Purpose | @@ -203,12 +207,10 @@ gh pr create --title "fix(#N): description" --body "Closes #N" ### Commit Conventions — STRICT -**🚫 NEVER add yourself as author or co-author.** The agent must never appear in any commit metadata field — not as author, not as `Co-Authored-By`, not in `Generated with`, not anywhere. - -- **No `--author` override.** Use the default git config. Always. +**⚠ Agent-authored commits:** Do NOT override git authorship (`--author`) with the agent's identity. Use the default git config. No `Co-Authored-By` or `Generated with` trailers. - **Short commits:** subject line + max 2 lines of body. Split into atomic commits rather than writing long bodies. - **Conventional Commits** types: `feat`, `fix`, `refactor`, `docs`, `test`, `ci`, `chore`. -- Bug fixes annotated inline: `// B7 (Jun 18 2026, kanban t_xxx): description`. +- Bug fixes annotated inline with the tracking issue/regression ID. ## Security Considerations @@ -225,7 +227,7 @@ gh pr create --title "fix(#N): description" --body "Closes #N" ## Things to Avoid -- Don't run `./gradlew` tasks locally expecting them to work — no Android SDK. +- Don't run `./gradlew` tasks without an Android SDK — CI handles compilation, lint, and tests. - Don't remove `@OptIn(ExperimentalMaterial3Api::class)` from screens that use `SegmentedButton`, `PullToRefreshBox`, or other experimental M3 APIs. - Don't use `remember { AuthManager.getBottomNavItems() }` without a key —