mosaic-headless 1.36.3 → 1.38.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.
Files changed (47) hide show
  1. package/README.ja.md +88 -253
  2. package/README.ko.md +85 -244
  3. package/README.md +86 -319
  4. package/README.zh-TW.md +86 -265
  5. package/SKILL.md +179 -1119
  6. package/assets/templates/platforms/claude-ai.json +1 -1
  7. package/assets/templates/platforms/claude-code.json +5 -2
  8. package/assets/templates/platforms/codex-cli.json +1 -1
  9. package/assets/templates/platforms/copilot.json +1 -1
  10. package/assets/templates/platforms/gemini-cli.json +1 -1
  11. package/data/custom-fields-verification.csv +11 -11
  12. package/data/design-audit.csv +26 -26
  13. package/data/dynamic-variables.csv +3 -2
  14. package/data/menu-verification.csv +1 -1
  15. package/data/pending.csv +10 -0
  16. package/data/pluggables.csv +20 -0
  17. package/data/rwd-verification.csv +733 -733
  18. package/data/terms-zh.csv +99 -0
  19. package/evals/RESULTS.md +41 -0
  20. package/evals/cases.json +329 -0
  21. package/evals/grade.py +121 -0
  22. package/evals/runs/2026-11-16-final-with-skill.json +29 -0
  23. package/evals/runs/2026-11-16-final-without-skill.json +30 -0
  24. package/evals/runs/2026-11-16-r1-with-skill.json +19 -0
  25. package/evals/runs/2026-11-16-r1-without-skill.json +19 -0
  26. package/evals/runs/2026-11-16-r2-with-skill.json +9 -0
  27. package/evals/runs/2026-11-16-r2-without-skill.json +9 -0
  28. package/evals/runs/2026-11-16-r3-without-skill.json +1 -0
  29. package/package.json +1 -1
  30. package/references/building.md +93 -0
  31. package/references/core-rules.md +143 -0
  32. package/references/data-files.md +102 -0
  33. package/references/design-system.md +1 -1
  34. package/references/facts.md +261 -0
  35. package/references/failure-modes.md +1 -1
  36. package/references/maintenance.md +70 -0
  37. package/references/tools.md +84 -0
  38. package/references/tutorials.md +1 -1
  39. package/references/upgrading.md +47 -2
  40. package/references/verification-record.md +395 -0
  41. package/scripts/check-release.mjs +10 -5
  42. package/scripts/install.mjs +7 -5
  43. package/tools/check_numbers.py +259 -0
  44. package/tools/extract_node_types.py +3 -1
  45. package/tools/mo.py +132 -7
  46. package/tools/test_mosaic.py +425 -0
  47. package/tools/verify_menus.py +1 -1
