From b5dd3d52b2ce09d49a42dfceca0a7c274f68f5f3 Mon Sep 17 00:00:00 2001 From: Fini Date: Sun, 19 Apr 2026 20:55:05 +0800 Subject: [PATCH] fix(ai): cjk-typography.md body rule aligns with text-rules/tool/skill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codex stop-hook #17: after fix #16 made add_body_text_v0 always use Inter for CJK body, one source still allowed the alternative: cjk-typography.md:16 said "Body: 'Inter' (system CJK fallback) or 'Noto Sans SC'". Every other authority in the repo says body=Inter unconditionally: - text-rules.md (text section of get_design_prompt): body='Inter' - skills/phases/planning/decomposition.md:45: "body='Inter'" - packages/pen-mcp/src/tools/add-body-text-v0.ts: always 'Inter' - skills/phases/generation/elements.md: "Inter everywhere" - role-definitions.md:88: "body-text: lineHeight=1.5 (CJK: 1.6)" (no font override) cjk-typography's "or Noto Sans SC" was the lone dissenter — an AI reading the domain skill would see a contradictory option that no other skill or tool supports. Remove the alternative so the repo is single-voiced. Also clarify the heading vs body split in the last two bullets: the script-specific Noto rule is HEADING-only; body is Inter + CJK lineHeight/letterSpacing. Cross-reference the other authorities so a future editor knows which rule sources must stay in sync. 253/253 tests pass (pen-mcp + pen-ai-skills). format green. --- .../pen-ai-skills/skills/domains/cjk-typography.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/pen-ai-skills/skills/domains/cjk-typography.md b/packages/pen-ai-skills/skills/domains/cjk-typography.md index e3489d28a..17cf7b500 100644 --- a/packages/pen-ai-skills/skills/domains/cjk-typography.md +++ b/packages/pen-ai-skills/skills/domains/cjk-typography.md @@ -12,8 +12,8 @@ category: domain CJK TYPOGRAPHY (Chinese/Japanese/Korean): -- Headings: "Noto Sans SC" (Chinese) / "Noto Sans JP" / "Noto Sans KR". NEVER "Space Grotesk"/"Manrope" for CJK. -- Body: "Inter" (system CJK fallback) or "Noto Sans SC". -- CJK lineHeight: headings 1.3-1.4 (NOT 1.1), body 1.6-1.8. letterSpacing: 0, NEVER negative. -- CJK buttons: each char is approximately fontSize wide. Container width >= (charCount x fontSize) + padding. -- Detect CJK from user request language — use CJK fonts for ALL text nodes. +- Headings: "Noto Sans SC" (Chinese) / "Noto Sans JP" (Japanese) / "Noto Sans KR" (Korean). NEVER "Space Grotesk" / "Manrope" for CJK — no CJK glyphs. +- Body: ALWAYS "Inter" (uses system CJK fallback at render time). Do NOT pick a script-specific Noto for body — that rule is HEADING-only. Matches the `text` section of get_design_prompt, `decomposition.md` ("body='Inter'"), and `add_body_text_v0`. +- CJK lineHeight: headings 1.3-1.4 (NOT 1.1 like Latin), body 1.6-1.8 (Latin body is 1.4-1.6). letterSpacing: 0, NEVER negative (causes CJK character overlap). +- CJK buttons: each char is approximately fontSize wide. Container width >= (charCount × fontSize) + padding. +- Detect CJK from user request language — apply CJK rules (script-specific Noto for headings; Inter + CJK lineHeight/letterSpacing for body; 0 letterSpacing everywhere).