@xulthekl/team-flow 0.53.0 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/always/phase-guard.md +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/marketplace.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/.github/plugin/marketplace.json +2 -2
- package/CHANGELOG.md +133 -0
- package/GEMINI.md +1 -1
- package/INSTALL.md +1 -1
- package/README.md +1 -1
- package/agents/prototype-builder.md +6 -5
- package/agents/prototype-env-scout.md +7 -7
- package/agents/release-archivist.md +1 -0
- package/dist/parsing/requirement-blocks.d.ts +26 -0
- package/dist/parsing/requirement-blocks.js +33 -5
- package/dist/validation/validator.js +8 -1
- package/docs/README_en.md +1 -1
- package/gemini-extension.json +1 -1
- package/hooks/session-start +19 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/plugin.json +2 -2
- package/scripts/check-project-config.mjs +84 -0
- package/scripts/design-system-clone.mjs +150 -0
- package/scripts/design-system-import.mjs +326 -0
- package/scripts/gen-primer.mjs +195 -0
- package/scripts/guard/checks/tasks-complete.mjs +9 -4
- package/scripts/guard/design-token-guard.mjs +317 -77
- package/scripts/infer-workflow.mjs +10 -1
- package/scripts/lib/arch-merge.mjs +20 -6
- package/scripts/lib/arch-parse.mjs +5 -11
- package/scripts/lib/ds-inputs.mjs +125 -0
- package/scripts/lib/ds-parse.mjs +236 -0
- package/scripts/lib/execution-recommendation.mjs +10 -1
- package/scripts/lib/glaf4-delegation.mjs +14 -3
- package/scripts/lib/hash.mjs +18 -2
- package/scripts/lib/md-normalize.mjs +108 -0
- package/scripts/lib/prototype-sync.mjs +19 -1
- package/scripts/lib/sdd-overlay.mjs +15 -3
- package/scripts/lib/solutions-promote.mjs +11 -4
- package/scripts/lib/spec-merge.mjs +46 -11
- package/scripts/lib/state-loader.mjs +4 -1
- package/scripts/token-extract.mjs +349 -0
- package/skills/design-system/SKILL.md +78 -9
- package/skills/design-system/references/agents/design-system-architect.md +67 -17
- package/skills/design-system/references/creation-flow.md +56 -5
- package/skills/design-system/references/creation-modes.md +171 -0
- package/skills/design-system/references/showcase-board-b-end.md +92 -0
- package/skills/design-system/references/showcase-board-c-end.md +115 -0
- package/skills/design-system/references/token-derivation.md +34 -9
- package/skills/design-system/references/variant-schema.md +35 -4
- package/skills/prototype/SKILL.md +18 -8
- package/skills/prototype/references/builder-methodology.md +72 -8
- package/skills/prototype/references/craft/anti-ai-slop.md +1 -1
- package/skills/prototype/references/craft/state-coverage.md +8 -2
- package/skills/prototype/references/layouts.md +10 -0
- package/skills/prototype/references/orchestration-flow.md +20 -3
- package/skills/prototype/references/prototype-scaffold/assets/design-tokens.css +2 -2
- package/skills/prototype/references/template.html +10 -10
- package/skills/release-archivist/SKILL.md +10 -3
- package/skills/release-archivist/references/closing-procedures.md +10 -0
- package/skills/workflow-bootstrap/SKILL.md +24 -2
- package/src/parsing/requirement-blocks.ts +34 -5
- package/src/validation/validator.ts +8 -1
- package/templates/design-systems/references/claude.md +315 -0
- package/templates/design-systems/references/linear-app.md +370 -0
- package/templates/design-systems/references/notion.md +312 -0
- package/templates/design-systems/references/posthog.md +259 -0
- package/templates/design-systems/references/sentry.md +265 -0
- package/templates/design-systems/references/stripe.md +325 -0
- package/templates/design-systems/references/supabase.md +258 -0
- package/templates/design-systems/references/vercel.md +313 -0
- package/templates/design-systems/registry.json +75 -0
- package/templates/design-systems/styles.json +576 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- 种子模板(v0.18.0):builder 从此模板组合,不从零写 CSS。token 由 design-system
|
|
1
|
+
<!-- 种子模板(v0.18.0):builder 从此模板组合,不从零写 CSS。token 由 .team-flow/design-system/ 渲染覆盖。 -->
|
|
2
2
|
<!-- 零外部依赖、可离线:CSS 进 <style>、JS 进 <script>,无 CDN / 外部字体 / 外部脚本。 -->
|
|
3
3
|
<!doctype html>
|
|
4
4
|
<html lang="zh-CN" data-theme="light" data-density="comfortable">
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
<title>team-flow prototype · seed template</title>
|
|
9
9
|
<style>
|
|
10
10
|
/* ============================================================
|
|
11
|
-
TOKENS — 由 design-system
|
|
11
|
+
TOKENS — 由 .team-flow/design-system/ 渲染覆盖,禁止在此硬编码新值。
|
|
12
12
|
占位默认值为「中性陶土」基调(非 indigo),保证模板离线可渲染。
|
|
13
13
|
============================================================ */
|
|
14
14
|
:root{
|
|
15
|
-
/* ——
|
|
16
|
-
--color-primary: #c96442; /* 由 design-system
|
|
17
|
-
--color-neutral-900: #1a1916; /* 由 design-system
|
|
15
|
+
/* —— 品牌/中性色(.team-flow/design-system/ 覆盖位)—— */
|
|
16
|
+
--color-primary: #c96442; /* 由 .team-flow/design-system/ 渲染覆盖 */
|
|
17
|
+
--color-neutral-900: #1a1916; /* 由 .team-flow/design-system/ 渲染覆盖 */
|
|
18
18
|
|
|
19
19
|
/* —— 单一 accent:每屏 ≤2 处 —— */
|
|
20
|
-
--accent: #c96442; /* 由 design-system
|
|
20
|
+
--accent: #c96442; /* 由 .team-flow/design-system/ 渲染覆盖(terracotta 中性暖色占位) */
|
|
21
21
|
--accent-hover: color-mix(in oklab, var(--accent), black 8%);
|
|
22
22
|
--accent-active: color-mix(in oklab, var(--accent), black 14%);
|
|
23
23
|
--accent-soft: color-mix(in oklab, var(--accent), transparent 86%);
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
--border: #e8e5df;
|
|
33
33
|
|
|
34
34
|
/* —— 字体(系统栈,零外部字体)—— */
|
|
35
|
-
--font-display: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 design-system
|
|
36
|
-
--font-body: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 design-system
|
|
35
|
+
--font-display: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 .team-flow/design-system/ 渲染覆盖 */
|
|
36
|
+
--font-body: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 .team-flow/design-system/ 渲染覆盖 */
|
|
37
37
|
--font-mono: ui-monospace, 'JetBrains Mono', monospace;
|
|
38
38
|
|
|
39
39
|
/* —— 字号阶梯(type scale)—— */
|
|
@@ -369,7 +369,7 @@ code{ font-family: var(--font-mono); font-size: 0.9em; }
|
|
|
369
369
|
<div class="container hero-center">
|
|
370
370
|
<p class="eyebrow">team-flow · seed template</p>
|
|
371
371
|
<h1>从种子模板组合页面,不从零写 CSS</h1>
|
|
372
|
-
<p class="lead">所有 section 直接落入 main,token 由 design-system
|
|
372
|
+
<p class="lead">所有 section 直接落入 main,token 由 .team-flow/design-system/ 渲染覆盖,零外部依赖、可离线。</p>
|
|
373
373
|
<div class="hero-cta">
|
|
374
374
|
<a class="btn btn-primary" href="#content">主操作</a>
|
|
375
375
|
<a class="btn btn-secondary" href="#content">次要操作</a>
|
|
@@ -383,7 +383,7 @@ code{ font-family: var(--font-mono); font-size: 0.9em; }
|
|
|
383
383
|
<footer class="pagefoot" data-testid="P-00-pagefoot">
|
|
384
384
|
<div class="container row-between">
|
|
385
385
|
<span>© team-flow prototype</span>
|
|
386
|
-
<span class="meta">由 seed template (v0.18.0) 组合 · token 由 design-system
|
|
386
|
+
<span class="meta">由 seed template (v0.18.0) 组合 · token 由 .team-flow/design-system/ 渲染</span>
|
|
387
387
|
</div>
|
|
388
388
|
</footer>
|
|
389
389
|
|
|
@@ -157,6 +157,7 @@ If implementation diverged from the contract, return to `bridging` before closur
|
|
|
157
157
|
③ tf prototype-sync <change-dir>
|
|
158
158
|
④ tf test-merge <change-dir>
|
|
159
159
|
⑤ tf solutions promote(compound promotion)
|
|
160
|
+
⑥ 设计系统待办检查(v0.54.0) ← 只读检查 + 报告,不执行 iterate
|
|
160
161
|
```
|
|
161
162
|
|
|
162
163
|
(各步详细说明见下方对应节标题的 ①–⑤ 编号。)
|
|
@@ -165,7 +166,7 @@ If implementation diverged from the contract, return to `bridging` before closur
|
|
|
165
166
|
>
|
|
166
167
|
> **为何 ① 必须在 ② 之前**(v0.53.0 变更,务必遵守):`executing→closing` 现挂 **`arch-merged` 门禁维度**——转换时校验全局台账已含本 change 增量。**未回写则转换被拒**。完整论证(含与 `arch-snapshot` 的无数据依赖关系)见 `references/closing-procedures.md`。
|
|
167
168
|
|
|
168
|
-
**架构快照门禁(arch-snapshot,v0.36.0 / v0.36.3)**:本轮迭代产品级架构快照 `iterations/vN/architecture.md` 必须已落盘("先快照后回写"强制化)。**FAIL 升级路径**:回 orchestrator 的 ARCH 阶段补快照;存量升级在途 change(快照缺失但 change 有增量产物)→ WARN 兜底放行;`arch_baseline` 缺失 → WARN 不阻断。hotfix/tweak
|
|
169
|
+
**架构快照门禁(arch-snapshot,v0.36.0 / v0.36.3)**:本轮迭代产品级架构快照 `iterations/vN/architecture.md` 必须已落盘("先快照后回写"强制化)。**FAIL 升级路径**:回 orchestrator 的 ARCH 阶段补快照;存量升级在途 change(快照缺失但 change 有增量产物)→ WARN 兜底放行;`arch_baseline` 缺失 → WARN 不阻断。hotfix/tweak 豁免(不挂该维度)。判定逻辑见插件内 `scripts/guard/checks/arch-gate-exemptions.mjs`(引用,非调用)。
|
|
169
170
|
|
|
170
171
|
### ① Architecture Merge (v0.10 §28-§31) — MUST run first
|
|
171
172
|
|
|
@@ -230,12 +231,18 @@ Promote change-level learnings to the global solutions library:
|
|
|
230
231
|
tf solutions promote <change-dir>
|
|
231
232
|
```
|
|
232
233
|
|
|
233
|
-
读取 change 根目录的 `learnings.md`(v0.49.0 §83.3.5 路径统一)——`severity ≥ medium` 且 `type = pitfall|pattern` 者晋升全局 `docs/solutions/`;命中既有条目则标记 confirmed pattern 并升级 severity。severity 序 `critical > high > medium > low`
|
|
234
|
+
读取 change 根目录的 `learnings.md`(v0.49.0 §83.3.5 路径统一)——`severity ≥ medium` 且 `type = pitfall|pattern` 者晋升全局 `docs/solutions/`;命中既有条目则标记 confirmed pattern 并升级 severity。severity 序 `critical > high > medium > low` 定义在插件内 `scripts/lib/severity.mjs`(引用,非调用)(v0.23 §91,单一来源)。
|
|
234
235
|
|
|
235
236
|
**Compound Capture Check(v0.5)**:closing 前自检本 change 是否产生了可沉淀的经验(强制回退 / 复发根因 / 范围外扩 / 契约漂移);有则写入 change 根的 `learnings.md`,每条 `## <title>` 带 frontmatter(`phase`/`domain`/`type`/`severity`/`date`)。该文件正是 `compound-captured` guard 检查、`tf solutions promote` 读取的对象。
|
|
236
237
|
|
|
237
238
|
> **本节的展开版(条目质量要求、`tf solutions capture` 与 `learnings.md` 的分工、Prototype Sync / Worktree Deisolation / Code Landing 全流程)见 `references/closing-procedures.md`**——该处为超集,本节不再重复(v0.53.0 §115.10:同名节曾两处各自维护,属根因 Ⅲ 的同一类漂移)。
|
|
238
239
|
|
|
240
|
+
### ⑥ 设计系统待办检查(v0.54.0)— 只读检查 + 报告
|
|
241
|
+
|
|
242
|
+
检查 `.team-flow/design-system/pending.md` 非空时,在 closing summary 的 `design_system_pending` 中报告条目数并标注 `needs user confirmation`(报告触发条件与细节见 `references/closing-procedures.md`)。
|
|
243
|
+
|
|
244
|
+
**只读,不执行 iterate**(由 design-system skill 在用户确认后触发);**单写者约束**:写入/移除一律由 design-system skill 执行。快速 closing 时 pending.md 保留不动。
|
|
245
|
+
|
|
239
246
|
### 阶段产物同步门禁点(v0.37.0 §68.2 G5)
|
|
240
247
|
|
|
241
248
|
回写链(顺序见 `### ⚠ 执行顺序` 的 ①–⑤)**全部完成后**,**阻塞确认**(AskUserQuestion)是否同步 change 实施结果(团队协作:落地结果是团队最需要看的内容):
|
|
@@ -278,7 +285,7 @@ Verify files exist and are non-empty, run `node --check` on code files, skip 5-s
|
|
|
278
285
|
|
|
279
286
|
**回写链前置判据(v0.22 §87)**:先按下表判断适用性,**不适用则不执行命令**(v0.22 实测:逐项跑完才知道不适用,占 release-archivist 80% 耗时)。本表 4 行判据**仅在 Lightweight Closure 适用**;其中 arch-merge 与 test-merge 两行的 "Skip silently" 见 `### ① Architecture Merge` 与 `### ④ Test Merge` 两节各自的正文句。
|
|
280
287
|
|
|
281
|
-
> **v0.53.0 修正**:此处原用行号引用(`(:164 正文句)`/`(:196 正文句)`),本次改动插入段落使其失效。**行号引用在密集改动期必然漂移,已改为按标题引用**——同轮 `docs/architecture-api-db-design-enhancement-v0.25.md` 亦把 45 处行号引用全量改为符号引用。
|
|
288
|
+
> **v0.53.0 修正**:此处原用行号引用(`(:164 正文句)`/`(:196 正文句)`),本次改动插入段落使其失效。**行号引用在密集改动期必然漂移,已改为按标题引用**——同轮 `team-flow-workspace/docs/architecture-api-db-design-enhancement-v0.25.md` 亦把 45 处行号引用全量改为符号引用。
|
|
282
289
|
|
|
283
290
|
| 回写项 | 前置判据 | 不满足时登记 |
|
|
284
291
|
|---|---|---|
|
|
@@ -96,3 +96,13 @@ If an `e2e/` suite exists for the change:
|
|
|
96
96
|
## Lightweight Closure (hotfix/tweak)
|
|
97
97
|
|
|
98
98
|
Verify files exist and are non-empty, run `node --check` on code files, skip 5-step verification. Still record DP-6 and DP-7.
|
|
99
|
+
|
|
100
|
+
## ⑥ 设计系统待办检查(v0.54.0)
|
|
101
|
+
|
|
102
|
+
`Post-Verification` 顺序的 ⑥(只读检查 + 报告,不执行 iterate)。检查 `.team-flow/design-system/pending.md`(原型阶段"暂不处理"的设计系统增量暂存):
|
|
103
|
+
|
|
104
|
+
1. **非空时**:读取未处理条目(格式 `{描述} | 来源: <change-id 或 s2-prototype> | 时间: <ISO>`),在 closing summary 的 `design_system_pending` 字段列出并标注 `needs user confirmation`
|
|
105
|
+
- **报告触发条件(防仪式膨胀)**:仅当「本 change 产生过 `ds_increment`(来源标注含本 change-id)」**或**「pending.md 非空且本次会话未询问过」时显式列出并建议确认;其余情况仅记录条目数
|
|
106
|
+
2. **不执行 iterate**——iterate 由 design-system skill 在用户确认后另行触发;主代理提示二选一:closing 等待执行 / 保留 pending 待下次绘制处理
|
|
107
|
+
3. **快速 closing(无交互路径)**:pending.md **保留不动**(不丢失,下次生效)
|
|
108
|
+
4. **单写者约束**:本步**只读**——写入/移除一律由 design-system skill 的 iterate 流程执行(避免多 change 并发读改写导致丢失更新)
|
|
@@ -12,7 +12,7 @@ description: 既有项目接入初始化器。在首次使用 team-flow 时执
|
|
|
12
12
|
```
|
|
13
13
|
workflow-bootstrap(一次性,手动触发)
|
|
14
14
|
→ B1 代码库侦察 → B1.5 conventions → B2 架构基线 → B3 领域词汇 → B4 目录初始化
|
|
15
|
-
→ B4.5 CLAUDE.md 初始化 → B5 路径判断
|
|
15
|
+
→ B4.5 CLAUDE.md 初始化 → B4.6 Design System 起点选择 → B5 路径判断
|
|
16
16
|
→ 进入 workflow-orchestrator S1(注入 baseline 上下文)
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -218,6 +218,28 @@ Step 2: 确定性提取(兜底)
|
|
|
218
218
|
|
|
219
219
|
**不做的事**:不写 SOP 流程(由 skill 负责)、不写变更级状态机(由 workflow skill 负责)、不列可自动发现的文件清单。
|
|
220
220
|
|
|
221
|
+
### B4.6: Design System 起点选择(advisory,v0.54.0 新增;v0.55.0 扩为六项)
|
|
222
|
+
|
|
223
|
+
> 编号说明:B4.5 已被占用(CLAUDE.md 初始化),本步骤为 B4.6。
|
|
224
|
+
|
|
225
|
+
`.team-flow/design-system/` 不存在时,AskUserQuestion 呈现**起点六选一 + 跳过**(**不阻断**,延续 advisory 约定):
|
|
226
|
+
|
|
227
|
+
> 「检测到项目尚无设计系统。选择起点方式:[移植已有设计系统 | 从模板库选择 | 通用起点(Ant Design 规格) | 从文档规范导入 | 从代码逆向建库 | 从零创建 | 跳过]」
|
|
228
|
+
|
|
229
|
+
**六项全部展示,每项带适用场景一句话**——能力存在但用户不知道 = 能力不存在(v0.55.0 D-23);按**资产就绪度降序**排列(从最厚的已有资产到最薄的空白起点):
|
|
230
|
+
|
|
231
|
+
| # | 起点 | 适用场景(对用户的一句话) | 委托给 design-system 时的参数 |
|
|
232
|
+
|---|------|---------------------------|------------------------------|
|
|
233
|
+
| 1 | **移植已有设计系统** | "你们公司**另一个后台项目**已经建过设计系统 → 直接复制过来改" | `clone --from <源路径>` |
|
|
234
|
+
| 2 | **从模板库选择** | "想参考某个成熟产品(Linear / Stripe / Vercel…)的视觉风格" | 起点=模板库(呈现 `${CLAUDE_PLUGIN_ROOT}/templates/design-systems/registry.json` 的 8 个参考) |
|
|
235
|
+
| 3 | **通用起点(Ant Design 规格)** | "全新项目、**没有任何规范**,先要一套像 Ant Design 的合规底座" | `--profile antd`(零 LLM) |
|
|
236
|
+
| 4 | **从文档规范导入** | "手里有**一套写好的 UI 规范**(Markdown / 规范树)" | `create-from-docs` |
|
|
237
|
+
| 5 | **从代码逆向建库** | "项目里**已有符合规范的原型代码**" | `create-from-code` |
|
|
238
|
+
| 6 | **从零创建** | "什么都没有,边聊边定" | 交互式 6 步 |
|
|
239
|
+
|
|
240
|
+
- **本步骤不直接调转换器**:六项**全部委托 `/team-flow:design-system`**,且必须**续跑 Step 5 评审 → Step 6 落盘**(含 primer 生成 + guard 校验)——转换器只产 base.md,缺少 primer 会让后续 prototype Step 0 对 `contract: v1` 系统直接 blocked(v0.54.0 P4 实证死路)
|
|
241
|
+
- **跳过** → 继续 B5;**已存在** → 跳过
|
|
242
|
+
|
|
221
243
|
### B5: Path Decision(路径判断,v0.42.0 重构:降级路径设计)
|
|
222
244
|
|
|
223
245
|
询问用户。**分组展示**——用户先决定"要不要把地基打牢"(第一组),再决定"打完地基做什么"(第二组):
|
|
@@ -258,7 +280,7 @@ Step 2: 确定性提取(兜底)
|
|
|
258
280
|
## Output Standard
|
|
259
281
|
|
|
260
282
|
每次交互结束时说明:
|
|
261
|
-
1. 已完成的阶段(B1-B1.5-B2-B3-B4-B4.5-B5)
|
|
283
|
+
1. 已完成的阶段(B1-B1.5-B2-B3-B4-B4.5-B4.6-B5)
|
|
262
284
|
2. 已产出的制品(baseline.md / conventions / ARCHITECTURE.md / PHYSICAL-MODEL.md / schema-baseline.sql / API-INDEX.md / INDEX.md / CONCEPTS.md / CLAUDE.md / cross-check-report.md(如执行 B)/ 目录结构)
|
|
263
285
|
3. 下一步建议(调用哪个 skill)
|
|
264
286
|
|
|
@@ -12,11 +12,40 @@ export interface RequirementsSectionParts {
|
|
|
12
12
|
after: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* 行内强调剥离 + 去反引号(v0.55.0 §8.4.3 横展;与 `scripts/lib/md-normalize.mjs` 同约定)。
|
|
17
|
+
*
|
|
18
|
+
* **根因**:解析层对最常见的 Markdown 强调语法脆弱且**失败静默**——手写
|
|
19
|
+
* `### **Requirement**: X` 或 `` ### `Requirement`: X `` 会让需求块整块漏解析,
|
|
20
|
+
* 而这条路径在 `tf sync`(→ `spec-merge` → 本模块)上是**活路径**,且
|
|
21
|
+
* `guard/checks/specs-merged` 会在 delta spec 存在时硬阻断 `executing → closing`。
|
|
22
|
+
* JS 侧已修(`md-normalize.mjs`),本函数是 TS 侧的对应实现(D-16「全修」)。
|
|
23
|
+
*
|
|
24
|
+
* **只剥双符号对**(`**` / `__`):单 `*` 可能是列表符、单 `_` 可能是 snake_case
|
|
25
|
+
* 标识符——剥它们是"改语义"而非"容格式"。
|
|
26
|
+
*/
|
|
27
|
+
export function stripInlineEmphasis(text: string): string {
|
|
28
|
+
return text.replace(/`/g, '').replace(/\*\*(.+?)\*\*/g, '$1').replace(/__(.+?)__/g, '$1');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** 归一化需求名:剥行内强调/反引号(名称本身被包裹时)+ trim。 */
|
|
15
32
|
export function normalizeRequirementName(name: string): string {
|
|
16
|
-
return name.trim();
|
|
33
|
+
return stripInlineEmphasis(name).trim();
|
|
17
34
|
}
|
|
18
35
|
|
|
19
|
-
|
|
36
|
+
/**
|
|
37
|
+
* 需求块标题:`### Requirement: <name>`。
|
|
38
|
+
*
|
|
39
|
+
* v0.55.0 容忍:`Requirement` 键被加粗/反引号包裹(`**Requirement**` /
|
|
40
|
+
* `` `Requirement` `` / `` **`Requirement`** ``——**两种符号可任意交错、任意顺序**,
|
|
41
|
+
* 故用字符类而非固定序列)、全角冒号、冒号前后空格。
|
|
42
|
+
* 名称内的标记由 {@link normalizeRequirementName} 归一。
|
|
43
|
+
*
|
|
44
|
+
* 注:单 `*` 包裹(`*Requirement*`)也在容错内——键名两侧的星号无论一个两个
|
|
45
|
+
* 都是强调写法,剥它不改变语义。**需求名内部**的单符号才是语义边界,
|
|
46
|
+
* 由 `stripInlineEmphasis` 只剥成对双符号来保证。
|
|
47
|
+
*/
|
|
48
|
+
export const REQUIREMENT_HEADER_REGEX = /^###\s*[`*]{0,4}\s*Requirement\s*[`*]{0,4}\s*[::]\s*(.+?)\s*$/i;
|
|
20
49
|
|
|
21
50
|
function normalizeLineEndings(content: string): string {
|
|
22
51
|
return content.replace(/\r\n?/g, '\n');
|
|
@@ -183,7 +212,7 @@ function parseRemovedNames(sectionBody: string): string[] {
|
|
|
183
212
|
names.push(normalizeRequirementName(m[1]));
|
|
184
213
|
continue;
|
|
185
214
|
}
|
|
186
|
-
const bullet = line.match(/^\s*-\s*`?###\s*Requirement
|
|
215
|
+
const bullet = line.match(/^\s*-\s*`?###\s*[`*]{0,4}\s*Requirement\s*[`*]{0,4}\s*[::]\s*(.+?)\s*$/i);
|
|
187
216
|
if (bullet) {
|
|
188
217
|
names.push(normalizeRequirementName(bullet[1]));
|
|
189
218
|
}
|
|
@@ -200,10 +229,10 @@ function parseRenamedPairs(
|
|
|
200
229
|
let current: { from?: string; to?: string } = {};
|
|
201
230
|
for (const line of lines) {
|
|
202
231
|
const fromMatch = line.match(
|
|
203
|
-
/^\s*-?\s*FROM
|
|
232
|
+
/^\s*-?\s*FROM\s*[::]\s*`?###\s*[`*]{0,4}\s*Requirement\s*[`*]{0,4}\s*[::]\s*(.+?)\s*$/i
|
|
204
233
|
);
|
|
205
234
|
const toMatch = line.match(
|
|
206
|
-
/^\s*-?\s*TO
|
|
235
|
+
/^\s*-?\s*TO\s*[::]\s*`?###\s*[`*]{0,4}\s*Requirement\s*[`*]{0,4}\s*[::]\s*(.+?)\s*$/i
|
|
207
236
|
);
|
|
208
237
|
if (fromMatch) {
|
|
209
238
|
current.from = normalizeRequirementName(fromMatch[1]);
|
|
@@ -16,7 +16,14 @@ import {
|
|
|
16
16
|
extractRequirementsSection,
|
|
17
17
|
} from '../parsing/requirement-blocks.js';
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
// v0.55.0 §8.4.3(D-16「全修」横展):本文件原有第二份 `REQUIREMENT_HEADER_REGEX`
|
|
20
|
+
// 定义(`/^###\s*Requirement:\s*(.+)\s*$/i`)——**定义后从未使用**(本文件的需求头
|
|
21
|
+
// 解析全部经 `parseDeltaSpec` / `extractRequirementsSection` 走解析层),属"同一契约
|
|
22
|
+
// 两处定义"的维护陷阱:改解析层正则时无人知道这里还有一份。已删除,需求头正则的
|
|
23
|
+
// 唯一真相源是 `parsing/requirement-blocks.ts`。
|
|
24
|
+
//
|
|
25
|
+
// ⚠️ 不要再在本文件内定义需求头/场景头以外格式约定的正则——场景头(下方)是
|
|
26
|
+
// 本文件唯一自有的格式契约,其余一律从解析层引入。
|
|
20
27
|
const SCENARIO_HEADER_REGEX = /^####\s+Scenario:/i;
|
|
21
28
|
|
|
22
29
|
function normalizeLineEndings(content: string): string {
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
# Design System Inspired by Claude (Anthropic)
|
|
2
|
+
|
|
3
|
+
> Category: AI & LLM
|
|
4
|
+
> Anthropic's AI assistant. Warm terracotta accent, clean editorial layout.
|
|
5
|
+
|
|
6
|
+
## 1. Visual Theme & Atmosphere
|
|
7
|
+
|
|
8
|
+
Claude's interface is a literary salon reimagined as a product page — warm, unhurried, and quietly intellectual. The entire experience is built on a parchment-toned canvas (`#f5f4ed`) that deliberately evokes the feeling of high-quality paper rather than a digital surface. Where most AI product pages lean into cold, futuristic aesthetics, Claude's design radiates human warmth, as if the AI itself has good taste in interior design.
|
|
9
|
+
|
|
10
|
+
The signature move is the custom Anthropic Serif typeface — a medium-weight serif with generous proportions that gives every headline the gravitas of a book title. Combined with organic, hand-drawn-feeling illustrations in terracotta (`#c96442`), black, and muted green, the visual language says "thoughtful companion" rather than "powerful tool." The serif headlines breathe at tight-but-comfortable line-heights (1.10–1.30), creating a cadence that feels more like reading an essay than scanning a product page.
|
|
11
|
+
|
|
12
|
+
What makes Claude's design truly distinctive is its warm neutral palette. Every gray has a yellow-brown undertone (`#5e5d59`, `#87867f`, `#4d4c48`) — there are no cool blue-grays anywhere. Borders are cream-tinted (`#f0eee6`, `#e8e6dc`), shadows use warm transparent blacks, and even the darkest surfaces (`#141413`, `#30302e`) carry a barely perceptible olive warmth. This chromatic consistency creates a space that feels lived-in and trustworthy.
|
|
13
|
+
|
|
14
|
+
**Key Characteristics:**
|
|
15
|
+
- Warm parchment canvas (`#f5f4ed`) evoking premium paper, not screens
|
|
16
|
+
- Custom Anthropic type family: Serif for headlines, Sans for UI, Mono for code
|
|
17
|
+
- Terracotta brand accent (`#c96442`) — warm, earthy, deliberately un-tech
|
|
18
|
+
- Exclusively warm-toned neutrals — every gray has a yellow-brown undertone
|
|
19
|
+
- Organic, editorial illustrations replacing typical tech iconography
|
|
20
|
+
- Ring-based shadow system (`0px 0px 0px 1px`) creating border-like depth without visible borders
|
|
21
|
+
- Magazine-like pacing with generous section spacing and serif-driven hierarchy
|
|
22
|
+
|
|
23
|
+
## 2. Color Palette & Roles
|
|
24
|
+
|
|
25
|
+
### Primary
|
|
26
|
+
- **Anthropic Near Black** (`#141413`): The primary text color and dark-theme surface — not pure black but a warm, almost olive-tinted dark that's gentler on the eyes. The warmest "black" in any major tech brand.
|
|
27
|
+
- **Terracotta Brand** (`#c96442`): The core brand color — a burnt orange-brown used for primary CTA buttons, brand moments, and the signature accent. Deliberately earthy and un-tech.
|
|
28
|
+
- **Coral Accent** (`#d97757`): A lighter, warmer variant of the brand color used for text accents, links on dark surfaces, and secondary emphasis.
|
|
29
|
+
|
|
30
|
+
### Secondary & Accent
|
|
31
|
+
- **Error Crimson** (`#b53333`): A deep, warm red for error states — serious without being alarming.
|
|
32
|
+
- **Focus Blue** (`#3898ec`): Standard blue for input focus rings — the only cool color in the entire system, used purely for accessibility.
|
|
33
|
+
|
|
34
|
+
### Surface & Background
|
|
35
|
+
- **Parchment** (`#f5f4ed`): The primary page background — a warm cream with a yellow-green tint that feels like aged paper. The emotional foundation of the entire design.
|
|
36
|
+
- **Ivory** (`#faf9f5`): The lightest surface — used for cards and elevated containers on the Parchment background. Barely distinguishable but creates subtle layering.
|
|
37
|
+
- **Pure White** (`#ffffff`): Reserved for specific button surfaces and maximum-contrast elements.
|
|
38
|
+
- **Warm Sand** (`#e8e6dc`): Button backgrounds and prominent interactive surfaces — a noticeably warm light gray.
|
|
39
|
+
- **Dark Surface** (`#30302e`): Dark-theme containers, nav borders, and elevated dark elements — warm charcoal.
|
|
40
|
+
- **Deep Dark** (`#141413`): Dark-theme page background and primary dark surface.
|
|
41
|
+
|
|
42
|
+
### Neutrals & Text
|
|
43
|
+
- **Charcoal Warm** (`#4d4c48`): Button text on light warm surfaces — the go-to dark-on-light text.
|
|
44
|
+
- **Olive Gray** (`#5e5d59`): Secondary body text — a distinctly warm medium-dark gray.
|
|
45
|
+
- **Stone Gray** (`#87867f`): Tertiary text, footnotes, and de-emphasized metadata.
|
|
46
|
+
- **Dark Warm** (`#3d3d3a`): Dark text links and emphasized secondary text.
|
|
47
|
+
- **Warm Silver** (`#b0aea5`): Text on dark surfaces — a warm, parchment-tinted light gray.
|
|
48
|
+
|
|
49
|
+
### Semantic & Accent
|
|
50
|
+
- **Border Cream** (`#f0eee6`): Standard light-theme border — barely visible warm cream, creating the gentlest possible containment.
|
|
51
|
+
- **Border Warm** (`#e8e6dc`): Prominent borders, section dividers, and emphasized containment on light surfaces.
|
|
52
|
+
- **Border Dark** (`#30302e`): Standard border on dark surfaces — maintains the warm tone.
|
|
53
|
+
- **Ring Warm** (`#d1cfc5`): Shadow ring color for button hover/focus states.
|
|
54
|
+
- **Ring Subtle** (`#dedc01`): Secondary ring variant for lighter interactive surfaces.
|
|
55
|
+
- **Ring Deep** (`#c2c0b6`): Deeper ring for active/pressed states.
|
|
56
|
+
|
|
57
|
+
### Gradient System
|
|
58
|
+
- Claude's design is **gradient-free** in the traditional sense. Depth and visual richness come from the interplay of warm surface tones, organic illustrations, and light/dark section alternation. The warm palette itself creates a "gradient" effect as the eye moves through cream → sand → stone → charcoal → black sections.
|
|
59
|
+
|
|
60
|
+
## 3. Typography Rules
|
|
61
|
+
|
|
62
|
+
### Font Family
|
|
63
|
+
- **Headline**: `Anthropic Serif`, with fallback: `Georgia`
|
|
64
|
+
- **Body / UI**: `Anthropic Sans`, with fallback: `Arial`
|
|
65
|
+
- **Code**: `Anthropic Mono`, with fallback: `Arial`
|
|
66
|
+
|
|
67
|
+
*Note: These are custom typefaces. For external implementations, Georgia serves as the serif substitute and system-ui/Inter as the sans substitute.*
|
|
68
|
+
|
|
69
|
+
### Hierarchy
|
|
70
|
+
|
|
71
|
+
| Role | Font | Size | Weight | Line Height | Letter Spacing | Notes |
|
|
72
|
+
|------|------|------|--------|-------------|----------------|-------|
|
|
73
|
+
| Display / Hero | Anthropic Serif | 64px (4rem) | 500 | 1.10 (tight) | normal | Maximum impact, book-title presence |
|
|
74
|
+
| Section Heading | Anthropic Serif | 52px (3.25rem) | 500 | 1.20 (tight) | normal | Feature section anchors |
|
|
75
|
+
| Sub-heading Large | Anthropic Serif | 36–36.8px (~2.3rem) | 500 | 1.30 | normal | Secondary section markers |
|
|
76
|
+
| Sub-heading | Anthropic Serif | 32px (2rem) | 500 | 1.10 (tight) | normal | Card titles, feature names |
|
|
77
|
+
| Sub-heading Small | Anthropic Serif | 25–25.6px (~1.6rem) | 500 | 1.20 | normal | Smaller section titles |
|
|
78
|
+
| Feature Title | Anthropic Serif | 20.8px (1.3rem) | 500 | 1.20 | normal | Small feature headings |
|
|
79
|
+
| Body Serif | Anthropic Serif | 17px (1.06rem) | 400 | 1.60 (relaxed) | normal | Serif body text (editorial passages) |
|
|
80
|
+
| Body Large | Anthropic Sans | 20px (1.25rem) | 400 | 1.60 (relaxed) | normal | Intro paragraphs |
|
|
81
|
+
| Body / Nav | Anthropic Sans | 17px (1.06rem) | 400–500 | 1.00–1.60 | normal | Navigation links, UI text |
|
|
82
|
+
| Body Standard | Anthropic Sans | 16px (1rem) | 400–500 | 1.25–1.60 | normal | Standard body, button text |
|
|
83
|
+
| Body Small | Anthropic Sans | 15px (0.94rem) | 400–500 | 1.00–1.60 | normal | Compact body text |
|
|
84
|
+
| Caption | Anthropic Sans | 14px (0.88rem) | 400 | 1.43 | normal | Metadata, descriptions |
|
|
85
|
+
| Label | Anthropic Sans | 12px (0.75rem) | 400–500 | 1.25–1.60 | 0.12px | Badges, small labels |
|
|
86
|
+
| Overline | Anthropic Sans | 10px (0.63rem) | 400 | 1.60 | 0.5px | Uppercase overline labels |
|
|
87
|
+
| Micro | Anthropic Sans | 9.6px (0.6rem) | 400 | 1.60 | 0.096px | Smallest text |
|
|
88
|
+
| Code | Anthropic Mono | 15px (0.94rem) | 400 | 1.60 | -0.32px | Inline code, terminal |
|
|
89
|
+
|
|
90
|
+
### Principles
|
|
91
|
+
- **Serif for authority, sans for utility**: Anthropic Serif carries all headline content with medium weight (500), giving every heading the gravitas of a published title. Anthropic Sans handles all functional UI text — buttons, labels, navigation — with quiet efficiency.
|
|
92
|
+
- **Single weight for serifs**: All Anthropic Serif headings use weight 500 — no bold, no light. This creates a consistent "voice" across all headline sizes, as if the same author wrote every heading.
|
|
93
|
+
- **Relaxed body line-height**: Most body text uses 1.60 line-height — significantly more generous than typical tech sites (1.4–1.5). This creates a reading experience closer to a book than a dashboard.
|
|
94
|
+
- **Tight-but-not-compressed headings**: Line-heights of 1.10–1.30 for headings are tight but never claustrophobic. The serif letterforms need breathing room that sans-serif fonts don't.
|
|
95
|
+
- **Micro letter-spacing on labels**: Small sans text (12px and below) uses deliberate letter-spacing (0.12px–0.5px) to maintain readability at tiny sizes.
|
|
96
|
+
|
|
97
|
+
## 4. Component Stylings
|
|
98
|
+
|
|
99
|
+
### Buttons
|
|
100
|
+
|
|
101
|
+
**Warm Sand (Secondary)**
|
|
102
|
+
- Background: Warm Sand (`#e8e6dc`)
|
|
103
|
+
- Text: Charcoal Warm (`#4d4c48`)
|
|
104
|
+
- Padding: 0px 12px 0px 8px (asymmetric — icon-first layout)
|
|
105
|
+
- Radius: comfortably rounded (8px)
|
|
106
|
+
- Shadow: ring-based (`#e8e6dc 0px 0px 0px 0px, #d1cfc5 0px 0px 0px 1px`)
|
|
107
|
+
- The workhorse button — warm, unassuming, clearly interactive
|
|
108
|
+
|
|
109
|
+
**White Surface**
|
|
110
|
+
- Background: Pure White (`#ffffff`)
|
|
111
|
+
- Text: Anthropic Near Black (`#141413`)
|
|
112
|
+
- Padding: 8px 16px 8px 12px
|
|
113
|
+
- Radius: generously rounded (12px)
|
|
114
|
+
- Hover: shifts to secondary background color
|
|
115
|
+
- Clean, elevated button for light surfaces
|
|
116
|
+
|
|
117
|
+
**Dark Charcoal**
|
|
118
|
+
- Background: Dark Surface (`#30302e`)
|
|
119
|
+
- Text: Ivory (`#faf9f5`)
|
|
120
|
+
- Padding: 0px 12px 0px 8px
|
|
121
|
+
- Radius: comfortably rounded (8px)
|
|
122
|
+
- Shadow: ring-based (`#30302e 0px 0px 0px 0px, ring 0px 0px 0px 1px`)
|
|
123
|
+
- The inverted variant for dark-on-light emphasis
|
|
124
|
+
|
|
125
|
+
**Brand Terracotta**
|
|
126
|
+
- Background: Terracotta Brand (`#c96442`)
|
|
127
|
+
- Text: Ivory (`#faf9f5`)
|
|
128
|
+
- Radius: 8–12px
|
|
129
|
+
- Shadow: ring-based (`#c96442 0px 0px 0px 0px, #c96442 0px 0px 0px 1px`)
|
|
130
|
+
- The primary CTA — the only button with chromatic color
|
|
131
|
+
|
|
132
|
+
**Dark Primary**
|
|
133
|
+
- Background: Anthropic Near Black (`#141413`)
|
|
134
|
+
- Text: Warm Silver (`#b0aea5`)
|
|
135
|
+
- Padding: 9.6px 16.8px
|
|
136
|
+
- Radius: generously rounded (12px)
|
|
137
|
+
- Border: thin solid Dark Surface (`1px solid #30302e`)
|
|
138
|
+
- Used on dark theme surfaces
|
|
139
|
+
|
|
140
|
+
### Cards & Containers
|
|
141
|
+
- Background: Ivory (`#faf9f5`) or Pure White (`#ffffff`) on light surfaces; Dark Surface (`#30302e`) on dark
|
|
142
|
+
- Border: thin solid Border Cream (`1px solid #f0eee6`) on light; `1px solid #30302e` on dark
|
|
143
|
+
- Radius: comfortably rounded (8px) for standard cards; generously rounded (16px) for featured; very rounded (32px) for hero containers and embedded media
|
|
144
|
+
- Shadow: whisper-soft (`rgba(0,0,0,0.05) 0px 4px 24px`) for elevated content
|
|
145
|
+
- Ring shadow: `0px 0px 0px 1px` patterns for interactive card states
|
|
146
|
+
- Section borders: `1px 0px 0px` (top-only) for list item separators
|
|
147
|
+
|
|
148
|
+
### Inputs & Forms
|
|
149
|
+
- Text: Anthropic Near Black (`#141413`)
|
|
150
|
+
- Padding: 1.6px 12px (very compact vertical)
|
|
151
|
+
- Border: standard warm borders
|
|
152
|
+
- Focus: ring with Focus Blue (`#3898ec`) border-color — the only cool color moment
|
|
153
|
+
- Radius: generously rounded (12px)
|
|
154
|
+
|
|
155
|
+
### Navigation
|
|
156
|
+
- Sticky top nav with warm background
|
|
157
|
+
- Logo: Claude wordmark in Anthropic Near Black
|
|
158
|
+
- Links: mix of Near Black (`#141413`), Olive Gray (`#5e5d59`), and Dark Warm (`#3d3d3a`)
|
|
159
|
+
- Nav border: `1px solid #30302e` (dark) or `1px solid #f0eee6` (light)
|
|
160
|
+
- CTA: Terracotta Brand button or White Surface button
|
|
161
|
+
- Hover: text shifts to foreground-primary, no decoration
|
|
162
|
+
|
|
163
|
+
### Image Treatment
|
|
164
|
+
- Product screenshots showing the Claude chat interface
|
|
165
|
+
- Generous border-radius on media (16–32px)
|
|
166
|
+
- Embedded video players with rounded corners
|
|
167
|
+
- Dark UI screenshots provide contrast against warm light canvas
|
|
168
|
+
- Organic, hand-drawn illustrations for conceptual sections
|
|
169
|
+
|
|
170
|
+
### Distinctive Components
|
|
171
|
+
|
|
172
|
+
**Model Comparison Cards**
|
|
173
|
+
- Opus 4.5, Sonnet 4.5, Haiku 4.5 presented in a clean card grid
|
|
174
|
+
- Each model gets a bordered card with name, description, and capability badges
|
|
175
|
+
- Border Warm (`#e8e6dc`) separation between items
|
|
176
|
+
|
|
177
|
+
**Organic Illustrations**
|
|
178
|
+
- Hand-drawn-feeling vector illustrations in terracotta, black, and muted green
|
|
179
|
+
- Abstract, conceptual rather than literal product diagrams
|
|
180
|
+
- The primary visual personality — no other AI company uses this style
|
|
181
|
+
|
|
182
|
+
**Dark/Light Section Alternation**
|
|
183
|
+
- The page alternates between Parchment light and Near Black dark sections
|
|
184
|
+
- Creates a reading rhythm like chapters in a book
|
|
185
|
+
- Each section feels like a distinct environment
|
|
186
|
+
|
|
187
|
+
## 5. Layout Principles
|
|
188
|
+
|
|
189
|
+
### Spacing System
|
|
190
|
+
- Base unit: 8px
|
|
191
|
+
- Scale: 3px, 4px, 6px, 8px, 10px, 12px, 16px, 20px, 24px, 30px
|
|
192
|
+
- Button padding: asymmetric (0px 12px 0px 8px) or balanced (8px 16px)
|
|
193
|
+
- Card internal padding: approximately 24–32px
|
|
194
|
+
- Section vertical spacing: generous (estimated 80–120px between major sections)
|
|
195
|
+
|
|
196
|
+
### Grid & Container
|
|
197
|
+
- Max container width: approximately 1200px, centered
|
|
198
|
+
- Hero: centered with editorial layout
|
|
199
|
+
- Feature sections: single-column or 2–3 column card grids
|
|
200
|
+
- Model comparison: clean 3-column grid
|
|
201
|
+
- Full-width dark sections breaking the container for emphasis
|
|
202
|
+
|
|
203
|
+
### Whitespace Philosophy
|
|
204
|
+
- **Editorial pacing**: Each section breathes like a magazine spread — generous top/bottom margins create natural reading pauses.
|
|
205
|
+
- **Serif-driven rhythm**: The serif headings establish a literary cadence that demands more whitespace than sans-serif designs.
|
|
206
|
+
- **Content island approach**: Sections alternate between light and dark environments, creating distinct "rooms" for each message.
|
|
207
|
+
|
|
208
|
+
### Border Radius Scale
|
|
209
|
+
- Sharp (4px): Minimal inline elements
|
|
210
|
+
- Subtly rounded (6–7.5px): Small buttons, secondary interactive elements
|
|
211
|
+
- Comfortably rounded (8–8.5px): Standard buttons, cards, containers
|
|
212
|
+
- Generously rounded (12px): Primary buttons, input fields, nav elements
|
|
213
|
+
- Very rounded (16px): Featured containers, video players, tab lists
|
|
214
|
+
- Highly rounded (24px): Tag-like elements, highlighted containers
|
|
215
|
+
- Maximum rounded (32px): Hero containers, embedded media, large cards
|
|
216
|
+
|
|
217
|
+
## 6. Depth & Elevation
|
|
218
|
+
|
|
219
|
+
| Level | Treatment | Use |
|
|
220
|
+
|-------|-----------|-----|
|
|
221
|
+
| Flat (Level 0) | No shadow, no border | Parchment background, inline text |
|
|
222
|
+
| Contained (Level 1) | `1px solid #f0eee6` (light) or `1px solid #30302e` (dark) | Standard cards, sections |
|
|
223
|
+
| Ring (Level 2) | `0px 0px 0px 1px` ring shadows using warm grays | Interactive cards, buttons, hover states |
|
|
224
|
+
| Whisper (Level 3) | `rgba(0,0,0,0.05) 0px 4px 24px` | Elevated feature cards, product screenshots |
|
|
225
|
+
| Inset (Level 4) | `inset 0px 0px 0px 1px` at 15% opacity | Active/pressed button states |
|
|
226
|
+
|
|
227
|
+
**Shadow Philosophy**: Claude communicates depth through **warm-toned ring shadows** rather than traditional drop shadows. The signature `0px 0px 0px 1px` pattern creates a border-like halo that's softer than an actual border — it's a shadow pretending to be a border, or a border that's technically a shadow. When drop shadows do appear, they're extremely soft (0.05 opacity, 24px blur) — barely visible lifts that suggest floating rather than casting.
|
|
228
|
+
|
|
229
|
+
### Decorative Depth
|
|
230
|
+
- **Light/Dark alternation**: The most dramatic depth effect comes from alternating between Parchment (`#f5f4ed`) and Near Black (`#141413`) sections — entire sections shift elevation by changing the ambient light level.
|
|
231
|
+
- **Warm ring halos**: Button and card interactions use ring shadows that match the warm palette — never cool-toned or generic gray.
|
|
232
|
+
|
|
233
|
+
## 7. Do's and Don'ts
|
|
234
|
+
|
|
235
|
+
### Do
|
|
236
|
+
- Use Parchment (`#f5f4ed`) as the primary light background — the warm cream tone IS the Claude personality
|
|
237
|
+
- Use Anthropic Serif at weight 500 for all headlines — the single-weight consistency is intentional
|
|
238
|
+
- Use Terracotta Brand (`#c96442`) only for primary CTAs and the highest-signal brand moments
|
|
239
|
+
- Keep all neutrals warm-toned — every gray should have a yellow-brown undertone
|
|
240
|
+
- Use ring shadows (`0px 0px 0px 1px`) for interactive element states instead of drop shadows
|
|
241
|
+
- Maintain the editorial serif/sans hierarchy — serif for content headlines, sans for UI
|
|
242
|
+
- Use generous body line-height (1.60) for a literary reading experience
|
|
243
|
+
- Alternate between light and dark sections to create chapter-like page rhythm
|
|
244
|
+
- Apply generous border-radius (12–32px) for a soft, approachable feel
|
|
245
|
+
|
|
246
|
+
### Don't
|
|
247
|
+
- Don't use cool blue-grays anywhere — the palette is exclusively warm-toned
|
|
248
|
+
- Don't use bold (700+) weight on Anthropic Serif — weight 500 is the ceiling for serifs
|
|
249
|
+
- Don't introduce saturated colors beyond Terracotta — the palette is deliberately muted
|
|
250
|
+
- Don't use sharp corners (< 6px radius) on buttons or cards — softness is core to the identity
|
|
251
|
+
- Don't apply heavy drop shadows — depth comes from ring shadows and background color shifts
|
|
252
|
+
- Don't use pure white (`#ffffff`) as a page background — Parchment (`#f5f4ed`) or Ivory (`#faf9f5`) are always warmer
|
|
253
|
+
- Don't use geometric/tech-style illustrations — Claude's illustrations are organic and hand-drawn-feeling
|
|
254
|
+
- Don't reduce body line-height below 1.40 — the generous spacing supports the editorial personality
|
|
255
|
+
- Don't use monospace fonts for non-code content — Anthropic Mono is strictly for code
|
|
256
|
+
- Don't mix in sans-serif for headlines — the serif/sans split is the typographic identity
|
|
257
|
+
|
|
258
|
+
## 8. Responsive Behavior
|
|
259
|
+
|
|
260
|
+
### Breakpoints
|
|
261
|
+
| Name | Width | Key Changes |
|
|
262
|
+
|------|-------|-------------|
|
|
263
|
+
| Small Mobile | <479px | Minimum layout, stacked everything, compact typography |
|
|
264
|
+
| Mobile | 479–640px | Single column, hamburger nav, reduced heading sizes |
|
|
265
|
+
| Large Mobile | 640–767px | Slightly wider content area |
|
|
266
|
+
| Tablet | 768–991px | 2-column grids begin, condensed nav |
|
|
267
|
+
| Desktop | 992px+ | Full multi-column layout, expanded nav, maximum hero typography (64px) |
|
|
268
|
+
|
|
269
|
+
### Touch Targets
|
|
270
|
+
- Buttons use generous padding (8–16px vertical minimum)
|
|
271
|
+
- Navigation links adequately spaced for thumb navigation
|
|
272
|
+
- Card surfaces serve as large touch targets
|
|
273
|
+
- Minimum recommended: 44x44px
|
|
274
|
+
|
|
275
|
+
### Collapsing Strategy
|
|
276
|
+
- **Navigation**: Full horizontal nav collapses to hamburger on mobile
|
|
277
|
+
- **Feature sections**: Multi-column → stacked single column
|
|
278
|
+
- **Hero text**: 64px → 36px → ~25px progressive scaling
|
|
279
|
+
- **Model cards**: 3-column → stacked vertical
|
|
280
|
+
- **Section padding**: Reduces proportionally but maintains editorial rhythm
|
|
281
|
+
- **Illustrations**: Scale proportionally, maintain aspect ratios
|
|
282
|
+
|
|
283
|
+
### Image Behavior
|
|
284
|
+
- Product screenshots scale proportionally within rounded containers
|
|
285
|
+
- Illustrations maintain quality at all sizes
|
|
286
|
+
- Video embeds maintain 16:9 aspect ratio with rounded corners
|
|
287
|
+
- No art direction changes between breakpoints
|
|
288
|
+
|
|
289
|
+
## 9. Agent Prompt Guide
|
|
290
|
+
|
|
291
|
+
### Quick Color Reference
|
|
292
|
+
- Brand CTA: "Terracotta Brand (#c96442)"
|
|
293
|
+
- Page Background: "Parchment (#f5f4ed)"
|
|
294
|
+
- Card Surface: "Ivory (#faf9f5)"
|
|
295
|
+
- Primary Text: "Anthropic Near Black (#141413)"
|
|
296
|
+
- Secondary Text: "Olive Gray (#5e5d59)"
|
|
297
|
+
- Tertiary Text: "Stone Gray (#87867f)"
|
|
298
|
+
- Borders (light): "Border Cream (#f0eee6)"
|
|
299
|
+
- Dark Surface: "Dark Surface (#30302e)"
|
|
300
|
+
|
|
301
|
+
### Example Component Prompts
|
|
302
|
+
- "Create a hero section on Parchment (#f5f4ed) with a headline at 64px Anthropic Serif weight 500, line-height 1.10. Use Anthropic Near Black (#141413) text. Add a subtitle in Olive Gray (#5e5d59) at 20px Anthropic Sans with 1.60 line-height. Place a Terracotta Brand (#c96442) CTA button with Ivory text, 12px radius."
|
|
303
|
+
- "Design a feature card on Ivory (#faf9f5) with a 1px solid Border Cream (#f0eee6) border and comfortably rounded corners (8px). Title in Anthropic Serif at 25px weight 500, description in Olive Gray (#5e5d59) at 16px Anthropic Sans. Add a whisper shadow (rgba(0,0,0,0.05) 0px 4px 24px)."
|
|
304
|
+
- "Build a dark section on Anthropic Near Black (#141413) with Ivory (#faf9f5) headline text in Anthropic Serif at 52px weight 500. Use Warm Silver (#b0aea5) for body text. Borders in Dark Surface (#30302e)."
|
|
305
|
+
- "Create a button in Warm Sand (#e8e6dc) with Charcoal Warm (#4d4c48) text, 8px radius, and a ring shadow (0px 0px 0px 1px #d1cfc5). Padding: 0px 12px 0px 8px."
|
|
306
|
+
- "Design a model comparison grid with three cards on Ivory surfaces. Each card gets a Border Warm (#e8e6dc) top border, model name in Anthropic Serif at 25px, and description in Olive Gray at 15px Anthropic Sans."
|
|
307
|
+
|
|
308
|
+
### Iteration Guide
|
|
309
|
+
1. Focus on ONE component at a time
|
|
310
|
+
2. Reference specific color names — "use Olive Gray (#5e5d59)" not "make it gray"
|
|
311
|
+
3. Always specify warm-toned variants — no cool grays
|
|
312
|
+
4. Describe serif vs sans usage explicitly — "Anthropic Serif for the heading, Anthropic Sans for the label"
|
|
313
|
+
5. For shadows, use "ring shadow (0px 0px 0px 1px)" or "whisper shadow" — never generic "drop shadow"
|
|
314
|
+
6. Specify the warm background — "on Parchment (#f5f4ed)" or "on Near Black (#141413)"
|
|
315
|
+
7. Keep illustrations organic and conceptual — describe "hand-drawn-feeling" style
|