177 lines
8.3 KiB
Markdown
177 lines
8.3 KiB
Markdown
# 移除 A03 重复认证页实施计划
|
||
|
||
> **For agentic workers:** REQUIRED SUB-SKILL: Use `superpowers:executing-plans` to implement this plan task-by-task in the current workspace. 用户明确禁止子代理、worktree、Git 暂存、提交、推送与上传;不使用 `subagent-driven-development`。
|
||
|
||
**Goal:** 删除重复的 A03 手机验证码页,让 A02 的短信 Tab 成为唯一手机号验证码登录入口,并把最终路由合同从 59 条收敛到 58 条。
|
||
|
||
**Architecture:** `pages/auth/a02-login.vue` 已是短信登录的唯一所有者,不改动其可见效果。删除 A03 页面文件、路由声明和临时 `pageCatalog` 条目;页面清单只由 `tests/full-page-visual-contract.ps1` 管理,并在同轮改为 58 条。个人中心绑定手机号和真实微信授权均不在本轮实现。
|
||
|
||
**Tech Stack:** uni-app Vue 3、PowerShell 契约审计、Chrome DevTools 截图、Git 只读检查。
|
||
|
||
## Global Constraints
|
||
|
||
- A01、A02、G01 的可见效果已获用户验收,禁止修改。
|
||
- A02 的短信 Tab 是手机号验证码登录的唯一入口;A03 不保留重定向、兼容入口或重复表单。
|
||
- 绑定手机号以后属于个人中心安全设置;微信授权取消、失败、受限以后属于 A06。
|
||
- 不新增真实短信、微信授权、登录、注册或后端接口,不生成新视觉资产。
|
||
- 不执行 `git add`、`git commit`、`git push`、上传、reset 或 worktree 操作。
|
||
|
||
---
|
||
|
||
### Task 1: 先固化 A03 删除合同,再移除运行时入口
|
||
|
||
**Files:**
|
||
- Create: `tests/a03-route-removal-contract.ps1`
|
||
- Modify: `tests/full-page-visual-contract.ps1`
|
||
- Modify: `pages.json`
|
||
- Modify: `data/page-catalog.js`
|
||
- Delete: `pages/auth/a03-mobile-verify.vue`
|
||
|
||
**Interfaces:**
|
||
- Consumes: `pages.json` 的最终路径数组、`data/page-catalog.js` 的临时母版条目。
|
||
- Produces: 58 条最终路由;不存在 `pages/auth/a03-mobile-verify`、`a03` 目录条目或 A03 页面文件。
|
||
|
||
- [x] **Step 1: 写失败的 A03 删除合同。**
|
||
|
||
创建 `tests/a03-route-removal-contract.ps1`:
|
||
|
||
```powershell
|
||
$ErrorActionPreference = 'Stop'
|
||
$root = Split-Path -Parent $PSScriptRoot
|
||
$pages = Get-Content -LiteralPath (Join-Path $root 'pages.json') -Raw -Encoding utf8 | ConvertFrom-Json
|
||
$catalog = Get-Content -LiteralPath (Join-Path $root 'data/page-catalog.js') -Raw -Encoding utf8
|
||
$a03File = Join-Path $root 'pages/auth/a03-mobile-verify.vue'
|
||
|
||
if ($pages.pages.path -contains 'pages/auth/a03-mobile-verify') { throw 'A-03 must not remain in pages.json' }
|
||
if (Test-Path -LiteralPath $a03File) { throw 'A-03 page file must be deleted' }
|
||
if ($catalog -match '(?m)^\s*a03\s*:') { throw 'A-03 catalog entry must be deleted' }
|
||
if ($pages.pages.Count -ne 58) { throw "Expected 58 final routes, found $($pages.pages.Count)." }
|
||
|
||
Write-Output 'A03-ROUTE-REMOVAL-CONTRACT PASS'
|
||
```
|
||
|
||
在 `tests/full-page-visual-contract.ps1` 中删除 `'pages/auth/a03-mobile-verify'`,并把 `59` 改为 `58`。
|
||
|
||
- [x] **Step 2: 运行并确认红灯。**
|
||
|
||
运行:
|
||
|
||
```powershell
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a03-route-removal-contract.ps1
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/full-page-visual-contract.ps1
|
||
```
|
||
|
||
预期:前者报告 A03 仍在 `pages.json`;后者报告期望 58 条、实际 59 条。
|
||
|
||
- [x] **Step 3: 最小删除旧合同。**
|
||
|
||
从 `pages.json` 删除整个对象:
|
||
|
||
```json
|
||
{
|
||
"path": "pages/auth/a03-mobile-verify",
|
||
"style": { "navigationStyle": "custom" }
|
||
}
|
||
```
|
||
|
||
从 `data/page-catalog.js` 删除整个 `a03` 单行对象,并删除 `pages/auth/a03-mobile-verify.vue`。不修改 A01、A02、A04--A06 文件。
|
||
|
||
- [x] **Step 4: 运行绿灯合同。**
|
||
|
||
运行:
|
||
|
||
```powershell
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a03-route-removal-contract.ps1
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/full-page-visual-contract.ps1
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/compile-audit.ps1
|
||
```
|
||
|
||
预期:依次输出 `A03-ROUTE-REMOVAL-CONTRACT PASS`、`FULL-PAGE-VISUAL-CONTRACT PASS`、`PASS compile audit`。
|
||
|
||
### Task 2: 同步当前产品事实与旧任务边界
|
||
|
||
**Files:**
|
||
- Modify: `docs/规划.md`
|
||
- Modify: `docs/交接记录.md`
|
||
- Modify: `docs/design/视觉设计交接手册.md`
|
||
- Modify: `docs/design/A01_启动登录引导_设计记录.md`
|
||
- Modify: `docs/design/A02_账号登录_设计记录.md`
|
||
- Modify: `docs/superpowers/specs/2026-07-14-a02-agreement-control-design.md`
|
||
- Modify: `docs/superpowers/plans/2026-07-14-a02-agreement-control.md`
|
||
- Modify: `docs/superpowers/plans/2026-07-13-product-design-visual-refinement.md`
|
||
|
||
**Interfaces:**
|
||
- Consumes: `docs/superpowers/specs/2026-07-14-remove-a03-redundant-auth-route-design.md` 的已确认决策。
|
||
- Produces: 当前规划、交接和认证设计记录都只把 A02 视为验证码登录入口,并声明 A03 已删除、绑定手机号归个人中心、微信异常归 A06。
|
||
|
||
- [x] **Step 1: 更新当前范围和计数。**
|
||
|
||
在 `docs/规划.md` 中把最终路由数从 59 改为 58,删除 A-03 清单项,把账户模块范围改为 A01、A02、A04--A06,并把下一步改为 A04。
|
||
|
||
在 `docs/交接记录.md` 中把“下一步审视 A03”改为“下一步审视 A04”,并明确 A03 已删除、A02 短信 Tab 唯一承接验证码登录。
|
||
|
||
- [x] **Step 2: 更新认证职责说明。**
|
||
|
||
在交接手册和 A01/A02 设计记录中把“验证码/微信回跳归 A03”改为:验证码归 A02;微信授权取消、失败、受限归 A06;绑定手机号归个人中心后续独立页。A01 保持当前微信待接入提示,不新增跳转。
|
||
|
||
- [x] **Step 3: 标记旧 A03 计划已被取代。**
|
||
|
||
在列出的日期计划和规格中保留历史执行事实,但在开头加入一行:
|
||
|
||
```markdown
|
||
> 现行范围更新:A03 已于 2026-07-14 删除;验证码登录归 A02,绑定手机号归个人中心,微信异常归 A06。历史方案不再作为实现依据。
|
||
```
|
||
|
||
在 `2026-07-13-product-design-visual-refinement.md` 的认证任务中删除 A03 文件和截图要求,任务名称改为“完成认证模块 A04--A06”。
|
||
|
||
- [x] **Step 4: 文档引用审计。**
|
||
|
||
运行:
|
||
|
||
```powershell
|
||
rg -n --glob '!unpackage/**' "a03-mobile-verify|A-03.*手机验证|A03.*手机号验证码" docs pages.json data tests
|
||
```
|
||
|
||
预期:没有当前范围、运行时路径或测试合同仍把 A03 定义为手机号验证码登录;日期历史文档只有明确的“现行范围更新”说明。
|
||
|
||
### Task 3: 验证 A02 唯一入口与冻结页回归
|
||
|
||
**Files:**
|
||
- Create: `docs/design/screens/runtime/2026-07-14/A02-sms-tab-after-a03-removal-360x800.png`
|
||
- Modify: `docs/design/A02_账号登录_设计记录.md`
|
||
- Modify: `design-qa.md`
|
||
|
||
**Interfaces:**
|
||
- Consumes: `scripts/capture-chrome-page.js` 的 `sms-tab` 动作与 A02 已验收的短信 Tab。
|
||
- Produces: A02 短信 Tab 是唯一验证码登录入口的运行时证据;A01/A02 不发生可见回退。
|
||
|
||
- [x] **Step 1: 捕获并审视 A02 短信 Tab。**
|
||
|
||
运行:
|
||
|
||
```powershell
|
||
node scripts/capture-chrome-page.js "http://localhost:5173/#/pages/auth/a02-login" ".auth-page" "docs/design/screens/runtime/2026-07-14/A02-sms-tab-after-a03-removal-360x800.png" 360 800 sms-tab
|
||
```
|
||
|
||
打开保存的 PNG,接受条件:祠堂头、卷轴面板、手机号和验证码输入行、获取验证码、朱砂登录按钮均完整;不得出现 A03、CSS 通用表单卡、黑块或半渲染。
|
||
|
||
- [x] **Step 2: 记录迁移事实。**
|
||
|
||
在 A02 设计记录和 `design-qa.md` 增加本轮事实:A02 短信 Tab 是唯一入口;A03 重复页已删除;本轮截图已检查。A02 保持 `accepted`,不重新打开其视觉验收。
|
||
|
||
- [x] **Step 3: 运行最终验证。**
|
||
|
||
运行:
|
||
|
||
```powershell
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a03-route-removal-contract.ps1
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a01-a02-ui-contract.ps1
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a02-register-entry-contract.ps1
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/capture-chrome-page-contract.ps1
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/compile-audit.ps1
|
||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/full-page-visual-contract.ps1
|
||
git diff --check
|
||
```
|
||
|
||
预期:所有 PowerShell 脚本输出 PASS;`git diff --check` 没有真实空白错误。最后报告 A03 已删除、A02 截图已审视,以及 A04 是下一步待审视页面;不声明 A04--A06 已完成。
|