From omni
Analyzes module directories for single responsibility principle compliance, module cohesion, and mixed duties. Outputs JSON report with scores, violations, statistics, and AI-friendliness grades.
npx claudepluginhub zte-aicloud/co-omnispec --plugin omniThis skill uses the workspace's default tool permissions.
分析指定模块目录的单一职责原则遵守情况,输出标准化JSON格式报告。
Orchestrates multi-module Single Responsibility Principle (SRP) analysis pipeline for codebases. Supports full scans of all modules and git diff-based incremental mode for CI gates.
Audits codebase architecture: maps module dependencies with Mermaid graphs, checks layering integrity, flags structural decay from 12 engineering books. For structure reviews, clean architecture checks, circular imports, and onboarding tours.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Share bugs, ideas, or general feedback.
分析指定模块目录的单一职责原则遵守情况,输出标准化JSON格式报告。
必须使用subagent执行此技能,通过Agent tool调用,subagent_type为"general-purpose"。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
module_path | string | ✅ | 待分析的模块目录路径(绝对路径或相对路径) |
scan_mode | enum | ❌ | 扫描模式:full(全量)或 increment(增量),默认 increment |
output_path | string | ❌ | 分析结果的保存路径。由编排 skill 调用时传入具体路径(如 state/step02-analyze-modules/{module_name}.json);单独调用时默认保存到 .claude/skills/ai-friendly-arch-guard-module-single-responsibility/output/analysis_result.json |
输出严格遵循 schema/output-schema.json 定义的 JSON Schema(完整字段定义见该文件)。
关键字段摘要:
| 字段路径 | 类型 | 说明 |
|---|---|---|
skill_id | string | 固定值 |
rule_version | string | 当前 v1.3 |
module_path | string | 模块目录相对路径(供编排层读取) |
scan_mode | enum | increment | full |
execute_status | enum | success | failed |
metric_result.total_score | number(0-100) | 综合得分 |
metric_result.confidence | number(0-1) | 置信度 |
metric_result.score_detail | object | 三维度得分明细 |
metric_result.confidence_detail | object | 三维度置��度明细 |
violation_info.total_count | integer | 违规总数 |
violation_info.level_summary | object | P0/P1/P2 分级统计 |
violation_info.list | array | 违规详情列表 |
violation_info.exempt_list | array | 豁免列表 |
statistic_info | object | 扫描单元统计(目录/模块/文件) |
| 等级 | 分数区间 | 含义 |
|---|---|---|
| S 级 | 90-100 | AI 原生友好,可全自动开发 |
| A 级 | 75-89 | AI 友好优良,适合 AI 辅助开发 |
| B 级 | 60-74 | 基础可用,需适度优化 |
| C 级 | 40-59 | AI 开发困难,需重构 |
| D 级 | 0-39 | 不适合 AI 开发 |