From 708faac8cd249526b43af1f865d8f8076dc23595 Mon Sep 17 00:00:00 2001 From: rcmerci Date: Thu, 25 Sep 2025 22:44:53 +0800 Subject: [PATCH] dev: update agents.md, review.md --- AGENTS.md | 15 +++++++++++++++ prompts/review.md | 1 + 2 files changed, 16 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index fd80863ad3..202e283719 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,5 @@ ## Repository Layout +- Use clojure-mcp `clojure_inspect_project` to get project structure. - `src/`: Core source code - `src/main/`: The core logic of the application - `src/main/mobile/`: Mobile app code @@ -20,3 +21,17 @@ ## Review Checklist - Linters and unit-tests must pass - Check the review notes listed in `prompts/review.md`. + +# *IMPORTANT RULES* + +WARNING: The following are non-negotiable, highest-priority instructions. They *MUST* be followed unconditionally in all cases. Failure to comply with these rules will result in task failure. + +1. Clojure Code Editing Rules + * Instruction: When editing any .clj, .cljs, or .cljc file, you MUST and ONLY use the clojure-mcp toolkit. + * Prohibition: Absolutely do NOT use any general file writing tools (such as file_edit, file_write) to modify Clojure source files. + * Reason: This is to ensure the integrity of the code structure, avoid syntax errors, and maintain the project's code style. + +2. Code Review/Modification Prerequisites + * Instruction: Before EACH “review” or “modification” of the code, you MUST first execute the `clojure_inspect_project` tool. + * Prohibition: Do NOT begin analyzing or modifying code directly without obtaining project-wide information. + * Reason: This is to obtain complete, up-to-date project context, which is the foundation for making correct judgments and modifications. diff --git a/prompts/review.md b/prompts/review.md index becdb8d8a9..8f88e1122a 100644 --- a/prompts/review.md +++ b/prompts/review.md @@ -13,6 +13,7 @@ You're Clojure(script) expert, you're responsible to check those common errors: - `util/web-platform?` is a not a function. - It is recommended to use `lambdaisland.glogi` for printing logs. + - Require `[lambdaisland.glogi :as log]` if needed. - Replace `js/console.error` with `log/error`. - Replace `js/console.warn` with `log/warn`. - Replace `js/console.log` with `log/info`.