Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: better CLAUDE.md file

Nevo Davidab3b1edb8664
diff --git a/CLAUDE.md b/CLAUDE.md
index 737bf2f5f..6cb1b3646 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -29,9 +29,9 @@ All the --color-custom* are deprecated, don't use them.
And check other components in the system before to get the right design.
When working on the backend we need to pass the 3 layers:
-Controller >> Service >> Repository (no shortcuts)
+DTO >> Controller >> Service >> Repository (no shortcuts)
In some cases we will have
-Controller >> Mananger >> Service >> Repository.
+DTO >> Controller >> Manager >> Service >> Repository.
Most of the server logic should be inside of libs/server.
The backend repository is mostly used to write controller, and import files from libs.server.
@@ -42,7 +42,7 @@ For the frontend follow this:
- Components are in /apps/frontend/src/components
- always use SWR to fetch stuff, and use "useFetch" hook from /libraries/helpers/src/utils/custom.fetch.tsx
-When using SWR, each one have to be in a seperate hook and must comply with react-hooks/rules-of-hooks, never put eslint-disable-next-line on it.
+When using SWR, each one have to be in a separate hook and must comply with react-hooks/rules-of-hooks, never put eslint-disable-next-line on it.
It means that this is valid:
const useCommunity = () => {
@@ -60,5 +60,10 @@ const useCommunity = () => {
- Linting of the project can run only from the root.
- Use only pnpm.
- The system is in production with many users, if you want to change something, you need to be sure that you are not breaking anything for existing users and a migration might be needed
-
- Whenever you generate a PR, PR description, or similar, **always** follow the PR Template (.github/PULL_REQUEST_TEMPLATE.md)
+- Avoid as much as possible creating new files with pure logic of algorithms, it's usually wrong
+- When you write code, make sure that what you add looks like something similar somewhere else in the code, don't make weird patterns
+- When you finished running, run another agents that matches the new code with the existing system code, to see that it looks similar and is not a weird pattern.
+- Workflows files can never be changed if they are already in origin/main, because changing a workflow will fail all its activities, instead create a new workflow with the version, and everywhere the workflow being called, change it to the new workflow version.
+- Workflows activities parameters cannot be changed, as it will break the workflow, if we need to change the parameters, if we need to change the parameters, we need to create a new activity with the new parameters, and then create a new workflow that uses the new activity.
+- Code must always be generic, there can't be a way that a specific logic, let's say facebook or instagram, appear in a file that use a generic logic, instead, we need to edit the interface of the provider, add another function, and then generically call it from the generic code, and then implement the specific logic in the provider implementation. we can't have something like if(facebookProvider) {} inside a non facebook provider file.
\ No newline at end of file