feat: add change list

This commit is contained in:
zhr 2026-09-24 11:20:13 +08:00
parent 8870c59e2d
commit 0ac9b8330f
5 changed files with 141 additions and 0 deletions

View File

@ -14,3 +14,5 @@ After **any** change to Go code, configs, migrations, OpenAPI, or i18n catalogs
If it fails, fix and re-run. Do not skip hooks or substitute partial checks (e.g. only `go test` on one package) unless the user explicitly asked for a scoped check. Use `make lint` alone only when debugging lint without the full test run.
Docs-only or comment-only edits with zero build/test surface may skip verification; anything that can affect compile, lint, or tests must run both targets.
After substantive changes, update the daily log per `.cursor/skills/daily-change-list/SKILL.md` (`docs/daily/{yyyy}-{mm}-{dd}-change-list.md`) before telling the user the work is complete.

View File

@ -0,0 +1,85 @@
---
name: daily-change-list
description: >-
Writes or appends a daily change log markdown under docs/daily after completing
repo edits (code, migrations, OpenAPI, i18n, configs, docs). Use when finishing
any task that modified or added files, before telling the user the work is done.
Triggers: daily changelog, change list, docs/daily, 每日变动, 变动清单.
---
# Daily change list
After **any** substantive edit or addition in this repo (skip pure Q&A with zero file changes), update the daily log **before** reporting completion to the user.
## Output path
```text
docs/daily/{yyyy}-{mm}-{dd}-change-list.md
```
| Placeholder | Meaning |
|-------------|---------|
| `{yyyy}` | 4-digit year |
| `{mm}` | 2-digit month (`01`–`12`) |
| `{dd}` | 2-digit day of month (`01`–`31`) |
Example: 2026-09-24 → `docs/daily/2026-09-24-change-list.md`.
Create `docs/daily/` if missing. **Same calendar day**: append a new session block; do not overwrite earlier entries.
## How to gather changes
1. `git status` and `git diff` (staged + unstaged) for paths touched this session.
2. Summarize **why** and **what** in plain language (modules, APIs, migrations, behavior).
3. Note verification: `make test` / `make lint` result, or `skipped` only for docs-only with no build surface.
Do not paste full diffs. List important files with one-line descriptions.
## Markdown template
**New file** (first entry of the day):
```markdown
# 每日变动 {yyyy}-{mm}-{dd}
## {HH:MM} — {one-line title}
### 概要
- …
### 变更范围
| 类型 | 说明 |
|------|------|
| 功能 / 修复 / 重构 / 文档 / 配置 | … |
### 主要文件
- `path/to/file` — …
### 验证
- `make test`: pass / fail / skipped (reason)
### 关联
- Issue / PR / 对话上下文(如有)
```
**Append** (file already exists): add another `## {HH:MM} — …` section with the same subsections under the existing `# 每日变动` header.
Use `{HH:MM}` in **UTC+8** unless the user specifies another timezone.
## Quality bar
- Chinese or English is fine; match the user’s language when obvious.
- One session block per agent completion; merge duplicate bullets if the same fix is retried.
- If the user explicitly says not to write the daily log, skip.
## Order with other gates
1. Finish code/docs edits.
2. Run `make test` when required (see `verify-before-done.mdc`).
3. Write or append this daily markdown.
4. Tell the user the task is done (mention the daily file path).

View File

@ -10,5 +10,6 @@ Before writing code:
4. HTTP and TCP share Application services under `internal/module/{biz}/logic`. Each module is `entity` / `model` (one file per table, GORM `TableName()` → `t_*`) / `logic` (one file per function, not per table). Gin handlers only bind and call those services (MVC). REST paths are `/v1/{resource}` grouped by business; admin ops use `/api/admin/…` (see skill `http.md`). Request DTOs use go-playground/validator (`label` / `errmsg` i18n keys). Context must carry `reqctx.RealIP` and the user language (`zh-CN` / `en` / `zh-TW`). Error `msg` and notification copy come from `internal/pkg/i18n`. Table and column COMMENT is required. Message `content` is serialized bytes, not a string.
5. MySQL: all tables `t_*`; migrations replay-all — details in `.cursor/skills/spark-im-v3/mysql.md`. After changing `migrations/*.sql`, run `go run ./cmd/migrate -config configs/config.yaml` yourself.
6. Before finishing any code change, run `make test` at the repo root (runs `lint` first, logic coverage ≥65%). Do not report the task as OK until it passes. `make deploy` chains through `test`.
7. After edits that touch the repo, load `.cursor/skills/daily-change-list/SKILL.md` and append `docs/daily/{yyyy}-{mm}-{dd}-change-list.md` before handoff.
Do not introduce Kafka, K8s, microservices, ConversationSeq, application-layer handshake crypto, or public gnet ports.

View File

@ -0,0 +1,46 @@
# 每日变动 2026-09-24
## 11:12 — 新增 daily-change-list Agent Skill
### 概要
- 新增项目 skill:每次完成代码/配置/文档等实质性修改后,在 `docs/daily/` 写入或追加当日变动 Markdown。
- 文件名格式:`{yyyy}-{mm}-{dd}-change-list.md`(示例:`2026-09-24-change-list.md`)。
- `AGENTS.md` 与 `verify-before-done.mdc` 已挂接该流程。
### 变更范围
| 类型 | 说明 |
|------|------|
| 文档 / 配置 | Agent skill、daily 目录说明、Agent 与 verify 规则 |
### 主要文件
- `.cursor/skills/daily-change-list/SKILL.md` — skill 定义与模板
- `docs/daily/README.md` — 目录说明
- `AGENTS.md` — 第 7 条引用 skill
- `.cursor/rules/verify-before-done.mdc` — 完成前写入 daily
### 验证
- `make test`: skipped(仅 Agent/文档,无 Go 变更)
### 关联
- 用户请求:新增每日修改变动 markdown 流程
## 11:16 — daily 文件名改为 yyyy-mm-dd
### 概要
- 每日变动文件命名由 `{yyyy}-{dd}-{mm}` 调整为 `{yyyy}-{mm}-{dd}`(年月日 ISO 顺序)。
### 主要文件
- `.cursor/skills/daily-change-list/SKILL.md`
- `docs/daily/README.md`、`AGENTS.md`、`.cursor/rules/verify-before-done.mdc`
- `docs/daily/2026-09-24-change-list.md`(自 `2026-24-09-change-list.md` 重命名并更新文内日期)
### 验证
- `make test`: skipped(文档)

7
docs/daily/README.md Normal file
View File

@ -0,0 +1,7 @@
# Daily change lists
Agent-maintained summaries of day-to-day edits.
**Filename:** `{yyyy}-{mm}-{dd}-change-list.md` (example: `2026-09-24-change-list.md`).
Workflow: `.cursor/skills/daily-change-list/SKILL.md`.