[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AASN0CP3ET98VX899G692M":3,"skill-same:01M7AASN0CP3ET98VX899G692M":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7AASN0CP3ET98VX899G692M","improve-codebase-architecture",null,"掃描 codebase 的 deepening 機會，以視覺化 HTML report 呈現，並針對使用者選擇的項目進行 grilling。","Andy-CH-BO-AN\u002Fplaywright-self-healing-tests","Andy-CH-BO-AN","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F58759761?v=4","01M71FSKGT9TWBMY2SFP4V2JR8","01M7AAS4QMEMT1S49WSF8H4NWE",0,"MIT","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: improve-codebase-architecture\ndescription: 掃描 codebase 的 deepening 機會，以視覺化 HTML report 呈現，並針對使用者選擇的項目進行 grilling。\n---\n\n# 改善 Codebase Architecture\n\n找出 architectural friction，提出 **deepening opportunities**：將 shallow module 轉為 deep module 的 refactor。目標是提升 testability 與 AI-navigability。\n\n此 command 必須以 project 的 domain model 為依據，並採用共通 design vocabulary：\n\n- 執行 `$codebase-design` skill，使用其 architecture vocabulary（**module**、**interface**、**depth**、**seam**、**adapter**、**leverage**、**locality**）及原則（deletion test、\"the interface is the test surface\"、\"one adapter = hypothetical seam, two = real\"）。每個 suggestion 必須精確使用這些詞；不可改用「component」、「service」、「API」或「boundary」。\n- `CONTEXT.md` 的 domain language 為良好 seam 命名；`docs\u002Fadr\u002F` 的 ADR 記錄不可重新爭論的決策。\n\n## 流程\n\n### 1. 探索\n\n**掃描前先定範圍：YAGNI。**Deepening module 的價值在於讓未來修改更容易，因此優先檢視近期常變動處。\n\n- 使用者指定 module、subsystem 或 pain point 時直接採用，略過後續推論。\n- 否則查看一段足夠的 `git log --oneline`，找出重複出現的 hotspot files／area，優先由這些 path 開始；若變更分散且沒有 hotspot，才擴大範圍。\n\n先讀專案 glossary（`CONTEXT.md`）與即將處理 area 的 ADR。接著派 sub-agent 探索 codebase，不可僵化套用 heuristic；記錄理解時遇到的 friction：\n\n- 是否理解一個概念需要反覆切換許多小 module？\n- 哪些 module 是 **shallow**，其 interface 幾乎和 implementation 一樣複雜？\n- 是否為了 testability 抽出 pure function，真正 bug 卻藏在呼叫關係，使 **locality** 消失？\n- 哪些緊密耦合 module 跨越 seam 泄漏？\n- 哪些 area 沒測試，或難以透過現有 interface 測試？\n\n對可疑 shallow module 套用 **deletion test**：刪除它會集中 complexity，還是只會移動 complexity？「會集中」才是值得處理的 signal。\n\n### 2. 用 HTML report 呈現候選項目\n\n將 self-contained HTML 寫入 OS temporary directory，不可寫入 repo。由 `$TMPDIR` 取得 temp dir，否則採用 Linux `\u002Ftmp`、Windows `%TEMP%`；檔名為 `\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html`，每次執行皆建立新檔。以 Linux `xdg-open \u003Cpath>`、macOS `open \u003Cpath>`、Windows `start \u003Cpath>` 開啟，並回報 absolute path。\n\nReport 必須完全離線可用：所有 CSS 直接寫入 `\u003Cstyle>`，所有 diagram 使用 inline SVG 或 HTML\u002FCSS。不可載入 CDN、外部 script、外部 stylesheet、字型或 image。每個 candidate 都要有 before／after visualisation。\n\n每個 candidate card 包含：\n\n- **Files**：涉及檔案／module\n- **Problem**：現有 architecture 為何造成 friction\n- **Solution**：plain English 說明改變\n- **Wins**：以 locality、leverage 與測試改善解釋\n- **Before \u002F After diagram**：並排自繪，呈現 shallowness 與 deepening\n- **Recommendation strength**：`強烈建議`、`值得探索` 或 `推測性` badge\n\n結尾加入 **Top recommendation**：最先處理哪個 candidate 與原因。\n\ndomain 以 `CONTEXT.md`，architecture 以 `$codebase-design` vocabulary 表達。若 `CONTEXT.md` 定義「Order」，寫「Order intake module」，不可寫「FooBarHandler」或「Order service」。\n\n**ADR conflict**：只有 friction 真實到值得重開 ADR 時才呈現矛盾，且在 card 明確標記，例如：_「與 ADR-0007 矛盾，但值得重開，因為…」_。不可列出所有理論上被 ADR 排除的 refactor。\n\n完整 scaffold、diagram pattern 與 style guidance 見 [HTML-REPORT.md](HTML-REPORT.md)。不可先提出 interface；檔案建立後詢問使用者：「你想先探索哪一個？」\n\n### 3. Grilling loop\n\n使用者選擇 candidate 後，執行 `$grilling` skill，依序釐清 constraint、dependency、deepened module 的 shape、seam 後的內容與存續測試。\n\n決策逐漸清楚時立刻產生 side effect，執行 `$domain-modeling` skill 以維護 domain model：\n\n- deepened module 使用 `CONTEXT.md` 尚無的 concept 命名時，加入 term；僅在需要時建立檔案。\n- 對話中釐清模糊 term 時，立即更新 `CONTEXT.md`。\n- 使用者以可承重的理由否決 candidate 時，可問：「要不要將此記為 ADR，避免未來 architecture review 再次提出？」只有理由能避免未來探索者重提同一項時才提供；「目前不值得」等短暫或顯而易見原因不提供。\n- 想探索 deepened module 的 alternative interface 時，執行 `$codebase-design` skill，採用其 design-it-twice parallel sub-agent pattern。\n","# 改善 Codebase Architecture\n\n找出 architectural friction，提出 **deepening opportunities**：將 shallow module 轉為 deep module 的 refactor。目標是提升 testability 與 AI-navigability。\n\n此 command 必須以 project 的 domain model 為依據，並採用共通 design vocabulary：\n\n- 執行 `$codebase-design` skill，使用其 architecture vocabulary（**module**、**interface**、**depth**、**seam**、**adapter**、**leverage**、**locality**）及原則（deletion test、\"the interface is the test surface\"、\"one adapter = hypothetical seam, two = real\"）。每個 suggestion 必須精確使用這些詞；不可改用「component」、「service」、「API」或「boundary」。\n- `CONTEXT.md` 的 domain language 為良好 seam 命名；`docs\u002Fadr\u002F` 的 ADR 記錄不可重新爭論的決策。\n\n## 流程\n\n### 1. 探索\n\n**掃描前先定範圍：YAGNI。**Deepening module 的價值在於讓未來修改更容易，因此優先檢視近期常變動處。\n\n- 使用者指定 module、subsystem 或 pain point 時直接採用，略過後續推論。\n- 否則查看一段足夠的 `git log --oneline`，找出重複出現的 hotspot files／area，優先由這些 path 開始；若變更分散且沒有 hotspot，才擴大範圍。\n\n先讀專案 glossary（`CONTEXT.md`）與即將處理 area 的 ADR。接著派 sub-agent 探索 codebase，不可僵化套用 heuristic；記錄理解時遇到的 friction：\n\n- 是否理解一個概念需要反覆切換許多小 module？\n- 哪些 module 是 **shallow**，其 interface 幾乎和 implementation 一樣複雜？\n- 是否為了 testability 抽出 pure function，真正 bug 卻藏在呼叫關係，使 **locality** 消失？\n- 哪些緊密耦合 module 跨越 seam 泄漏？\n- 哪些 area 沒測試，或難以透過現有 interface 測試？\n\n對可疑 shallow module 套用 **deletion test**：刪除它會集中 complexity，還是只會移動 complexity？「會集中」才是值得處理的 signal。\n\n### 2. 用 HTML report 呈現候選項目\n\n將 self-contained HTML 寫入 OS temporary directory，不可寫入 repo。由 `$TMPDIR` 取得 temp dir，否則採用 Linux `\u002Ftmp`、Windows `%TEMP%`；檔名為 `\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html`，每次執行皆建立新檔。以 Linux `xdg-open \u003Cpath>`、macOS `open \u003Cpath>`、Windows `start \u003Cpath>` 開啟，並回報 absolute path。\n\nReport 必須完全離線可用：所有 CSS 直接寫入 `\u003Cstyle>`，所有 diagram 使用 inline SVG 或 HTML\u002FCSS。不可載入 CDN、外部 script、外部 stylesheet、字型或 image。每個 candidate 都要有 before／after visualisation。\n\n每個 candidate card 包含：\n\n- **Files**：涉及檔案／module\n- **Problem**：現有 architecture 為何造成 friction\n- **Solution**：plain English 說明改變\n- **Wins**：以 locality、leverage 與測試改善解釋\n- **Before \u002F After diagram**：並排自繪，呈現 shallowness 與 deepening\n- **Recommendation strength**：`強烈建議`、`值得探索` 或 `推測性` badge\n\n結尾加入 **Top recommendation**：最先處理哪個 candidate 與原因。\n\ndomain 以 `CONTEXT.md`，architecture 以 `$codebase-design` vocabulary 表達。若 `CONTEXT.md` 定義「Order」，寫「Order intake module」，不可寫「FooBarHandler」或「Order service」。\n\n**ADR conflict**：只有 friction 真實到值得重開 ADR 時才呈現矛盾，且在 card 明確標記，例如：_「與 ADR-0007 矛盾，但值得重開，因為…」_。不可列出所有理論上被 ADR 排除的 refactor。\n\n完整 scaffold、diagram pattern 與 style guidance 見 [HTML-REPORT.md](HTML-REPORT.md)。不可先提出 interface；檔案建立後詢問使用者：「你想先探索哪一個？」\n\n### 3. Grilling loop\n\n使用者選擇 candidate 後，執行 `$grilling` skill，依序釐清 constraint、dependency、deepened module 的 shape、seam 後的內容與存續測試。\n\n決策逐漸清楚時立刻產生 side effect，執行 `$domain-modeling` skill 以維護 domain model：\n\n- deepened module 使用 `CONTEXT.md` 尚無的 concept 命名時，加入 term；僅在需要時建立檔案。\n- 對話中釐清模糊 term 時，立即更新 `CONTEXT.md`。\n- 使用者以可承重的理由否決 candidate 時，可問：「要不要將此記為 ADR，避免未來 architecture review 再次提出？」只有理由能避免未來探索者重提同一項時才提供；「目前不值得」等短暫或顯而易見原因不提供。\n- 想探索 deepened module 的 alternative interface 時，執行 `$codebase-design` skill，採用其 design-it-twice parallel sub-agent pattern。\n",{"name":5,"description":7},"main","41b33db37e0cff05594180ed30962ae769bb66f6",".agents\u002Fskills\u002Fimprove-codebase-architecture","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN","2026-09-19 18:58:37",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add Andy-CH-BO-AN\u002Fplaywright-self-healing-tests --skill improve-codebase-architecture",{"tool":35,"command":36},"bunx","bunx skills add Andy-CH-BO-AN\u002Fplaywright-self-healing-tests --skill improve-codebase-architecture",{"tool":38,"command":39},"pnpm","pnpm dlx skills add Andy-CH-BO-AN\u002Fplaywright-self-healing-tests --skill improve-codebase-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",true,[43,49],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"agents\u002Fopenai.yaml","REFERENCE","参考文档",172,"https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002Fagents\u002Fopenai.yaml",{"path":50,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":51,"sourceHtmlUrl":52},"HTML-REPORT.md",6747,"https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002FHTML-REPORT.md",[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7AASPR946YZRE5RF4A9Y712","readme-pm-review","僅在使用者明確要求以 product-manager 角度審查 repository README 時使用。先只讀 README，不推測未記錄功能，提供可讀性回饋、改寫建議與產品優先順序建議。","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freadme-pm-review\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7AASKTD9ZN18D6NTKKW1MXH","handoff","將目前對話濃縮為可供下一位 agent 接手的交接文件。","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7AASJGF9S5PYDPX06TE8SAP","grilling","以密集提問檢驗使用者的計畫、決策或想法。使用者想壓力測試思考或使用任何「grill」觸發語時使用。","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgrilling\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7AASH7K8B19AZ6Z5FF1TRDB","grill-with-docs","以密集訪談釐清並磨練計畫或設計，並同步建立 ADR 與 glossary 文件。","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgrill-with-docs\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7AASG4404RPT22AMJX2PMP9","grill-me","以密集訪談釐清並磨練計畫或設計。","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgrill-me\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M7AASE1PD2H3TCX7V2AQBD53","git-change-conventions","在此 repository 建立或命名 branch、pull request、commit 時使用。遵守既定 type prefix，並撰寫詳盡 commit message。","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002Fplaywright-self-healing-tests\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgit-change-conventions\u002FSKILL.md",[],[]]