zzusp/doc-first-dev / skills/spec-multi
spec-multi
Verified| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.8 KB |
| assets/multi-spec-blank.md | markdown | 1.3 KB |
| assets/services-index-blank.md | markdown | 559 B |
| error-handling.md | markdown | 1.6 KB |
| evals/eval-01-cross-service-feature.md | markdown | 2.5 KB |
| evals/eval-02-interface-drift.md | markdown | 1.8 KB |
| evals/eval-03-partial-service-change.md | markdown | 2.2 KB |
| init.md | markdown | 1.9 KB |
| phase-a.md | markdown | 4.3 KB |
| phase-b.md | markdown | 2.6 KB |
| phase-c.md | markdown | 6.1 KB |
| phase-d.md | markdown | 2.9 KB |
| step0.md | markdown | 1.2 KB |
evals/eval-02-interface-drift.md
View on GitHub# Eval 02 — 接口漂移处理
## 场景描述
需求「用户搜索」已完成 Phase A 和 Phase B,正在 Phase D 一致性审计阶段。
需求文档"接口定义"节中 `[backend] GET /api/users` 定义的响应为:
```json
{ "code": 0, "data": { "list": [...], "total": 10 } }
```
但审计时发现,frontend 代码中实际读取的是 `response.data.users`(非 `list`),而 backend 代码返回的是 `response.data.list`。
即:backend 实现与文档一致,但 frontend 实现与文档不符。
## 预期行为
### Phase D.1
- 检查"接口定义"节中 `[backend] GET /api/users` 的调用方 frontend 代码
- 发现 `frontend/src/api/userApi.js` 中读取 `response.data.users`,与接口定义的 `list` 字段不符
- 暂停审计,展示问题:
```
发现不一致:
接口定义:[backend] GET /api/users → data.list
frontend 代码(userApi.js):读取 data.users
→ 如何处理?
A. 以文档/backend 为准(修改 frontend 代码,将 data.users 改为 data.list)
B. 以 frontend 代码为准(更新需求文档和 backend 代码,将 list 改为 users)
```
### 用户选择 A(以文档为准)
- 修改 `frontend/src/api/userApi.js`,将 `data.users` 改为 `data.list`
- 更新需求文档(接口定义节不变,调用方引用节注明已修复)
- 继续 D.2 清理
### 用户选择 B(以代码为准)
- 更新需求文档"接口定义"节:`[backend] GET /api/users` 响应字段 `list` → `users`
- 修改 `backend` 代码,将 `list` 改为 `users`
- 继续 D.2 清理
## 验证要点
- [ ] D.1 正确发现调用方代码与接口定义不符(而不是遗漏)
- [ ] 问题展示清晰:指出具体文件、具体字段,不含糊
- [ ] 两种选择均正确执行(代码修改或文档更新)
- [ ] 修复后继续 D.2,不重新跑完整的 Phase C
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |