chore(logs): split agent change log outputs
This commit is contained in:
@@ -2,21 +2,51 @@
|
||||
|
||||
这个目录提供 `agent-change-log` 的可执行部分。
|
||||
|
||||
## 手动写入一条日志
|
||||
## 记录一次 bug 修复
|
||||
|
||||
```bash
|
||||
python3 tools/agent-change-log/update_change_log.py --event "manual"
|
||||
python3 tools/agent-change-log/update_change_log.py \
|
||||
--kind bug \
|
||||
--bug-title "保存草稿失败后表格消失" \
|
||||
--bug-slug draft-preview-disappears
|
||||
```
|
||||
|
||||
## 安装提交后自动日志 hook
|
||||
默认写入:
|
||||
|
||||
```text
|
||||
document/development/YYYY-MM-DD/dev-logs/bugs/<bug-slug>.md
|
||||
```
|
||||
|
||||
bug 日志只记录修复内容,不再写 `遗留问题` 和 `TODO`。
|
||||
|
||||
## 生成每日综合日志
|
||||
|
||||
```bash
|
||||
python3 tools/agent-change-log/update_change_log.py --kind summary
|
||||
```
|
||||
|
||||
默认读取当天:
|
||||
|
||||
```text
|
||||
document/development/YYYY-MM-DD/feature/
|
||||
document/development/YYYY-MM-DD/dev-logs/bugs/
|
||||
```
|
||||
|
||||
然后生成:
|
||||
|
||||
```text
|
||||
document/development/YYYY-MM-DD/work-logs.med
|
||||
```
|
||||
|
||||
## 安装提交后自动 bug 日志 hook
|
||||
|
||||
```bash
|
||||
tools/agent-change-log/install_post_commit_hook.sh
|
||||
```
|
||||
|
||||
安装后,每次 `git commit` 完成,`.githooks/post-commit` 会调用
|
||||
`update_change_log.py`,把最近提交、Git 双向提交检查和触发时间追加到
|
||||
`document/work-log/YYYY-MM-DD.md`。
|
||||
`update_change_log.py --kind auto`。脚本只在提交标题看起来像 bug 修复时写入
|
||||
`dev-logs/bugs`,例如 `fix:`、`bugfix:`、包含 `修复`、`缺陷`、`失败`、`异常`。
|
||||
|
||||
注意:hook 只能覆盖“提交后自动记录”。没有提交的普通文件修改,仍需要执行代理在任务完成前按
|
||||
`AGENTS.md` 和 `agent-change-log` 主动记录。
|
||||
非 bug 提交会跳过,功能点仍通过 `document/development/YYYY-MM-DD/feature/`
|
||||
下的 `CONCEPT.md` 和 `TODO.md` 沉淀。
|
||||
|
||||
Reference in New Issue
Block a user