skill-recommender
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseskill-recommender
skill-recommender
Purpose
用途
Analyze user requests and recommend appropriate documentation skills from the AI Dev Flow framework catalog.
Problem Solved: Users must know which of 25+ skills to invoke for their documentation task, requiring deep framework knowledge.
Solution: Parse user intent, match against skill catalog, and provide ranked recommendations with confidence scores and rationale.
分析用户请求,从AI Dev Flow框架目录中推荐合适的文档技能。
解决的问题:用户必须了解25+种技能中哪一种适用于他们的文档任务,这需要具备深厚的框架知识。
解决方案:解析用户意图,与技能目录匹配,并提供带有置信度分数和理由的排序推荐。
When to Use This Skill
何时使用该技能
Use skill-recommender when:
- User is unsure which skill to use for a documentation task
- Starting a new documentation workflow and need guidance
- Want to discover available skills for a specific intent
- Need help navigating the skill catalog
Do NOT use when:
- User explicitly requests a specific skill (e.g., "/skill doc-prd")
- Performing non-documentation tasks
- User is experienced and knows the target skill
在以下场景使用skill-recommender:
- 用户不确定哪种技能适用于文档任务
- 启动新的文档工作流并需要指导
- 想要发现针对特定意图的可用技能
- 需要帮助浏览技能目录
请勿在以下场景使用:
- 用户明确请求特定技能(例如:"/skill doc-prd")
- 执行非文档类任务
- 用户经验丰富且知晓目标技能
Skill Inputs
技能输入项
| Input | Type | Required | Description |
|---|---|---|---|
| user_request | string | Yes | Natural language description of what user wants to do |
| project_context | object | No | Project structure and existing artifacts (from context-analyzer) |
| max_recommendations | number | No | Maximum recommendations to return (default: 3) |
| 输入项 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| user_request | string | 是 | 用户想要执行操作的自然语言描述 |
| project_context | object | 否 | 项目结构和现有工件(来自context-analyzer) |
| max_recommendations | number | 否 | 返回的最大推荐数(默认值:3) |
Skill Workflow
技能工作流
Step 1: Parse User Intent
步骤1:解析用户意图
Extract action verbs and targets from the user request:
Intent Categories:
| Category | Signal Keywords | Example Request |
|---|---|---|
| create, write, draft, new, add | "Create a new PRD for user authentication" |
| update, modify, edit, change, revise | "Update the traceability section of SPEC-01" |
| validate, check, verify, audit, review | "Check if my artifacts have proper traceability" |
| analyze, review, examine, inspect | "Analyze the project documentation structure" |
| plan, roadmap, schedule, organize | "Create an implementation roadmap from ADRs" |
Target Extraction:
| Target | Signal Keywords | Maps To |
|---|---|---|
| business requirements | business, brd, objectives | doc-brd |
| product requirements | product, prd, features, user stories | doc-prd |
| formal requirements | ears, formal, when-the-shall | doc-ears |
| test scenarios | bdd, tests, scenarios, gherkin | doc-bdd |
| architecture decisions | adr, architecture, decision | doc-adr |
| system requirements | sys, system, technical | doc-sys |
| requirements | req, requirement, atomic | doc-req |
| implementation plan | impl, implementation, plan | doc-impl |
| contracts | ctr, contract, api, interface | doc-ctr |
| specifications | spec, specification, yaml | doc-spec |
| tasks | tasks, todo, implementation tasks | doc-tasks |
| traceability | trace, traceability, links | trace-check |
| validation | validate, quality, compliance | doc-validator |
| diagrams | diagram, mermaid, chart, flow | charts-flow, mermaid-gen |
| roadmap | roadmap, adr implementation | adr-roadmap |
| project management | mvp, mmp, release, planning | project-mngt |
从用户请求中提取动作动词和目标对象:
意图类别:
| 类别 | 标识关键词 | 示例请求 |
|---|---|---|
| create, write, draft, new, add | "为用户认证创建一份新的PRD" |
| update, modify, edit, change, revise | "更新SPEC-01的可追溯性章节" |
| validate, check, verify, audit, review | "检查我的工件是否具备正确的可追溯性" |
| analyze, review, examine, inspect | "分析项目文档结构" |
| plan, roadmap, schedule, organize | "从ADRs创建一份实施路线图" |
目标对象提取:
| 目标对象 | 标识关键词 | 对应技能 |
|---|---|---|
| 业务需求 | business, brd, objectives | doc-brd |
| 产品需求 | product, prd, features, user stories | doc-prd |
| 正式需求 | ears, formal, when-the-shall | doc-ears |
| 测试场景 | bdd, tests, scenarios, gherkin | doc-bdd |
| 架构决策 | adr, architecture, decision | doc-adr |
| 系统需求 | sys, system, technical | doc-sys |
| 需求 | req, requirement, atomic | doc-req |
| 实施计划 | impl, implementation, plan | doc-impl |
| 契约 | ctr, contract, api, interface | doc-ctr |
| 技术规格 | spec, specification, yaml | doc-spec |
| 任务 | tasks, todo, implementation tasks | doc-tasks |
| 可追溯性 | trace, traceability, links | trace-check |
| 验证 | validate, quality, compliance | doc-validator |
| 图表 | diagram, mermaid, chart, flow | charts-flow, mermaid-gen |
| 路线图 | roadmap, adr implementation | adr-roadmap |
| 项目管理 | mvp, mmp, release, planning | project-mngt |
Step 2: Match Skills
步骤2:匹配技能
Match parsed intent against skill catalog:
Skill Catalog (Core Documentation Skills):
| Skill ID | Category | Layer | Description |
|---|---|---|---|
| doc-brd | core-workflow | 1 | Business Requirements Documents |
| doc-prd | core-workflow | 2 | Product Requirements Documents |
| doc-ears | core-workflow | 3 | EARS Formal Requirements |
| doc-bdd | core-workflow | 4 | BDD Test Scenarios |
| doc-adr | core-workflow | 5 | Architecture Decision Records |
| doc-sys | core-workflow | 6 | System Requirements |
| doc-req | core-workflow | 7 | Atomic Requirements |
| doc-impl | core-workflow | 8 | Implementation Plans (optional) |
| doc-ctr | core-workflow | 9 | API Contracts (optional) |
| doc-spec | core-workflow | 10 | Technical Specifications |
| doc-tasks | core-workflow | 11 | Implementation Tasks |
Quality Assurance Skills:
| Skill ID | Category | Description |
|---|---|---|
| trace-check | quality-assurance | Validate bidirectional traceability |
| doc-validator | quality-assurance | Validate documentation standards |
| code-review | quality-assurance | Code quality review |
| contract-tester | quality-assurance | Test API contracts |
Utility Skills:
| Skill ID | Category | Description |
|---|---|---|
| charts-flow | utility | Mermaid architecture diagrams |
| mermaid-gen | utility | Generate Mermaid diagrams |
| analytics-flow | utility | Analytics and data analysis |
| project-init | utility | Initialize project structure |
Planning Skills:
| Skill ID | Category | Description |
|---|---|---|
| adr-roadmap | planning | ADR implementation roadmaps |
| project-mngt | planning | MVP/MMP/MMR release planning |
| doc-flow | planning | SDD workflow orchestration |
将解析后的意图与技能目录匹配:
技能目录(核心文档技能):
| 技能ID | 类别 | 层级 | 描述 |
|---|---|---|---|
| doc-brd | core-workflow | 1 | 业务需求文档 |
| doc-prd | core-workflow | 2 | 产品需求文档 |
| doc-ears | core-workflow | 3 | EARS正式需求 |
| doc-bdd | core-workflow | 4 | BDD测试场景 |
| doc-adr | core-workflow | 5 | 架构决策记录 |
| doc-sys | core-workflow | 6 | 系统需求 |
| doc-req | core-workflow | 7 | 原子需求 |
| doc-impl | core-workflow | 8 | 实施计划(可选) |
| doc-ctr | core-workflow | 9 | API契约(可选) |
| doc-spec | core-workflow | 10 | 技术规格 |
| doc-tasks | core-workflow | 11 | 实施任务 |
质量保证技能:
| 技能ID | 类别 | 描述 |
|---|---|---|
| trace-check | quality-assurance | 验证双向可追溯性 |
| doc-validator | quality-assurance | 验证文档标准 |
| code-review | quality-assurance | 代码质量评审 |
| contract-tester | quality-assurance | 测试API契约 |
实用技能:
| 技能ID | 类别 | 描述 |
|---|---|---|
| charts-flow | utility | Mermaid架构图表 |
| mermaid-gen | utility | 生成Mermaid图表 |
| analytics-flow | utility | 分析与数据分析 |
| project-init | utility | 初始化项目结构 |
规划技能:
| 技能ID | 类别 | 描述 |
|---|---|---|
| adr-roadmap | planning | ADR实施路线图 |
| project-mngt | planning | MVP/MMP/MMR发布规划 |
| doc-flow | planning | SDD工作流编排 |
Step 3: Score and Rank
步骤3:评分与排序
Calculate confidence scores based on:
| Factor | Weight | Description |
|---|---|---|
| Intent match | 40% | How well request matches skill intent signals |
| Target match | 30% | Explicit skill/artifact type mentioned |
| Context fit | 20% | Project state and workflow position |
| Usage patterns | 10% | Common skill sequences |
Confidence Levels:
- High (≥80%): Strong match, recommend with confidence
- Medium (50-79%): Good match, include alternative options
- Low (<50%): Weak match, suggest clarification
基于以下因素计算置信度分数:
| 因素 | 权重 | 描述 |
|---|---|---|
| 意图匹配度 | 40% | 请求与技能意图标识的匹配程度 |
| 目标匹配度 | 30% | 是否明确提及技能/工件类型 |
| 上下文适配度 | 20% | 项目状态和工作流阶段 |
| 使用模式 | 10% | 常见技能使用序列 |
置信度等级:
- 高(≥80%):匹配度高,可放心推荐
- 中(50-79%):匹配度良好,需包含备选选项
- 低(<50%):匹配度弱,建议用户澄清需求
Step 4: Generate Recommendations
步骤4:生成推荐
Format recommendations with rationale:
Output Format:
yaml
recommendations:
- skill: doc-prd
confidence: 92%
rationale: "Request mentions 'product requirements' and 'features' - direct match for PRD creation"
next_steps: "Run /skill doc-prd to create Product Requirements Document"
- skill: doc-brd
confidence: 65%
rationale: "May need BRD first if business requirements not yet documented"
condition: "Use if no BRD exists for this feature"
- skill: doc-ears
confidence: 45%
rationale: "EARS follows PRD in workflow - consider after PRD completion"
condition: "Use after PRD is complete"
clarification_needed: false
clarification_question: null为推荐结果添加理由并格式化:
输出格式:
yaml
recommendations:
- skill: doc-prd
confidence: 92%
rationale: "Request mentions 'product requirements' and 'features' - direct match for PRD creation"
next_steps: "Run /skill doc-prd to create Product Requirements Document"
- skill: doc-brd
confidence: 65%
rationale: "May need BRD first if business requirements not yet documented"
condition: "Use if no BRD exists for this feature"
- skill: doc-ears
confidence: 45%
rationale: "EARS follows PRD in workflow - consider after PRD completion"
condition: "Use after PRD is complete"
clarification_needed: false
clarification_question: nullExample Usage
示例用法
Example 1: Clear Intent
示例1:意图明确的请求
User Request: "I need to create a product requirements document for a new authentication feature"
Skill Analysis:
Intent: create (keywords: create, need)
Target: product requirements (keywords: product requirements document)
Domain: authentication featureRecommendations:
yaml
recommendations:
- skill: doc-prd
confidence: 95%
rationale: "Explicit request for Product Requirements Document"
next_steps: "Run /skill doc-prd to create PRD for authentication feature"
- skill: doc-brd
confidence: 40%
rationale: "BRD may be needed upstream if not already created"
condition: "Check if BRD exists for authentication feature"用户请求:"我需要为新的认证功能创建一份产品需求文档"
技能分析:
Intent: create (keywords: create, need)
Target: product requirements (keywords: product requirements document)
Domain: authentication feature推荐结果:
yaml
recommendations:
- skill: doc-prd
confidence: 95%
rationale: "Explicit request for Product Requirements Document"
next_steps: "Run /skill doc-prd to create PRD for authentication feature"
- skill: doc-brd
confidence: 40%
rationale: "BRD may be needed upstream if not already created"
condition: "Check if BRD exists for authentication feature"Example 2: Ambiguous Intent
示例2:意图模糊的请求
User Request: "Help me document the system architecture"
Skill Analysis:
Intent: create (keywords: document)
Target: ambiguous - could be ADR, SYS, or diagramsRecommendations:
yaml
recommendations:
- skill: doc-adr
confidence: 60%
rationale: "Architecture decisions typically documented in ADRs"
- skill: doc-sys
confidence: 55%
rationale: "System requirements capture technical architecture"
- skill: charts-flow
confidence: 50%
rationale: "Architecture diagrams visualize system structure"
clarification_needed: true
clarification_question: "What aspect of architecture? (1) Decisions/rationale (ADR), (2) System specs (SYS), (3) Visual diagrams?"用户请求:"帮我记录系统架构"
技能分析:
Intent: create (keywords: document)
Target: ambiguous - could be ADR, SYS, or diagrams推荐结果:
yaml
recommendations:
- skill: doc-adr
confidence: 60%
rationale: "Architecture decisions typically documented in ADRs"
- skill: doc-sys
confidence: 55%
rationale: "System requirements capture technical architecture"
- skill: charts-flow
confidence: 50%
rationale: "Architecture diagrams visualize system structure"
clarification_needed: true
clarification_question: "What aspect of architecture? (1) Decisions/rationale (ADR), (2) System specs (SYS), (3) Visual diagrams?"Example 3: Validation Request
示例3:验证类请求
User Request: "Check if my documentation has proper links between artifacts"
Skill Analysis:
Intent: validate (keywords: check)
Target: traceability (keywords: links between artifacts)Recommendations:
yaml
recommendations:
- skill: trace-check
confidence: 98%
rationale: "Direct request for traceability validation"
next_steps: "Run /skill trace-check to validate bidirectional links"用户请求:"检查我的文档工件之间是否有正确的关联链接"
技能分析:
Intent: validate (keywords: check)
Target: traceability (keywords: links between artifacts)推荐结果:
yaml
recommendations:
- skill: trace-check
confidence: 98%
rationale: "Direct request for traceability validation"
next_steps: "Run /skill trace-check to validate bidirectional links"Integration with Other Skills
与其他技能的集成
| Integration | Description |
|---|---|
| context-analyzer | Receives project context for better recommendations |
| doc-flow | Can be invoked by doc-flow for skill discovery |
| workflow-optimizer | Shares workflow position awareness |
| 集成对象 | 描述 |
|---|---|
| context-analyzer | 接收项目上下文以优化推荐结果 |
| doc-flow | 可被doc-flow调用以实现技能发现 |
| workflow-optimizer | 共享工作流阶段感知能力 |
Quality Gates
质量验收标准
Definition of Done
完成定义
- User request parsed successfully
- At least one skill recommendation provided
- Confidence scores calculated for all recommendations
- Rationale included for each recommendation
- Clarification question generated when ambiguous
- 成功解析用户请求
- 提供至少一项技能推荐
- 为所有推荐结果计算置信度分数
- 为每个推荐结果添加理由
- 当意图模糊时生成澄清问题
Performance Targets
性能指标
| Metric | Target |
|---|---|
| Response latency | <500ms |
| Recommendation accuracy | ≥85% |
| User acceptance rate | ≥70% |
| 指标 | 目标值 |
|---|---|
| 响应延迟 | <500ms |
| 推荐准确率 | ≥85% |
| 用户接受率 | ≥70% |
Traceability
可追溯性
Required Tags:
@prd: PRD.000.001
@adr: ADR-000必填标签:
@prd: PRD.000.001
@adr: ADR-000Upstream Sources
上游来源
| Source | Type | Reference |
|---|---|---|
| PRD-00 | Product Requirements | PRD-00 |
| ADR-000 | Architecture Decision | ADR-000 |
| 来源 | 类型 | 参考链接 |
|---|---|---|
| PRD-00 | 产品需求 | PRD-00 |
| ADR-000 | 架构决策 | ADR-000 |
Downstream Artifacts
下游工件
| Artifact | Type | Reference |
|---|---|---|
| Selected doc-* skill | Skill Execution | Invoked based on recommendation |
| 工件 | 类型 | 参考链接 |
|---|---|---|
| 选中的doc-*技能 | 技能执行 | 根据推荐结果调用 |
Version Information
版本信息
Version: 1.0.0
Created: 2025-11-29
Status: Active
Author: AI Dev Flow Framework Team
版本: 1.0.0
创建时间: 2025-11-29
状态: 活跃
作者: AI Dev Flow Framework Team