baodan/.agents/skills/impeccable/reference/craft-floor.md
wsb1224 e3479f0546 上线阻断问题全部修复
#	问题	修复	文件
1	前端构建失败(引号错误)	size="small type=" → size="small" type="	PosterHistoryPage.vue
2	migrate_014 ORM vs 缺失列	全部改为原始 SQL,不再引用 ORM 模型	migrate_014.py
3	cleanup 字段名错误	output_path → ppt_path	cleanup.py
4	文案生成 case 越权	添加 case.user_id != user_id 校验	poster/service.py
5	存储路径未接通持久化卷	全部改用 get_storage_root()(默认 /app/api/storage/insurance)	config.py, ppt/routes.py, poster/service.py, poster/tasks.py
高风险问题修复
#	问题	修复	文件
6	migrate_019 rollback 撤销成功字段	每个 ALTER 后立即 commit,失败只回滚当前语句	migrate_019.py
7	迁移锁 Windows 不兼容 + 句柄未持久化	全局变量保存锁句柄,支持 Windows msvcrt	api/insurance/db/__init__.py
8	PDF 校验异常时放行	异常返回 False(文件损坏)	security.py
9	健康检查始终返回成功	缺少关键资源时返回 503 + missing 列表	poster/routes.py
10	短密钥掩码泄露原值	≤4 字符返回 ****	ppt_admin_service.py
11	设置无键名白名单	添加 _ALLOWED_SETTING_KEYS 白名单	ppt_admin_service.py
12	容器重启任务永久 stuck	添加 recover_stale_tasks() 启动恢复函数	poster/tasks.py, ppt/parse_worker.py
2026-07-27 13:52:09 +08:00

3.0 KiB
Raw Permalink Blame History

Craft floor

Load this after the direction is settled, and build without announcing the checklist. A pinned brief or the committed visual world overrides anything here; your own habit does not. When the design hook is active it already enforces the mechanical checks below as you edit: act on its findings instead of re-auditing each rule.

Verify

Each of these is a check on the built result, not an intention.

  • Contrast: body and placeholder text ≥4.5:1, large text ≥3:1. On colored surfaces tint secondary text from that hue or the foreground; never gray.
  • Depth: shadows carry an offset and a soft blur. A zero-offset colored halo is decoration.
  • Spacing: tight groups, generous separation, more space above a heading than below it. Read the computed values.
  • Type: body measure 6575ch, display max 6rem, tracking floor -0.04em, balanced headings, obvious scale and weight steps. Run the real copy at every breakpoint and fix what overflows.
  • Motion: one authored moment, not scattered effects and not one identical entrance on every section. Exponential ease-out from an already-visible default. Reach past transform and opacity: blur, backdrop-filter, clip-path, mask, and shadow belong to the palette when they stay smooth.
  • States: hover, disabled, loading, error, empty. Plus real content, working controls, responsive composition, keyboard focus.
  • Copy: the product's own language. Controls name their action; errors name the problem and the recovery.
  • Coverage: every brief requirement present and findable within seconds.

Refuse

These are the category's defaults, not bans: the brief's own words can earn any of them. Reaching for one when the axis is free means you were not deciding; recognizing that means rewriting the element, not softening it.

Page scaffolds:

  • Same-size cards of icon plus heading plus text as the page structure. Cards are the lazy container; nested cards are always wrong.
  • The hero-metric template: big number, small label, supporting stats, accent.
  • A tracked uppercase eyebrow over every section. One named kicker is a system; an eyebrow everywhere is grammar you did not choose.
  • Section numbers (01 / 02 / 03) unless the sequence itself carries information the reader needs.
  • A modal for a task that needs neither interruption nor protected focus.

Surface habits:

  • Gradient text. Emphasis comes from weight or size.
  • Glass and blur as decoration rather than as a specific effect.
  • A colored border-left or border-right above 1px on cards, list items, callouts, or alerts.
  • Sparklines, progress rings, and soft-shadowed rounded rectangles standing in for content.
  • Monospace as a costume for "technical" rather than for code, data, or measurement.
  • Light or dark picked by category. Pick it from the use scene: who, where, under what ambient light.

The floor holds the mechanics; it never picks the direction. With every check green, spend the page on the committed world, and when torn between refined and committed, commit.