Compare commits

..

10 Commits

Author SHA1 Message Date
pzhang_zywl 183bcb8e6c feat: CLAUDE.md 支持 generic session 自动加载项目上下文和 Gitea 配置 - Closes #117
CI / test (pull_request) Successful in 18s
将 CLAUDE.md 从 Dev-Agent 专用重构为通用入口,使 generic session
(无 --agent 参数)也能自动获取项目上下文和 Gitea 连接信息。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 14:14:55 +08:00
pzhang_qe_agent_01 67d0209e2b Merge pull request 'fix: [test] Layer C QE Audit LLM 模型升级:deepseek-v4-flash → deepseek-v4-pro - Closes #90' (#116) from test/issue-90-model-upgrade into main
CI / test (push) Successful in 20s
2026-06-08 14:12:55 +08:00
pzhang_zywl e59f69943c test: 升级 Layer C QE Audit 模型 deepseek-v4-flash → deepseek-v4-pro - Closes #90
CI / test (pull_request) Successful in 20s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 14:11:26 +08:00
pzhang_dev_agent_01 3644594c09 Merge pull request 'fix: [bug] Dev-Agent 启动时无法读取 PROJECT_CHARTER.md / GLOBAL_STATE.md — Glob 工具对项目目录返回空 - Closes #113' (#114) from dev/issue-113-glob-agent-startup into main
CI / test (push) Successful in 19s
2026-06-08 12:39:52 +08:00
pzhang_zywl 687e2efbf6 fix: Dev-Agent 启动流程使用绝对路径读取项目文档 - Closes #113
CI / test (pull_request) Successful in 19s
Glob 工具在 Windows 下对项目目录持续返回空结果,导致 agent 启动时无法
读取 PROJECT_CHARTER.md 和 GLOBAL_STATE.md。改用绝对路径 + Read 工具。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 12:39:09 +08:00
pzhang_dev_agent_01 83a793d3e8 Merge pull request 'fix: DEV_AGENT.md / QE_AGENT.md 未在 session 启动时自动加载 - Closes #108' (#112) from dev/issue-108-claude-md into main
CI / test (push) Successful in 22s
2026-06-08 12:09:46 +08:00
pzhang_zywl 371252de61 fix: 创建 CLAUDE.md 实现 session 自动加载角色指令 - Closes #108
CI / test (pull_request) Successful in 25s
在项目根创建 CLAUDE.md(Claude Code 自动加载),确保任何方式进入项目
目录时 Dev-Agent 指令自动生效,不依赖启动脚本 --agent 参数。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 12:04:20 +08:00
pzhang_dev_agent_01 ca5ac630a8 Merge pull request 'fix: 系统性修复 claude code auto mode拦截问题 - Closes #110' (#111) from dev/issue-110-automode-config into main
CI / test (push) Successful in 20s
2026-06-08 11:53:47 +08:00
pzhang_zywl 27d1a74e71 fix: 系统性修复 claude code auto mode 拦截问题 - Closes #110
CI / test (pull_request) Successful in 22s
- 扩充 permissions.allow 覆盖 PYTHONIOENCODING 前缀变体、基础 shell 命令
- 完善 autoMode.allow 描述,涵盖 agent_poller 所有 action、git 操作、pip、文件管理
- 明确声明 settings.json 修改为修复 auto mode 所必需

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 11:45:05 +08:00
pzhang_dev_agent_01 02edacb7e2 Merge pull request 'fix: DEV_AGENT.md / QE_AGENT.md 未在 session 启动时自动加载 - Closes #108' (#109) from dev/issue-108-agent-loading into main
CI / test (push) Successful in 20s
2026-06-08 11:34:21 +08:00
4 changed files with 79 additions and 26 deletions
+3 -1
View File
@@ -63,7 +63,9 @@ export GITEA_USER=pzhang_dev_agent_01 # Dev-Agent 账号
**每次新 session 启动时,立即执行:** **每次新 session 启动时,立即执行:**
1. 读取项目章程和全局状态`docs/PROJECT_CHARTER.md``docs/GLOBAL_STATE.md` 1. 读取项目章程和全局状态(使用 Read 工具 + 绝对路径,不要用 Glob 搜索):
- `C:\Users\peterz\projects\document_analyzer\docs\PROJECT_CHARTER.md`
- `C:\Users\peterz\projects\document_analyzer\docs\GLOBAL_STATE.md`
2. 确认环境变量已设置(GITEA_USER + ~/.gitea/config.yaml 2. 确认环境变量已设置(GITEA_USER + ~/.gitea/config.yaml
3.`/loop 10m` 开启 10 分钟间隔的自动轮询 3.`/loop 10m` 开启 10 分钟间隔的自动轮询
4. 轮询内容(多轮递进): 4. 轮询内容(多轮递进):
+44 -21
View File
@@ -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"
]
} }
}
+28
View File
@@ -0,0 +1,28 @@
# document_analyzer — PRD-to-IR Pipeline
基于 AI 的车机 PRD 文档解析与结构化 IR 生成 pipeline。通过 Dev-Agent 与 QE-Agent 协同迭代,探索 AI Agent 多智能体协作的软件工程闭环。
## 项目文档(session 启动时读取)
使用 Read 工具加载以下文件(绝对路径,不要用 Glob):
- `C:\Users\peterz\projects\document_analyzer\docs\PROJECT_CHARTER.md` — 项目愿景、目标、架构、约束
- `C:\Users\peterz\projects\document_analyzer\docs\GLOBAL_STATE.md` — 当前阶段目标、已知问题、最近变更
## Gitea 配置
- 配置文件:`~/.gitea/config.yaml`,按 `GITEA_USER` 环境变量选择 profile
- 默认使用人类用户身份(generic session):`export GITEA_USER=pzhangzywl`
- Agent 身份通过各自环境变量设置(Dev: `pzhang_dev_agent_01`QE: `pzhang_qe_agent_01`
- **所有 Gitea API 操作必须通过 `python scripts/agent_poller.py`**,禁止直接 curl 或硬编码 token
## 核心规则
1. 代码改动走完整流程:Issue → 分支 → 开发/UT → pytest → PR → CI → merge → 自行验证 → 关闭 Issue
2. 关闭 Issue 必须包含 4 要素:问题 / 根因 / 修复 / 验证
## Agent 模式
- **Dev-Agent**: 启动时自动加载 `.claude/agents/dev-agent.md`(功能开发、重构、UT、接口集成测试)
- **QE-Agent**: 启动时自动加载 `.claude/agents/qe-agent.md`(验收测试、质量门禁)
- **Generic session**: 仅加载本文件,使用人类用户身份工作
+4 -4
View File
@@ -9,7 +9,7 @@ LLM configuration is read from secrets.yaml (searched in order):
2. ~/.openclaw/config/secrets.yaml 2. ~/.openclaw/config/secrets.yaml
3. ~/.openclaw/workspace-document-analyzer/config/secrets.yaml 3. ~/.openclaw/workspace-document-analyzer/config/secrets.yaml
deepseek.apiKey / deepseek.baseUrl → text model (deepseek-v4-flash) deepseek.apiKey / deepseek.baseUrl → text model (deepseek-v4-pro)
Environment variables: Environment variables:
TEST_IR_PATH — path to IR JSON (default: output/final/ir_final.json) TEST_IR_PATH — path to IR JSON (default: output/final/ir_final.json)
@@ -198,11 +198,11 @@ def parsed_data(parsed_path: str | None) -> dict | None:
class _AcceptanceLLM: class _AcceptanceLLM:
"""Thin LLM wrapper for acceptance tests. """Thin LLM wrapper for acceptance tests.
Uses deepseek-v4-flash for text (Layer C QE audit) via OpenAI-compatible API, Uses deepseek-v4-pro for text (Layer C QE audit) via OpenAI-compatible API,
configured from ~/.openclaw/config/secrets.yaml. configured from ~/.openclaw/config/secrets.yaml.
""" """
TEXT_MODEL = "deepseek-v4-flash" TEXT_MODEL = "deepseek-v4-pro"
IMAGE_MODEL = "qwen3-vl-plus" IMAGE_MODEL = "qwen3-vl-plus"
TIMEOUT = 180 TIMEOUT = 180
MAX_RETRIES = 3 MAX_RETRIES = 3
@@ -277,7 +277,7 @@ class _AcceptanceLLM:
def llm_client(): def llm_client():
"""Create an LLM client for acceptance tests. """Create an LLM client for acceptance tests.
Uses deepseek-v4-flash for text (Layer C QE audit), configured from Uses deepseek-v4-pro for text (Layer C QE audit), configured from
~/.openclaw/config/secrets.yaml deepseek section. ~/.openclaw/config/secrets.yaml deepseek section.
""" """
return _AcceptanceLLM() return _AcceptanceLLM()