elicitation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Elicitation Skill

启发式审查技能

Purpose

用途

Enable expert agents to self-review and self-correct their code before external validation (sniper). Based on BMAD-METHOD's 75 elicitation techniques.

让专家Agent在外部验证(sniper)前对自己的代码进行自我审查与自我修正。基于BMAD-METHOD的75种启发式技术。

3 Execution Modes

3种执行模式

Mode 1: MANUAL (default)

模式1:手动模式(默认)

Expert presents 5 relevant techniques → User chooses → Expert applies
专家Agent列出5种相关技术 → 用户选择 → 专家Agent执行

Mode 2: AUTO (--auto)

模式2:自动模式(--auto)

Expert auto-detects code type → Auto-selects techniques → Applies silently
专家Agent自动检测代码类型 → 自动选择技术 → 静默执行

Mode 3: SKIP (--skip)

模式3:跳过模式(--skip)

Skip elicitation → Go directly to sniper validation

跳过启发式审查 → 直接进入sniper验证

Quick Start

快速开始

After Execute phase, expert runs:
bash
undefined
在执行阶段完成后,专家Agent运行以下命令:
bash
undefined

Manual mode (default)

手动模式(默认)

Apply elicitation skill
应用启发式审查技能

Auto mode (no prompts)

自动模式(无提示)

Apply elicitation skill --auto
应用启发式审查技能 --auto

Skip self-review

跳过自我审查

Apply elicitation skill --skip

---
应用启发式审查技能 --skip

---

Workflow Overview

工作流概览

┌─────────────────────────────────────────────────────────┐
│              ELICITATION WORKFLOW                       │
│                                                         │
│  Step 0: Init           → Load context                 │
│  Step 1: Analyze Code   → Detect code type             │
│  Step 2: Select         → Choose techniques (or auto)  │
│  Step 3: Apply Review   → Execute techniques           │
│  Step 4: Self-Correct   → Fix own issues               │
│  Step 5: Report         → Summary before sniper        │
└─────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────┐
│              启发式审查工作流                           │
│                                                         │
│  步骤0:初始化           → 加载上下文                   │
│  步骤1:代码分析         → 检测代码类型                 │
│  步骤2:技术选择         → 选择技术(或自动选择)        │
│  步骤3:执行审查         → 应用选定技术                 │
│  步骤4:自我修正         → 修复自身问题                 │
│  步骤5:生成报告         → 提交给sniper前的总结         │
└─────────────────────────────────────────────────────────┘

Auto-Detection Matrix

自动检测矩阵

Code Type DetectedAuto-Selected Techniques
Authentication/SecuritySecurity Audit, OWASP Check, Input Validation
API EndpointsError Handling, Type Coverage, API Contracts
Database/ORMN+1 Detection, Migration Safety, Data Integrity
UI ComponentsAccessibility, Edge Cases, Loading States
Business LogicSOLID Compliance, Unit Test Coverage, Edge Cases
RefactoringBreaking Changes, Regression Analysis, Backward Compat
Performance CriticalProfiling, Memory Analysis, Complexity Check

检测到的代码类型自动选定的技术
认证/安全安全审计、OWASP检查、输入验证
API端点错误处理、类型覆盖、API契约
数据库/ORMN+1查询检测、迁移安全性、数据完整性
UI组件可访问性、边界情况、加载状态
业务逻辑SOLID合规性、单元测试覆盖率、边界情况
代码重构破坏性变更、回归分析、向后兼容性
性能关键代码性能分析、内存分析、复杂度检查

Technique Categories (12)

技术分类(12类)

Full catalog:
references/techniques-catalog.md
  1. Code Quality (7): Code review, Pattern detection, Complexity analysis...
  2. Security (7): OWASP audit, Input validation, Auth check...
  3. Performance (6): Profiling, N+1 detection, Memory analysis...
  4. Architecture (6): SOLID check, Dependency analysis, Coupling review...
  5. Testing (6): Edge cases, Boundary testing, Error paths...
  6. Documentation (6): API review, Comment check, Type coverage...
  7. UX (6): Accessibility, Error messages, Loading states...
  8. Data (6): Schema validation, Migration safety, Data integrity...
  9. Concurrency (6): Race conditions, Deadlock analysis, State sync...
  10. Integration (7): API contracts, Backward compat, Breaking changes...
  11. Observability (6): Logging, Metrics, Error tracking...
  12. Maintainability (6): Readability, Naming, File organization...
Total: 75 techniques

完整目录:
references/techniques-catalog.md
  1. 代码质量(7种):代码审查、模式检测、复杂度分析...
  2. 安全(7种):OWASP审计、输入验证、认证检查...
  3. 性能(6种):性能分析、N+1查询检测、内存分析...
  4. 架构(6种):SOLID检查、依赖分析、耦合度审查...
  5. 测试(6种):边界情况、边界测试、错误路径...
  6. 文档(6种):API审查、注释检查、类型覆盖...
  7. UX(6种):可访问性、错误提示、加载状态...
  8. 数据(6种):Schema验证、迁移安全性、数据完整性...
  9. 并发(6种):竞态条件、死锁分析、状态同步...
  10. 集成(7种):API契约、向后兼容性、破坏性变更...
  11. 可观测性(6种):日志、指标、错误追踪...
  12. 可维护性(6种):可读性、命名规范、文件组织...
总计:75种技术

Integration with APEX

与APEX的集成

A-nalyze → P-lan → E-xecute → [ELICIT] → X-amine
                       │          │           │
                       ▼          ▼           ▼
                    Expert    Expert       sniper
                     code    self-review   (final)
Benefits:
  • Expert catches own mistakes before sniper
  • Faster validation (less sniper corrections)
  • Knowledge retention (expert learns from self-review)

A-nalyze(分析) → P-lan(规划) → E-xecute(执行) → [ELICIT(启发式审查)] → X-amine(检查)
                       │          │           │
                       ▼          ▼           ▼
                    Expert(专家Agent)  Expert(自我审查)       sniper(最终验证)
                     编码          自我审查         (最终验证)
优势:
  • 专家Agent在sniper验证前发现自身错误
  • 验证速度更快(减少sniper的修正次数)
  • 知识留存(专家Agent从自我审查中学习)

Forbidden

禁止操作

  • ❌ Skip init step (must load context)
  • ❌ Apply techniques without understanding code type
  • ❌ Self-correct without documenting changes
  • ❌ Report without listing applied techniques
  • ❌ Use techniques outside expertise domain

  • ❌ 跳过初始化步骤(必须加载上下文)
  • ❌ 在未理解代码类型的情况下应用技术
  • ❌ 未记录变更就进行自我修正
  • ❌ 未列出所用技术就提交报告
  • ❌ 使用超出专业领域的技术

Steps Reference

步骤参考

StepFilePurpose
0
steps/step-00-init.md
Load context, detect mode
1
steps/step-01-analyze-code.md
Analyze written code
2
steps/step-02-select-techniques.md
Select techniques
3
steps/step-03-apply-review.md
Apply review
4
steps/step-04-self-correct.md
Self-correct
5
steps/step-05-report.md
Generate report
步骤文件用途
0
steps/step-00-init.md
加载上下文,检测模式
1
steps/step-01-analyze-code.md
分析编写的代码
2
steps/step-02-select-techniques.md
选择技术
3
steps/step-03-apply-review.md
执行审查
4
steps/step-04-self-correct.md
自我修正
5
steps/step-05-report.md
生成报告