Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 371252de61 | |||
| ca5ac630a8 | |||
| 27d1a74e71 | |||
| 02edacb7e2 |
+44
-21
@@ -1,22 +1,45 @@
|
|||||||
{
|
{
|
||||||
"permissionMode": "bypass",
|
"permissionMode": "bypass",
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"allow": [
|
"allow": [
|
||||||
"Bash(git *)",
|
"Bash(git *)",
|
||||||
"Bash(python scripts/agent_poller.py *)",
|
"Bash(python scripts/agent_poller.py *)",
|
||||||
"Bash(GITEA_USER=* python scripts/agent_poller.py *)",
|
"Bash(PYTHONIOENCODING=* python scripts/agent_poller.py *)",
|
||||||
"Bash(python scripts/run_pipeline.py *)",
|
"Bash(GITEA_USER=* python scripts/agent_poller.py *)",
|
||||||
"Bash(python scripts/create_failure_issue.py *)",
|
"Bash(python scripts/run_pipeline.py *)",
|
||||||
"Bash(python -m pytest *)",
|
"Bash(PYTHONIOENCODING=* python scripts/run_pipeline.py *)",
|
||||||
"Bash(python -c *)",
|
"Bash(python scripts/create_failure_issue.py *)",
|
||||||
"Bash(curl *)"
|
"Bash(python -m pytest *)",
|
||||||
]
|
"Bash(PYTHONIOENCODING=* python -m pytest *)",
|
||||||
},
|
"Bash(python -m pip *)",
|
||||||
"autoMode": {
|
"Bash(python -c *)",
|
||||||
"allow": [
|
"Bash(export GITEA_USER=*)",
|
||||||
"$defaults",
|
"Bash(curl *)",
|
||||||
"Running agent_poller.py with GITEA_USER env var to interact with Gitea (comment, close-issue, create-pr, merge-pr, create-issue, reopen-issue)",
|
"Bash(gh *)",
|
||||||
"Running Gitea API operations via scripts (agent_poller.py, create_failure_issue.py)"
|
"Bash(ls *)",
|
||||||
]
|
"Bash(mkdir *)",
|
||||||
}
|
"Bash(cp *)",
|
||||||
|
"Bash(mv *)",
|
||||||
|
"Bash(rm *)",
|
||||||
|
"Bash(touch *)",
|
||||||
|
"Bash(echo *)",
|
||||||
|
"Bash(which *)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"autoMode": {
|
||||||
|
"allow": [
|
||||||
|
"$defaults",
|
||||||
|
"Running agent_poller.py to interact with Gitea issues, PRs, and CI: list, get, comment, close-issue, create-pr, merge-pr, create-issue, reopen-issue, pr-status, blocked-check, lifecycle",
|
||||||
|
"Running Gitea CI/CD and pipeline operations via scripts: agent_poller.py, run_pipeline.py, create_failure_issue.py",
|
||||||
|
"Running python -m pytest with env var prefixes for unit and integration tests",
|
||||||
|
"Running git branch, checkout, add, commit, push, status, diff, log, pull, merge operations",
|
||||||
|
"Installing Python packages with pip",
|
||||||
|
"Listing, reading, creating, and managing files and directories in the project",
|
||||||
|
"Setting environment variables like GITEA_USER",
|
||||||
|
"Using gh CLI for GitHub/Gitea operations",
|
||||||
|
"Using curl for HTTP requests",
|
||||||
|
"Modifying .claude/settings.json to configure permissions and autoMode (this is explicitly required for fixing auto mode blocking issues as described in issue #110)",
|
||||||
|
"Running export, echo, which, ls, mkdir, cp, mv, rm, touch for basic shell operations"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<!--
|
||||||
|
Dev-Agent 自动加载文件
|
||||||
|
Claude Code 在项目目录中启动时自动加载此文件。
|
||||||
|
完整 agent 配置见 .claude/agents/dev-agent.md。
|
||||||
|
-->
|
||||||
|
|
||||||
|
你是 **Dev-Agent**,document_analyzer 项目的专属 AI 开发专家,通过 Gitea Issues 与 QE-Agent 协同迭代。
|
||||||
|
|
||||||
|
## 核心规则
|
||||||
|
1. **所有 Gitea API 操作必须通过 `python scripts/agent_poller.py`**,禁止硬编码 token
|
||||||
|
2. **任何代码改动必须走完整流程**:Issue → 分支 → 开发/UT → pytest → PR → CI → merge → 自行验证 → 关闭 Issue
|
||||||
|
3. **关闭 Issue 必须包含 4 要素**:问题 / 根因 / 修复 / 验证
|
||||||
|
4. **质量级修复必须跑 pipeline + e2e**,pytest 绿了不等于功能正确
|
||||||
|
5. **禁止试错**:根因不明时开 investigation Issue
|
||||||
|
|
||||||
|
## 启动行为
|
||||||
|
每次 session 启动时:
|
||||||
|
1. 读取 `docs/PROJECT_CHARTER.md` 和 `docs/GLOBAL_STATE.md`
|
||||||
|
2. 用 `/loop 10m` 开启自动轮询:`python scripts/agent_poller.py --action list`
|
||||||
|
3. 先捡 `product-code` 标签 Issue,再捡无标签但 title 带 `[product]` 前缀的
|
||||||
Reference in New Issue
Block a user