From a43e41a020ed208ca69bfba390251d0d6d3c8803 Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Thu, 31 Jul 2025 17:53:30 +0400 Subject: [PATCH] docs: agents --- .cursor/rules/no-useless-comments.mdc | 2 +- .cursor/rules/no-useless-duplication.mdc | 2 +- .cursor/rules/nodecar-modifications.mdc | 2 +- .cursor/rules/use-singletons | 6 ++++++ AGENTS.md | 7 ++++--- 5 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .cursor/rules/use-singletons diff --git a/.cursor/rules/no-useless-comments.mdc b/.cursor/rules/no-useless-comments.mdc index 5761a4c..562c19c 100644 --- a/.cursor/rules/no-useless-comments.mdc +++ b/.cursor/rules/no-useless-comments.mdc @@ -3,4 +3,4 @@ description: globs: alwaysApply: true --- -Don't leave comments that don't add value \ No newline at end of file +Don't leave comments that don't add value. \ No newline at end of file diff --git a/.cursor/rules/no-useless-duplication.mdc b/.cursor/rules/no-useless-duplication.mdc index e2dee36..49af230 100644 --- a/.cursor/rules/no-useless-duplication.mdc +++ b/.cursor/rules/no-useless-duplication.mdc @@ -3,4 +3,4 @@ description: globs: alwaysApply: true --- -Do not duplicate code unless you have a very good reason to do so. It is important that the same logic is not duplicated multiple times \ No newline at end of file +Do not duplicate code unless you have a very good reason to do so. It is important that the same logic is not duplicated multiple times. \ No newline at end of file diff --git a/.cursor/rules/nodecar-modifications.mdc b/.cursor/rules/nodecar-modifications.mdc index e88bb43..b9423f4 100644 --- a/.cursor/rules/nodecar-modifications.mdc +++ b/.cursor/rules/nodecar-modifications.mdc @@ -3,4 +3,4 @@ description: globs: alwaysApply: true --- -Anytime you change nodecar's code and try to test, recompile it with "cd nodecar && pnpm build" \ No newline at end of file +Anytime you change nodecar's code and try to test, recompile it with "cd nodecar && pnpm build". \ No newline at end of file diff --git a/.cursor/rules/use-singletons b/.cursor/rules/use-singletons new file mode 100644 index 0000000..b951b9a --- /dev/null +++ b/.cursor/rules/use-singletons @@ -0,0 +1,6 @@ +--- +description: +globs: +alwaysApply: true +--- +If there is a global singleton of a struct, only use it inside a method while properly initializing it, unless I have explicitly specified in the request otherwise. \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index 44a9c0d..0d51496 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,8 @@ # Instructions for AI Agents - After your changes, instead of running specific tests or linting specific files, run "pnpm format && pnpm lint && pnpm test". It means that you first format the code, then lint it, then test it, so that no part is broken after your changes. -- Don't leave comments that don't add value -- Do not duplicate code unless you have a very good reason to do so. It is important that the same logic is not duplicated multiple times +- Don't leave comments that don't add value. +- Do not duplicate code unless you have a very good reason to do so. It is important that the same logic is not duplicated multiple times. - Before finishing the task and showing summary, always run "pnpm format && pnpm lint && pnpm test" at the root of the project to ensure that you don't finish with broken application. -- Anytime you change nodecar's code and try to test, recompile it with "cd nodecar && pnpm build" +- Anytime you change nodecar's code and try to test, recompile it with "cd nodecar && pnpm build". +- If there is a global singleton of a struct, only use it inside a method while properly initializing it, unless I have explicitly specified in the request otherwise.