Architectural Analysis

pedronauck/skills/skills/mine/architectural-analysis

作者 pedronauck0422940cea5d9960b3697016d1cb28c8ed02b030無授權條款收錄於 2026年10月9日更新於 2026年10月9日

Audit architecture, dead code, duplication, type confusion, and code smells across a codebase. Excludes formatting, performance profiling, security audits, and feature-level reviews.

AI 產生的概覽

稽核程式碼庫中的架構設計問題,例如死程式碼、重複、循環相依與型別混淆。

功能
引導代理對指定範圍進行唯讀架構稽核:梳理進入點與相關相依性,優先關注死匯出、職責重複、循環相依、歸屬或型別混淆等訊號,並在判定程式碼為死程式碼前追蹤其使用情形。每項重要發現都會在原始碼中確認,說明其行為或維護成本,標註路徑與行號,並提出最小可行的修改建議。產出為與請求規模相符的報告,可選用隨附的報告或摘要範本,並儲存到 .audits/ 目錄下。
適用情境
適用於有人要求對程式碼庫或其某一部分進行架構審查或設計品質稽核的情境。既適合需要結構化報告的全面稽核,也適合只需簡短問題清單的窄範圍提問。不適用於格式檢查、效能剖析、安全稽核或功能層級的審查。
執行需求
僅以指令形式執行,不含指令碼。需要代理具備檔案讀取與搜尋工具,例如 ripgrep(rg --files 及限定範圍的 rg 搜尋),以及可用的靜態分析輸出;隨附的參考目錄與報告/摘要範本由模型讀取。

Architectural Analysis

Audit the requested scope and report concrete design problems. An audit alone is read-only; existing explicit authorization to apply findings can include remediation. Use the project's boundaries and public compatibility policy when judging a design.

  1. Resolve scope from the request/context. Map entry points and relevant dependencies with rg --files, scoped rg searches, and available static-analysis output. Do not create one todo per source file or assume a TypeScript stack.
  2. Prioritize signals: dead exports, duplicated responsibilities, cycles, confused ownership/types, and expensive change patterns. Read the matching section of references/detection-catalog.md when classifying a candidate; thresholds are clues, not automatic defects.
  3. Trace usage before declaring code dead, including dynamic loading, reflection, framework hooks, tests, and published APIs. An unreferenced public export is not safe to delete solely because this checkout has no consumer.
  4. Confirm each material finding in source. Explain the behavior or maintenance cost, cite paths/lines, state uncertainty, and propose the smallest useful change. Avoid a separate generic smell sweep when it adds no evidence.
  5. Match report size to the request. For a broad audit, use assets/report-template.md as an adaptable outline and save .audits/architectural-analysis-<timestamp>.md; distinguish inspected and uninspected areas. For a narrow answer, a concise finding list is enough. Missing coverage must never be reported as None found.
  6. Summarize the important findings and evidence. Existing source and summary templates are optional presentation aids, not two required reports.

來源與署名

來源:pedronauck/skills位於skills/mine/architectural-analysis提交0422940

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架