# Codex Prompt: Phase 6.3 — 清理 Notification 自创内容（已大部分完成的收尾）

`Notification.success` status 和 legacy `type` 轴在过去某轮已经从代码中清理。本任务做**收尾清理 + 状态更新**：

1. 删除残留 dead CSS（`.notif--success` 规则）
2. 更新 `divergences.md` 将这两项从 `TODO repair (Phase 6.3)` 改为 `resolved`
3. 全仓 grep 确认无其它残留
4. 自验 + 自 commit

---

## 必读前置

1. `docs/PROJECT_GOAL.md`
2. `docs/working-principles.md` 原则 3（不创建未登记的 prop / variant / 状态）
3. `src/design-system/translation/divergences.md`（含 `## Notification.success` 和 `## Notification.type` 两节）
4. `src/components/Notification/Notification.vue`（runtime 实现）
5. `src/canonical/Notification.vue`（canonical wrapper，已干净）

---

## 任务 1：删除 runtime Notification.vue 中的 dead `.notif--success` CSS

文件：`src/components/Notification/Notification.vue`

定位：搜 `.notif--success` 应只命中 1 处，约 line 216–218（请按实际行号）：

```css
.notif--success .notif__icon {
  color: var(--brand);
}
```

操作：**整块删除**（含上下空行调整，让相邻 CSS 块仍合理空白分隔）。

理由：runtime `NotificationStatus` 类型枚举不含 `success`（已确认），运行时不可能产生 `notif--success` class，此 CSS 是历史遗留 dead code。

---

## 任务 2：grep 验证无其它残留

执行下列扫描并把输出贴到报告：

```bash
# 应仅命中已删 line（删后应为 0 命中）
grep -n "notif--success\|--success" src/components/Notification/Notification.vue

# 应为空
grep -rn "Notification.*success\|status.*success" src/canonical/Notification.vue tests/ playground/docs/pages/NotificationPage.vue 2>&1

# 应为空（legacy type axis 早已删）
grep -rn "props\.type\|type\s*:\s*'(notification|info|warning)'" src/components/Notification/Notification.vue src/canonical/Notification.vue 2>&1
```

如有任一非空命中，**STOP 报告**，列出具体位置后等用户指令，不要自行扩散修改。

---

## 任务 3：更新 `src/design-system/translation/divergences.md`

把 `## Notification.success` 节内容从：

```
- Status: TODO repair（Phase 6.3）
```

改为：

```
- Status: ✅ resolved (2026-04-28, Phase 6.3)
- Resolution: code 中已无 `success` runtime status；本轮删除残留 dead CSS `.notif--success`
```

把 `## Notification.type` 节内容从：

```
- Status: TODO repair（Phase 6.3）
```

改为：

```
- Status: ✅ resolved (2026-04-28, Phase 6.3)
- Resolution: 历史 legacy `type` 轴已不存在于 runtime 或 canonical Notification 实现；grep 验证无残留
```

不动这两节的其它字段。

---

## 任务 4：自验

```bash
pnpm test 2>&1 | tail -10
pnpm build 2>&1 | tail -8
```

**两者必须通过**——任何失败 STOP 报告，不强行通过。

---

## 任务 5：写 execution report

输出：`docs/internal/phase-6.3-execution-report.md`

格式：

```markdown
# Phase 6.3 Execution Report

跑时间：YYYY-MM-DD HH:MM:SS

## 任务 1：dead CSS 删除
- 文件：src/components/Notification/Notification.vue
- 删除内容：
  ```css
  [粘贴被删的 CSS 块]
  ```
- 行数变化：[before X 行 → after Y 行]

## 任务 2：grep 验证结果
- `notif--success`：[输出 / 空]
- canonical/tests/docs 引用：[输出 / 空]
- legacy type 轴：[输出 / 空]

## 任务 3：divergences.md 更新
- Notification.success 状态：TODO → resolved
- Notification.type 状态：TODO → resolved

## 任务 4：自验
- `pnpm test`：[passed N / N]
- `pnpm build`：[✓ Xs]

## 异常项（如有）
[空 / 描述]
```

