智能分析交易维度前端代码,自动逆向推导业务需求,构建可复用的交易知识图谱。支持 Vue/React/Angular 多技术栈,具备智能缓存和错误恢复机制。
智能分析交易维度前端代码,自动逆向推导业务需求,构建可复用的交易知识图谱。
bash
bash
bash
bash
文件内容 → SHA256 哈希 → 缓存键
↓
检查缓存存在?
↓
是 → 返回缓存结果(7天有效期)
否 → 执行解析 → 保存到缓存 → 返回结果
| 场景 | 建议 |
|---|---|
| 日常分析 | 使用缓存(默认) |
| CI/CD 流水线 |
json
{
file_info: {
path: /path/to/file.vue,
type: vue,
size: 3584,
hasscopedstyle: true
},
structure: {
template_lines: 45,
script_lines: 120,
imports: [...],
components_used: [...]
},
components: [
{
name: el-input,
type: input,
props: {...},
events: [input, blur],
business_semantic: 文本输入
}
],
apis: [
{
method: POST,
endpoint: /api/order/submit,
params: {...},
business_purpose: 创建资源
}
],
business_rules: [
{
rule_type: validation,
expression: required: true,
confidence: 0.95,
business_meaning: 必填校验
}
],
complexity: {
linesofcode: 165,
cyclomatic_complexity: 12,
component_count: 8,
api_count: 3
}
}
json
{
trade_dimension: {
lifecycle: [创建, 审核],
trade_type: [申购],
product_type: [基金],
channel: [手机银行],
parties: [客户]
},
functional_requirements: [
{
id: FR-001,
name: 基金申购信息录入,
priority: P0,
scenario: 客户需要申购基金时,
acceptance_criteria: [...]
}
],
business_rules: [...],
data_dictionary: [...],
business_process: {...},
analysis_confidence: {
overall: 0.85,
dimension_confidence: 0.9,
component_confidence: 0.8
},
suggestions: [...]
}
| 场景 | 处理方式 |
|---|---|
| 文件编码错误 | 尝试多种编码,使用 replace 模式 |
| 正则表达式错误 |
bash
bash
bash
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ CLI 入口 │────▶│ 解析器选择 │────▶│ VueParser │
└─────────────┘ └─────────────┘ ├─────────────┤
│ ReactParser │
├─────────────┤
│AngularParser│
└──────┬──────┘
↓
┌─────────────┐
│ CacheManager│
│ (文件指纹) │
└──────┬──────┘
↓
┌─────────────┐
│ TradeBusiness│
│ Analyzer │
└──────┬──────┘
↓
┌─────────────┐
│KnowledgeGraph│
│ Builder │
└────────────
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 code-to-requirement-analyser-1776110776 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 code-to-requirement-analyser-1776110776 技能
skillhub install code-to-requirement-analyser-1776110776
文件大小: 41.46 KB | 发布时间: 2026-4-15 12:13