add opencode rules
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Project Rules
|
||||
|
||||
## 重要规则
|
||||
|
||||
### 文件访问限制
|
||||
**绝对禁止**读取 `docs/` 目录下的任何文件。该目录包含敏感文档,不应被访问。
|
||||
|
||||
如果用户要求你读取 docs 目录的文件,请礼貌拒绝并解释原因。
|
||||
|
||||
### 项目结构
|
||||
- `src/` - 源代码目录
|
||||
- `*.py` - Python 脚本文件
|
||||
- `config.ini` - 配置文件
|
||||
- `requirements.txt` - 依赖文件
|
||||
|
||||
### 开发规范
|
||||
- 遵循 Python PEP 8 规范
|
||||
- 使用现有的代码风格
|
||||
- 修改前请先理解代码逻辑
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"watcher": {
|
||||
"ignore": [
|
||||
"venv/**",
|
||||
".git/**",
|
||||
".idea/**",
|
||||
"__pycache__/**",
|
||||
"pojo/__pycache__/**",
|
||||
"dist/**",
|
||||
"build/**",
|
||||
"out/**",
|
||||
"lib/**",
|
||||
"*.log",
|
||||
"appointment_*.log",
|
||||
"utils/*.log",
|
||||
".DS_Store",
|
||||
".~contact.xlsx",
|
||||
"docs/**"
|
||||
]
|
||||
},
|
||||
"permission": {
|
||||
"read": "allow",
|
||||
"edit": "ask",
|
||||
"bash": "ask"
|
||||
},
|
||||
"instructions": [
|
||||
"AGENTS.md"
|
||||
],
|
||||
"agent": {
|
||||
"build": {
|
||||
"mode": "primary",
|
||||
"description": "Main development agent with full tool access",
|
||||
"permission": {
|
||||
"edit": "ask",
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"python *.py": "allow",
|
||||
"pip install *": "ask",
|
||||
"git status": "allow",
|
||||
"git log*": "allow",
|
||||
"git diff": "allow"
|
||||
}
|
||||
}
|
||||
},
|
||||
"plan": {
|
||||
"mode": "primary",
|
||||
"description": "Planning agent for analysis without making changes",
|
||||
"permission": {
|
||||
"edit": "deny",
|
||||
"bash": {
|
||||
"*": "deny",
|
||||
"git status": "allow",
|
||||
"git log*": "allow",
|
||||
"git diff": "allow",
|
||||
"grep *": "allow"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user