---

## 任务 6：自己 commit + housekeeping

由你（Codex）自己 commit 本轮改动 + 顺带做 housekeeping，让新 AI session 能顺利复盘。

### 6.6.1 更新 `docs/PROJECT_GOAL.md` "当前进度" 段

在 PROJECT_GOAL.md 的"阶段路线"框（约 line 67–86）：

- 把 `✅ 6.1：翻译层批量登记（无代码改动）` 后面追加两行：
  ```
  ✅ 6.2a：Token 映射计划（38 hex → token 决策表）
  ✅ 6.2b：Token 替换执行（5 组件 hex → token + 10 新 token）—— commit b1b1e40
  ```
- 把原 `[当前位置 ↓]` 标记从 `🔴 6.2 ...` 上方移到 `🔴 6.3` 上方
- 把原 `🔴 6.2：...` 行删除（或标 ✅ 6.2，再换行 [当前位置 ↓]）
- 加一行 `🔴 6.3.5（新增）：canonical 层反向 audit（验证 src/canonical/ 无其它"自创未登记"项）` 在 6.3 之后

不要改 PROJECT_GOAL.md 其它内容。

### 6.6.2 commit message 建议

```
chore: clean up Notification.success / type residue (Phase 6.3) + housekeeping

Phase 6.3:
- Remove dead CSS .notif--success in runtime Notification.vue
  (runtime NotificationStatus enum no longer contains 'success')
- Mark Notification.success and Notification.type as resolved
  in src/design-system/translation/divergences.md
- Verified: grep no residue; pnpm test 105/105; pnpm build ✓

Housekeeping:
- Update PROJECT_GOAL.md current phase marker (6.2b done → next 6.3 / 6.3.5)
- Commit residual prompt files and roadmap proposal that were uncommitted
  (for new-session discoverability)

Phase 6.3 closes the "code-invented status / axis" line item from earlier audit.
Next: 6.3.5 (canonical 层反向 audit) → 6.4 (新增运行时能力)

Co-Authored-By: Codex
```

### 6.6.3 commit 范围（精确控制）

包含以下文件：

**6.3 实际改动**：
- `src/components/Notification/Notification.vue`（删 dead CSS）
- `src/design-system/translation/divergences.md`（两节状态更新）
- `docs/internal/phase-6.3-execution-report.md`（本轮报告）

**Housekeeping（之前未 commit 的关键文件）**：
- `docs/PROJECT_GOAL.md`（当前阶段标记更新——6.6.1 内容）
- `docs/internal/_prompts/phase-6.2b-token-replacement.prompt.md`（6.2b 历史档案）
- `docs/internal/_prompts/phase-6.3-cleanup-invented-content.prompt.md`（本 prompt）
- `docs/internal/project-goal-roadmap-proposal-2026-04-28.md`（完整路线图提案）

**不要 commit**：
- `figma-data/published/icons/manifest.json`（M）—— 仅时间戳变化，build prepare hook 副作用，按之前约定 git restore 还原

---

## 禁止

- ❌ 不动 `src/canonical/`（已确认干净，不需要改）
- ❌ 不动 `src/icons/` / `figma-data/` / `figma-sync/`
- ❌ 不动其它组件代码
- ❌ 不修 audit 脚本 / 配置
- ❌ 不主动改 `working-principles.md` / `AGENTS.md` / `PROJECT_GOAL.md`
- ❌ 如 grep 发现额外残留（任务 2），STOP 不擅自扩散
- ❌ 失败的 test/build 不强行通过
- ❌ 不要把 6.4/6.5 的内容 sneak 进来

---

## 完成后

1. 报告 + 自 commit 完成后 STOP
2. 把报告路径告诉用户
3. 等用户决定进 6.4 or 其它

完成后 STOP。