@@ -0,0 +1,99 @@
1
+ zh,en,kind,note,source,trust
2
+ 內距,padding,css,paddingTop/Right/Bottom/Left (1.0.12 shipped 邊框間距),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
3
+ 邊框間距,padding,css,Mosaic's former zh_TW for Padding; Mosaic 1.0.9-1.0.12 wording,mosaic 1.0.12 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json (replaced in 1.0.13),documented
4
+ 外距,margin,css,marginTop/Right/Bottom/Left (1.0.12 shipped 邊界),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
5
+ 邊界,margin,css,Mosaic's former zh_TW for Margin; Mosaic 1.0.9-1.0.12 wording,mosaic 1.0.12 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json (replaced in 1.0.13),documented
6
+ 邊框,border,css,border*Width/Style/Color per side (1.0.12 shipped 框線),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
7
+ 框線,border,css,Mosaic's former zh_TW for Border; Mosaic 1.0.9-1.0.12 wording,mosaic 1.0.12 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json (replaced in 1.0.13),documented
8
+ 圓角,border-radius,css,borderRadius,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
9
+ 半徑,border-radius,css,Mosaic's shipped zh_TW for Radius,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
10
+ 寬度,width,css,also min-width / max-width,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
11
+ 高度,height,css,also min-height / max-height,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
12
+ 背景,background,css,backgroundColor / backgroundStyle,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
13
+ 背景色,background-color,css,,colloquial; no Mosaic string,inferred
14
+ 色彩,color,css,matches every *-color property,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
15
+ 顏色,color,css,matches every *-color property,colloquial; no Mosaic string,inferred
16
+ 字型,font-family,css,a site-wide typeface is a fontFamily collection variable (references/styling.md),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
17
+ 字級,font-size,css,,colloquial; no Mosaic string,inferred
18
+ 字體大小,font-size,css,,colloquial; no Mosaic string,inferred
19
+ 行高,line-height,css,,colloquial; no Mosaic string,inferred
20
+ 字距,letter-spacing,css,,colloquial; no Mosaic string,inferred
21
+ 字重,font-weight,css,,colloquial; no Mosaic string,inferred
22
+ 粗細,font-weight,css,,colloquial; no Mosaic string,inferred
23
+ 不透明度,opacity,css,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
24
+ 透明度,opacity,css,,colloquial; no Mosaic string,inferred
25
+ 陰影,shadow,css,box-shadow and text-shadow,colloquial; no Mosaic string,inferred
26
+ 間隙,gap,css,columnGap / rowGap,colloquial; no Mosaic string,inferred
27
+ 對齊,align,css,align-items / align-self / align-content / text-align,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
28
+ 顯示,display,css,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
29
+ 位置,position,css,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
30
+ 黏性定位,position,css,position: sticky,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
31
+ 溢出,overflow,css,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
32
+ 轉場,transition,css,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
33
+ 變形,transform,css,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
34
+ 網格,grid,css,grid-template-* / grid-auto-*; child placement emits nothing (references/facts.md),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
35
+ 濾鏡,filter,css,filter and backdrop-filter,colloquial; no Mosaic string,inferred
36
+ 層級,z-index,css,,colloquial; no Mosaic string,inferred
37
+ 按鈕,button,type,url -> <a>; none -> <button>; inactive -> <span>,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
38
+ 文字,text,type,renders <div>; set tagName for h1-h6 / p,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
39
+ 標題,text,type,a heading is a text node with tagName h1-h6,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
40
+ 圖片,image,type,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
41
+ 圖示,icon,type,renders inline <svg>,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
42
+ 連結,button|menu-link|wysiwyg-link|dropdown-toggle,type,only these four take a url; wrap anything else in a Link-variant button,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
43
+ 摺疊面板,accordion,type,nest accordion > accordion-item > accordion-title / accordion-content,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
44
+ 手風琴,accordion,type,Mosaic's former zh_TW for Accordion; Mosaic 1.0.9-1.0.12 wording,mosaic 1.0.12 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json (replaced in 1.0.13),documented
45
+ 頁籤,tabs,type,the tab element (a browser tab stays 分頁),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
46
+ 索引標籤,tabs,type,Mosaic's former zh_TW for Tabs / Tab; Mosaic 1.0.9-1.0.12 wording,mosaic 1.0.12 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json (replaced in 1.0.13),documented
47
+ 彈出視窗,modal,type,blocking dialog; Popover-API host since 1.0.10,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
48
+ 浮動框,popover,type,non-blocking dialog (1.0.10),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
49
+ 彈窗,modal|popover,type,modal blocks the page; popover does not (references/dialog-and-triggers.md),colloquial; no Mosaic string,inferred
50
+ 燈箱,modal,type,,colloquial; no Mosaic string,inferred
51
+ 下拉式選單,dropdown|dropdown-wide,type,openOn hover for a desktop menu,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
52
+ 導覽列,navbar,type,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
53
+ 選單,menu|menu-link|wp-menu,type,site menus: references/design-system.md,colloquial; no Mosaic string,inferred
54
+ 漢堡選單,navbar|modal,type,phone menu = navbar or a modal drawer; there is no off-canvas node,colloquial; no Mosaic string,inferred
55
+ 輪播,slider,type,nest as default-children requires; bare slider is unsafe,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
56
+ 表單,form|form-wrapper,type,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
57
+ 選取,select,type,1.0.12 used 選取 for every Select; 1.0.13 keeps it only for selecting elements (msgctxt) and calls the form element 下拉式方塊,mosaic 1.0.12 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json (replaced in 1.0.13),documented
58
+ 下拉欄位,select,type,1.0.12 Select (select-input is gone),colloquial; no Mosaic string,inferred
59
+ 影片,video|youtube|vimeo,type,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
60
+ 地圖,googlemaps|openstreetmap,type,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
61
+ 容器,div|section,type,section arrives with 80px top and bottom padding,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
62
+ 區段,section,type,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
63
+ 清單,list|list-item,type,,colloquial; no Mosaic string,inferred
64
+ 元件,component-internal|component-instance,type,"a spec node with ""component"" becomes an instance (references/design-system.md)",mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
65
+ 迴圈,loop,type,local-context loopSource is @VAR('post/<loop>'),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
66
+ 程式碼,code,type,last resort; a code node's content is a template (@media( kills the page),colloquial; no Mosaic string,inferred
67
+ 懸停,hover,state,1.0.12 shipped 游標暫留),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
68
+ 游標暫留,hover,state,Mosaic's former zh_TW for Hover; Mosaic 1.0.9-1.0.12 wording,mosaic 1.0.12 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json (replaced in 1.0.13),documented
69
+ 滑鼠移入,hover,state,,colloquial; no Mosaic string,inferred
70
+ 聚焦,focus,state,,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
71
+ 作用中,active,state,state ids like ___tab--active / ___slide--active,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
72
+ 展開,opened,state,___accordion-item--opened / ___dropdown--opened,colloquial; no Mosaic string,inferred
73
+ 斷點,breakpoint,concept,style keys _ (desktop) / _t (tablet) / _m (mobile): references/responsive.md,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
74
+ 中斷點,breakpoint,concept,Mosaic's former zh_TW for Breakpoint: references/responsive.md; Mosaic 1.0.9-1.0.12 wording,mosaic 1.0.12 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json (replaced in 1.0.13),documented
75
+ 響應式,responsive,concept,_t / _m style keys; verify with verify_rwd.py and audit_mobile.py (references/responsive.md),colloquial; no Mosaic string,inferred
76
+ RWD,responsive,concept,_t / _m style keys; verify with verify_rwd.py and audit_mobile.py (references/responsive.md),colloquial; no Mosaic string,inferred
77
+ 手機版,mobile,concept,the _m style key (references/responsive.md),colloquial; no Mosaic string,inferred
78
+ 平板,tablet,concept,the _t style key (references/responsive.md),colloquial; no Mosaic string,inferred
79
+ 母版,master,concept,header/footer shell; build_site.py makes one per site,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
80
+ 範本,template,concept,mo.py routes --grep template; references/templates-and-conditions.md,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
81
+ 變體,variant,concept,mo.py classes; theme-global element classes (references/design-system.md),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
82
+ 類別,class,concept,variants and universal classes: mo.py classes,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
83
+ 變數,variable,concept,"collection variables = design tokens; {""token"": ""--x""} in a spec (references/design-system.md)",mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
84
+ 集合,collection,concept,collection of variables; modes for dark/light (references/design-system.md),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
85
+ 模式,mode,concept,a second mode on the colour collection = dark/light (references/design-system.md),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
86
+ 互動,interaction,concept,mo.py interactions; build with tools/interactions.py (references/interactions.md),mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
87
+ 動畫,interaction,concept,animations are interactions (tools/interactions.py); never @keyframes in a code node,colloquial; no Mosaic string,inferred
88
+ 條件,condition,concept,mo.py conditions; references/templates-and-conditions.md,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
89
+ 覆寫,override,concept,component instance overrides (references/design-system.md),zh_TW designer glossary 2026-11-05,house-style
90
+ 佈景,theme,concept,move a theme: theme_zip.py (Mosaic's ZIP) or theme_export.php / theme_import.php (references/building.md),colloquial; no Mosaic string,inferred
91
+ 主題,theme,concept,move a theme: theme_zip.py (Mosaic's ZIP) or theme_export.php / theme_import.php (references/building.md),colloquial; no Mosaic string,inferred
92
+ 動態內容,dynamic,concept,@VAR() values: mo.py vars (references/dynamic-content.md),colloquial; no Mosaic string,inferred
93
+ 自訂欄位,custom field,concept,@VAR('post/meta_<key>'); run tools/list_fields.php (references/custom-fields.md),colloquial; no Mosaic string,inferred
94
+ 深色模式,mode,concept,dark/light = a second mode on the colour collection (references/design-system.md),colloquial; no Mosaic string,inferred
95
+ 下拉選單,select|dropdown,type,a form field = select (1.0.12); a menu that drops down = dropdown,colloquial; no Mosaic string,inferred
96
+ 不安全,unsafe,concept,mo.py types --unsafe; mo.py check <types> exits 1 on one,colloquial; no Mosaic string,inferred
97
+ 付費版,pro,concept,mo.py types --edition pro,colloquial; no Mosaic string,inferred
98
+ 下拉式方塊,select,type,1.0.13 zh_TW for the Select form element (msgctxt Form element); select > select-toggle + select-options > select-option,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
99
+ 頁籤組,tabs,type,1.0.13 zh_TW for Tabs,mosaic 1.0.13 Languages/dist/mosaic-zh_TW-AppMosaicEditor.json,documented
@@ -0,0 +1,41 @@
1
+ # evals 結果
2
+
3
+ 最新的在最上面。題目與評分標準見 `cases.json`,評分程式 `grade.py`。
4
+
5
+ ## 2026-11-16(現行題組,Mosaic Pro 1.0.12 資料)
6
+
7
+ - 第 1 輪 16 題:沒 skill 也答對 4 題(scrollDepth slot、section 預設內距、modal 開啟判斷、customDeclarations dvh),標 `retired`,補 4 題。
8
+ - 第 2 輪:補的題裡 `image-attachment-path` 沒 skill 也對,再標 `retired`,補 `class-name-grammar`(第 3 輪只問沒 skill 那一方)。
9
+ - `accordion-content-bare` 的評分放寬:原本硬性要求答出「54 bytes」,但題目問的是「會怎樣、要放哪」。有 skill 的作答答出了 BROKE_PAGE 和 accordion-item,卻因為沒寫 54 被判錯,所以改成答出頁面會壞掉即可(理由寫在 cases.json 的 `note`)。
10
+ - 有 skill 的作答者回報路由缺口:`下拉選單` 查不到、沒有 unsafe/Pro 的路由列、前台行為只能 grep facts.md、class 命名沒有路由列。都已補上:terms-zh.csv、路由列、`mo.py facts`。
11
+ - 下表把各輪答案合併評分,每題都用最後一版題目和評分標準。
12
+ - 舊的 `claude plugin eval` 題組(5 題,1.0.8 時期)還在 `evals/<case>/`,最後一次紀錄是 2026-09-14:有 skill 0.867、沒有 skill 0.00,詳見 `evals/results/`。
13
+
14
+
15
+ | 項目 | 有 skill | 沒有 skill |
16
+ |---|---|---|
17
+ | 計分題答對率(16 題) | **16/16(100.0%)** | 0/16(0.0%) |
18
+ | 全部題目(16 題) | 16/16 | 0/16 |
19
+ | 模型 | claude-opus-5-5 | claude-opus-5-5 |
20
+ | 作答方式 | subagent 讀 SKILL.md、用 mo.py 與 references 查(r1+r2 合併) | subagent 不用任何工具,憑記憶作答(r1+r2+r3 合併) |
21
+ | 答案檔 | `evals/runs/2026-11-16-final-with-skill.json` | `evals/runs/2026-11-16-final-without-skill.json` |
22
+
23
+ | 題目 | 可信度 | 有 skill | 沒有 skill | 備註 |
24
+ |---|---|---|---|---|
25
+ | `select-split-1012` | measured | ✅ | ❌ | |
26
+ | `popover-trigger-slots` | measured | ✅ | ❌ | |
27
+ | `popover-flipped-state` | measured | ✅ | ❌ | |
28
+ | `shorthand-interaction-types` | documented | ✅ | ❌ | |
29
+ | `interaction-value-shape` | measured | ✅ | ❌ | |
30
+ | `wysiwyg-text-escape-1011` | measured | ✅ | ❌ | |
31
+ | `pro-only-types-1011` | documented | ✅ | ❌ | |
32
+ | `url-capable-types` | measured | ✅ | ❌ | |
33
+ | `unsafe-type-count` | measured | ✅ | ❌ | |
34
+ | `accordion-content-bare` | measured | ✅ | ❌ | |
35
+ | `local-loop-source` | measured | ✅ | ❌ | |
36
+ | `button-text-editable` | measured | ✅ | ❌ | |
37
+ | `no-template-status` | measured | ✅ | ❌ | |
38
+ | `unprobed-node-props` | measured | ✅ | ❌ | |
39
+ | `variant-delete` | measured | ✅ | ❌ | |
40
+ | `class-name-grammar` | documented | ✅ | ❌ | |
41
+
@@ -0,0 +1,329 @@
1
+ {
2
+ "about": "mosaic-headless 真題。考模型記不住的東西:Mosaic 1.0.10-1.0.12 的新結構與改名、量測出來的失敗方式、只有實測才知道的值的形狀。評分:must 每一組都要命中(組內任一正規式命中即可),全部命中才算對。沒 skill 也答對的題沒有鑑別度(SOP 6-4),標 retired 換題。答案出處都是 mo.py 查詢或 references/ 的實測紀錄(Mosaic Pro 1.0.12 測試站)。",
3
+ "cases": [
4
+ {
5
+ "id": "select-split-1012",
6
+ "question": "Mosaic Pro 1.0.12 把表單的下拉選單改成可以自己組的 Select。要用哪些 node type、怎麼巢狀?舊的哪個 type 已經不存在?",
7
+ "must": [
8
+ [
9
+ "select-toggle"
10
+ ],
11
+ [
12
+ "select-options"
13
+ ],
14
+ [
15
+ "select-option(?!s)"
16
+ ],
17
+ [
18
+ "select-input"
19
+ ]
20
+ ],
21
+ "source": "python tools/mo.py placement select; references/upgrading.md (1.0.11 -> 1.0.12)",
22
+ "trust": "measured"
23
+ },
24
+ {
25
+ "id": "scrolldepth-slot-1010",
26
+ "question": "Mosaic 1.0.10 起,scrollDepth 觸發器的動作要放在哪個 slot 名稱底下?如果還放在舊的 slot 名稱會怎樣?",
27
+ "must": [
28
+ [
29
+ "\\breached\\b"
30
+ ],
31
+ [
32
+ "never runs|不會執行|不會跑|永遠不|沒有作用|不執行|stored|kept|保留"
33
+ ]
34
+ ],
35
+ "source": "references/facts.md (scrollDepth's action slot)",
36
+ "trust": "measured",
37
+ "retired": "2026-11-16 r1: no-skill answer also matched"
38
+ },
39
+ {
40
+ "id": "popover-trigger-slots",
41
+ "question": "Mosaic 1.0.10 的 popover(浮動框)作為互動觸發器時,有哪三個 slot?做三步驟導覽時,下一步應該掛在哪個 slot?",
42
+ "must": [
43
+ [
44
+ "\\bshow\\b"
45
+ ],
46
+ [
47
+ "beforeClose"
48
+ ],
49
+ [
50
+ "afterClose"
51
+ ]
52
+ ],
53
+ "source": "references/facts.md; data/popover-verification.csv",
54
+ "trust": "measured"
55
+ },
56
+ {
57
+ "id": "popover-flipped-state",
58
+ "question": "Mosaic popover 設了 keepInView,空間不夠被翻到另一側時,要用哪個 style state ID 才能幫翻轉後的樣子另外設樣式?",
59
+ "must": [
60
+ [
61
+ "_{2,3}popover--flipped"
62
+ ]
63
+ ],
64
+ "source": "python tools/mo.py states --grep popover",
65
+ "trust": "measured"
66
+ },
67
+ {
68
+ "id": "shorthand-interaction-types",
69
+ "question": "Mosaic 的 modal 可以用 interactionShorthand 直接掛觸發器。哪幾種 interaction type 可以當 shorthand?用其他種會怎樣?",
70
+ "must": [
71
+ [
72
+ "pageLoad"
73
+ ],
74
+ [
75
+ "exitIntent"
76
+ ],
77
+ [
78
+ "scrollDepth"
79
+ ]
80
+ ],
81
+ "source": "references/facts.md (InteractionTypesManager::getShorthandInteractionTypes)",
82
+ "trust": "documented"
83
+ },
84
+ {
85
+ "id": "interaction-value-shape",
86
+ "question": "用 headless 方式寫 Mosaic interaction 動畫的 keyframe 值時,initial 和 properties 的 key 要用什麼?值要寫成什麼型別?",
87
+ "must": [
88
+ [
89
+ "uuid"
90
+ ],
91
+ [
92
+ "meta"
93
+ ],
94
+ [
95
+ "string|字串|\"80%\"|單位"
96
+ ]
97
+ ],
98
+ "source": "references/interactions.md; tools/interactions.py",
99
+ "trust": "measured"
100
+ },
101
+ {
102
+ "id": "wysiwyg-text-escape-1011",
103
+ "question": "在 Mosaic 1.0.11 的 wysiwyg-text 文字段落裡寫 A<strong>B</strong>,前台會顯示什麼?要做行內粗體或換行,正確做法是什麼?",
104
+ "must": [
105
+ [
106
+ "literal|escap|&lt;|跳脫|原樣|字面|直接顯示|印出"
107
+ ],
108
+ [
109
+ "wysiwyg-span|format"
110
+ ]
111
+ ],
112
+ "source": "references/facts.md (A wysiwyg-text run prints no markup since 1.0.11)",
113
+ "trust": "measured"
114
+ },
115
+ {
116
+ "id": "pro-only-types-1011",
117
+ "question": "Mosaic 1.0.11 調整了 Free/Pro 分界之後,哪些 node type 需要 Pro?(列出 type 名稱)",
118
+ "must": [
119
+ [
120
+ "\\bcode\\b"
121
+ ],
122
+ [
123
+ "\\bmodal\\b"
124
+ ],
125
+ [
126
+ "popover"
127
+ ],
128
+ [
129
+ "modal-overlay"
130
+ ],
131
+ [
132
+ "modal-window"
133
+ ]
134
+ ],
135
+ "source": "python tools/mo.py types --edition pro",
136
+ "trust": "documented"
137
+ },
138
+ {
139
+ "id": "url-capable-types",
140
+ "question": "Mosaic 裡只有哪幾種 node type 的 url 屬性真的會輸出 <a href>?把 url 放在 image 或 text 上會怎樣?",
141
+ "must": [
142
+ [
143
+ "\\bbutton\\b"
144
+ ],
145
+ [
146
+ "menu-link"
147
+ ],
148
+ [
149
+ "wysiwyg-link"
150
+ ],
151
+ [
152
+ "dropdown-toggle"
153
+ ]
154
+ ],
155
+ "source": "references/facts.md (Only four types take a url)",
156
+ "trust": "measured"
157
+ },
158
+ {
159
+ "id": "section-default-padding",
160
+ "question": "Mosaic 的 section node 如果完全不設 padding,前台量到上下各有多少內距?",
161
+ "must": [
162
+ [
163
+ "(?<!\\d)80 ?px"
164
+ ]
165
+ ],
166
+ "source": "references/facts.md (section arrives with 80px)",
167
+ "trust": "measured",
168
+ "retired": "2026-11-16 r1: no-skill answer also matched"
169
+ },
170
+ {
171
+ "id": "unsafe-type-count",
172
+ "question": "在 mosaic-headless 的實測裡(Mosaic 1.0.11/1.0.12),單獨提交會讓請求失敗或讓整頁壞掉、被列為不安全(unsafe to commit)的 node type 有幾個?",
173
+ "must": [
174
+ [
175
+ "(?<!\\d)27(?!\\d)"
176
+ ]
177
+ ],
178
+ "source": "python tools/mo.py stats",
179
+ "trust": "measured"
180
+ },
181
+ {
182
+ "id": "modal-open-1010",
183
+ "question": "Mosaic 1.0.10 把 modal 改成 Popover API 之後,用 JavaScript 要怎麼判斷 modal 目前是開著的?dialog.open 還能用嗎?",
184
+ "must": [
185
+ [
186
+ ":popover-open|data-mosaic-dialog-state"
187
+ ],
188
+ [
189
+ "false|不能|不可|沒用|無效|永遠"
190
+ ]
191
+ ],
192
+ "source": "references/facts.md (Since 1.0.10 the modal is a Popover-API host)",
193
+ "trust": "measured",
194
+ "retired": "2026-11-16 r1: no-skill answer also matched"
195
+ },
196
+ {
197
+ "id": "custom-declarations-dvh",
198
+ "question": "在 Mosaic 的 customDeclarations 裡寫 height: 100dvh,同一個區塊其他宣告會怎樣?",
199
+ "must": [
200
+ [
201
+ "whole|entire|整個|全部|all|其他.{0,8}(也|一起|都)"
202
+ ],
203
+ [
204
+ "drop|丟|消失|不見|失效|無效|捨棄|移除|不會輸出"
205
+ ]
206
+ ],
207
+ "source": "references/facts.md (customDeclarations is all or nothing)",
208
+ "trust": "measured",
209
+ "retired": "2026-11-16 r1: no-skill answer also matched"
210
+ },
211
+ {
212
+ "id": "accordion-content-bare",
213
+ "question": "把 Mosaic 的 accordion-content 直接放在一般 div 底下提交,會發生什麼事?正確要放在哪裡?",
214
+ "must": [
215
+ [
216
+ "BROKE_PAGE|error string|錯誤字串|整頁|整個.{0,6}頁|54"
217
+ ],
218
+ [
219
+ "accordion-item"
220
+ ]
221
+ ],
222
+ "source": "python tools/mo.py type accordion-content",
223
+ "trust": "measured",
224
+ "note": "2026-11-16 r1: rubric relaxed - the 54-byte size was not the point of the question; the page-breaking verdict and the parent are"
225
+ },
226
+ {
227
+ "id": "local-loop-source",
228
+ "question": "Mosaic 的 local-context loop,loopSource 應該怎麼寫?為什麼不能用 @LOOP()?",
229
+ "must": [
230
+ [
231
+ "@VAR\\(\\s*'post/"
232
+ ],
233
+ [
234
+ "editor|編輯器"
235
+ ]
236
+ ],
237
+ "source": "references/facts.md (A local-context loop's loopSource)",
238
+ "trust": "measured"
239
+ },
240
+ {
241
+ "id": "button-text-editable",
242
+ "question": "headless 建 Mosaic 按鈕時,按鈕文字要放在什麼結構裡,客戶在編輯器才能雙擊編輯文字?",
243
+ "must": [
244
+ [
245
+ "\\btext\\b"
246
+ ],
247
+ [
248
+ "Inherited text|6381b2f3"
249
+ ]
250
+ ],
251
+ "source": "references/facts.md (A button's words go in a text node); tools/build_page.py wrap_text_runs",
252
+ "trust": "measured"
253
+ },
254
+ {
255
+ "id": "no-template-status",
256
+ "question": "Mosaic 網站上某個網址沒有任何範本對應時,未登入的訪客會收到什麼 HTTP 狀態碼和內容?",
257
+ "must": [
258
+ [
259
+ "(?<!\\d)406(?!\\d)"
260
+ ],
261
+ [
262
+ "empty|空白|空的|沒有內容|無內容"
263
+ ]
264
+ ],
265
+ "source": "references/core-rules.md (406 is Mosaic's no template matched)",
266
+ "trust": "measured"
267
+ },
268
+ {
269
+ "id": "unprobed-node-props",
270
+ "question": "mosaic-headless 的 node property 實測(node-property sweep)裡,有哪兩個宣告過的 property 名稱還沒有任何探測紀錄?",
271
+ "must": [
272
+ [
273
+ "ariaLive"
274
+ ],
275
+ [
276
+ "positioning"
277
+ ]
278
+ ],
279
+ "source": "python tools/mo.py stats; data/pending.csv",
280
+ "trust": "measured"
281
+ },
282
+ {
283
+ "id": "image-attachment-path",
284
+ "question": "Mosaic image node 用 wp-attachment:// 協定指定圖片時,路徑要相對於哪個目錄?如果寫成完整的 wp-content/uploads/... 會怎樣?",
285
+ "must": [
286
+ [
287
+ "uploads"
288
+ ],
289
+ [
290
+ "twice|兩次|重複|double|又加|再加|再次|second"
291
+ ]
292
+ ],
293
+ "source": "references/facts.md (attachment-protocol path)",
294
+ "trust": "measured",
295
+ "retired": "2026-11-16 r2: no-skill answer also matched"
296
+ },
297
+ {
298
+ "id": "variant-delete",
299
+ "question": "想刪掉 Mosaic 的一個 variant(例如 Heading 2 的樣式),對它送 status:\"delete\" 會怎樣?正確做法是什麼?",
300
+ "must": [
301
+ [
302
+ "ignor|忽略|沒有作用|無效|不會刪|不理"
303
+ ],
304
+ [
305
+ "empty|清空|空的|\\{\\s*\\}|states"
306
+ ]
307
+ ],
308
+ "source": "references/facts.md (A variant row cannot be deleted, only emptied)",
309
+ "trust": "measured"
310
+ },
311
+ {
312
+ "id": "class-name-grammar",
313
+ "question": "Mosaic 使用者自訂的 class 名稱(variant sub class、universal class)每一段最多幾個字元?哪個前綴是保留的不能用?名稱撞到時會怎樣?",
314
+ "must": [
315
+ [
316
+ "(?<!\\d)60(?!\\d)"
317
+ ],
318
+ [
319
+ "m-"
320
+ ],
321
+ [
322
+ "-2|編號|數字|suffix|後綴"
323
+ ]
324
+ ],
325
+ "source": "references/facts.md (User class names have a grammar)",
326
+ "trust": "documented"
327
+ }
328
+ ]
329
+ }
package/evals/grade.py ADDED
@@ -0,0 +1,121 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ grade.py — evals 評分:同一組真題,比「有 skill」與「沒有 skill」的答對率。
4
+
5
+ 流程(給其他 skill 照抄,只要換 cases.json):
6
+ 1. python evals/grade.py --questions > q.txt 只印題目,不含答案,交給作答者
7
+ 2. 作答者各跑一次,答案存成 evals/runs/<日期>-with-skill.json、-without-skill.json
8
+ 格式:{"meta": {"date": ..., "model": ..., "how": ...}, "answers": {"<id>": "<答案全文>"}}
9
+ 3. python evals/grade.py --with <檔> --without <檔> [--write]
10
+ --write 把結果加到 evals/RESULTS.md 最上面(舊紀錄保留)
11
+
12
+ 評分規則:cases.json 每題的 must 是「組」的清單,每一組至少命中一個正規式(不分大小寫),
13
+ 全部組都命中才算對。沒有 skill 也答對的題沒有鑑別度(SOP 6-4),不列入計分,要換題。
14
+
15
+ exit code:有 skill 的計分題答對率低於 --min(預設 90%)就回 1。
16
+ """
17
+ from __future__ import annotations
18
+
19
+ import argparse
20
+ import json
21
+ import re
22
+ import sys
23
+ from pathlib import Path
24
+
25
+ HERE = Path(__file__).resolve().parent
26
+ CASES = HERE / "cases.json"
27
+ RESULTS = HERE / "RESULTS.md"
28
+
29
+ for _s in (sys.stdout, sys.stderr):
30
+ if hasattr(_s, "reconfigure"):
31
+ _s.reconfigure(encoding="utf-8", errors="replace")
32
+
33
+
34
+ def load_cases() -> list[dict]:
35
+ # retired:已確認沒有鑑別度而換掉的題,保留在檔案裡當紀錄,不再作答與評分
36
+ return [c for c in json.loads(CASES.read_text(encoding="utf-8"))["cases"] if not c.get("retired")]
37
+
38
+
39
+ def correct(case: dict, answer: str) -> bool:
40
+ return all(any(re.search(p, answer or "", re.I) for p in group) for group in case["must"])
41
+
42
+
43
+ def load_run(path: str) -> tuple[dict, dict]:
44
+ data = json.loads(Path(path).read_text(encoding="utf-8"))
45
+ return data.get("meta", {}), data["answers"]
46
+
47
+
48
+ def report(cases, with_run, without_run) -> tuple[str, float]:
49
+ (wm, wa), (om, oa) = with_run, without_run
50
+ rows, counted, w_ok, o_ok, w_all, o_all = [], 0, 0, 0, 0, 0
51
+ for c in cases:
52
+ w, o = correct(c, wa.get(c["id"], "")), correct(c, oa.get(c["id"], ""))
53
+ w_all += w
54
+ o_all += o
55
+ if o and w:
56
+ note = "沒 skill 也對:不計分,要換題"
57
+ else:
58
+ counted += 1
59
+ w_ok += w
60
+ o_ok += o
61
+ note = "" if w else "有 skill 仍答錯"
62
+ rows.append(f"| `{c['id']}` | {c['trust']} | {'✅' if w else '❌'} | {'✅' if o else '❌'} | {note} |")
63
+ n = len(cases)
64
+ rate = w_ok / counted * 100 if counted else 0.0
65
+ date = wm.get("date") or om.get("date") or "?"
66
+ out = [
67
+ f"## {date}",
68
+ "",
69
+ "| 項目 | 有 skill | 沒有 skill |",
70
+ "|---|---|---|",
71
+ f"| 計分題答對率({counted} 題) | **{w_ok}/{counted}({rate:.1f}%)** | "
72
+ f"{o_ok}/{counted}({(o_ok / counted * 100 if counted else 0):.1f}%) |",
73
+ f"| 全部題目({n} 題) | {w_all}/{n} | {o_all}/{n} |",
74
+ f"| 模型 | {wm.get('model', '?')} | {om.get('model', '?')} |",
75
+ f"| 作答方式 | {wm.get('how', '?')} | {om.get('how', '?')} |",
76
+ f"| 答案檔 | `{wm.get('file', '')}` | `{om.get('file', '')}` |",
77
+ "",
78
+ "| 題目 | 可信度 | 有 skill | 沒有 skill | 備註 |",
79
+ "|---|---|---|---|---|",
80
+ *rows,
81
+ "",
82
+ ]
83
+ return "\n".join(out), rate
84
+
85
+
86
+ def main() -> int:
87
+ ap = argparse.ArgumentParser()
88
+ ap.add_argument("--questions", action="store_true", help="只印題目(給作答者,不含答案與評分)")
89
+ ap.add_argument("--with", dest="with_", help="有 skill 的答案檔")
90
+ ap.add_argument("--without", help="沒有 skill 的答案檔")
91
+ ap.add_argument("--write", action="store_true", help="把結果加到 RESULTS.md 最上面")
92
+ ap.add_argument("--min", type=float, default=90.0, help="有 skill 計分題答對率門檻(%%)")
93
+ args = ap.parse_args()
94
+ cases = load_cases()
95
+
96
+ if args.questions:
97
+ for c in cases:
98
+ print(f"{c['id']}\t{c['question']}")
99
+ return 0
100
+ if not (args.with_ and args.without):
101
+ ap.error("要給 --with 與 --without,或用 --questions")
102
+
103
+ runs = []
104
+ for p in (args.with_, args.without):
105
+ meta, ans = load_run(p)
106
+ meta.setdefault("file", Path(p).as_posix().split("mosaic-headless/")[-1])
107
+ runs.append((meta, ans))
108
+ text, rate = report(cases, runs[0], runs[1])
109
+ print(text)
110
+
111
+ if args.write:
112
+ head = "# evals 結果\n\n最新的在最上面。題目與評分標準見 `cases.json`,評分程式 `grade.py`。\n\n"
113
+ old = RESULTS.read_text(encoding="utf-8") if RESULTS.exists() else head
114
+ body = old[len(head):] if old.startswith(head) else old
115
+ RESULTS.write_text(head + text + "\n" + body, encoding="utf-8")
116
+ print(f"已寫入 {RESULTS}")
117
+ return 0 if rate >= args.min else 1
118
+
119
+
120
+ if __name__ == "__main__":
121
+ raise SystemExit(main())
@@ -0,0 +1,29 @@
1
+ {
2
+ "meta": {
3
+ "date": "2026-11-16",
4
+ "model": "claude-opus-5-5",
5
+ "how": "subagent 讀 SKILL.md、用 mo.py 與 references 查(r1+r2 合併)"
6
+ },
7
+ "answers": {
8
+ "select-split-1012": "1.0.12 的結構:select > select-toggle(內含 select-placeholder 與 icon 箭頭)+ select-options > select-option。select-option 的標籤改成子節點(text > wysiwyg-text),不再用 text 屬性;值放在 value。舊的 select-input 已不存在(mo.py type select-input 回 no such node type)。原生下拉改用 listbox > listbox-option(多選或 size>1 時,data upgrade 會轉成這個)。前台輸出 <mosaic-select class=m-select> 加一個隱藏的 <input class=m-select-input>。來源:mo.py type select / select-toggle / select-options / select-option、references/upgrading.md(Select split)、failure-modes.md。",
9
+ "scrolldepth-slot-1010": "1.0.10 起 scrollDepth 宣告兩個 slot:reached(捲到門檻)與 returned(捲回門檻以上)。動作要寫在 actionSlots.reached。如果還放在舊的 slot 名稱 scrollDepth 底下,資料會被存下來,但因為該 type 已經不宣告這個 key,不會匯出,動作永遠不會執行,而且沒有任何錯誤。data upgrade 會把舊資料(含 completedAfter: scrollDepth)搬到 reached;interactionShorthand 寫法不受影響。來源:references/dialog-and-triggers.md、facts.md、upgrading.md。",
10
+ "popover-trigger-slots": "popover 觸發器(Popover visibility change,Element events 群組)有三個 slot:show、beforeClose(原生隱藏會等它跑完)、afterClose(popover 已經隱藏之後)。三步驟導覽的下一步要掛在目前這一步自己的 afterClose(在 afterClose 裡執行 popoverOpen 下一步)。不能在第一步內的「下一步」按鈕直接開下一步:從 dialog 裡打開的 dialog 會變成它的子層,父層關閉時會一起被關掉;關閉 popover 也會暫停它裡面所有元素的 interactions。「下一步」按鈕只負責關閉自己這一步。來源:mo.py interactions、references/dialog-and-triggers.md、facts.md。",
11
+ "popover-flipped-state": "用 style state ___popover--flipped(mo.py states --grep flip:scope node-type、host popover、swept COMPILED,selector 是 .m-popover[data-mosaic-popover-flipped])。來源:mo.py states --grep flip、facts.md。",
12
+ "shorthand-interaction-types": "只有三種:pageLoad、exitIntent、scrollDepth(來源碼 InteractionTypesManager::getShorthandInteractionTypes())。這三種都不需要元素先可見、可互動,而 modal 在打開前是 display:none。用其他種(例如 elementScrollIntoView)會被無聲丟棄:modal 的 aria 屬性照常輸出,但頁面的 mosaicInteractions 沒有它,modal 永遠不會打開。「不要自動打開」要寫 type: manual。另外 shorthand 不能帶 conditions。來源:references/dialog-and-triggers.md、facts.md。",
13
+ "interaction-value-shape": "initial 和 keyframe 的 properties 要用屬性 META 的 uuid 當 key,不能用屬性名稱(例如 opacity)。值要寫成帶單位的 CSS 字串,例如 「0%」「40px」「0px」,不能寫數字。timed 觸發器的 keyframe 用 duration / delay(毫秒);只有 progress 類(scrollIntoView、pointerMove)用 progressData 0-100。用數字或用屬性名稱當 key,存下來的都是零值。建議用 tools/interactions.py 產生,不要手寫。來源:references/interactions.md、mo.py interactions。",
14
+ "wysiwyg-text-escape-1011": "1.0.11 起 wysiwyg-text 會跳脫 < 和 >,前台會直接顯示文字 A<strong>B</strong>(HTML 是 A&lt;strong&gt;B&lt;/strong&gt;),不會變成粗體。正確做法是用節點:粗體在 wysiwyg-text 設 format: [bold](輸出 <strong>;斜體是 [italic]),或用 wysiwyg-span(<span class=m-span>,再加樣式);換行用 wysiwyg-linebreak(<br>);行內連結用帶 url 的 wysiwyg-link。每個節點底下都放自己的 wysiwyg-text。bold 和 italic 同時設在 1.0.11 會巢狀錯誤,inline_html.py 改成用有樣式的 wysiwyg-span。舊站可以用 scan_inline_tags.py / fix_inline_tags.py 修正。來源:references/facts.md、upgrading.md。",
15
+ "pro-only-types-1011": "1.0.11 之後需要 Pro 的只剩 5 個:code、modal、modal-overlay、modal-window、popover。表單系統、slider、tabs 共 49 個 type 移到 Free。來源:mo.py types --edition pro、references/upgrading.md。",
16
+ "url-capable-types": "只有四種:button、menu-link、wysiwyg-link、dropdown-toggle。url 放在 text 或 image 上會被接受、也會存下來,但完全不會輸出 <a>。要讓其他東西可點,要用 button 包起來,style.variant 設成 Link variant(m-link),帶 url 就會輸出 <a class=m-link href>;這就是編輯器「Wrap in link」寫入的結構。來源:references/facts.md。",
17
+ "section-default-padding": "上下各 80px(實測:spec 沒設 padding 的 section,前台量到 top / bottom 各 80px,夾在兩個區塊之間就會多出 160px 空白)。要明確設定 paddingTop / paddingBottom。來源:references/facts.md、responsive.md。",
18
+ "unsafe-type-count": "27 個(BROKE_PAGE 12 + COMMIT_500 14 + COMMIT_502 1):accordion-content、accordion-item、accordion-title、checkbox-input、component-instance、document、form-multi-steps-steps、loop、loop-items、loop-pagination、loop-pagination-button-next、loop-pagination-button-previous、loop-pagination-number、loop-pagination-numbers、multi-steps-form-step、multi-steps-forms、radio-input、slider、slider-navigation、slider-navigation-bullet、slider-slide、slider-slides、tabs-content、tabs-loop-tabs、tabs-menu、tabs-tab、wysiwyg-variable。來源:mo.py stats、mo.py types --unsafe。",
19
+ "modal-open-1010": "1.0.10 的 modal 是 <dialog popover=manual>,用 showPopover() 打開,會進入 top layer。dialog.open 不能用,它永遠是 false,拿它判斷的話每個 modal 都會被當成關著。要用 el.matches(':popover-open') 判斷,或讀 data-mosaic-dialog-state=open。要從程式關閉,用 el.mosaicDialog.requestClose()(回傳 Promise);close() 已經不存在。來源:references/dialog-and-triggers.md、facts.md。",
20
+ "custom-declarations-dvh": "整個 customDeclarations 區塊都會被無聲丟棄。驗證器會解析每一條宣告,只要一個值不合格就丟掉整塊,而 dvh(還有 svh、lvh、dvw、容器單位)不在 ValidatorCustomDeclarations 的單位清單裡,!important 也一樣會失敗。要用 dvh 的話,改用結構化的 height / maxHeight 欄位,它們接受 dvh。來源:references/facts.md、styling.md。",
21
+ "accordion-content-bare": "會 BROKE_PAGE:提交成功,但整個公開頁面變成一行錯誤字串(AccordionItemElementMResource instance required)。mo.py 判定為 UNSAFE - DO NOT COMMIT。它要放在 accordion-item 底下(accordion-title 與 accordion-content 是 accordion-item 透過 heal() 帶進來的子節點),accordion-item 再放在 accordion 裡。來源:mo.py type accordion-content。",
22
+ "local-loop-source": "loopType: localContext 的 loopSource 要寫成 {\"v\": \"@VAR('post/<loop名稱>')\"},例如 @VAR('post/loopacf_rel')。不能用 @LOOP():loop evaluator 只執行它拿到的函式呼叫,不看函式名稱;@VAR 會解析出 loop,@LOOP 則會呼叫 null。前台兩種都能顯示,但 @LOOP 在編輯器會丟出 _loopEvaluatorFunction is not a function,畫布永遠載入不完,build_page.py 也會拒絕。@LOOP(…) 放在文字裡面沒問題。來源:references/facts.md、custom-fields.md、failure-modes.md。",
23
+ "button-text-editable": "要用編輯器原生的結構 button > text(Inherited text variant,6381b2f3…)> wysiwyg-text。如果把 wysiwyg-text 直接放在 button 底下,前台看起來一樣,但在編輯器裡 navigator 看不到子節點,雙擊只會打開連結設定,沒辦法編輯文字。build_page.py 會自動包好(wrap_text_runs),所以 spec 用 「text」 簡寫就安全;舊站可以用 tools/fix_text_runs.py 修正。menu-link、dropdown-toggle、tabs、submit 的標籤也一樣。來源:references/facts.md、SKILL.md 的五個常見錯誤。",
24
+ "no-template-status": "HTTP 406。406 是 Mosaic 的「沒有範本對應」:FrontendRenderer 接到 TemplateNotFoundException 時呼叫 status_header(406),說明文字只印給管理員看,所以未登入訪客拿到的是一個空白頁加上 406 狀態碼,看起來像伺服器出問題。最常踩到的情況:剛 wp theme activate 一個新佈景、還沒建好範本(或建置失敗)時,整站都會是 406。所以驗證要用登出狀態讀頁面。(來源:`mo.py facts visitor` → references/core-rules.md「406 is Mosaic's \"no template matched\"」)",
25
+ "unprobed-node-props": "`ariaLive` 和 `positioning`。這兩個都只宣告在 `popover` 上,`mo.py prop` 查出來的 verified 都是「not probed」(ariaLive 的值是 off / polite / assertive)。`mo.py stats` 也列出:191 筆探測紀錄涵蓋了 120 個宣告名稱中的 118 個。(來源:SKILL.md Sources 表、`mo.py stats`、`mo.py prop ariaLive`、`mo.py prop positioning`)",
26
+ "variant-delete": "Variant 不能刪除,只能清空。對 variant 送 `status:\"delete\"`,伺服器會接受但直接忽略,因為 variant 那一列有 catalog 撐著。正確做法是把那一列 commit 回去,內容設成 `{\"states\": {\"&\": {\"_\": {}}}}`,這樣它的 CSS 規則就會消失(在 Heading 2 上實測過)。對照組:universal class 沒有 catalog 撐著,用 `status:\"delete\"` 就真的會刪掉。ID 要用 `name` 去 data/variants.csv 查(用 `mo.py classes --grep Heading`)。(來源:`mo.py facts status` → references/facts.md、references/design-system.md)",
27
+ "class-name-grammar": "每一段最多 60 個字元。名稱會被整理成 `[a-z0-9_-]` 的段落,段落之間用 `--` 串起來(例如 `m-button--primary--sm`)。保留前綴是 `m-`;段落也不能以 `_` 或數字開頭(`m-` 會被拿掉)。名稱撞到時,系統會自動在後面加 `-2`、`-3` 去重複;emitted name 在同一個佈景內是唯一的(四張表的 `emittedName` 欄位有 unique index),所以兩個 class 不可能是同一個拼法。整理完變成空字串的名稱,會退回成 `class`。整理規則還包括:轉寫成拉丁字母、轉小寫、連續的 `-` 合併,尺寸級距也會統一(`s`→`sm`、`m`→`md`、`l`→`lg`、`xxs`→`2xs`)。(來源:`mo.py facts reserved` → references/facts.md「User class names have a grammar」、references/upgrading.md ClassNameHelper 段落、references/design-system.md)"
28
+ }
29
+ }