You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+67-10Lines changed: 67 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,12 @@
1
1
2
2
# Project Coding Guidelines
3
3
4
-
NOTICE: This file is generated using AGENTS.sh and should NEVER be manually updated.
5
-
6
-
This file contains all coding guidelines and standards for this project.
4
+
NOTICE: AGENTS.md is generated using AGENTS.sh and should NEVER be manually updated.
7
5
8
6
---
9
7
10
8
9
+
11
10
when summarizing changes at the end of the message, be super short, a few words and in bullet points, use bold text to highlight important keywords. use markdown.
12
11
13
12
please ask questions and confirm assumptions before generating complex architecture code.
@@ -22,6 +21,12 @@ NEVER add comments unless I tell you
22
21
23
22
always use kebab case for new filenames. never use uppercase letters in filenames
24
23
24
+
25
+
## see files in the repo
26
+
27
+
use `git ls-files | tree --fromfile` to see files in the repo. this command will ignore files ignored by git
28
+
29
+
25
30
---
26
31
27
32
# typescript
@@ -58,6 +63,8 @@ always use kebab case for new filenames. never use uppercase letters in filename
58
63
59
64
- NEVER start the development server with pnpm dev yourself. there is no reason to do so, even with &
60
65
66
+
- When creating classes do not add setters and getters for a simple private field. instead make the field public directly so user can get it or set it himself without abstractions on top
67
+
61
68
- if you encounter typescript lint errors for an npm package, read the node_modules/package/\*.d.ts files to understand the typescript types of the package. if you cannot understand them, ask me to help you with it.
62
69
63
70
```ts
@@ -117,6 +124,7 @@ const users: User[] = []
117
124
118
125
remember to always add the explicit type to avoid unexpected type inference.
119
126
127
+
120
128
---
121
129
122
130
# package manager: pnpm with workspace
@@ -129,6 +137,12 @@ if you need to install packages always use pnpm
129
137
130
138
instead of adding packages directly in package.json use `pnpm install package` inside the right workspace folder. NEVER manually add a package by updating package.json
131
139
140
+
## updating a package
141
+
142
+
when i ask you to update a package always run `pnpm update -r packagename`. to update to latest also add --latest
143
+
144
+
Do not do `pnpm add packagename` to update a package. only to add a missing one. otherwise other packages versions will get out of sync.
145
+
132
146
## fixing duplicate pnpm dependencies
133
147
134
148
sometimes typescript will fail if there are 2 duplicate packages in the workspace node_modules. this can happen in pnpm if a package is used in 2 different places (even if inside a node_module package, transitive dependency) with a different set of versions for a peer dependency
@@ -234,6 +248,7 @@ in this case, we could have only updated @better-auth/stripe to fix the issue to
234
248
235
249
if after doing this we still have duplicate packages, you will have to ask the user for help. you can try deleting the node_modules and restarting the approach, but it rarely helps.
236
250
251
+
237
252
---
238
253
239
254
## reading github repositories
@@ -243,12 +258,13 @@ you can use gitchamber.com to read repo files. run `curl https://gitchamber.com`
243
258
### vercel ai sdk documentation
244
259
245
260
when working with the vercel ai sdk, you can fetch the latest docs using:
you can swap out the topic with text you want to search docs for. you can also limit the total results returned with the param token to limit the tokens that will be added to the context window
251
266
267
+
252
268
---
253
269
254
270
## react
@@ -455,8 +471,6 @@ in typescript never use process.env directly. instead find the closest `env.ts`
455
471
456
472
the cli uses cac npm package.
457
473
458
-
notice that if you add a route in the spiceflow server you will need to run `pnpm --filter website gen-client` to update the apiClient inside cli.
459
-
460
474
461
475
---
462
476
@@ -823,14 +837,22 @@ use lucide-react to import icons. always add the Icon import name, for example `
@@ -848,6 +870,24 @@ spiceflow is a little-known api framework. if you add server routes to a file th
848
870
849
871
thisurlreturnsasinglelongdocumentationthatcoversyourusecase. alwaysfetchthisdocumentsoyouknowhowtousespiceflow. spiceflowisdifferentfromhonoandotherapiframeworks, that's why you should ALWAYS fetch the docs first before using it
0 commit comments