视觉审核完成30%

This commit is contained in:
rain
2026-07-16 18:12:59 +08:00
parent cb25317412
commit 23cfd365a1
89 changed files with 3740 additions and 403 deletions
@@ -0,0 +1,52 @@
# A01 品牌 Logo 尺寸微调实施计划
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 将 A01 顶部品牌 Logo 精确缩小到 `184×221rpx`,其他布局保持不变。
**Architecture:** 继续使用现有 `brand-seal.png` 和绝对定位叠层,只调整页面内唯一的尺寸所有者 `.brand-seal`。静态契约负责防止尺寸回退,真实 H5 截图负责视觉判断。
**Tech Stack:** uni-app Vue、SCSS、PowerShell 契约测试、Chrome CDP 截图与运行 smoke。
## Global Constraints
- 只修改 A01 Logo 尺寸和对应契约。
- 不使用 worktree,不执行 Git 暂存、提交、推送、重置或清理。
- 不把 H5 截图写成 Android 或用户整页验收。
---
### Task 1: 锁定并实现 Logo 尺寸
**Files:**
- Modify: `tests/a01-a02-ui-contract.ps1`
- Modify: `pages/auth/a01-entry.vue`
**Interfaces:**
- Consumes: `.brand-seal` 现有样式规则和 `brand-seal.png`
- Produces: 精确的 `184×221rpx` H5 显示槽位。
- [ ] **Step 1: 写入失败契约**
在测试中解析 `.brand-seal`,要求 `width: 184rpx;``height: 221rpx;``top: 64rpx;``left: 50%;`
- [ ] **Step 2: 确认 RED**
运行:`powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a01-a02-ui-contract.ps1`
预期:因页面仍为 `220×264rpx` 而失败。
- [ ] **Step 3: 最小实现**
`.brand-seal` 的宽高改为:
```scss
width: 184rpx;
height: 221rpx;
```
- [ ] **Step 4: 验证 GREEN 与真实运行**
运行 A01 静态合同、四档运行 smoke、412×915 截图和 `git diff --check`;人工确认 Logo 无拉伸、裁切或新的层级问题。
项目禁止 Git 操作,因此本计划不包含提交步骤。
@@ -0,0 +1,197 @@
# A01 Scroll Skins V3 Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. The user forbids subagents, worktrees, commits, and all Git mutation commands, so execution stays inline in the current worktree and every commit step is intentionally omitted.
**Goal:** Replace A01's current button, Toast, and verification-panel visuals with the user-approved option-2 scroll-and-cloud family while preserving live text, exact slot ratios, interaction behavior, and old assets.
**Architecture:** Keep the approved board as the immutable visual target. Generate one clean master per surface, then use the existing Node/Pillow pipeline to remove presentation backgrounds, preserve fixed decorative caps/corners, stretch only safe centers, and emit exact versioned outputs. A01 consumes the new outputs only after manifest and pixel tests pass; H5 comparison uses the approved board plus real runtime screenshots.
**Tech Stack:** uni-app/Vue, SCSS, Node.js 24, native `node:test`, Python 3.14, Pillow 12.3.0, PowerShell contracts, Chrome CDP 9222, built-in ImageGen.
## Global Constraints
- Scope is A01 only; do not edit other page implementations.
- Preserve `STKaiti`, `KaiTi`, live button copy, WeChat icon, verification copy, interactions, and current logical slots.
- Keep all old assets; write only versioned v3 outputs.
- Do not use `scaleToFill` to hide a ratio mismatch.
- Master and output assets contain no text, icons, logo, white halo, green fringe, or presentation shadow.
- A01 remains `[~]`; H5 output is internal evidence only until Android/HBuilderX and user review.
- Do not run worktree, subagent, `git add`, `commit`, `push`, `reset`, `checkout`, upload, delete, or cleanup commands.
---
### Task 1: Preserve Exact Individual Masters
**Files:**
- Reference: `docs/design/assets/a01-vnext/A01-shared-scroll-skins-with-dialog-approved.png`
- Create: `docs/design/assets/a01-vnext/masters/a01-scroll-primary-master-v3.png`
- Create: `docs/design/assets/a01-vnext/masters/a01-scroll-secondary-master-v3.png`
- Create: `docs/design/assets/a01-vnext/masters/a01-scroll-toast-master-v3.png`
- Create: `docs/design/assets/a01-vnext/masters/a01-scroll-dialog-master-v3.png`
**Interfaces:**
- Consumes: the approved four-component board and the measured slots from the design spec.
- Produces: four committed-quality visual masters with flat chroma presentation backgrounds, no text, and quiet safe centers.
- [ ] **Step 1: Generate the four masters independently**
Use ImageGen once per master. Attach the approved board every time. Require the exact family, one isolated component, a flat `#00ff00` background for deterministic extraction, no external shadow, and these target ratios: `622:92`, `622:100`, `590:82`, `620:520`.
- [ ] **Step 2: Inspect every master**
Open all four with `view_image`. Reject any master with text, asymmetric clouds, cropped scroll rods, missing gold lines, landscape above the dialog's lower 22%, or decoration crossing the live-content safe center.
- [ ] **Step 3: Save only the approved individual masters**
Copy each generated result to the exact master path without overwriting an existing file. Keep ImageGen originals untouched.
### Task 2: Declare the V3 Machine Contract
**Files:**
- Create: `design-pipeline/manifests/a01-scroll-skins-v3.json`
- Modify: `design-pipeline/tests/manifest-v2.test.mjs`
- Modify: `design-pipeline/package.json`
**Interfaces:**
- Consumes: four master paths from Task 1.
- Produces: manifest assets `a01-scroll-primary-v3`, `a01-scroll-secondary-v3`, `a01-scroll-toast-v3`, and `a01-scroll-dialog-v3`.
- [ ] **Step 1: Write failing manifest tests**
Add assertions that the manifest declares exactly four unique outputs, exact logical/output dimensions, `uniform-only` for fixed button/dialog outputs, `nine-slice` for Toast, and A01 consumer selectors.
- [ ] **Step 2: Run RED**
Run `npm.cmd --prefix design-pipeline run test:v2`. Expected: failure because `a01-scroll-skins-v3.json` does not exist.
- [ ] **Step 3: Add the manifest and scripts**
Declare outputs:
```text
static/assets/foundation/transparent/a01-scroll-primary-v3.png 1866×276
static/assets/foundation/transparent/a01-scroll-secondary-v3.png 1866×300
static/assets/foundation/transparent/a01-scroll-toast-v3.png 1770×246
static/assets/modules/auth/transparent/a01-scroll-dialog-v3.png 1860×1560
```
Add `build:a01-scroll-skins` and `verify:a01-scroll-skins` package scripts. All paths must remain inside the workspace.
- [ ] **Step 4: Run GREEN**
Run the Node tests and manifest validator. Expected: all tests pass and `MANIFEST-V2 PASS` names the v3 manifest.
### Task 3: Build Exact Clean Outputs
**Files:**
- Create: `design-pipeline/tests/test_build_scroll_skins.py`
- Create: `design-pipeline/scripts/build_scroll_skins.py`
- Create: `design-pipeline/scripts/build-a01-scroll-skins.mjs`
- Modify: `design-pipeline/scripts/asset_quality.py`
**Interfaces:**
- Produces: `remove_chroma_background(image, key, tolerance)`, `stretch_safe_center(image, output_size, insets)`, and `build_manifest(manifest, workspace)`.
- [ ] **Step 1: Write failing synthetic tests**
Tests must prove that chroma pixels become transparent black, decorative caps/corners remain pixel-identical after resizing, only the declared center stretches, exact output dimensions are returned, and a dialog with `alpha.required=false` remains opaque.
- [ ] **Step 2: Run RED**
Run the Python unittest discovery command. Expected: import failure for `build_scroll_skins`.
- [ ] **Step 3: Implement minimal Pillow processing**
Use RGBA conversion, chroma-distance Alpha removal, bounding-box trim, manifest insets, Pillow LANCZOS only for target-height normalization, center-only stretching, transparent-black cleanup, sRGB chunk writing, and optimized PNG output.
- [ ] **Step 4: Run GREEN and build actual assets**
Run Python tests, `npm.cmd --prefix design-pipeline run build:a01-scroll-skins`, and the quality verifier. Expected for every asset: exact dimensions, zero visible chroma residue, zero light fringe, zero transparent RGB, and no manifest errors.
- [ ] **Step 5: Inspect all four outputs**
Use `view_image`; reject seams, cropped rods, distorted clouds, weak gold contrast, center-knot drift, or dialog landscape entering the content region.
### Task 4: Integrate A01 Test-First
**Files:**
- Modify: `tests/a01-a02-ui-contract.ps1`
- Modify: `tests/a01-asset-alpha-audit.ps1`
- Modify: `tests/a01-responsive-runtime-smoke.js`
- Modify: `pages/auth/a01-entry.vue`
**Interfaces:**
- Consumes: four verified v3 outputs.
- Produces: A01 using v3 visuals without changing behavior or live content.
- [ ] **Step 1: Extend contracts before page changes**
Require the four v3 paths, exact sizes, no old A01 button/Toast/dialog references in A01, no `scaleToFill` on these skins, and the approved runtime selectors.
- [ ] **Step 2: Run RED**
Run both PowerShell contracts. Expected: failure because A01 still uses v2 buttons and the old dialog/code-native Toast.
- [ ] **Step 3: Make the minimal A01 change**
Replace only the decorative skin layers. Preserve copy, icon, state, click handlers, normal-flow layout, overlay positioning, and slot dimensions. Use `aspectFit` for exact button/dialog assets; use the Toast v3 asset through its declared adaptive rendering strategy.
- [ ] **Step 4: Run GREEN**
Run the PowerShell contracts and Python quality audit. Expected: pass.
### Task 5: Real Runtime and Visual Comparison
**Files:**
- Modify: `scripts/capture-chrome-page.js`
- Create ignored evidence under: `tmp/a01-scroll-skins-v3-*.png`
- Modify: `design-qa.md`
**Interfaces:**
- Produces: password, Toast, and verification-dialog runtime evidence at `412×915`, plus four-viewport structural verification.
- [ ] **Step 1: Add deterministic capture states**
The capture tool must support `password-tab`, `invalid-login`, and `verification-dialog` without arbitrary click timing. Runtime smoke must assert all four v3 assets load at expected natural dimensions.
- [ ] **Step 2: Run four viewports**
Run `node tests/a01-responsive-runtime-smoke.js`. Expected: pass at `320×568`, `360×640`, `360×800`, and `412×915`, with natural scrolling at 320×568 and no horizontal overflow.
- [ ] **Step 3: Capture and compare**
Capture the three meaningful A01 states. Compare the approved visual board and runtime evidence together. Fix P0/P1/P2 mismatches; do not loop on P3 polish.
- [ ] **Step 4: Update QA truthfully**
Record the exact source and runtime images in `design-qa.md`. The result may say H5 passed only; Android and user acceptance remain pending.
### Task 6: Documentation and Final Verification
**Files:**
- Modify: `docs/design/设计资产生产流水线规范.md`
- Modify: `docs/design/P00_页面结构与资产清单.md`
- Modify: `docs/交接记录.md`
- [ ] **Step 1: Record implemented facts**
Document the selected visual source, four v3 outputs, build/verify commands, A01-only scope, preserved old assets, and remaining Android/user gates.
- [ ] **Step 2: Run the focused verification set**
```powershell
npm.cmd --prefix design-pipeline run test:v2
npm.cmd --prefix design-pipeline run build:a01-scroll-skins
npm.cmd --prefix design-pipeline run verify:a01-scroll-skins
design-pipeline/.venv/Scripts/python.exe -m unittest discover -s design-pipeline/tests -p "test_*.py" -v
powershell -NoProfile -ExecutionPolicy Bypass -File tests/a01-a02-ui-contract.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File tests/a01-asset-alpha-audit.ps1
node tests/a01-responsive-runtime-smoke.js
git diff --check
```
Expected: all focused checks pass; `git diff --check` has no whitespace error. CRLF notices alone are not failures.
- [ ] **Step 3: Report remaining gates**
State explicitly: H5 internal evidence completed or blocked, Android/HBuilderX pending, user page acceptance pending, A01 remains `[~]`, no Git mutation commands executed.
@@ -0,0 +1,117 @@
# A04 同步 A01 新视觉体系实施计划
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 将 A04 页面内旧认证视觉全部替换为 A01 已审核的新体系,并移除非最终的自定义滑动验证面板。
**Architecture:** A04 继续独立拥有注册字段和校验逻辑,只复用 A01 已生产的位图资产与全局字体合同。主按钮按固定比例等比显示,Toast 使用同一张可切片资产;真实滑动验证由后续接口组件负责,当前有效提交只显示待接入反馈。
**Tech Stack:** uni-app Vue 3、SCSS、PowerShell 静态契约、Chrome CDP 运行 smoke。
## Global Constraints
- A04 Logo 必须为 `184×221rpx``top: 64rpx`、水平居中。
- 禁止 A04 引用 `a01-primary-button.png``a01-secondary-button.png``a02-login-panel.png` 或局部 `STSong/SimSun`
- 注册主按钮使用 `a01-scroll-primary-v3.png``aspectFit`Toast 使用 `a01-scroll-toast-v3.png``border-image`
- 协议图标、返回箭头、宗祠底板保留。
- 不使用 worktree,不执行 Git 暂存、提交、推送、重置或清理。
- 不修改 A01 或其他页面,不对接接口,不把 H5 写成 Android 或用户整页验收。
---
### Task 1: 用契约锁定 A04 新视觉和验证边界
**Files:**
- Modify: `tests/a04-registration-contract.ps1`
- Modify: `tests/a04-registration-runtime-smoke.js`
**Interfaces:**
- Consumes: A04 当前页面结构与 A01 v3 资产路径。
- Produces: 旧资产禁止、Logo 精确尺寸、Toast 切片和有效提交反馈的回归合同。
- [ ] **Step 1: 写入失败静态契约**
要求 A04 包含 `a01-vnext-divider-v1.png``a01-scroll-primary-v3.png``a01-scroll-toast-v3.png``width: 184rpx;``height: 221rpx;``border-image-slice:` 和“滑动验证待接口接入”;禁止三个旧资产、`verificationVisible``verification-layer``feedback-toast__skin``font-family:`
- [ ] **Step 2: 更新运行 smoke 的期望**
有效表单提交后等待 `.feedback-toast`,断言文案为“滑动验证待接口接入”,并断言页面不存在 `.verification-layer`;四档尺寸改为 `320×568``360×640``360×800``412×915`
- [ ] **Step 3: 运行测试确认 RED**
运行:
```powershell
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a04-registration-contract.ps1
```
预期:因 A04 仍引用旧主按钮和旧验证面板而失败。
---
### Task 2: 最小迁移 A04 页面
**Files:**
- Modify: `pages/auth/a04-register.vue`
**Interfaces:**
- Consumes: `a01-vnext-divider-v1.png``a01-scroll-primary-v3.png``a01-scroll-toast-v3.png` 与全局字体。
- Produces: A04 新默认态、错误态、协议态和滑动验证待接入反馈。
- [ ] **Step 1: 替换模板资产**
将标题分隔和主按钮改为新资产与 `aspectFit`,删除验证弹层模板及 Toast 内部拉伸图片。
- [ ] **Step 2: 收敛脚本状态**
删除 `verificationVisible``closeVerification``confirmVerification`;有效提交改为:
```js
showFeedback('滑动验证待接口接入')
```
- [ ] **Step 3: 同步样式**
`.brand-seal` 改为 `184×221rpx`;移除所有局部 `font-family`;主按钮保持现有点击槽但等比承载 v3 皮肤;Toast 使用:
```scss
border: 16rpx solid transparent;
border-width: 16rpx 74rpx;
border-image-source: url('/static/assets/foundation/transparent/a01-scroll-toast-v3.png');
border-image-slice: 58 280 fill;
border-image-width: 16rpx 74rpx;
border-image-repeat: stretch;
```
- [ ] **Step 4: 运行静态合同确认 GREEN**
运行静态合同,预期输出 `A04-REGISTRATION-CONTRACT PASS`
---
### Task 3: 真实运行验证与浏览器交付
**Files:**
- Modify: `design-qa.md`
**Interfaces:**
- Consumes: A04 已迁移页面与 CDP 调试页。
- Produces: 四档响应式结果和浏览器中的 A04 默认态。
- [ ] **Step 1: 运行 A04 smoke**
运行 `node tests/a04-registration-runtime-smoke.js`,预期输出 `A04-REGISTRATION-RUNTIME-SMOKE PASS`
- [ ] **Step 2: 捕获并检查 412×915**
运行 `capture-chrome-page.js` 捕获 A04 默认态,人工检查 Logo、标题、字段、按钮、协议和底部留白。
- [ ] **Step 3: 更新 QA 边界**
`design-qa.md` 的 A04 段记录新资产和真实滑动验证延期;不得写成用户已验收。
- [ ] **Step 4: 最终聚焦验证**
重新运行静态合同、运行 smoke、截图合同和 `git diff --check`;将浏览器停在 A04 默认态供用户审核。
项目禁止 Git 操作,因此本计划不包含提交步骤。
@@ -0,0 +1,167 @@
# A05 向 A01 视觉体系收拢实施计划
> **For agentic workers:** REQUIRED SUB-SKILL: Use `superpowers:executing-plans` inline. 本任务集中修改同一 A05 页面,不派发子代理;项目禁止 worktree、Git 暂存、提交和推送。
**Goal:** 让 A05 的 Logo、字体、标题分隔、按钮、Toast 和成功结果容器统一使用 A01 已确定的新视觉资产,同时保留四字段重设流程。
**Architecture:** `pages/auth/a05-reset-password.vue` 继续独立拥有表单和本地状态。页面直接消费 A01 正式资产;静态 PowerShell 合同负责禁止旧资产回退,Chrome CDP 烟测负责验证交互与多尺寸运行态。
**Tech Stack:** uni-app、Vue 3 `<script setup>`、SCSS、PowerShell、Node.js、Chrome CDP。
## Global Constraints
- 只修改 A05、A05 聚焦测试、A05 QA/验收记录和必要计划文档。
- 不接接口;真实滑动验证使用后续组件自带样式,本轮只显示待接入 Toast。
- 不使用原生 UniApp Toast、Modal、Loading、ActionSheet。
- 320×568 允许自然纵向滚动;同时复核 360×640、360×800、412×915。
- A05 保持 `[~]`H5 证据不等于 Android/HBuilderX 或完整用户验收。
---
### Task 1: 收紧 A05 静态视觉合同
**Files:**
- Modify: `tests/a05-reset-password-contract.ps1`
- Test: `tests/a05-reset-password-contract.ps1`
**Interfaces:**
- Consumes: `pages/auth/a05-reset-password.vue` UTF-8 源码。
- Produces: 新资产必需项、旧资产禁用项、Logo/字体/九宫格渲染约束。
- [x] **Step 1: 写失败合同**
要求以下源码片段存在:
```powershell
'a01-vnext-divider-v1.png'
'a01-scroll-primary-v3.png'
'a01-scroll-toast-v3.png'
'a01-scroll-dialog-v3.png'
'width: 184rpx;'
'height: 221rpx;'
"border-image-source: url('/static/assets/foundation/transparent/a01-scroll-toast-v3.png');"
'border-image-slice: 58 280 fill;'
```
禁止以下旧路径和结构:
```powershell
'a01-primary-button.png'
'a01-secondary-button.png'
'a02-login-panel.png'
'auth-divider-knot.png'
'feedback-toast__skin'
'verificationVisible'
'verification-layer'
'font-family:'
```
- [x] **Step 2: 运行合同并确认 RED**
Run: `powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a05-reset-password-contract.ps1`
Expected: FAIL,首个失败原因是 A05 尚未引用新标题分隔或新按钮资产。
---
### Task 2: 最小迁移 A05 页面
**Files:**
- Modify: `pages/auth/a05-reset-password.vue`
- Test: `tests/a05-reset-password-contract.ps1`
**Interfaces:**
- Consumes: A01 的 `brand-seal.png``a01-vnext-divider-v1.png``a01-scroll-primary-v3.png``a01-scroll-toast-v3.png``a01-scroll-dialog-v3.png`
- Produces: 原选择器和表单 API 保持可用;获取验证码入口改为待接入 Toast。
- [x] **Step 1: 替换模板资产**
```vue
<image class="reset-divider" src="/static/assets/modules/auth/transparent/a01-vnext-divider-v1.png" mode="aspectFit" />
<image class="reset-submit__skin" src="/static/assets/foundation/transparent/a01-scroll-primary-v3.png" mode="aspectFit" />
<image class="success-dialog__skin" src="/static/assets/modules/auth/transparent/a01-scroll-dialog-v3.png" mode="aspectFit" />
<image class="success-action__skin" src="/static/assets/foundation/transparent/a01-scroll-primary-v3.png" mode="aspectFit" />
```
删除旧验证层和 Toast 图片子层;Toast 只保留真实文字节点。
- [x] **Step 2: 收敛行为验证占位**
```js
const prepareGetCode = () => {
if (!/^1\d{10}$/.test(phone.value)) {
fieldErrors.value.phone = '请输入正确手机号'
return
}
fieldErrors.value.phone = ''
showFeedback('滑动验证待接口接入')
}
```
删除 `verificationVisible``closeVerification``confirmVerification`,不伪造验证码已发送。
- [x] **Step 3: 对齐样式**
Logo 改为 `184×221rpx`;删除全部局部 `font-family`;按钮图片使用 `aspectFit`;Toast 复制 A04 已验证的九宫格 `border-image` 参数;成功卷轴按现有遮罩居中,不改变返回登录逻辑。
- [x] **Step 4: 运行合同并确认 GREEN**
Run: `powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a05-reset-password-contract.ps1`
Expected: `A05-RESET-PASSWORD-CONTRACT PASS`
---
### Task 3: 更新运行烟测并完成 RED/GREEN
**Files:**
- Modify: `tests/a05-reset-password-runtime-smoke.js`
- Test: `tests/a05-reset-password-runtime-smoke.js`
**Interfaces:**
- Consumes: Chrome `9222` 调试端口与 `http://localhost:5173` H5 页面。
- Produces: 默认态、手机号错误、待接入 Toast、全字段错误、密码不一致和成功结果证据。
- [x] **Step 1: 将旧验证层断言改为新 Toast 断言**
点击“获取验证码”后等待 `.feedback-toast`,断言文字为“滑动验证待接口接入”;同时断言不存在 `.verification-layer`,表单值未清空。
- [x] **Step 2: 运行烟测**
Run: `node tests/a05-reset-password-runtime-smoke.js http://localhost:5173`
Expected: `A05-RESET-PASSWORD-RUNTIME-SMOKE PASS`
---
### Task 4: 真实截图、文档和最终验证
**Files:**
- Modify: `design-qa.md`
- Modify: `docs/验收规划.md`
- Modify: `docs/交接记录.md`
- Modify: `docs/design/P00_页面结构与资产清单.md`
- Update ignored evidence: `tmp/a05-*.png`
**Interfaces:**
- Consumes: 实际 H5 运行页与静态/运行测试输出。
- Produces: A05 待审核候选证据,不产生正式验收或冻结结论。
- [x] **Step 1: 捕获四档视口并审视**
用 Chrome CDP 捕获 320×568、360×640、360×800、412×915,检查 Logo、标题、四字段、验证码入口、按钮边缘、Toast、成功卷轴、滚动和横向溢出。
- [x] **Step 2: 更新 A05 记录**
只记录新视觉迁移与内部 H5 证据;A05 仍为 `[~]`,真实滑动验证、接口结果和 Android/HBuilderX 仍待审核。
- [x] **Step 3: 运行最终验证**
```powershell
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a05-reset-password-contract.ps1
node tests/a05-reset-password-runtime-smoke.js http://localhost:5173
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/capture-chrome-page-contract.ps1
git diff --check
```
Expected: 三项测试 PASS`git diff --check` 退出码 0,允许已有 CRLF 提示。
@@ -0,0 +1,17 @@
# A06 向 A01 视觉体系收拢实施计划
> 当前会话内联执行;不使用子代理、worktree 或任何 Git 暂存、提交、推送操作。
**Goal:** 在不改变 A06 三种阻断状态逻辑的前提下,统一 Logo、字体、标题分隔、按钮和恢复说明层。
**Architecture:** `pages/auth/a06-auth-status.vue``statusConfig` 继续作为状态合同唯一所有者;只替换展示层资产与尺寸。PowerShell 合同禁止旧视觉回退,Chrome CDP 验证多状态和四档尺寸。
**Tech Stack:** uni-app、Vue 3、SCSS、PowerShell、Node.js、Chrome CDP。
## Tasks
- [x]`tests/a06-auth-status-contract.ps1` 要求 `a01-vnext-divider-v1.png`、两次 `a01-scroll-primary-v3.png``a01-scroll-dialog-v3.png``184×221rpx``aspectFit`;禁止旧三项资产与 `font-family:`,运行得到 RED。
- [x]`pages/auth/a06-auth-status.vue` 最小替换资产和样式,保持 `statusConfig`、查询参数、恢复层与导航逻辑不变,运行合同得到 GREEN。
- [x]`tests/a06-auth-status-runtime-smoke.js` 尺寸补齐为 320×568、360×640、360×800、412×915,运行三状态、未知回落、弹层与返回 A01 烟测。
- [x] 捕获并检查 412×915 风险默认态和恢复说明层,以及 320×568 短屏;更新 `design-qa.md`、验收规划、交接记录和资产清单。
- [x] 运行 A06/A05/A04/A01 聚焦合同、A06 运行烟测、截图合同、状态统计和 `git diff --check`A06 保持 `[~]`
@@ -0,0 +1,16 @@
# A06 路由封存实施计划
> 用户于 2026-07-16 选择从正式路由移除 A06,但保留页面源码、测试、视觉证据与文档。禁止删除文件、worktree 和任何 Git 写操作。
**Goal:** 将 A06 从当前基础版本路由和验收队列中封存,使正式路由从 53 条变为 52 条,同时保留可恢复实现。
**Contract owner:** `pages.json` 是当前可发布路由的唯一所有者;`docs/交接记录.md` 记录 A06 封存原因、保留路径与恢复条件。
## Tasks
- [x] 先修改路由合同:A06 源码必须存在,但 `pages.json` 不得注册 A06A01/A02/A03/full-page 合同统一期待 52 条,运行得到 RED。
- [x]`pages.json` 删除 A06 单一路由项,不移动或删除 `pages/auth/a06-auth-status.vue`、A06 测试和证据,运行静态合同得到 GREEN。
- [x] 让 A06 runtime smoke 在路由封存时明确输出 SKIP 并成功退出;恢复路由后仍执行原多状态烟测。
- [x] 从 52 页活动验收表移出 A06,后续序号减一;新增“封存页面”记录,不计入 `[~]/[x]/[!]` 统计。
- [x] 更新交接记录、视觉手册、P00、证据索引和 Design QA:A06 保留用途为未来阻断登录流程,恢复条件为产品重新启用并补真实入口/接口/Android 复核。
- [x] 验证 52 条路由、52 个 `[~]`、0 `[x]`、0 `[!]`、A06 源码/测试/证据存在、活动路由不存在 A06,并运行相关合同及 `git diff --check`
@@ -0,0 +1,284 @@
# Design Asset Pipeline v2 Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Subagents and worktrees are prohibited for this project.
**Goal:** Upgrade the existing Node/Sharp A01 pipeline with a strict manifest v2, a portable Python/Pillow pixel-quality gate, and two clean, exact-ratio A01 button v2 assets verified in the real uni-app page.
**Architecture:** Keep `design-pipeline/` as the single orchestration root. Node validates the manifest, checks consumers and runtime slots, and invokes Python; Pillow deterministically rebuilds versioned assets from committed masters and analyzes Alpha/edge contamination. A new pilot manifest is added beside schema v1 so the current reproducible pipeline is not broken before the pilot passes.
**Tech Stack:** Node.js 24 / native `node:test`, Sharp 0.34.5, Python 3.14, Pillow 12.3.0, PowerShell contracts, Chrome CDP 9222, uni-app/HBuilderX.
**Execution record (2026-07-16):** All six implementation tasks were executed in the current worktree. The importable Python module is `rebuild_a01_buttons.py` and the Node entry is `rebuild-a01-buttons.mjs`. The focused automated gates and four H5 viewports passed; Android/HBuilderX, a second-computer rebuild, and user acceptance remain outstanding. Existing handoff evidence was not overwritten; the latest internal 412×915 check stays under ignored `tmp/`.
## Global Constraints
- Do not use a worktree, subagent, `git add`, `git commit`, `git push`, `git reset`, `git checkout`, upload, or destructive cleanup.
- Preserve the current A01 and documentation changes already in the dirty worktree.
- Do not overwrite or delete `a01-primary-button.png` or `a01-secondary-button.png`; v2 outputs use new paths.
- Do not promote the pipeline beyond A01 in this implementation.
- A01 stays `[~]`; H5 evidence is internal only and Android/user verification remains outstanding.
- Fixed assets must match the actual logical slots: primary `622×92rpx`, secondary `622×100rpx`.
- Produce 3× files: primary `1866×276px`, secondary `1866×300px`.
- Button text and the WeChat icon remain code/UI nodes and must not be baked into the bitmaps.
- Every production-code task follows RED → GREEN and ends with a focused diff/status checkpoint instead of a commit.
---
### Task 1: Strict Manifest v2 Validator
**Files:**
- Create: `design-pipeline/manifests/a01-buttons-v2.json`
- Create: `design-pipeline/scripts/manifest-v2.mjs`
- Create: `design-pipeline/scripts/validate-manifest-v2.mjs`
- Create: `design-pipeline/tests/manifest-v2.test.mjs`
- Modify: `design-pipeline/package.json`
**Interfaces:**
- Consumes: a JSON file path supplied on the command line.
- Produces: `loadAndValidateManifest(filePath): Promise<ManifestV2>` and CLI output `MANIFEST-V2 PASS <path>`.
- [ ] **Step 1: Write failing Node tests**
Use `node:test` to assert that a valid fixture returns schema version 2 and that validators reject duplicate IDs, path escape, ratio mismatch over 0.5%, `uniform-only` with `scaleToFill`, unknown asset classes, and missing consumers.
```js
import test from 'node:test'
import assert from 'node:assert/strict'
import { validateManifest } from '../scripts/manifest-v2.mjs'
test('rejects a fixed bitmap whose output ratio differs from its slot', () => {
const manifest = validManifest()
manifest.assets[0].outputPixels.height = 300
assert.throws(() => validateManifest(manifest, workspace), /ratio/i)
})
```
- [ ] **Step 2: Run RED**
Run: `node --test design-pipeline/tests/manifest-v2.test.mjs`
Expected: FAIL because `manifest-v2.mjs` does not exist.
- [ ] **Step 3: Implement the minimal strict validator**
Validate these exact properties: `schemaVersion`, `page`, unique `assets[].id`, `assetClass`, workspace-safe `source/output`, `logicalSlot`, `outputPixels`, `render.scalePolicy`, `render.uniMode`, `alpha`, `edge`, `quality.maxBytes`, and non-empty `consumers`. Reject unknown top-level asset classes and calculate ratio drift as:
```js
const slotRatio = widthRpx / heightRpx
const outputRatio = width / height
const ratioDrift = Math.abs(outputRatio / slotRatio - 1)
if (ratioDrift > 0.005) throw new Error('asset ratio drift exceeds 0.5%')
```
- [ ] **Step 4: Add pilot manifest and package scripts**
Add scripts:
```json
{
"test:v2": "node --test tests/manifest-v2.test.mjs",
"validate:a01-buttons": "node scripts/validate-manifest-v2.mjs manifests/a01-buttons-v2.json"
}
```
The manifest declares the two old committed masters as `source`, versioned v2 outputs, exact slot/output dimensions, `uniform-only`, transparent outer padding, no chroma residue, sRGB, and the A01 consumer selectors `.login-submit` / `.wechat-login`.
- [ ] **Step 5: Run GREEN and checkpoint**
Run:
```powershell
npm.cmd ci --prefix design-pipeline
npm.cmd --prefix design-pipeline run test:v2
npm.cmd --prefix design-pipeline run validate:a01-buttons
git diff --check
git status --short
```
Expected: Node tests and manifest validation pass; only scoped files plus pre-existing changes appear.
### Task 2: Portable Python Pixel Quality Gate
**Files:**
- Create: `design-pipeline/requirements.txt`
- Create: `design-pipeline/scripts/asset_quality.py`
- Create: `design-pipeline/tests/test_asset_quality.py`
- Create: `design-pipeline/scripts/verify-assets.py`
**Interfaces:**
- Consumes: manifest v2 and its output PNG files.
- Produces: `analyze_asset(path: Path, spec: dict) -> dict`, non-zero CLI exit on violations, and `ASSET-QUALITY PASS <id>` per asset.
- [ ] **Step 1: Pin the supported dependency**
Create:
```text
Pillow==12.3.0
```
Pillow 12.3.0 supports Python 3.10+ including 3.14; do not add OpenCV unless a failing test proves Pillow is insufficient.
- [ ] **Step 2: Write failing Python unit tests with synthetic PNGs**
Use `unittest` and temporary images to cover exact dimensions, RGBA requirement, transparent corners, transparent outer padding, green residue, light fringe on partially transparent edge pixels, sRGB metadata warning/reporting, and maximum bytes.
```python
def test_rejects_visible_green_residue(self):
image = Image.new("RGBA", (32, 16), (0, 0, 0, 0))
image.putpixel((16, 8), (0, 255, 0, 255))
report = analyze_asset(self.save(image), self.spec())
self.assertIn("chroma residue", " ".join(report["errors"]))
```
- [ ] **Step 3: Run RED**
Run outside the sandbox if required:
```powershell
python -m venv design-pipeline/.venv
design-pipeline/.venv/Scripts/python.exe -m pip install -r design-pipeline/requirements.txt
design-pipeline/.venv/Scripts/python.exe -m unittest discover -s design-pipeline/tests -p 'test_*.py' -v
```
Expected: FAIL because `asset_quality.py` does not exist.
- [ ] **Step 4: Implement the minimal analyzer**
Implement row-wise Pillow analysis without OpenCV. Count chroma residue only where Alpha is visible. Evaluate light fringe only on pixels with `0 < alpha < 255`, so the intentionally warm-white secondary-button interior is not rejected. Require the declared transparent outer padding and exact dimensions.
- [ ] **Step 5: Implement manifest CLI and run GREEN**
`verify-assets.py` imports the analyzer, reads the manifest, validates each existing output, writes an ignored JSON report under `design-pipeline/generated/a01-buttons-v2/quality-report.json`, and exits non-zero on any error.
Run unit tests and `git diff --check`; expected unit-test PASS. Output verification remains RED until Task 3 creates v2 assets.
### Task 3: Deterministic A01 Button Rebuilder
**Files:**
- Create: `design-pipeline/scripts/rebuild-a01-buttons.py`
- Create: `design-pipeline/scripts/rebuild-a01-buttons.mjs`
- Create: `design-pipeline/tests/test_rebuild_a01_buttons.py`
- Modify: `design-pipeline/package.json`
**Interfaces:**
- Consumes: the two committed v1 master PNGs plus manifest v2.
- Produces: versioned v2 PNGs at exactly `1866×276` and `1866×300`, with transparent outer padding and no baked text/icons.
- [ ] **Step 1: Write failing reconstruction tests**
Generate synthetic framed masters with deliberately contaminated outer rows. Assert that `rebuild_button(source, output_size, trim, padding, cap_width)` removes the contaminated border, keeps transparent corners/padding, preserves left/right caps, and returns exact output size.
- [ ] **Step 2: Run RED**
Run the Python unittest command. Expected: FAIL because the rebuilder module does not exist.
- [ ] **Step 3: Implement nine-slice-like offline rebuilding**
Use Pillow only:
1. Crop the manifest-declared contaminated outer trim.
2. Split into left cap, stretchable center, and right cap.
3. Resize caps uniformly to the inner target height.
4. Resize only the center horizontally to fill the remaining width.
5. Paste onto an RGBA target with the declared transparent padding.
6. Save optimized sRGB PNG.
This is offline raster production, not runtime nine-slice; the page receives a complete exact-ratio bitmap.
- [ ] **Step 4: Add a Node orchestration script**
Add `rebuild:a01-buttons` to `package.json`, calling a small Node launcher that selects `PYTHON` or `python`, validates the manifest, runs the Python rebuilder, then runs `verify-assets.py`. A non-zero Python exit must propagate.
- [ ] **Step 5: Build actual v2 assets and run GREEN**
Run the rebuild command with Python available outside the sandbox if required. Inspect both output images with `view_image`, then run Python unit tests and output verification. Expected: exact sizes, transparent outer padding, no detected fringe/chroma residue.
### Task 4: A01 Asset Contract and Page Integration
**Files:**
- Modify: `tests/a01-a02-ui-contract.ps1`
- Modify: `tests/a01-asset-alpha-audit.ps1`
- Modify: `pages/auth/a01-entry.vue`
**Interfaces:**
- Consumes: v2 button paths and manifest render policy.
- Produces: A01 references v2 skins with no text/icon baked in and no ratio distortion.
- [ ] **Step 1: Extend the PowerShell contracts first**
Require v2 asset references, forbid the two v1 paths in A01, require `mode="aspectFit"` on both button skins, and verify exact v2 pixel sizes/Alpha corners. Keep v1 files present because other pages may still consume them.
- [ ] **Step 2: Run RED**
Run both A01 contracts. Expected: FAIL because A01 still references v1 assets with `scaleToFill`.
- [ ] **Step 3: Make the minimal page change**
Change only the two `button-skin` sources and their `mode`; do not change button copy, WeChat icon, click behavior, layout heights, or unrelated A01 styles.
- [ ] **Step 4: Run GREEN**
Run the A01 contracts and `git diff --check`. Expected: PASS.
### Task 5: Runtime Slot and Visual Verification
**Files:**
- Create: `design-pipeline/scripts/verify-runtime-slots.mjs`
- Create: `design-pipeline/tests/runtime-slot-contract.test.mjs`
- Modify: `design-pipeline/package.json`
**Interfaces:**
- Consumes: manifest v2 runtime URL, selectors, Chrome port 9222.
- Produces: `RUNTIME-ASSET-SLOTS PASS` after checking loaded sources, slot dimensions, ratio, overflow, and four viewports.
- [ ] **Step 1: Write failing Node tests for pure slot comparison**
Extract `compareSlot(actual, expected, tolerance)` and test exact match, tolerance, and mismatch. Run RED before implementation.
- [ ] **Step 2: Implement the CDP verifier**
Use the same native WebSocket request pattern as `scripts/capture-chrome-page.js`. Navigate without the existing reload race, wait for both images to load, and inspect 320×568, 360×640, 360×800, and 412×915. Assert no horizontal overflow and natural scroll at 320×568.
- [ ] **Step 3: Run Node tests and real runtime verification**
Keep HBuilderX H5 and the dedicated Chrome 9222 page running. Expected: pure tests PASS and `RUNTIME-ASSET-SLOTS PASS`.
- [ ] **Step 4: Capture one representative screenshot**
Overwrite the existing ignored A01 412×915 runtime representative instead of generating multiple similar images. Open it with `view_image` and inspect both button edges, corners, line sharpness, text/icon separation, and page layout.
### Task 6: Portable Handoff and Final Verification
**Files:**
- Modify: `docs/design/设计资产生产流水线规范.md`
- Modify: `docs/交接记录.md`
- Modify: `docs/design/P00_页面结构与资产清单.md`
**Interfaces:**
- Consumes: actual commands, paths, reports, and observed verification results.
- Produces: another Windows computer can restore Node/Python dependencies and repeat the verified static pipeline.
- [ ] **Step 1: Update documentation with facts only**
Replace “target contract” wording only for components actually implemented. Record Pillow 12.3.0, Python 3.10+ support, environment commands, manifest path, script names, v2 asset dimensions, and remaining Android/user-validation gap.
- [ ] **Step 2: Run the complete focused verification set**
Run:
```powershell
npm.cmd --prefix design-pipeline run test:v2
npm.cmd --prefix design-pipeline run validate:a01-buttons
npm.cmd --prefix design-pipeline run rebuild:a01-buttons
design-pipeline/.venv/Scripts/python.exe -m unittest discover -s design-pipeline/tests -p 'test_*.py' -v
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a01-a02-ui-contract.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a01-asset-alpha-audit.ps1
npm.cmd --prefix design-pipeline run verify:a01-buttons:runtime
git diff --check
git status --short
```
- [ ] **Step 3: Report exact verification layers**
Report static pipeline, Python tests, H5 runtime and screenshot evidence separately. Do not claim Android or user acceptance. Do not commit, stage, push, upload, delete v1 assets, or promote the pipeline to other pages.
@@ -0,0 +1,34 @@
# G01 Application Card Spacing Implementation Plan
> **For agentic workers:** 本计划在当前会话内执行;用户禁止 worktree、多代理及任何 Git 写操作。
**Goal:** 让 G01“加入申请”组三张独立卷轴卡片之间保持 `12rpx` 间距。
**Architecture:** 保留现有模板和资产,仅使用相邻兄弟选择器为第二张及后续申请卡增加上间距。静态合同锁定精确值,运行烟测与真实截图确认页面未溢出且视觉接缝消失。
**Tech Stack:** Vue 3、uni-app、SCSS、PowerShell 静态合同、Chrome CDP 截图。
## Global Constraints
- 只修改 G01 当前审核区域。
- 不新增或替换资产。
- 不执行 Git 暂存、提交、推送、重置或检出。
- H5 截图只是当前视觉审核证据,Android/HBuilderX 仍待复核。
---
### Task 1: 锁定并实现申请卡间距
**Files:**
- Modify: `tests/g01-visual-contract.ps1`
- Modify: `pages/genealogy/g01-my-genealogies.vue`
**Interfaces:**
- Consumes: 现有 `.application-record` 相邻兄弟结构。
- Produces: `.application-record + .application-record { margin-top: 12rpx; }`
- [x]`tests/g01-visual-contract.ps1` 增加精确间距断言。
- [x] 运行合同,确认因缺少 `12rpx` 间距而失败。
- [x] 在 G01 样式中加入相邻兄弟选择器,不调整其他样式。
- [x] 重新运行 G01 静态合同与运行烟测并确认通过。
- [x] 捕获并检查 412×915 默认状态,确认三张申请卡之间有小间隔且没有横向溢出。
@@ -0,0 +1,53 @@
# G01 List Background Assets Implementation Plan
> **For agentic workers:** 当前会话内执行;禁止 worktree、多代理和任何 Git 写操作。
**Goal:** 保存三个 G01 背景母版,并建立可在另一台电脑确定性重建候选输出的 Python+Node 流水线。
**Architecture:** ImageGen 输出作为受控母版;候选清单是生成提示、源路径和处理模式的唯一所有者。Python 进行像素处理,Node 校验路径并编排,生成结果只进入可再生的忽略目录。
**Tech Stack:** Node.js 22+、Python 3、Pillow 12.3.0、JSON、PNG。
## Global Constraints
- 不修改 G01 页面滚动结构或运行资产引用。
- 不覆盖现有 `footer-mountain-bamboo.png`
- 不把候选写入 handoff 截图目录。
- 不执行 Git 暂存、提交、推送、重置或检出。
---
### Task 1: 候选母版与机器清单
**Files:**
- Create: `design-pipeline/manifests/g01-background-candidates.json`
- Create: `design-pipeline/tests/g01-background-candidates.test.mjs`
- [ ] 先写清单合同测试并确认缺少清单时失败。
- [ ] 写入三个母版、完整提示、源尺寸、处理模式和输出路径。
- [ ] 运行 Node 测试并确认清单通过。
### Task 2: 确定性像素构建
**Files:**
- Create: `design-pipeline/scripts/build_g01_backgrounds.py`
- Create: `design-pipeline/scripts/build-g01-backgrounds.mjs`
- Create: `design-pipeline/tests/test_build_g01_backgrounds.py`
- Modify: `design-pipeline/package.json`
- [ ] 先写纯绿、抗锯齿绿边和不透明母版测试并确认失败。
- [ ] 实现绿幕转 Alpha、去绿污染、透明 RGB 清零和不透明母版标准化。
- [ ] 添加 Node 编排入口和 npm 命令。
- [ ] 运行 Python/Node 测试与实际候选构建。
### Task 3: 交接与清理审计
**Files:**
- Modify: `docs/design/设计资产生产流水线规范.md`
- Modify: `docs/design/P00_页面结构与资产清单.md`
- Modify: `docs/交接记录.md`
- Create: `docs/design/G01_列表背景候选与换机重建.md`
- [ ] 记录三母版、构建命令、依赖、不可逐像素重新生成的边界和页面滚动待讨论事项。
- [ ] 扫描截图、候选和未跟踪文件的文档引用,生成精确清理清单。
- [ ] 不删除历史 handoff 证据;任何含糊项留给用户确认。