Files
Claude-Code-Workflow/.claude/skills/ccw/index/intent-rules.json

166 lines
5.6 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"_metadata": {
"version": "1.0.0",
"description": "Externalized intent classification rules for CCW orchestrator"
},
"intent_patterns": {
"bugfix": {
"priority": 1,
"description": "Bug修复意图",
"variants": {
"hotfix": {
"patterns": ["hotfix", "urgent", "production", "critical", "emergency", "紧急", "生产环境", "线上"],
"workflow": "lite-fix --hotfix"
},
"standard": {
"patterns": ["fix", "bug", "error", "issue", "crash", "broken", "fail", "wrong", "incorrect", "修复", "错误", "崩溃", "失败"],
"workflow": "lite-fix"
}
}
},
"issue_batch": {
"priority": 2,
"description": "批量Issue处理意图",
"patterns": {
"batch_keywords": ["issues", "issue", "batch", "queue", "多个", "批量", "一批"],
"action_keywords": ["fix", "resolve", "处理", "解决", "修复"]
},
"require_both": true,
"workflow": "issue:plan → issue:queue → issue:execute"
},
"exploration": {
"priority": 3,
"description": "探索/不确定意图",
"patterns": ["不确定", "不知道", "explore", "研究", "分析一下", "怎么做", "what if", "should i", "探索", "可能", "或许", "建议"],
"workflow": "brainstorm → plan → execute"
},
"ui_design": {
"priority": 4,
"description": "UI/设计意图",
"patterns": ["ui", "界面", "design", "设计", "component", "组件", "style", "样式", "layout", "布局", "前端", "frontend", "页面"],
"variants": {
"imitate": {
"triggers": ["参考", "模仿", "像", "类似", "reference", "like"],
"workflow": "ui-design:imitate-auto → plan → execute"
},
"explore": {
"triggers": [],
"workflow": "ui-design:explore-auto → plan → execute"
}
}
},
"tdd": {
"priority": 5,
"description": "测试驱动开发意图",
"patterns": ["tdd", "test-driven", "测试驱动", "先写测试", "red-green", "test first"],
"workflow": "tdd-plan → execute → tdd-verify"
},
"review": {
"priority": 6,
"description": "代码审查意图",
"patterns": ["review", "审查", "检查代码", "code review", "质量检查", "安全审查"],
"workflow": "review-session-cycle → review-fix"
},
"documentation": {
"priority": 7,
"description": "文档生成意图",
"patterns": ["文档", "documentation", "docs", "readme", "注释", "api doc", "说明"],
"variants": {
"incremental": {
"triggers": ["更新", "增量", "相关"],
"workflow": "memory:update-related"
},
"full": {
"triggers": ["全部", "完整", "所有"],
"workflow": "memory:docs → execute"
}
}
}
},
"complexity_indicators": {
"high": {
"score_threshold": 4,
"patterns": {
"architecture": {
"keywords": ["refactor", "重构", "migrate", "迁移", "architect", "架构", "system", "系统"],
"weight": 2
},
"multi_module": {
"keywords": ["multiple", "多个", "across", "跨", "all", "所有", "entire", "整个"],
"weight": 2
},
"integration": {
"keywords": ["integrate", "集成", "connect", "连接", "api", "database", "数据库"],
"weight": 1
},
"quality": {
"keywords": ["security", "安全", "performance", "性能", "scale", "扩展", "优化"],
"weight": 1
}
},
"workflow": "plan → verify → execute"
},
"medium": {
"score_threshold": 2,
"workflow": "lite-plan → lite-execute"
},
"low": {
"score_threshold": 0,
"workflow": "lite-plan → lite-execute"
}
},
"cli_tool_triggers": {
"gemini": {
"explicit": ["用 gemini", "gemini 分析", "让 gemini", "用gemini"],
"semantic": ["深度分析", "架构理解", "执行流追踪", "根因分析"]
},
"qwen": {
"explicit": ["用 qwen", "qwen 评估", "让 qwen", "用qwen"],
"semantic": ["第二视角", "对比验证", "模式识别"]
},
"codex": {
"explicit": ["用 codex", "codex 实现", "让 codex", "用codex"],
"semantic": ["自主完成", "批量修改", "自动实现"]
}
},
"fallback_rules": {
"no_match": {
"default_workflow": "lite-plan → lite-execute",
"use_complexity_assessment": true
},
"ambiguous": {
"action": "ask_user",
"message": "检测到多个可能意图,请确认工作流选择"
}
},
"cli_classification": {
"_doc": "CLI辅助意图分类配置对模糊或复杂输入使用Gemini进行语义理解",
"enabled": true,
"trigger_conditions": {
"low_confidence_threshold": 0.6,
"min_input_length": 100,
"low_match_count": 2,
"complexity_trigger": "high",
"ambiguous_patterns": ["不确定", "可能", "或者", "建议", "最好", "maybe", "perhaps", "should i", "what if", "or"]
},
"default_tool": "gemini",
"fallback_tool": "qwen",
"timeout_ms": 60000,
"cache_similar_inputs": true,
"max_retries": 2
},
"cli_action_planning": {
"_doc": "CLI辅助行动规划配置对高复杂度任务使用CLI规划最优执行策略",
"enabled": true,
"trigger_conditions": {
"complexity_threshold": "high",
"step_count_threshold": 3,
"multi_module_detected": true
},
"default_tool": "gemini",
"timeout_ms": 60000,
"allow_step_modification": true,
"risk_assessment": true
}
}