docs: 知微↔小小莫代码协作协议(Kanban闭环)——知微发卡附diff方案,小小莫审核入库回执,根治知微修复被guard回滚白干
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
# 知微↔小小莫 代码协作协议(Kanban 闭环)
|
||||
|
||||
> 2026-08-25 老莫要求建立。背景:知微发现 price_monitor 两个 bug(reassesed_codes 未定义、market_value 漂移),发卡通知了小小莫,但知微自己改了代码被 deploy_guard 回滚两次(知微无 commit 令牌),修复差点丢失。
|
||||
|
||||
## 问题
|
||||
|
||||
知微能发现代码问题、能改代码,但**无法 commit**(pre-commit 白名单无令牌),deploy_guard 15 分钟后回滚工作区未入库改动 → 知微的修复白做。Kanban 通知通道一直在(bridge 推 XMPP),但**卡片处理没有闭环**——小小莫收到通知后没有固定的"审核→入库→回执"流程。
|
||||
|
||||
## 协作流程(唯一通道)
|
||||
|
||||
```
|
||||
知微发现代码问题
|
||||
↓
|
||||
建 Kanban 卡(assignee=xiaoxiao),body 必须含:
|
||||
① 问题描述 ② 错误证据(报错栈/日志行) ③ 修改方案(diff 或 代码段+文件+行号) ④ 影响范围
|
||||
↓ bridge 自动 DM 小小莫(xxm@yoin.fun)
|
||||
小小莫收到 [Kanban] card.assigned
|
||||
↓(kanban-handler 协议)
|
||||
读卡(POST 9580/kanban/show)→ 三叉判断:
|
||||
A 方案明确 → 小小莫修改+验证+commit(GIT_ALLOW_COMMIT)
|
||||
B 方案不清 → 评论追问,status=blocked
|
||||
C 不该我改 → 评论说明,转派
|
||||
↓
|
||||
评论回执(commit hash + 验证结果)→ status=done → DM 知微简短汇报
|
||||
```
|
||||
|
||||
## 硬性规则
|
||||
|
||||
1. **知微禁止直接改生产代码指望留存**——任何改动不入库 15 分钟就被 deploy_guard 回滚。知微的正确动作:改完验证后**立即发卡**(附 diff),小小莫审核入库
|
||||
2. **小小莫盘中紧急修复**:先改先 commit(guard 窗口 15 分钟),卡片回执可后补
|
||||
3. **重复卡合并**:同一问题多张卡,小小莫评论关联后全部标 done
|
||||
4. **回滚冲突**:deploy_guard 回滚了知微的改动 = 知微必须重新改或发卡——guard 不拦"已入库"的代码,入库即安全
|
||||
|
||||
## API 通道(kanban_api :9580)
|
||||
|
||||
```bash
|
||||
POST /kanban/show {"id": "t_xxx"} # 读卡(含评论)
|
||||
POST /kanban/comment {"id": "t_xxx", "author": "...", "body": "..."} # 评论(自动通知核心群)
|
||||
POST /kanban/update {"id": "t_xxx", "status": "done"} # 状态
|
||||
POST /kanban/list {"assignee": "xiaoxiao", "status": "ready"} # 我的待办
|
||||
POST /kanban/create {...} # 建卡
|
||||
```
|
||||
|
||||
> 注:kanban-handler skill 里"写操作暂不开放 HTTP"已过时——9580 支持 comment/update。
|
||||
|
||||
## 日志
|
||||
|
||||
- 每次卡片处理:评论里必须含 commit hash(审计留痕)
|
||||
- 协作事件进 MoFin broadcast(category=health/strategy)
|
||||
- 本文件变更走 git
|
||||
|
||||
## 今日闭环(2026-08-25 首次运行)
|
||||
|
||||
| 卡 | 问题 | 修复 | commit |
|
||||
|---|---|---|---|
|
||||
| t_62af191a / t_53226938 | reassesed_codes 未定义(919 行引用早于 937 行定义) | 定义挪位 | 855c8631 |
|
||||
| t_e10f1725 / t_15efb8a1 | market_value 不同步漂移 | price 更新后重算 market_value(小小莫代入库) | e781f7fe |
|
||||
Reference in New Issue
Block a user