Files
scaffold/template/.claude/rules/communication-catalog.md
baozaotumao df48c36422 refactor: 规则中性化——剥离 PPT 业务,统一为订单示范域
把规则从原 ppt-gen 项目泛化为通用脚手架,覆盖 19 个文件:
- ddd/architecture/design-discipline/error-codes/communication-* 等:
  领域术语、错误码、消息示例、扩展点、状态流统一为「订单」示范域
- agent-dag/agent.md/agent-concurrency/agent-llm-*:DAG 节点、配置、并发、
  LLM 适配从「对话→预览→生成→截图→合成」改为「intake→process→validate→finalize」
- backend-db:Session 实体/状态机/ORM/仓储/checkpoint 对齐新流水线
- 移除幻灯片专属依赖与产物:agent 去 playwright/python-pptx,
  Dockerfile 去 Chromium 系统库,.gitignore 去 *.pptx
- 保留合法通用项:ANSI(PTY 处理)、Playwright(E2E 测试工具)、Gemini CLI(真实 provider)

验证:gemini-cli/openai-api 两变体生成退出 0,生成项目零 PPT 残留,
backend/agent 骨架均可 import 运行。
2026-06-01 23:15:05 -07:00

29 lines
963 B
Markdown

---
paths: ["backend/**", "agent/**", "frontend/**"]
---
# 消息目录(payload 形状)
> 查阅型:各消息 type 的 payload 形状,外层由信封包裹(见 `communication-protocol.md`)。字段一律 snake_case。
> 以下以「订单」为示范业务,仅占位;按项目实际定义自己的消息。
命令(Browser → Backend → Agent):
```json
{"type": "start_session", "channel": "web"}
{"type": "create_order", "items": [{"sku": "A-1", "qty": 2}]}
{"type": "submit_order", "order_id": "..."}
```
事件(Agent → Backend → Browser):
```json
{"type": "order_created", "order_id": "...", "status": "pending"}
{"type": "item_priced", "sku": "A-1", "amount": {"currency": "CNY", "value": 1990}}
{"type": "log", "message": "正在校验库存 2/3"}
{"type": "order_confirmed", "order_id": "..."}
{"type": "done"}
{"type": "error", "code": "EXTERNAL_SERVICE_TIMEOUT", "message": "..."}
```