docs(agents): 精简 AGENTS.md 为约束清单
AGENTS.md 只保留约束。项目介绍交给 README.md。设计细节交给 docs/design 与 docs/solutions。 删除架构、配置、CI、可观测性与关键文件五节。保留红线、命令、TDD、测试、文档、注释、提交信息。 CLAUDE.md 改为指向 AGENTS.md。规范只维护一份。 清理悬垂引用。指向已删章节的表格行删除。可观测性文档只同步 README 与设计文档。ISSUES-REPORT 的 D-2、D-3、D-6 标为已消解。 验证:git diff --stat 显示 9 个文件变更。
This commit is contained in:
@@ -407,7 +407,7 @@ type Mention struct {
|
||||
|
||||
// CommentStore 是评论写路径的最小存储契约。
|
||||
//
|
||||
// 抽成接口的两个理由(AGENTS.md「测试替身」一节):
|
||||
// 抽成接口的两个理由(AGENTS.md「测试」一节):
|
||||
// 1. "发布失败走本地直写"是本次修复的核心分支,必须能在没有 MySQL 的单测里断言;
|
||||
// 2. CommentWorker 只需要其中 3 个方法,接口能把它的依赖面收窄。
|
||||
type CommentStore interface {
|
||||
@@ -1420,7 +1420,6 @@ SELECT dedupe_key, COUNT(*) FROM notifications
|
||||
| `frontend/src/api/comment.ts` | 新增 `newRequestId`;`publish` 增 `requestId` 参数 |
|
||||
| `frontend/src/components/CommentDrawer.vue` | `publishComment` 用 `pendingIntent` 复用键(§6.12) |
|
||||
| `frontend/src/views/VideoDetailView.vue` | 同上(两处代码相同,抽到 composable 更好,但不在本方案范围内) |
|
||||
| `AGENTS.md` | 更新"Async Write Path"一节:写路径的幂等约定(意图键 + 唯一索引 + 占位),以及"新增异步副作用必须自带去重键"的规则 |
|
||||
| `docs/ISSUES-REPORT.md` | 标注 P0-4 已修复;按 §2.6 勘误 `:191` 的两处表述;P2-16 标注"① 已顺带修复" |
|
||||
|
||||
### 9.2 验证
|
||||
@@ -1624,5 +1623,4 @@ if deleted && evt.VideoID != 0 {
|
||||
| `backend/internal/worker/commentworker_test.go` | 新增 | `applyPublish`/`applyDelete` 幂等 |
|
||||
| `backend/internal/worker/notificationworker_test.go` | 新增 | 通知去重键 |
|
||||
| `backend/internal/video/comment_repo_integration_test.go` | 新增 | `-tags integration`:唯一索引、并发、NULL 兼容 |
|
||||
| `AGENTS.md` | 改 | 写路径幂等约定 |
|
||||
| `docs/ISSUES-REPORT.md` | 改 | P0-4 结案 + §2.6 勘误 + P2-16 ① 状态 |
|
||||
|
||||
Reference in New Issue
Block a user