@qijenchen/design-system 0.1.0-beta.35 → 0.1.0-beta.37
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.md +3 -3
- package/ds-canonical/hooks/check_dim_count_drift.sh +3 -3
- package/ds-canonical/hooks/check_pattern_invariants.sh +3 -1
- package/ds-canonical/hooks/check_post_main_ssot_propagate.sh +1 -1
- package/ds-canonical/hooks/check_storybook_addon_preset_cjs.sh +7 -2
- package/ds-canonical/hooks/inject_deploy_url_after_push.sh +5 -1
- package/ds-canonical/hooks/lib/_token_hygiene.sh +3 -2
- package/ds-canonical/hooks/session_start_governance_check.sh +32 -3
- package/ds-canonical/hooks/tests/test_check_token_hygiene.sh +1 -1
- package/ds-canonical/references/build-ui-canonicals.md +2 -2
- package/ds-canonical/references/item-anatomy-recipe.md +1 -1
- package/ds-canonical/references/ssot-consultation.md +1 -1
- package/ds-canonical/references/tailwind-gotchas.md +1 -1
- package/ds-canonical/rules/meta-patterns.md +2 -2
- package/ds-canonical/rules/story-rules.md +4 -4
- package/ds-canonical/skills/README.md +2 -2
- package/ds-canonical/skills/bug-fix-rhythm/SKILL.md +1 -1
- package/ds-canonical/skills/code-quality-audit/SKILL.md +2 -2
- package/ds-canonical/skills/codex-collab/SKILL.md +4 -4
- package/ds-canonical/skills/codify-corrections/SKILL.md +5 -5
- package/ds-canonical/skills/codify-principle/SKILL.md +2 -2
- package/ds-canonical/skills/component-quality-gate/SKILL.md +6 -6
- package/ds-canonical/skills/deep-audit-cross-codex/SKILL.md +5 -58
- package/ds-canonical/skills/deep-audit-cross-codex/references/phase-a-workflow.md +2 -2
- package/ds-canonical/skills/deep-audit-cross-codex/references/phase-b-codex-brief.md +23 -2
- package/ds-canonical/skills/deep-audit-cross-codex/references/skill-relationships-antipatterns-benchmarks.md +30 -0
- package/ds-canonical/skills/deep-audit-cross-codex/references/upstream-directives-r-mapping.md +33 -0
- package/ds-canonical/skills/design-system-audit/SKILL.md +24 -10
- package/ds-canonical/skills/design-system-audit/references/audit-prompts.md +16 -16
- package/ds-canonical/skills/design-system-audit/references/principle-audit-protocol.md +1 -1
- package/ds-canonical/skills/design-system-audit/references/rule-placement.md +10 -10
- package/ds-canonical/skills/ensure-canonical/SKILL.md +2 -2
- package/ds-canonical/skills/governance-health/SKILL.md +3 -2
- package/ds-canonical/skills/knowledge-prune/SKILL.md +10 -77
- package/ds-canonical/skills/knowledge-prune/references/phase-z-cross-repo-ssot-propagation.md +11 -0
- package/ds-canonical/skills/knowledge-prune/references/prune-dimensions-d5-d10.md +55 -0
- package/ds-canonical/skills/knowledge-prune/references/world-class-prune-alignment.md +7 -0
- package/ds-canonical/skills/new-component/SKILL.md +1 -1
- package/ds-canonical/skills/new-component/references/new-component-checklist.md +1 -1
- package/ds-canonical/skills/product-ui-audit/SKILL.md +9 -9
- package/ds-canonical/skills/product-ui-audit/references/audit-checks.md +3 -3
- package/ds-canonical/skills/product-ui-audit/references/report-template.md +1 -1
- package/ds-canonical/skills/propose-options/SKILL.md +18 -18
- package/ds-canonical/skills/prototype/SKILL.md +2 -2
- package/ds-canonical/skills/prototype/references/audit-checks.md +1 -1
- package/ds-canonical/skills/prototype/references/evaluation-matrix.md +1 -1
- package/ds-canonical/skills/prototype/references/proposal-template.md +1 -1
- package/ds-canonical/skills/scan-similar-bugs/SKILL.md +5 -5
- package/ds-canonical/skills/story-auto-compile-migrate/SKILL.md +2 -2
- package/ds-canonical/skills/story-writing/SKILL.md +3 -3
- package/ds-canonical/skills/story-writing/references/anatomy-standard.md +2 -2
- package/ds-canonical/skills/story-writing/references/category-templates.md +2 -2
- package/ds-canonical/skills/visual-audit/SKILL.md +3 -3
- package/ds-canonical/skills/visual-audit/references/visual-checklist.md +3 -3
- package/ds-canonical/skills/visual-audit/references/world-class-benchmarks.md +2 -2
- package/ds-story-manifest.json +1 -1
- package/package.json +1 -1
- package/src/styles/base.css +42 -5
- package/src/styles/tokens.css +1 -1
- package/src/tokens/color/primitives.css +7 -0
|
@@ -11,6 +11,25 @@ ls -la ~/.codex/auth.json # 3 Auth(
|
|
|
11
11
|
|
|
12
12
|
**Decision**:1 ✅ → local CLI / 1 ❌ + 2 ✅ → global / 1+2 ❌ + 3 ✅ → `npm install` / 全 ❌ → 報 user。**禁 Explore agent 替身**(M31)。
|
|
13
13
|
|
|
14
|
+
## B.0.1 — Exec invocation(2026-05-30 bypass-parity,user-authorized;取代 audit-verify 場景的舊 `exec -s read-only`)
|
|
15
|
+
|
|
16
|
+
**Why**:`-s read-only` 只能 grep/read,跑不了 tsc/playwright/.mjs → verify 不對稱(Claude 機械驗、codex 只目測)違反 M31 Step 2「不可只一方 verify」。bypass 讓 codex 做**跟 Claude 一模一樣**的機械驗證。
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
node_modules/.bin/codex exec \
|
|
20
|
+
--dangerously-bypass-approvals-and-sandbox \ # user-authorized;codex shell 可跑 audit script
|
|
21
|
+
--skip-git-repo-check -C "$PWD" \ # 同 repo root → 同 spec.md / scripts / node_modules
|
|
22
|
+
-c model_reasoning_effort=low \ # 避大 brief plan-turn 燒 budget(per memory Rule 3)
|
|
23
|
+
--output-last-message /tmp/codex-phaseB.md \ # 截 verdict artifact 供 Step 4.5 diff
|
|
24
|
+
< brief.md > /tmp/codex-phaseB.log 2>&1 &
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**安全護欄(bypass 解鎖 shell 但仍禁寫源)**:
|
|
28
|
+
- Brief 必含「**禁 edit / delete / write `packages/design-system/src/**` 及任何 DS 源**;只跑唯讀 audit script + grep + Playwright screenshot」。
|
|
29
|
+
- **每次 bypass 需 user explicit authorize**(anti-pattern:AI 自動 bypass 不問,per `memory/feedback_codex_exec_transport_canonical`)。
|
|
30
|
+
- codex 截圖寫 `/tmp/codex-screenshots/`(不污染 repo)。
|
|
31
|
+
- 純讀 / cite-only 場景(非 audit-verify)仍用 `-s read-only`(bypass 只給「需跑 script 才能機械驗」的 Phase B verify)。
|
|
32
|
+
|
|
14
33
|
## B.1 Brief template
|
|
15
34
|
|
|
16
35
|
⚠️ **Faithful relay invariant**(M31 Step 0.05,user-verbatim,不可只送 paraphrase):
|
|
@@ -42,12 +61,14 @@ ls -la ~/.codex/auth.json # 3 Auth(
|
|
|
42
61
|
|
|
43
62
|
1. **全盤閱讀**(per A.0 file list,不 sample):
|
|
44
63
|
- CLAUDE.md / `.claude/rules/*` / `.claude/references/*`
|
|
45
|
-
- `packages/design-system/src/**/*.spec.md` 全部(~
|
|
64
|
+
- `packages/design-system/src/**/*.spec.md` 全部(brief-gen 時跑 `find packages/design-system/src -name '*.spec.md' | wc -l` 取真數,當前 ~83,禁硬寫)
|
|
46
65
|
- `packages/design-system/src/tokens/**/*.spec.md` + `packages/design-system/src/patterns/**/*.spec.md`
|
|
47
66
|
- `~/.claude/.../memory/MEMORY.md` index + active project memory
|
|
48
67
|
|
|
49
|
-
2. **全 dim deep audit NO-SAMPLE**(對齊 `.claude/skills/design-system-audit/SKILL.md` Group A-
|
|
68
|
+
2. **全 dim deep audit NO-SAMPLE**(對齊 `.claude/skills/design-system-audit/SKILL.md` Group A-Q 全 dim):
|
|
69
|
+
- **live dim 清單由 Claude brief-gen 時注入**:跑 `node scripts/dispatch-audit-dims.mjs --summary` 把編號 / batch 貼進 brief,並要求 codex **自己再跑一次自確認**(read-only 跑不了 → 用 bypass 跑;禁硬寫 dim 數字,per SKILL.md SSOT-integrity invariant)
|
|
50
70
|
- 每 dim 全 DS-wide 掃,禁 sample top N
|
|
71
|
+
- **機械維度 codex 自己跑**(bypass sandbox,做跟 Claude 一樣的事):`npx tsc -b` / `node scripts/audit-content-quality.mjs --check` / 相關 `node scripts/*-invariants.mjs` / Playwright screenshot(sequential navigate→wait→screenshot→evaluate,per memory Rule 2,禁 batch unsafe)。**貼每個 command 的 literal stdout 當 cite**;真跑不了的(帳號 / 網路 scoped)明標「mechanical-uncoverable, eyeball-only」讓 Claude B.2 補跑
|
|
51
72
|
- 每 finding 必 cite: <file:line> + <quote> + <違反 spec / rule>
|
|
52
73
|
|
|
53
74
|
3. **整理完整報告**(P0 / P1 / P2 分類):
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Skill 分工 + Anti-pattern + 世界級對照(deep-audit-cross-codex SKILL.md 抽出)
|
|
2
|
+
|
|
3
|
+
## 與其他 skill 分工
|
|
4
|
+
|
|
5
|
+
| Skill | Scope | 不重疊 |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| `/design-system-audit --deep` | 全 dim Claude solo audit | 本 skill chain 為 Phase A.1,額外 Phase B + 全盤閱讀 preflight + 比稿辯論 |
|
|
8
|
+
| `/codex-collab` | M31 5-step dual-track for **任意題目** | 本 skill chain 為 Phase B,額外 Phase A 前置 + 全 dim 完整覆蓋(per design-system-audit SSOT) + Phase C 共識 commit |
|
|
9
|
+
| `/propose-options` | M18 4-Q gate single propose | 本 skill A.2 / B.5 chain 用它格式化 propose |
|
|
10
|
+
| `/ensure-canonical` | M19 5-layer auto-pipeline | 本 skill A.3 / B.5 chain 用它落地 canonical |
|
|
11
|
+
| `/knowledge-prune` | 治理文件冗贅清 | **Transitively chained**:Phase A.1 chain `/design-system-audit --deep` → Phase 4.5 auto-chain `/knowledge-prune`(per `design-system-audit/SKILL.md:334-340` 9-trigger 條件)。SSOT 透過 `Skill` tool 直接 invoke,**不**重寫 prune logic / **不**複製 phase。Mechanical signal:`check_audit_post_report_validator.sh:81` emit `prune-chain-trigger` → `inject_pending_self_audit.sh` parse `.claude/logs/audit-post-report-validator.jsonl` → next-turn inject directive |
|
|
12
|
+
| `/bug-fix-rhythm` | surgical visual bug 修 | 正交,本 skill 是 broad sweep;surgical bug 不該觸發本 skill |
|
|
13
|
+
|
|
14
|
+
## Anti-pattern(永久 ban)
|
|
15
|
+
|
|
16
|
+
- ❌ Skip A.0 全盤閱讀(憑記憶判斷哪些 spec 該讀)
|
|
17
|
+
- ❌ A.1 sub-agent prompt 含「sample top N」/「heavy agent skip」escape
|
|
18
|
+
- ❌ A.2 propose 用 jargon(L1-L7 / SSOT / canonical 在 propose 內裸用)
|
|
19
|
+
- ❌ 跳 Phase B 只跑 Phase A(除非 codex transport 全失敗 + user 同意)
|
|
20
|
+
- ❌ B.2 收 codex reply 直接 paste 給 user(pass-through,M31 Step 4.5 verify 跳)
|
|
21
|
+
- ❌ B.4 disagreement 用直覺 vote / 「兩邊都對」打太極(cite battle invariant)
|
|
22
|
+
- ❌ C.2 AI 自決 merge main(M28 violation)
|
|
23
|
+
- ❌ Phase A 完成沒等 user 拍板 SSOT-UI/UX 就進 Phase B(scope 跑掉)
|
|
24
|
+
|
|
25
|
+
## 世界級對照
|
|
26
|
+
|
|
27
|
+
- **RFC 學術同儕審查**:作者 v1 + reviewer v2(獨立)+ public cite battle 收斂共識
|
|
28
|
+
- **Linux kernel patch review**:Maintainer first-pass + lkml mailing list 二 review + cite source 比稿
|
|
29
|
+
- **Google ML eng-design-review**:proposer + adversarial reviewer + structured disagreement protocol
|
|
30
|
+
- **Anthropic constitutional AI critic + revise**:同 model 不同 prompt 互審 → 本 skill 升級成跨 model
|
package/ds-canonical/skills/deep-audit-cross-codex/references/upstream-directives-r-mapping.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Upstream context / framing + user-verbatim directives + R18-R26 mechanical-mapping(deep-audit-cross-codex SKILL.md 抽出)
|
|
2
|
+
|
|
3
|
+
## SSOT integrity invariant + 生態位 + 上游 canonical 全繼承
|
|
4
|
+
|
|
5
|
+
> **SSOT integrity invariant**(2026-05-18 user-mandated):本 skill 的 audit dim list **完全 chain `/design-system-audit --deep` SSOT**(`.claude/skills/design-system-audit/SKILL.md` `## The N audit dimensions` 段)。
|
|
6
|
+
>
|
|
7
|
+
> **禁** hardcode dim count(`46 dim` / `53 dim` 等具體數字)— 用「全 dim」/「Group A-P」/「per design-system-audit SSOT」表達。新增 / 刪除 / 修改稽核項目 → **只動 design-system-audit/SKILL.md**,本 skill 自動繼承。
|
|
8
|
+
>
|
|
9
|
+
> Mechanical 強制:hook `check_dim_count_drift.sh` 攔 Edit 寫死數字。
|
|
10
|
+
|
|
11
|
+
**生態位**:`/design-system-audit --deep` 是 Claude solo 全 dim 稽核 SSOT;本 skill 是**雙 model 完整 sweep**(Claude solo → codex parallel → 比稿辯論共識 → 落地),chain 既有 audit dim 不 fork。
|
|
12
|
+
|
|
13
|
+
**上游 canonical 全繼承**(per user「避免膨脹但別漏」):本 skill chain CLAUDE.md 全 mindset + meta-patterns 全 active M-rules + 治理 8-home / 自主執行 / 命名 SSOT canonical,**不重述、不 hardcode count(避 R19 膨脹),全靠 reference**。
|
|
14
|
+
|
|
15
|
+
## 上游 user-verbatim directives + R18-R26 對齊
|
|
16
|
+
|
|
17
|
+
對齊 mindset #1「不取巧省工」+ M31 dual-track + 用戶 2026-05-18 directive(verbatim):
|
|
18
|
+
|
|
19
|
+
> 「完整深度進階稽核整個 design system」+「codex 跑相同的完整深度進階稽核」+「跟 codex 討論辯論出共識」+「SSOT-UI/UX 增刪改需要用中文具體人話言簡意賅地講給我聽讓我判斷決策,其他的決策基本上就是不以省工為前提...自主自動自發地做到完整、完美」
|
|
20
|
+
|
|
21
|
+
**+ 用戶 2026-05-29 directive(verbatim,permanent codify)**:
|
|
22
|
+
|
|
23
|
+
> 「你應該要確保任何 infra 包括各種 Claude.md, skills, hooks 等在 ds repo, template repo, fork template 的 repo, 都能正常順利如預期的運作達到預期的效果, 且流程都正確無誤,且該維持 SSOT 的部分又能完全維持」+「我們的工作流程就是用 claude code 直接連去 repo 進行各種增刪改, 然後要可以部署出來讓人驗證, 驗證完成之後再推去 main」+「確保環境建置是能夠全雲端的, 且該自動化的就自動化, 真的無法自動化的要有具體的言簡意賅的中文明確引導」+「確保所有原則都是足夠泛化可以用來舉一反三的原則, 避免原則無限膨脹, 沒有多餘重複的且是 SSOT, 並確保所有 infra 都是最佳有效率的 claude code 實務, 並確保 infra 能夠產出世界級的設計並符合我們一致的設計語言和確保 ssot, 然後所有程式碼都是乾淨簡潔易懂好維護好管理的, 且是會有大腦地自動優化不斷改善, 確保自己永遠符合上述原則」
|
|
24
|
+
|
|
25
|
+
**機械強制 R18-R26 對齊**:
|
|
26
|
+
- R18 泛化 / 舉一反三 → 上游 mindset #6 + meta-patterns velocity ≤ 3/quarter(`/knowledge-prune`)
|
|
27
|
+
- R19 避免膨脹 → 上游治理 canonical 行數預算 + `/knowledge-prune` 季度
|
|
28
|
+
- R20 無多餘重複 SSOT → 上游 Rule-of-3(`/knowledge-prune` D1 + ensure-canonical Phase 3)
|
|
29
|
+
- R21 最佳 Claude Code 實務 → 上游「世界級對照」section
|
|
30
|
+
- R22 世界級 + 一致設計 → 上游 mindset #1 + A.3 7 目標 simultaneous
|
|
31
|
+
- R24 code clean → chain `/code-quality-audit`(Phase A.4 verify chain)
|
|
32
|
+
- R25 大腦自動 self-improve → chain `/ensure-canonical` Phase F + M14
|
|
33
|
+
- R26 永遠符合 → M19 trigger phrase auto-pipeline(`stop_self_audit.sh` 機械強制)
|
|
@@ -3,7 +3,9 @@ name: design-system-audit
|
|
|
3
3
|
description: Systematic audit of this design system for world-class quality. Runs the full audit dimension list(per `## The N audit dimensions` section) covering spec hygiene / code correctness / a11y / naming / tokens / patterns / CLAUDE.md consistency / Layout Family compliance / prop value collisions / shadcn alias leakage / home-name-vs-scope fit / spec hardcoded-values, and surfaces actionable fix lists. Has explicit checkpoints where the skill MUST stop and ask user. Invoke via /design-system-audit when asked to audit, re-audit, check quality, or verify design system health.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Design System Audit (
|
|
6
|
+
# Design System Audit (Groups A–Q + Future-proof preflight; dim count canonical per `check_dim_count_drift.sh` / `dispatch-audit-dims.mjs` SSOT — 禁 hardcode)
|
|
7
|
+
|
|
8
|
+
> **Budget note**:本檔 = 88-dim **registry SSOT**(foundational;dispatch-audit-dims.mjs / deep-audit / check_dim_count_drift 全 parse 此檔),per CLAUDE.md `# 治理 canonical`「foundational SSOT 例外 ≤ 800-1200」,**不受 250 SKILL cap**(dim table 本質就是 registry,拆出會 break dispatch parser SSOT)。
|
|
7
9
|
|
|
8
10
|
Purpose: catch every bug class this project has shipped historically PLUS structural gaps relative to Polaris / Material / Atlassian / Ant / Carbon / Apple HIG. Each audit has a clear rubric tied to CLAUDE.md rules. The skill reports findings and **explicitly stops at checkpoints** for user decisions before large-scope fixes.
|
|
9
11
|
|
|
@@ -81,7 +83,7 @@ Grouped by theme. Each runs as an independent subagent; many can parallelize.
|
|
|
81
83
|
|---|-------|-----------------|
|
|
82
84
|
| 16 | **Layout Family 宣告** | 每個 component spec 第一段必須宣告「Layout Family: 1/2/3/4」或明示「非 family(self-contained / composite)」; 缺漏代表元件遊離於系統 |
|
|
83
85
|
| 17 | **Prop value 跨元件認知衝突** | 同字 literal 在不同元件作 prop value 但語義衝突(`text` 是 Button `variant="text"` 文字樣式,若 FileItem `mode="text"` 變成「文字為主呈現」= 雙語義,consumer 混淆)——命名三 test 第 3 條強制檢查 |
|
|
84
|
-
| 18 | **shadcn compat alias 回流檢查** | grep `bg-popover / text-popover-foreground / text-muted-foreground / bg-accent / text-accent-foreground / bg-destructive / bg-background` 等在我們的元件 code——這些是 shadcn copy-paste 安全網,我們元件應用 direct token。每次 audit 重新 grep 防 `npx shadcn add X` 新生成的 code 留下 alias |
|
|
86
|
+
| 18 | **shadcn compat alias 回流檢查** | grep `bg-popover / text-popover-foreground / text-muted-foreground / bg-accent / text-accent-foreground / bg-destructive / bg-background` 等在我們的元件 code——這些是 shadcn copy-paste 安全網,我們元件應用 direct token。每次 audit 重新 grep 防 `npx shadcn add X` 新生成的 code 留下 alias。完整 deny-list SSOT:`tokens/utility-registry.json`(新增 alias 改 registry;此 grep pattern + product-ui Dim 1 對齊同 SSOT)|
|
|
85
87
|
|
|
86
88
|
### Group G — Home governance + spec hygiene (P1 priority)
|
|
87
89
|
|
|
@@ -95,7 +97,7 @@ Grouped by theme. Each runs as an independent subagent; many can parallelize.
|
|
|
95
97
|
| # | Audit | What it catches |
|
|
96
98
|
|---|-------|-----------------|
|
|
97
99
|
| 21 | **連續 item list wrapper gap**(consumer 層 Consistency)| consumer stories / app code 的 `.map()` list wrapper gap 是否對齊 item 元件的「List wrapper canonical」:standalone card/pill → 必 gap;flush/transparent → 0 gap OK;mixed 視覺語言 → 必取保守 gap。hook `check_item_list_gap.sh` 是預警層,本 dim 補 audit 層 |
|
|
98
|
-
| 22 | **視覺容器 inner breathing**(consumer 層 Absolute)| consumer 自建的視覺邊界容器(permanent bg / border / shadow 三擇一)是否有 inner padding。hook `check_container_breathing.sh`
|
|
100
|
+
| 22 | **視覺容器 inner breathing**(consumer 層 Absolute)| consumer 自建的視覺邊界容器(permanent bg / border / shadow 三擇一)是否有 inner padding。hook `check_container_breathing.sh`(retired;audit-only via dim 22)— 本 dim batch sweep 即檢查,補 multi-line className / 非 div 容器的 case |
|
|
99
101
|
|
|
100
102
|
### Group I — Story auto-compile drift(2026-04-24 新增 C Phase 4)
|
|
101
103
|
|
|
@@ -115,14 +117,14 @@ Grouped by theme. Each runs as an independent subagent; many can parallelize.
|
|
|
115
117
|
|
|
116
118
|
| # | Audit | What it catches |
|
|
117
119
|
|---|-------|-----------------|
|
|
118
|
-
| 27 | **Clean code 量化**(auto-chain `/code-quality-audit`)| `any` 使用(無 `// any-allow` escape) / dead export / tsx file-size budget 500(cap 800) / long function > 80 行 / circular dep / magic number(與 `
|
|
120
|
+
| 27 | **Clean code 量化**(auto-chain `/code-quality-audit`)| `any` 使用(無 `// any-allow` escape) / dead export / tsx file-size budget 500(cap 800) / long function > 80 行 / circular dep / magic number(與 token 防線 `lib/_token_hygiene.sh` + `check_opacity_token_usage.sh` 正交)。進階模式 `--deep` 必 chain `node scripts/code-quality-audit.mjs --scope=all`;其他模式 scope=changed |
|
|
119
121
|
|
|
120
122
|
### Group L — Story splitting principle(2026-04-26 新增)
|
|
121
123
|
|
|
122
124
|
| # | Audit | What it catches |
|
|
123
125
|
|---|-------|-----------------|
|
|
124
126
|
| 28 | **Manual story 拆分原則 alignment**(對齊 Polaris / Carbon / Storybook 官方)| Per-component grep `*.stories.tsx`(non-anatomy/principles)反 pattern:(1) `WithStartIcon`+`WithEndIcon` 拆兩 story(同 slot rule 違規,該 `WithIcon` 對照 grid)(2) `Default`+`AllVariants` 同檔(冗餘)(3) ≥2 個 variant 拆細(`Primary`+`Secondary`+`Tertiary` 各自 — 該合 `AllVariants`)。`// @story-split-rationale: <reason>` 檔首 allowlist 例外。Hook check_story_slot_split(planned) write-time block 同源,本 dim 對既有元件 batch verify。對應 `.claude/rules/story-rules.md`「拆分原則」+ `/story-writing` skill Phase 0 |
|
|
125
|
-
| 29 | **Trait-based展示 stories compliance**(對齊 M19 ensure-canonical pipeline + Polaris/Material/Carbon/Ant/Storybook)| Per-component verify(a)spec.md frontmatter 有 `traits:` 宣告(b)展示 stories.tsx 包含每 trait 的 required core stories(c)scope-N/A 的 trait 在 spec.md 邊界案例段有 rationale。違反列 P0 修。對應 `category-templates.md` v2 + hook `check_story_category.sh
|
|
127
|
+
| 29 | **Trait-based展示 stories compliance**(對齊 M19 ensure-canonical pipeline + Polaris/Material/Carbon/Ant/Storybook)| Per-component verify(a)spec.md frontmatter 有 `traits:` 宣告(b)展示 stories.tsx 包含每 trait 的 required core stories(c)scope-N/A 的 trait 在 spec.md 邊界案例段有 rationale。違反列 P0 修。對應 `category-templates.md` v2 + hook `check_story_invariants.sh R3`(原 lib/`check_story_category.sh` folded 進 R3)。Hook 是 write-time block,本 dim 對既有 47 元件 batch verify + 找未宣告 traits 的元件(P2 migration pending) |
|
|
126
128
|
| 30 | **Principles canonical compliance**(對齊 Polaris / Carbon / Ant 共識)| Per-component verify principles.stories.tsx:(a)universal core ≥ 2 of {WhenToUse / WhenNotToUse / Vs*Rule / ContentGuidelines}(b)無 deprecated 命名(`Forbidden*` / `Donts` / `Pitfalls` / `Prohibitions` / `NonGoals` / `VisualDonts` 全 deprecated → `WhenNotToUse`)。對應 `category-templates.md`「Principles canonical」節 + hook `check_principles_canonical.sh`。Hook 是 write-time block,本 dim 對既有 47 元件 batch verify(預期 13 元件 deprecated naming + 52 元件缺 WhenToUse)|
|
|
127
129
|
|
|
128
130
|
### Group M — Overlay body API discipline(2026-05-01 新增)
|
|
@@ -137,8 +139,8 @@ Grouped by theme. Each runs as an independent subagent; many can parallelize.
|
|
|
137
139
|
|
|
138
140
|
| # | Audit | What it catches |
|
|
139
141
|
|---|-------|-----------------|
|
|
140
|
-
| 34 | **Disabled state 顯著性 precedence**(M24)| Field family disabled mode → 內 placeholder/value/icon 全切 `text-fg-disabled`(非 muted)。Hook `
|
|
141
|
-
| 35 | **Layered chain invariant — overlay scroll**(M25)| Overlay primitive → SurfaceBody 中間 wrapper 必 `flex flex-col h-full`,斷一層 = body 不 scroll。Hook `
|
|
142
|
+
| 34 | **Disabled state 顯著性 precedence**(M24)| Field family disabled mode → 內 placeholder/value/icon 全切 `text-fg-disabled`(非 muted)。Hook `check_field_family_invariants.sh` A.4(disabled placeholder color,原 check_disabled_placeholder_color folded;P1 stderr)同源,本 dim DS-wide batch verify |
|
|
143
|
+
| 35 | **Layered chain invariant — overlay scroll**(M25)| Overlay primitive → SurfaceBody 中間 wrapper 必 `flex flex-col h-full`,斷一層 = body 不 scroll。Hook `check_pattern_invariants.sh` C.1(overlay scroll chain,原 check_overlay_panel_scroll_chain folded;P1 WARN)同源,本 dim DS-wide batch verify |
|
|
142
144
|
| 36 | **Naked variant cell-as-input row-mode propagation**(M19)| `variant="naked"` consumer 內 wrapper 必 import + apply `nakedCellRowModeAlign` SSOT。Hook check_naked_row_mode_propagation(planned) |
|
|
143
145
|
| 37 | **Field state machine 「focus dominates everything」**(M19 v13.3)| 禁 per-control `(open\|isOpen) && 'border-primary'`(Field default 處理)+ naked variant 禁平行 outline ring。SSOT `field-wrapper.tsx` 三 compoundVariant。對齊 Material 3 / Polaris / Ant 共識。Hook check_field_state_token_consume(planned) |
|
|
144
146
|
| 38 | **Inline-action gap canonical**(2026-05-05)| `<ItemInlineAction>` sibling gap = `gap-2` (8px) per `inline-action.spec.md:80`。Hook check_inline_action_canonical_gap(planned) |
|
|
@@ -162,7 +164,7 @@ User 2026-05-15 verbatim 抓「DS 深度稽核漏 storybook content quality」+
|
|
|
162
164
|
|
|
163
165
|
| # | Audit | What it catches |
|
|
164
166
|
|---|-------|-----------------|
|
|
165
|
-
| 47 | **Tailwind utility registry compliance**(對齊 Atlassian `@atlaskit/tokens` / Carbon / Ant / Polaris token-first)| `check_opacity_token_usage.sh`
|
|
167
|
+
| 47 | **Tailwind utility registry compliance**(對齊 Atlassian `@atlaskit/tokens` / Carbon / Ant / Polaris token-first)| `check_opacity_token_usage.sh`(讀 `packages/design-system/src/tokens/utility-registry.json` SSOT;原計畫 rename → `check_tailwind_token_registry.sh` 未實作,功能已在 check_opacity_token_usage.sh)。檢 `leading-N` / `tracking-*` / `gap-px|0.5|1.5` / `w-fraction` / `text-(xs|sm|base|lg|xl|...)` / `font-(thin|light|semibold|black)` / `rounded-(xl|2xl|3xl)` 等繞 SSOT utility |
|
|
166
168
|
| 48 | **Unused / orphan token detector**(2026-05-21 升級:跑 `scripts/audit-orphan-tokens.mjs --check` SSOT,不用 raw grep `var()` — 漏 Tailwind `@theme inline` bridge + `@utility` body + class-name match + JS literal mirror,N 條合法消費路徑 false-positive)。Script 內建 structural-keep 分類器(palette tier 1-10 / mask alpha / chart reserved / state variants / neutral / SOP 5-piece / JS literal mirror)per `tokens/orphan-tokens.spec.md` SSOT。真 retire 候選 = comprehensive scan 後仍 0 consumer + 不落任何 structural-keep 類別。0 真孤兒 = PASS;有真孤兒 → user 拍板 retire OR 補 structural-keep 新類別 |
|
|
167
169
|
| 49 | **a11y axe-core 自動跑 + contrast ratio**(Storybook a11y addon + Carbon AVT + Atlassian linters)| Per `*.stories.tsx` 跑 axe-core via Storybook a11y addon;WCAG AA contrast ≥ 4.5:1(text)/ 3:1(large text / UI)。Carbon 每 PR 跑 AVT,Atlassian 季度 audit + linter integration。本 dim 缺 = a11y 漏在 spec.md 寫了但無自動驗 |
|
|
168
170
|
| 50 | **Bundle size budget per component**(Material UI size-limit / Material Web public tracking / Ant tree-shake)| Per component gzip size 上限(eg. Button ≤ 5KB / DataTable ≤ 50KB);CI fail if regress > 10%。對齊 size-limit pkg + Carbon export audit。需建 `package.json` `size-limit` 段 + per-component manifest |
|
|
@@ -179,7 +181,7 @@ User 2026-05-15 verbatim 抓「DS 深度稽核漏 storybook content quality」+
|
|
|
179
181
|
| 61 | **M16 item-list gap + M23(c) DataTable framework prop conflict enforcement**(2026-05-26 backfill)| PreToolUse hooks 兩 invariant:(a) `check_item_list_gap.sh` — 2+ `<FileItem>` / `<MenuItem variant="rich">` 在同 NEW content 且無 `gap-N` / `space-y-N` parent → warn(M16);(b) `check_data_table_size_num_to_meta_width.sh` — `ColumnDef` 上下文出現 `size: <number>` 但無 `meta: { width: ... }` → warn TanStack `size:px` vs DS `size:density` 框架 prop 衝突(M23(c))。對應 meta-patterns.md M16 + M23(c) + item-anatomy.spec.md + data-table.spec.md |
|
|
180
182
|
| 62 | **Fork-user Netlify onboarding canonical**(2026-05-26 codify;2026-05-29 flip to Basic Password per Identity-deprecated reality)| Audit product-workspace + fork repos:(a) `netlify.toml` 含 access control headers(X-Robots-Tag noindex + Basic Password mention in comment); (b) `.storybook/manager-head.html` **不** 含 Netlify Identity widget script(Identity 2024 deprecated,Basic Password edge 層擋,client widget 不需要;若仍含 widget = drift); (c) `scripts/setup-netlify-access.mjs` 含「沒 Netlify 帳號」前置 explainer + gh auth pre-check + 最後印 dashboard `visitor-access` URL 教 user 點 Basic Password radio; (d) `package.json` 有 `setup:netlify` npm script; (e) **CLAUDE.md `Access control` 段含「Claude 引導使用者 Netlify onboarding」≥6 條話術**(解釋 Netlify / GitHub 1-click OAuth / Basic Password dashboard 30 秒設定 / SEO header 已 ship / deploy 驗證 / GitHub CLI 未 login / Codespaces cloud-dev path)+ 真實斷點清單(plugin install + OAuth + password 設 + password 分享 4 斷點)+ 禁推薦 Identity(已 deprecated)段。錨例:2026-05-26 user 抓「Claude 會知道引導 user 完成環境建置嗎?」+ 2026-05-29 user screenshot 顯示 free-tier 只有 Basic protection 可用(Team protection / Non-production deploys only 鎖 Pro plan)|
|
|
181
183
|
| 63 | **Deploy URL auto-reply infra**(2026-05-26 codify per user verbatim「完成部署之後都應該自動回吐部署的連結,每次必定自動回,不論是現在這個 session 還是其他的」)| Audit product-workspace + fork repos:(a) `scripts/deploy-url.mjs` 存在 + executable + 輸出 production 或 preview URL JSON;(b) `package.json` 有 `deploy-url` script wired;(c) DS-side hook `.claude/hooks/inject_deploy_url_after_push.sh` 偵測 `git push origin <branch>` PostToolUse Bash → auto inject deploy URL into AI context;(d) hook scope skip `push --delete`(branch cleanup 非 deploy);(e) hook silent skip if no `.netlify/state.json` 或 `scripts/deploy-url.mjs`(DS repo 自身 + 非 Netlify-wired repos 不誤觸發)。Cross-session benefit:hook ship via plugin → 任何 fork user `/plugin install` 後自動受惠 |
|
|
182
|
-
| 64 | **Post-main-push SSOT propagation canonical**(2026-05-26 user correction「不是只要一 knowledge audit deep 之後就要,是等我 push main 後才要」)| Audit:(a) CLAUDE.md `# Git solo-work canonical` 有 Step 5.5 SSOT propagation 段;(b) Hook `check_post_main_ssot_propagate.sh` 存在 + 註冊在 PostToolUse Bash matcher;(c) hook 偵測 `git push origin main` + diff HEAD~..HEAD 含 SSOT-affecting paths(`packages/
|
|
184
|
+
| 64 | **Post-main-push SSOT propagation canonical**(2026-05-26 user correction「不是只要一 knowledge audit deep 之後就要,是等我 push main 後才要」)| Audit:(a) CLAUDE.md `# Git solo-work canonical` 有 Step 5.5 SSOT propagation 段;(b) Hook `check_post_main_ssot_propagate.sh` 存在 + 註冊在 PostToolUse Bash matcher;(c) hook 偵測 `git push origin main` + diff HEAD~..HEAD 含 SSOT-affecting paths(`packages/design-system/src` + `packages/storybook-config/{addons,addons-preset.ts,preview.tsx}`(無 src/)+ `.claude/{rules,hooks,skills,commands,references}` + `.claude-plugin/*.json` + `hooks/hooks.json` + `CLAUDE.md`)→ inject 提議 bump beta.N+1;(d) cross-repo SSOT sync 統一由 CLAUDE.md Step 5.5 + `check_post_main_ssot_propagate.sh` canonical trigger(push-main-based;**不需 skill-specific Phase Z**,/knowledge-prune + /deep-audit-cross-codex 不複製,DRY);(e) 整鏈 cover 任何 SSOT-affecting 來源(/knowledge-prune / /deep-audit-cross-codex / 一般 dev / 新元件 / bug fix)。對應「一次更新所有 DS repo 增刪改,不需手動 1 個 1 個」directive |
|
|
183
185
|
| 65 | **Chrome header avatar canonical**(2026-05-27 codex Step 4 cite battle + user 抓 UserFooter vertical stack drift)| 對每 production tsx + DS sidebar.stories.tsx / anatomy / principles 跑:`<SidebarHeader>` block 內偵測 `<ItemAvatar>` → 違反 chrome-header canonical(per `header-canonical.spec.md:57-72` / `sidebar.spec.md:241-247` / `item-anatomy.spec.md:513-537`「chrome header 不是 row context」)。正確 pattern = raw `<Avatar size={24}>`。Hook `check_chrome_header_avatar_canonical.sh` PreToolUse Edit/Write 用 python multiline regex 對 `<SidebarHeader>...<ItemAvatar>...</SidebarHeader>` block 偵測;SidebarFooter / SidebarMenuButton row context 不攔(footer IS row context per spec)。錨例 2026-05-27 product-workspace App.tsx + DS 3 sidebar stories 連動 fix |
|
|
184
186
|
| 66 | **Immediate cross-repo dispatch + visual parity gate**(2026-05-27 codex collab Q3 共識)| Audit:(a) DS `.github/workflows/release.yml` 含「Dispatch product-workspace sync」step 用 `repository_dispatch` event_type=ds-published 立即 trigger;(b) product-workspace `.github/workflows/sync-design-system.yml` 接 `repository_dispatch` event 自動 bump deps + PR(取代 Renovate weekly);(c) consumer fixture gate:packed DS install to product-workspace,build storybook,DS canonical story vs product story masked screenshot diff;(d) visual-assertions.json coverage manifest 每 component .spec.md ↔ ≥1 visual scenario(目前 AppShell/BulkActionBar/FieldControlGroup pending — 列 TBD per release gate scope);(e) `npm pack` ships(scripts/visual-audit.mjs deferred per files allowlist 範疇,plugin SKILL.md 取代)|
|
|
185
187
|
| 67 | **SidebarMenuButton implicit-wrap canonical**(2026-05-27 codify per user 抓 UserFooter 垂直 stack root cause)| 對每 production tsx grep:`<SidebarMenuButton>` 無 asChild 但 children 含 `<ItemAvatar>` 或 `<Avatar>` → 違反(SidebarMenuButton 沒 asChild 時把 children 全塞進 ItemLabel 單 span → Avatar+text 同 span 垂直 stack)。Hook `check_sidebar_menu_button_implicit_wrap.sh` PreToolUse Edit/Write 用 python multiline regex 攔。正確 pattern:asChild + `<div role="group">` + `<span data-sidebar="menu-label" className="min-w-0 flex-1 truncate">` per `sidebar.stories.tsx#UserFooter`。錨例 2026-05-27 product-workspace App.tsx UserFooter Avatar 跟 label 垂直堆疊 |
|
|
@@ -200,6 +202,18 @@ User 2026-05-15 verbatim 抓「DS 深度稽核漏 storybook content quality」+
|
|
|
200
202
|
| 82 | **Consumer app story title `Apps/<app-name>/...` namespace**(2026-05-28 codify per template create-app duplicate-id anchor)| `check_consumer_app_story_title.sh` P0 BLOCKER:consumer apps `apps/<name>/**/*.stories.{tsx,ts,mdx}` 的 `title:` field 必開頭 `Apps/<app-kebab-name>/...`(per `.claude/rules/story-rules.md` 「Title 命名 2-namespace canonical」)。錯 prefix → Storybook glob 撈到 2 個同 id story → build duplicate warning + 只顯第一個 → 新 app 在 sidebar 不可見。Hook 從 file path 自動推 expected prefix。DS-internal stories(`packages/design-system/**`)走 `Design System/...` 另條 canonical,out of scope。Escape `// @app-story-title-skip:`。Anchor:2026-05-28 npm run create-app verify-flow-test e2e 抓 4 collisions,`scripts/create-app.mjs:patchStoryTitles()` 修生成 + hook 防手動 edit |
|
|
201
203
|
| 83 | **Fork-context runtime + naming SSOT**(2026-05-29 codify per user「fork 後 fork user 在自己獨立環境下仍能如預期運行」;net-new vs dim 62/63/64)| Net-new aspects 不在 dim 62/63/64:**(a)** Hook fire integrity in fork cwd — verify `check_fork_user_plugin_install.sh`(SessionStart)+ `inject_deploy_url_after_push.sh`(PostToolUse Bash)+ approval-preflight scope `apps/**/*.tsx` 在 fork cwd 正確 fire,plugin install 後 `${CLAUDE_PLUGIN_ROOT}` 變數正確 resolve;**(b)** CLAUDE.md cross-load chain — fork `CLAUDE.md` Step 0 指向 `node_modules/@qijenchen/design-system/CLAUDE.md` + `ds-canonical/rules/meta-patterns.md` 真可讀(npm package `files` allowlist 含 ds-canonical);**(c)** Naming SSOT 3 層 — DS-internal source dir(`template/ds-product-template/`)≠ published GitHub Template Repository(`ajenchen/ds-product-template`)≠ fork user new repo 名(self-chosen)清楚 documented in `template/README.md`「命名 SSOT」段;**(d)** **跨 repo 交付 canary(2026-05-29 加,補 source→live 盲點)** — `node scripts/verify-published-deploy.mjs`:L1 mirror workflow 最近 run 必 success(否則 published scaffold stale)+ L2 published `.storybook/main.ts` === 本地 template(mirror 真送達)+ L3 `--live`(給 `NETLIFY_PREVIEW_PASSWORD`)playwright 帶密碼 render 部署故事斷言非空白。**Why net-new**:dim 66 只驗 local fixture build,dim 83(a)-(c)只驗 source — 都沒驗「mirror 有沒有真把 source 送達 live netlify 部署」。Anchor:2026-05-29 mirror 從 5/26 默默失敗(PAT 無 workflow scope)→ published stale → netlify 空白,稽核數週沒抓到因無此 canary。Skill chain:`/deep-audit-cross-codex` Phase 0 cwd detection 切 ds-repo / fork-user-repo 2-mode 跑此 dim(2026-05-29 簡化 from 3-mode per 「避免原則無限膨脹」)。Anchor:2026-05-29 dir name vs published repo name SSOT confusion + ds-canonical mirror drift + mirror-deliver-to-live gap |
|
|
202
204
|
|
|
205
|
+
### Group Q — Fork-shipped packaging integrity(2026-05-30 加 per user「打包給 template/fork 的所有東西都應被稽核正確無誤且如預期可用」)
|
|
206
|
+
|
|
207
|
+
**ds-repo-mode-only** — deep-audit Phase 0 在 fork-user-repo 模式自動 skip(fork 無 packaging pipeline);各 dim = 既有 deterministic script 薄 pointer(零新邏輯)。Source→live 交付 canary 見 dim 83(d),本 group 不重複。
|
|
208
|
+
|
|
209
|
+
| # | Audit | What it catches |
|
|
210
|
+
|---|-------|-----------------|
|
|
211
|
+
| 84 | **Mirror-build integrity + 2-scenario E2E**(ds-repo-mode-only)| `node scripts/test-2-scenario-architecture.mjs`:20 test case + Mirror M0-M7 — published-template mirror allowlist 正確(scaffold + apps/template + scripts subset 全送達、**排除** `.claude/skills`(governance 走 plugin install))+ package.json transform(`workspaces` + DS dep `*`→`^X.Y.Z`)+ Scenario A/B 結構一致。錨例:2026-05-29 mirror 從 5/26 默默失敗數週稽核沒抓到 |
|
|
212
|
+
| 85 | **ds-canonical npm mirror 新鮮度**(ds-repo-mode-only)| `node scripts/sync-ds-canonical.mjs --check`:npm package `ds-canonical/`(skills / rules / hooks read-only cross-load mirror)== live `.claude/` SSOT 無 stale drift(fork `CLAUDE.md` Step 0 cross-load 讀的是此 mirror)。3-allowlist 軸 1:npm files allowlist == `.claude` SSOT。錨例:本 session 13 處死引用同時有 ds-canonical stale 副本 |
|
|
213
|
+
| 86 | **Plugin manifest + symlink-vs-source 一致**(ds-repo-mode-only)| `node scripts/plugin-structure-validate.mjs`:`.claude-plugin/{plugin,marketplace}.json` valid + 5-manifest version 對齊 + plugin symlink set(skills / hooks / rules)== source(fork `/plugin install` 後拿到完整 governance 不缺漏)。3-allowlist 軸 2:plugin symlink == source;軸 3(mirror 涵蓋 apps/template + 排除 .claude/skills)走 dim 84 |
|
|
214
|
+
| 87 | **Scaffold 可建性 dogfood prepublish gate**(ds-repo-mode-only)| `node scripts/dogfood-prepublish-verify.mjs`:published scaffold 真能 `npm install` + `build-storybook`(consumer 視角,非僅 byte-mirror 比對),prepublish 攔「ship 出去裝不起來」|
|
|
215
|
+
| 88 | **Infra-self ref integrity**(ds-repo-mode-only;2026-05-30 加,根因防線)| `node scripts/check-dangling-infra-ref.mjs --check`(governance docs 引用的 hook/script 必存在磁碟 OR 同行 annotate retired/未實作;認 `check_X.sh`→`_X.sh` lib-consolidation form)+ `node scripts/check-skill-deadref.mjs --check`(禁 `CLAUDE.md line N` brittle ref + 已移除 section deny-list)。錨例 2026-05-30:抓 40 處死 hook ref + env-smoke set-e bug,前無機械防線。M7/M34 broad-vs-narrow gap closed;deep-audit 至此真正含「所有 infra」自我稽核 |
|
|
216
|
+
|
|
203
217
|
**Heavy dim(`--deep` mode 各必獨立 sub-agent 跑,不可 batch)**:12 / 24 / 25 / 40 / 41 / 42 / 43 / 45 / 49 / 50 / 51 / 52 / 53。Sub-agent prompt 嚴禁含「SKIP」keyword(per Phase 1 NO-SKIP invariant)。
|
|
204
218
|
|
|
205
219
|
---
|
|
@@ -240,7 +254,7 @@ User verbatim:「你完整稽核之前應該會先全面盤查全部檔案和所
|
|
|
240
254
|
Launch all audits as background subagents (single message, multiple `Agent` tool calls with `run_in_background: true`). Use prompts in [references/audit-prompts.md](references/audit-prompts.md).
|
|
241
255
|
|
|
242
256
|
**Every audit prompt declares three metadata lines at top**:
|
|
243
|
-
- **Type**: `Absolute` or `Consistency` (per CLAUDE.md
|
|
257
|
+
- **Type**: `Absolute` or `Consistency` (per CLAUDE.md`# 稽核 canonical`「Consistency 類稽核」)
|
|
244
258
|
- **Canonical source**: where correct behavior is defined
|
|
245
259
|
- **Rationale home**: where deviation justification should live (`N/A` for Absolute)
|
|
246
260
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Audit Subagent Prompts(全 dim per `SKILL.md SSOT`)
|
|
2
2
|
|
|
3
|
-
> **Count canonical**:本檔 dim 數對齊 `.claude/skills/design-system-audit/SKILL.md` `## The N audit dimensions` 表。歷史標題曾寫「22 audits」,已 deprecated — 真實 dim 數以 SKILL.md
|
|
3
|
+
> **Count canonical**:本檔 dim 數對齊 `.claude/skills/design-system-audit/SKILL.md` `## The N audit dimensions` 表。歷史標題曾寫「22 audits」,已 deprecated — 真實 dim 數以 SKILL.md 為準。Prompt section 對 PURE-JUDGMENT dims 必備;deterministic-script dims(eg. 84-88)無需 prompt(腳本即檢查)。**誠實註**:prompt 數**非**機械 count-verified(`sync-governance-counters.mjs` 不 parse 本檔)— 靠 audit dim 15 + Phase A 人工對齊(2026-05-30 修正前 frontmatter 誤稱有自動 cross-verify)。
|
|
4
4
|
|
|
5
5
|
Each prompt is self-contained — designed to paste into an `Agent` call with `run_in_background: true` and `subagent_type: ds-dim-auditor`(registered agent since 2026-04-24;scoped Read/Grep/Glob only;fallback to `general-purpose` if agent not available)。
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ Working directory: /Users/chenqiren/Library/CloudStorage/GoogleDrive-qijenchen@g
|
|
|
31
31
|
- **「decorative indicator 被誤列入 action predicate」(D6e,2026-04-22)** → `pointer-events-none` + `aria-hidden` 的 icon 不該出現在 action example 表。Calendar / status dot / CircularProgress 等被誤收 = P0 flag。對照 CLAUDE.md M9 predicate 自測
|
|
32
32
|
- **「Row action 尺寸 > 24」(D6e cap 違反,2026-04-22)** → row primitive 內 inline action 絕對值 cap = 24,row tier 放大不該讓 action 同步放大。違反 = P0 flag。對照 `patterns/element-anatomy/item-anatomy.spec.md`「Inline Action 設計規格」Row ≤ 24 cap
|
|
33
33
|
|
|
34
|
-
## Dimension Type Taxonomy (CLAUDE.md
|
|
34
|
+
## Dimension Type Taxonomy (CLAUDE.md`# 稽核 canonical`「Consistency 類稽核」)
|
|
35
35
|
|
|
36
36
|
Every dimension below is tagged **Absolute** or **Consistency** so sub-agents apply the right formula:
|
|
37
37
|
|
|
@@ -403,7 +403,7 @@ End: `N files checked, V violations.` Under 600 words. Don't fix.
|
|
|
403
403
|
**Rationale home**: element .spec.md — replacing/omitting a 6-canonical section requires a rationale paragraph explaining why (e.g., "Badge 無互動狀態,不需 StateBehavior"). Renaming identifier is never allowed. **`*.anatomy.stories.tsx` 檔頭 `// @anatomy-rationale:` 註解列出 N/A sections + 一行原因 → legitimately N/A,不報為 violation**(對齊 hook `check_story_anatomy.sh` 同源處理)。
|
|
404
404
|
|
|
405
405
|
```
|
|
406
|
-
Your job: audit .anatomy.stories.tsx against `/story-writing` anatomy-standard.md on THREE layers, enforcing CLAUDE.md
|
|
406
|
+
Your job: audit .anatomy.stories.tsx against `/story-writing` anatomy-standard.md on THREE layers, enforcing CLAUDE.md `# 稽核 canonical`「Consistency 類稽核」.
|
|
407
407
|
|
|
408
408
|
**Layer 1 — Canonical `export const` names** (一字不差, in order):
|
|
409
409
|
1. `Overview` / 2. `Inspector` / 3. `ColorMatrix` / 4. `SizeMatrix` / 5. `StateBehavior` / 6. `Accessibility`(互動元件強制,純視覺 indicator N/A)
|
|
@@ -433,7 +433,7 @@ Missing 6-canonical → requires rationale paragraph in .spec.md OR `// @anatomy
|
|
|
433
433
|
**For each `packages/design-system/src/components/*/*.anatomy.stories.tsx`**:
|
|
434
434
|
1. Grep `^export const ([A-Za-z]+)` — Layer 1 identifier list
|
|
435
435
|
2. For each export, grep its `name:` field value — Layer 2 中文覆寫
|
|
436
|
-
3. Check 6-canonical presence + rationale in .spec.md OR `// @anatomy-rationale:` 檔頭註解 for any missing(若 .anatomy.stories.tsx 檔頭有 `// @anatomy-rationale:` 註解,列出 N/A sections 和理由 — 視為 legitimate 偏離,不報為 violation。Hook `
|
|
436
|
+
3. Check 6-canonical presence + rationale in .spec.md OR `// @anatomy-rationale:` 檔頭註解 for any missing(若 .anatomy.stories.tsx 檔頭有 `// @anatomy-rationale:` 註解,列出 N/A sections 和理由 — 視為 legitimate 偏離,不報為 violation。Hook `check_story_invariants.sh`(R1 anatomy,原 check_story_anatomy.sh folded 已合入)同源處理。)
|
|
437
437
|
|
|
438
438
|
Report format:
|
|
439
439
|
- `ComponentName L1: missing [Inspector, ColorMatrix] — no rationale in spec.md`
|
|
@@ -481,7 +481,7 @@ End: `N files checked, M violations across C categories.` Under 600 words. Don't
|
|
|
481
481
|
## 15. Cross-doc 一致性(CLAUDE.md + spec.md + tsx docblock 全域 drift)
|
|
482
482
|
|
|
483
483
|
**Type**: Absolute
|
|
484
|
-
**Canonical source**: 各 SSOT home(per `#
|
|
484
|
+
**Canonical source**: 各 SSOT home(per `# 治理 canonical` 8-home)
|
|
485
485
|
**Rationale home**: N/A — duplicated / contradictory / drift 永遠是 bug
|
|
486
486
|
|
|
487
487
|
**2026-04-30 擴 scope**:從原「CLAUDE.md 自身」擴到 cross-doc(CLAUDE.md + spec.md +
|
|
@@ -525,9 +525,9 @@ End: `Total issues found: M. Categories: [breakdown 1-10]`. Under 600 words. Don
|
|
|
525
525
|
|
|
526
526
|
---
|
|
527
527
|
|
|
528
|
-
## Running all
|
|
528
|
+
## Running all dimensions in parallel(count per SKILL.md SSOT)
|
|
529
529
|
|
|
530
|
-
|
|
530
|
+
Dispatch per `node scripts/dispatch-audit-dims.mjs --summary`(動態 batch plan,non-hardcoded)— 一 message 內每 batch 一個 `Agent` tool call,`run_in_background: true`。Heavy dims 各獨立 sub-agent。Expected wall time: 3-5 分鐘並行。
|
|
531
531
|
|
|
532
532
|
After all return:
|
|
533
533
|
- Consolidate findings per file with line numbers
|
|
@@ -860,7 +860,7 @@ Scan consumer 自建的視覺邊界容器(非 chrome primitive 消費)是否有
|
|
|
860
860
|
|
|
861
861
|
若同 className 無 `p-N` / `px-N` / `py-N` / `p-\[var(...)\]` / `pt-N` / `pb-N` → violation。
|
|
862
862
|
|
|
863
|
-
Hook `check_container_breathing.sh`
|
|
863
|
+
Hook `check_container_breathing.sh`(retired;audit-only via 本 dim 22)— 本 dim 為 audit 層捕 hook 遺漏 / 多行 className split 的 case。
|
|
864
864
|
|
|
865
865
|
**排除**(hook 同邏輯):
|
|
866
866
|
- Chrome primitive(SurfaceHeader / SurfaceBody / SurfaceFooter / Field wrapper / Button / Input)= 自帶 canonical padding
|
|
@@ -981,7 +981,7 @@ End: `N components scanned, M with traits, K P0 violations, J P2 pending migrati
|
|
|
981
981
|
**Type**: Absolute
|
|
982
982
|
**Canonical source**: `.claude/skills/story-writing/references/category-templates.md`「Principles canonical」節 v3(2026-04-26 整合)
|
|
983
983
|
**Rationale home**: 元件 spec.md(若需 scope-N/A 例外)
|
|
984
|
-
**Hook**: `
|
|
984
|
+
**Hook**: `check_canonical_propagation.sh`(E.1 principles canonical,原 check_principles_canonical.sh folded 已合入;v3-aware)
|
|
985
985
|
|
|
986
986
|
Working directory: /Users/chenqiren/Library/CloudStorage/GoogleDrive-qijenchen@gmail.com/我的雲端硬碟/my-project
|
|
987
987
|
|
|
@@ -1078,37 +1078,37 @@ Sub-agent 對每 benchmark cite 反查 DS 內既有 codified canonical;有 → c
|
|
|
1078
1078
|
|
|
1079
1079
|
**Type**: Absolute / **Canonical**: M24 + `field-controls.spec.md` disabled state machine / **Home**: spec.md「state precedence」
|
|
1080
1080
|
|
|
1081
|
-
Per-element grep disabled mode → 內 placeholder / value / icon 全切 `text-fg-disabled`(neutral-6)非 `text-fg-muted`(neutral-7)。state > emphasis。Hook `
|
|
1081
|
+
Per-element grep disabled mode → 內 placeholder / value / icon 全切 `text-fg-disabled`(neutral-6)非 `text-fg-muted`(neutral-7)。state > emphasis。Hook `check_field_family_invariants.sh`(A.4 disabled placeholder color,原 check_disabled_placeholder_color.sh folded 已合入)同源,本 dim DS-wide batch。
|
|
1082
1082
|
|
|
1083
1083
|
## 35. Layered chain invariant — overlay scroll(M25)
|
|
1084
1084
|
|
|
1085
1085
|
**Type**: Absolute / **Canonical**: M25 + `overlay-surface.spec.md` / **Home**: spec.md SSOT
|
|
1086
1086
|
|
|
1087
|
-
Overlay primitive → SurfaceBody 中間 wrapper 必 `flex flex-col h-full`,斷一層 = body 不 scroll。Hook `
|
|
1087
|
+
Overlay primitive → SurfaceBody 中間 wrapper 必 `flex flex-col h-full`,斷一層 = body 不 scroll。Hook `check_pattern_invariants.sh`(C.1 overlay scroll chain,原 check_overlay_panel_scroll_chain.sh folded 已合入)同源,本 dim DS-wide batch verify integrity。
|
|
1088
1088
|
|
|
1089
1089
|
## 36. Naked variant cell-as-input row-mode propagation(M19)
|
|
1090
1090
|
|
|
1091
1091
|
**Type**: Absolute / **Canonical**: `nakedCellRowModeAlign` SSOT / **Home**: spec.md
|
|
1092
1092
|
|
|
1093
|
-
`variant="naked"` consumer 內 wrapper 必 import + apply `nakedCellRowModeAlign` SSOT。Hook `
|
|
1093
|
+
`variant="naked"` consumer 內 wrapper 必 import + apply `nakedCellRowModeAlign` SSOT。Hook `check_field_family_invariants.sh`(A.1 naked row-mode propagation,原 check_naked_row_mode_propagation.sh folded 已合入)同源。
|
|
1094
1094
|
|
|
1095
1095
|
## 37. Field state machine「focus dominates everything」(M19 v13.3)
|
|
1096
1096
|
|
|
1097
1097
|
**Type**: Absolute / **Canonical**: `field-wrapper.tsx` 三 compoundVariant SSOT / **Home**: spec.md state machine 段
|
|
1098
1098
|
|
|
1099
|
-
禁 per-control `(open|isOpen) && 'border-primary'`(Field default 處理)+ naked variant 禁平行 outline ring。對齊 Material 3 / Polaris / Ant 共識。Hook `
|
|
1099
|
+
禁 per-control `(open|isOpen) && 'border-primary'`(Field default 處理)+ naked variant 禁平行 outline ring。對齊 Material 3 / Polaris / Ant 共識。Hook `check_field_family_invariants.sh`(A.3 Field state ring SSOT,原 check_field_state_token_consume.sh folded 已合入)同源,本 dim batch verify Field family + outliers。
|
|
1100
1100
|
|
|
1101
1101
|
## 38. Inline-action gap canonical
|
|
1102
1102
|
|
|
1103
1103
|
**Type**: Absolute / **Canonical**: `inline-action.spec.md:80` / **Home**: spec.md
|
|
1104
1104
|
|
|
1105
|
-
`<ItemInlineAction>` sibling gap = `gap-2`(8px)。Hook `
|
|
1105
|
+
`<ItemInlineAction>` sibling gap = `gap-2`(8px)。Hook `check_pattern_invariants.sh`(C.2 inline-action canonical gap,原 check_inline_action_canonical_gap.sh folded 已合入)同源,本 dim batch verify consumer。
|
|
1106
1106
|
|
|
1107
1107
|
## 39. Row-layout slot primitive consumption(M1+M17)
|
|
1108
1108
|
|
|
1109
1109
|
**Type**: Absolute / **Canonical**: `ItemPrefix` / `ItemSuffix` primitive / **Home**: `item-anatomy.spec.md`
|
|
1110
1110
|
|
|
1111
|
-
禁自刻 `<span h-[1lh] shrink-0 flex items-center>` slot wrapper(item-anatomy / field-wrapper 外),必消費 `<ItemPrefix>` / `<ItemSuffix>`。Hook `
|
|
1111
|
+
禁自刻 `<span h-[1lh] shrink-0 flex items-center>` slot wrapper(item-anatomy / field-wrapper 外),必消費 `<ItemPrefix>` / `<ItemSuffix>`。Hook `check_pattern_invariants.sh`(C.4 row slot handcraft,原 check_row_slot_handcraft.sh folded 已合入)同源。
|
|
1112
1112
|
|
|
1113
1113
|
## 40. Title 命名 quality(story-rules.md L18-22)
|
|
1114
1114
|
|
|
@@ -1168,7 +1168,7 @@ Per-file grep `packages/design-system/src/**/*.{tsx,css}` + consumer code,對 `u
|
|
|
1168
1168
|
- shadcn alias:`bg-popover` / `text-muted-foreground` 等
|
|
1169
1169
|
- primitive class:`bg-neutral-1` / `text-blue-6` 等
|
|
1170
1170
|
|
|
1171
|
-
對齊 Atlassian `@atlaskit/tokens` + Carbon `@carbon/themes` + Ant ConfigProvider + Polaris `polaris-tokens` registry + lint enforcement。Hook `
|
|
1171
|
+
對齊 Atlassian `@atlaskit/tokens` + Carbon `@carbon/themes` + Ant ConfigProvider + Polaris `polaris-tokens` registry + lint enforcement。Hook `check_opacity_token_usage.sh`(reads tokens/utility-registry.json;原 doc 稱 check_tailwind_token_registry.sh 之 rename 未實作,SSOT 仍為此 hook)同源,本 dim DS-wide batch。
|
|
1172
1172
|
|
|
1173
1173
|
## 48. Unused / orphan token detector(2026-05-17 新增,codex Q5 verdict)
|
|
1174
1174
|
|
|
@@ -354,7 +354,7 @@ skill 不再重複 scan 方法 / 判斷表。
|
|
|
354
354
|
|
|
355
355
|
## 本 protocol 自己也是活文件
|
|
356
356
|
|
|
357
|
-
每次 audit 結束,main agent 自動回填 4 類學習(對齊 CLAUDE.md `#
|
|
357
|
+
每次 audit 結束,main agent 自動回填 4 類學習(對齊 CLAUDE.md `# 治理 canonical` → Audit skill Phase F 節):
|
|
358
358
|
|
|
359
359
|
1. 新 FP → 加到上方「常見 FP 記憶」
|
|
360
360
|
2. 新 meta-pattern → 提議加到 CLAUDE.md `# Meta-Pattern 預警`
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
### Level 5 — Skill (`.claude/skills/*/SKILL.md` + `references/`)
|
|
48
48
|
|
|
49
|
-
- **Audit / 稽核協議**(如 `design-system-audit` 的
|
|
49
|
+
- **Audit / 稽核協議**(如 `design-system-audit` 的 full-dim per design-system-audit SSOT / `product-ui-audit` 的 7 維度檢核)
|
|
50
50
|
- **AI↔user 對話 protocol**(checkpoint 範本:「先不管」vs tech debt / 新 rule 提議 / 分類模糊等)
|
|
51
51
|
- **特定工作流 playbook**(only-when-invoked 的多步驟流程)
|
|
52
52
|
- **文件撰寫指南**(story-writing 等)
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
- **Pre/post-tool 自動化**(邊界守衛、sync check 提醒、token hygiene、import guard、charter gate)
|
|
68
68
|
- **判斷法**:這條規則能「機械化在 tool 執行前後自動跑」嗎? 是 → hook;否 → CLAUDE.md 或 spec
|
|
69
69
|
- **當前 hooks**(7 個):
|
|
70
|
-
- `pre_edit_spec_check.sh` — 編輯 tsx 前讀 spec
|
|
71
|
-
- `check_sync_update.sh` —
|
|
72
|
-
- `
|
|
70
|
+
- `pre_edit_spec_check.sh`(retired;改靠 M3 mindset #3「改一處看三處」)— 編輯 tsx 前讀 spec
|
|
71
|
+
- `check_sync_update.sh`(retired/未實作 — 改靠 M3 mindset #3 + `pre_edit_spec_check.sh`)
|
|
72
|
+
- `lib/_token_hygiene.sh`(由 `post_edit_dispatcher.sh` source)— 硬寫 shadow / shadcn alias / primitive-color / raw overflow 抓違規
|
|
73
73
|
- `block_prototype_imports.py` — 產品 code 禁 import explorations
|
|
74
74
|
- `enforce_home_charter.sh` — Write 到 classification-sensitive dir 時注入 charter(本 audit 設計時新增)
|
|
75
75
|
|
|
@@ -82,15 +82,15 @@
|
|
|
82
82
|
|
|
83
83
|
---
|
|
84
84
|
|
|
85
|
-
## 當前 skill 生態(
|
|
85
|
+
## 當前 skill 生態(代表性;完整 22 skills 見 `.claude/skills/README.md`)
|
|
86
86
|
|
|
87
87
|
| Skill | Invoke 時機 | Scope |
|
|
88
88
|
|-------|------------|-------|
|
|
89
|
-
| `design-system-audit` | 稽核 DS 本身(spec/cva/SSOT 漂移
|
|
90
|
-
| `product-ui-audit` | 「audit X feature」「DS 用對了嗎」/ prototype Phase 3.5 自動 | consumer UI code
|
|
89
|
+
| `design-system-audit` | 稽核 DS 本身(spec/cva/SSOT 漂移 full-dim per SSOT) | design-system/ 內部 |
|
|
90
|
+
| `product-ui-audit` | 「audit X feature」「DS 用對了嗎」/ prototype Phase 3.5 自動 | consumer UI code 7 維檢核 |
|
|
91
91
|
| `prototype` | user 明言「做 prototype / MVP / 原型」 | 建 exploration candidates(Phase 3.5 強制 audit gate) |
|
|
92
92
|
| `delivery-handoff` | 產品 final 後「要交付 / handoff」 | 產 figma-like 交付包 |
|
|
93
|
-
| `component-quality-gate` | 元件即將合入 DS |
|
|
93
|
+
| `component-quality-gate` | 元件即將合入 DS | 35 項 spec+code+story+ship checklist |
|
|
94
94
|
| `story-writing` | 寫 / 審 story | 範例選擇 + anatomy 5-story + 三方連動 |
|
|
95
95
|
|
|
96
96
|
**不走 skill 的情境**:user 日常對話「比幾個版本 / 世界級怎麼做」等模糊語,AI 先 clarify 再決定走 skill 還是直接口頭討論。
|
|
@@ -141,9 +141,9 @@ Q5. 是 CLAUDE.md / SKILL.md 已有項目的「深層細節」嗎?
|
|
|
141
141
|
| cva 適用範圍 | CLAUDE.md ✓ | CLAUDE.md | 寫元件 code 的 pattern 決策,Level 1 |
|
|
142
142
|
| 4-Family Model 頂層 taxonomy | CLAUDE.md + item-layout SSOT(舊) | `patterns/element-anatomy/element-anatomy.spec.md`(taxonomy overview)+ `patterns/element-anatomy/item-anatomy.spec.md`(F1/F2 deep)flat 並列 | 2026-04-20 refactor:folder `element-anatomy` = topic home,flat 多檔 topical pattern(overview + 具體 topic),對齊 Material / Polaris Foundations 組織法;不用 nested / 不用頂層飛地 |
|
|
143
143
|
| 「先不管」語意區分 | CLAUDE.md(❌ 錯放) | **`design-system-audit` Checkpoint 7** | AI↔user 對話 protocol,不是設計規則;只在 audit triage 情境需要 |
|
|
144
|
-
|
|
|
144
|
+
| full-dim per design-system-audit SSOT | CLAUDE.md(❌ 若放這會污染) | **`design-system-audit` skill** | 只在 `/design-system-audit` invoke 時需要 |
|
|
145
145
|
| Tech debt 清單 | CLAUDE.md(❌ 會過期變誤導) | **Memory** | 隨時間變化的 session 狀態 |
|
|
146
|
-
| Spec 寫作要交叉比對 | CLAUDE.md 或 spec 或 Hook | **
|
|
146
|
+
| Spec 寫作要交叉比對 | CLAUDE.md 或 spec 或 Hook | **M3 mindset #3 + `pre_edit_spec_check.sh`**(`check_sync_update.sh` retired/未實作)| Edit 前讀 spec + mindset 連動 |
|
|
147
147
|
| `ItemLayout` export(ghost) | 本來以為是 industry idiom | **移除,改用 `<MenuItem>` + slot components** | 實查 Material 用 `<ListItem>` / Polaris `<ResourceItem>` / Ant `<List.Item>`——都無 Layout 後綴。ItemLayout 違反「element-level 不用 layout 字」鐵律 + 不是 idiom。只是 doc 裡 ghost reference,真實 exports 是 `ItemIcon / ItemAvatar / ItemLabel / ItemSuffix / ItemInlineAction`(slot pattern)+ `MenuItem`(canonical F1) |
|
|
148
148
|
| Element anatomy 放哪 / item anatomy 結構 | 3 次 iteration:nested(X)→ 頂層飛地(F)→ 合併 merge(Y)→ flat topical(Z,final) | **`patterns/element-anatomy/` flat 多檔** | Z 比 X 少一層、比 Y 保 scope 純淨(taxonomy 和 deep SSOT 分檔);對齊 Material / Polaris 的 flat topical foundations 組織法 |
|
|
149
149
|
| Story 寫作完整指南 | CLAUDE.md(過度膨脹) / patterns/(類別錯) | **`story-writing` skill** | 文件撰寫 workflow,invoke-only 多步驟;不是 runtime primitive 所以不屬 patterns |
|
|
@@ -28,7 +28,7 @@ description: User 說「確保 X 一定要 / 不可繞過 / 永不漂移 / ensur
|
|
|
28
28
|
## Preconditions
|
|
29
29
|
|
|
30
30
|
- 讀 CLAUDE.md M14 / M19(本 skill SSOT 上游)
|
|
31
|
-
- 讀 `#
|
|
31
|
+
- 讀 `# 治理 canonical`(8 home)
|
|
32
32
|
- 該 rule 的 substantive meaning 還沒 finalize → 必走 Phase 5 user sign-off
|
|
33
33
|
|
|
34
34
|
## Workflow(8 phases)
|
|
@@ -181,7 +181,7 @@ User 拍板才 Phase 6 起執行。
|
|
|
181
181
|
|
|
182
182
|
- CLAUDE.md M14(對話結論 → integrate pipeline)
|
|
183
183
|
- CLAUDE.md M19(本 skill SSOT 上游)
|
|
184
|
-
- CLAUDE.md `#
|
|
184
|
+
- CLAUDE.md `# 治理 canonical`(8 home)
|
|
185
185
|
- Story splitting principle(2026-04-26 本 skill template 案例,4-layer 落地)
|
|
186
186
|
|
|
187
187
|
## 世界級對照(template 細節)
|
|
@@ -42,6 +42,7 @@ ls -la .claude/logs/*.jsonl
|
|
|
42
42
|
| **User correction signals**(per session)| `user-corrections.jsonl` count + sample | 總累積 > 20 = 需 codify |
|
|
43
43
|
| **File size trend**(weekly snapshot)| `metric-snapshots.jsonl`(若存在)| CLAUDE.md 增速 > 5 line/week = sprawl alert |
|
|
44
44
|
| **Benchmark freshness**(external)| `.claude/benchmarks/last-fetch.txt` | > 30 天 = 過期 |
|
|
45
|
+
| **Infra-ref integrity**(2026-05-30 加,根因防線)| `node scripts/check-dangling-infra-ref.mjs` + `node scripts/check-skill-deadref.mjs`(fail-open report)| bucket-B > 0(死 hook ref)OR removed-section/line-number ref > 0 = infra-self drift → 提議 repoint。錨例:2026-05-30 抓 40 處死 hook ref + env-smoke set-e bug |
|
|
45
46
|
|
|
46
47
|
### Phase 2 — Analysis(fire-driven auto-propose)
|
|
47
48
|
|
|
@@ -57,7 +58,7 @@ Output: 「`check_item_list_gap.sh` 6 月 fired 78 次 → 提議擴充到 CLAUD
|
|
|
57
58
|
|
|
58
59
|
Hook 0 fire / 6 月 OR skill 0 invoke / 3 月 = 無 consumer = retire 候選。
|
|
59
60
|
|
|
60
|
-
Output: 「`check_sideoffset_canonical.sh` 6 月 0 fire → retire 候選(先 grep 全 repo 確認無 reference 才執行)」
|
|
61
|
+
Output: 「`check_sideoffset_canonical.sh`(retired;已移入 hooks/retired/,此為 dead-rule 偵測示例)6 月 0 fire → retire 候選(先 grep 全 repo 確認無 reference 才執行)」
|
|
61
62
|
|
|
62
63
|
#### 2c. Pending corrections → codify 候選
|
|
63
64
|
|
|
@@ -143,4 +144,4 @@ Snapshot 本次 metric 到 `.claude/logs/metric-snapshots.jsonl` append:
|
|
|
143
144
|
|
|
144
145
|
- `.claude/logs/` — metric source
|
|
145
146
|
- `.claude/benchmarks/` — external signal
|
|
146
|
-
- CLAUDE.md `#
|
|
147
|
+
- CLAUDE.md `# 治理 canonical` — governance rules (本 skill 執行)
|