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 从公开仓库中收录这些内容。

举报或申请下架