From 8a7577d5bbc29120ff8e92fd433d6fc63b820d8f Mon Sep 17 00:00:00 2001 From: Barnabas Balogh Date: Wed, 29 Apr 2026 18:39:56 +0200 Subject: [PATCH] docs: add AGENTS.md with guidelines for code contributions --- AGENTS.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..c91d9222 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,70 @@ +# Purefin AGENTS.md + +Follow these instructions before making changes: + +* Understand the relevant files before editing. +* Always follow official Android recommendations and best practices. +* Always include the pages you have read in your reply, even in planning mode. +* Prefer small, targeted changes over broad refactors. +* Preserve existing architecture and naming unless the task requires a change. +* Do not introduce new dependencies without a clear reason. +* Ask for clarification or leave a note when requirements are ambiguous. + +--- + +## Repository Expectations + +* Always use the currently used syntax in the codebase. Include examples for any naming you introduce. +* Avoid touching unrelated files. +* Do not fix unrelated existing problems in the codebase. +* Prefer consistency with the existing codebase over idealized patterns. +* When modifying a file, match its local style and conventions. +* Favor readable, maintainable code over clever code. + +--- + +## Testing + +* Running a build is sufficient to verify your implementation. +* Do not write tests unless explicitly asked to. + +--- + +## Git and Commit Rules + +When asked to prepare a commit: + +* Use **Conventional Commits** format. +* Format: + + ``` + (): + ``` +* The description should not be too long, but must include any major change. +* Use imperative mood. +* Keep the subject concise. + +**Common types:** + +* `feat` – new feature +* `fix` – bug fix +* `refactor` – code change without feature or fix +* `test` – adding or updating tests +* `docs` – documentation changes +* `chore` – maintenance tasks +* `build` – build system changes +* `ci` – CI/CD changes + +--- + +## Preferred Workflow + +1. Read the task carefully. +2. Read relevant official Google/Android documentation. +3. Inspect the relevant files and nearby code. +4. Choose the simplest solution aligned with Google’s standards. +5. Check if the code can be simplified: + + * If yes, simplify it. + * Do not reduce readability. +6. Summarize the result, including anything not verified.