Browse Source

ignore: docs & style

Aiden Cline 9 tháng trước cách đây
mục cha
commit
5b34636afa
4 tập tin đã thay đổi với 15 bổ sung13 xóa
  1. 1 0
      .opencode/opencode.jsonc
  2. 0 13
      AGENTS.md
  3. 2 0
      CONTRIBUTING.md
  4. 12 0
      STYLE_GUIDE.md

+ 1 - 0
.opencode/opencode.jsonc

@@ -4,6 +4,7 @@
   // "enterprise": {
   // "enterprise": {
   //   "url": "https://enterprise.dev.opencode.ai",
   //   "url": "https://enterprise.dev.opencode.ai",
   // },
   // },
+  "instructions": ["STYLE_GUIDE.md"],
   "provider": {
   "provider": {
     "opencode": {
     "opencode": {
       "options": {
       "options": {

+ 0 - 13
AGENTS.md

@@ -1,16 +1,3 @@
-## IMPORTANT
-
-- Try to keep things in one function unless composable or reusable
-- DO NOT do unnecessary destructuring of variables
-- DO NOT use `else` statements unless necessary
-- DO NOT use `try`/`catch` if it can be avoided
-- AVOID `try`/`catch` where possible
-- AVOID `else` statements
-- AVOID using `any` type
-- AVOID `let` statements
-- PREFER single word variable names where possible
-- Use as many bun apis as possible like Bun.file()
-
 ## Debugging
 ## Debugging
 
 
 - To test opencode in the `packages/opencode` directory you can run `bun dev`
 - To test opencode in the `packages/opencode` directory you can run `bun dev`

+ 2 - 0
CONTRIBUTING.md

@@ -42,6 +42,8 @@ Want to take on an issue? Leave a comment and a maintainer may assign it to you
 > [!NOTE]
 > [!NOTE]
 > After touching `packages/opencode/src/server/server.ts`, run "./packages/sdk/js/script/build.ts" to regenerate the JS sdk.
 > After touching `packages/opencode/src/server/server.ts`, run "./packages/sdk/js/script/build.ts" to regenerate the JS sdk.
 
 
+Please try to follow the [style guide](./STYLE_GUIDE.md)
+
 ### Setting up a Debugger
 ### Setting up a Debugger
 
 
 Bun debugging is currently rough around the edges. We hope this guide helps you get set up and avoid some pain points.
 Bun debugging is currently rough around the edges. We hope this guide helps you get set up and avoid some pain points.

+ 12 - 0
STYLE_GUIDE.md

@@ -0,0 +1,12 @@
+## Style Guide
+
+- Try to keep things in one function unless composable or reusable
+- DO NOT do unnecessary destructuring of variables
+- DO NOT use `else` statements unless necessary
+- DO NOT use `try`/`catch` if it can be avoided
+- AVOID `try`/`catch` where possible
+- AVOID `else` statements
+- AVOID using `any` type
+- AVOID `let` statements
+- PREFER single word variable names where possible
+- Use as many bun apis as possible like Bun.file()