LAB / TASTE GATE
品味写进门禁
一次把设计品味落到可检查规则的微实验:skills + wiki + gates/check_taste.py。
坏卡 exit 1、好卡 exit 0。fixtures 是手写样例,不是本轮 live Design Agent 出稿;候选 A 未跑。
lab-taste-gate-20261029 ASIA/HONG_KONG GATE AFTER
INSPIRATION
灵感
选自 lab pick 候选 B(2026-10-28-cn-x)。灵感来自 meng shao (@shao__meng)的 Content Studio 讨论:把品味写进 skills / wiki / code gates。
LAB PICK · CANDIDATE B
LangChain Content Studio: taste in skills/wiki/code gates。 本轮自选落地候选 B(无需安装 Claude Code)。候选 A「Claude Code 三隐形坑复现」记为 deferred,未跑。
BEFORE / AFTER
无代码门禁 vs 代码门禁
Before:没有自动化门禁,坏卡只能靠肉眼拦。
After:gates/check_taste.py 按硬规则拦截。
Before
no automated gate; fixture would ship on visual review only After · bad-card.html · exit 1
FAIL bad-card.html: banned_hex:#667eea, banned_hex:#764ba2, banned_hex:#f093fb, banned_phrase:unlock your potential, banned_phrase:cutting-edge, banned_phrase:synergize, banned_phrase:unprecedented value, banned_phrase:get started now, decorative_emoji_row, purple_gradient After · good-card.html · exit 0
PASS good-card.html RE-RUN
本地复跑
在 public/lab/taste-gate 目录执行:
python3 gates/check_taste.py fixtures/bad-card.html
python3 gates/check_taste.py fixtures/good-card.html 期望:bad exit 1,good exit 0。
FIXTURES
手写样例
下面是存进产物的 HTML。不是本轮 Design Agent 现场出稿。
bad-card.html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>AI Generated Card</title>
<style>
body { font-family: system-ui, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); margin: 0; padding: 48px; }
.card { background: white; border-radius: 24px; padding: 40px; box-shadow: 0 25px 50px rgba(0,0,0,.25); max-width: 420px; margin: 0 auto; }
h1 { background: linear-gradient(90deg, #667eea, #f093fb); -webkit-background-clip: text; color: transparent; font-size: 2.5rem; }
.cta { background: linear-gradient(90deg, #667eea, #764ba2); color: white; border: none; padding: 16px 32px; border-radius: 999px; width: 100%; font-size: 1.1rem; }
.emoji-row { font-size: 2rem; letter-spacing: 8px; }
</style>
</head>
<body>
<div class="card">
<div class="emoji-row">✨🚀💡🎯</div>
<h1>Unlock Your Potential</h1>
<p>In today's rapidly evolving digital landscape, leveraging cutting-edge AI solutions empowers teams to synergize seamlessly and unlock unprecedented value.</p>
<button class="cta">Get Started Now</button>
</div>
</body>
</html> good-card.html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>实验卡片</title>
<style>
:root { color-scheme: light; }
body { font-family: "IBM Plex Sans", "Noto Sans SC", system-ui, sans-serif; background: #f4f1ea; color: #1a1a1a; margin: 0; padding: 32px; }
.card { background: #fffdf8; border: 1px solid #d9d2c5; border-radius: 8px; padding: 24px; max-width: 420px; margin: 0 auto; }
h1 { font-size: 1.35rem; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.02em; }
p { font-size: 0.95rem; line-height: 1.55; margin: 0 0 20px; color: #3d3d3d; }
.cta { background: #1a1a1a; color: #fffdf8; border: none; padding: 10px 16px; border-radius: 6px; font-size: 0.9rem; }
</style>
</head>
<body>
<div class="card">
<h1>把品味写进门禁</h1>
<p>先定可检查的规则,再让 Agent 改稿。紫色渐变和空话 CTA 直接挡在门外。</p>
<button class="cta">查看对照</button>
</div>
</body>
</html> LIMITS
诚实边界
- fixtures 是手写样例,不是本轮 live Design Agent 出稿。
- 候选 A(Claude Code 三隐形坑)未跑(
candidate_a_deferredin run.json)。 - 门禁只检查硬规则(banned hex / phrases / emoji / purple gradient),不是完整设计评审。
ARTIFACTS
产物文件
- README.md 说明
- provenance.md 来源
- run.json run 记录
- skills/design-taste.md 品味硬规则
- wiki/taste-gate.md 契约说明
- gates/check_taste.py 代码门禁
- fixtures/bad-card.html 手写坏样例
- fixtures/good-card.html 手写好样例
- runs/before-note.txt 门禁前
- runs/after-bad.txt bad exit 1
- runs/after-good.txt good exit 0
- runs/after-bad.exit exit code 1
- runs/after-good.exit exit code 0