$npx -y skills add fusengine/agents --skill elicitationAuto-review skill for expert agents. After coding, expert applies elicitation techniques to self-correct before sniper validation. Inspired by BMAD-METHOD. Use when: an expert agent needs to self-review and self-correct code after the Execute phase, before sniper validation.
| 1 | # Elicitation Skill |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Enable expert agents to **self-review and self-correct** their code before external validation (sniper). Based on BMAD-METHOD's 75 elicitation techniques. |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## 3 Execution Modes |
| 10 | |
| 11 | ### Mode 1: MANUAL (default) |
| 12 | ``` |
| 13 | Expert presents 5 relevant techniques → User chooses → Expert applies |
| 14 | ``` |
| 15 | |
| 16 | ### Mode 2: AUTO (--auto) |
| 17 | ``` |
| 18 | Expert auto-detects code type → Auto-selects techniques → Applies silently |
| 19 | ``` |
| 20 | |
| 21 | ### Mode 3: SKIP (--skip) |
| 22 | ``` |
| 23 | Skip elicitation → Go directly to sniper validation |
| 24 | ``` |
| 25 | |
| 26 | --- |
| 27 | |
| 28 | ## Quick Start |
| 29 | |
| 30 | **After Execute phase, expert runs:** |
| 31 | ```bash |
| 32 | # Manual mode (default) |
| 33 | > Apply elicitation skill |
| 34 | |
| 35 | # Auto mode (no prompts) |
| 36 | > Apply elicitation skill --auto |
| 37 | |
| 38 | # Skip self-review |
| 39 | > Apply elicitation skill --skip |
| 40 | ``` |
| 41 | |
| 42 | --- |
| 43 | |
| 44 | ## Workflow Overview |
| 45 | |
| 46 | ``` |
| 47 | ┌─────────────────────────────────────────────────────────┐ |
| 48 | │ ELICITATION WORKFLOW │ |
| 49 | │ │ |
| 50 | │ Step 0: Init → Load context │ |
| 51 | │ Step 1: Analyze Code → Detect code type │ |
| 52 | │ Step 2: Select → Choose techniques (or auto) │ |
| 53 | │ Step 3: Apply Review → Execute techniques │ |
| 54 | │ Step 4: Self-Correct → Fix own issues │ |
| 55 | │ Step 5: Report → Summary before sniper │ |
| 56 | └─────────────────────────────────────────────────────────┘ |
| 57 | ``` |
| 58 | |
| 59 | --- |
| 60 | |
| 61 | ## Auto-Detection Matrix |
| 62 | |
| 63 | | Code Type Detected | Auto-Selected Techniques | |
| 64 | |--------------------|--------------------------| |
| 65 | | Authentication/Security | Security Audit, OWASP Check, Input Validation | |
| 66 | | API Endpoints | Error Handling, Type Coverage, API Contracts | |
| 67 | | Database/ORM | N+1 Detection, Migration Safety, Data Integrity | |
| 68 | | UI Components | Accessibility, Edge Cases, Loading States | |
| 69 | | Business Logic | SOLID Compliance, Unit Test Coverage, Edge Cases | |
| 70 | | Refactoring | Breaking Changes, Regression Analysis, Backward Compat | |
| 71 | | Performance Critical | Profiling, Memory Analysis, Complexity Check | |
| 72 | | Config/Docs/Plugin files (`.md` agents/skills, `hooks.json`, frontmatter YAML) | CQ-01, DOC-01, INT-01 + validation by the **strictest parser in the consumption chain** (e.g. `js-yaml` strict for frontmatter, `json.tool` for JSON) -- never "looks well-formed" | |
| 73 | |
| 74 | --- |
| 75 | |
| 76 | ## Technique Categories (12) |
| 77 | |
| 78 | Full catalog: `references/techniques-catalog.md` |
| 79 | |
| 80 | 1. **Code Quality** (7): Code review, Pattern detection, Complexity analysis... |
| 81 | 2. **Security** (7): OWASP audit, Input validation, Auth check... |
| 82 | 3. **Performance** (6): Profiling, N+1 detection, Memory analysis... |
| 83 | 4. **Architecture** (6): SOLID check, Dependency analysis, Coupling review... |
| 84 | 5. **Testing** (6): Edge cases, Boundary testing, Error paths... |
| 85 | 6. **Documentation** (6): API review, Comment check, Type coverage... |
| 86 | 7. **UX** (6): Accessibility, Error messages, Loading states... |
| 87 | 8. **Data** (6): Schema validation, Migration safety, Data integrity... |
| 88 | 9. **Concurrency** (6): Race conditions, Deadlock analysis, State sync... |
| 89 | 10. **Integration** (7): API contracts, Backward compat, Breaking changes... |
| 90 | 11. **Observability** (6): Logging, Metrics, Error tracking... |
| 91 | 12. **Maintainability** (6): Readability, Naming, File organization... |
| 92 | |
| 93 | **Total: 75 techniques** |
| 94 | |
| 95 | --- |
| 96 | |
| 97 | ## Integration with APEX |
| 98 | |
| 99 | ``` |
| 100 | A-nalyze → P-lan → E-xecute → [ELICIT] → X-amine |
| 101 | │ │ │ |
| 102 | ▼ ▼ ▼ |
| 103 | Expert Expert sniper |
| 104 | code self-review (final) |
| 105 | ``` |
| 106 | |
| 107 | **Benefits:** |
| 108 | - Expert catches own mistakes before sniper |
| 109 | - Faster validation (less sniper corrections) |
| 110 | - Knowledge retention (expert learns from self-review) |
| 111 | |
| 112 | --- |
| 113 | |
| 114 | ## Forbidden |
| 115 | |
| 116 | - ❌ Skip init step (must load context) |
| 117 | - ❌ Apply techniques without understanding code type |
| 118 | - ❌ Self-correct without documenting changes |
| 119 | - ❌ Report without listing applied techniques |
| 120 | - ❌ Use techniques outside expertise domain |
| 121 | |
| 122 | --- |
| 123 | |
| 124 | ## Exit Criteria (Step 5: Report) |
| 125 | |
| 126 | **Score** = techniques applied / techniques selected, weighted by critical category (Security, Architecture). |
| 127 | |
| 128 | | Score | Status | Action | |
| 129 | |-------|--------|--------| |
| 130 | | ≥ 90% | 🟢 | Proceed to sniper | |
| 131 | | 70-89% | 🟡 | Document gaps, then proceed | |
| 132 | | < 70% | 🔴 | Iterate before sniper | |
| 133 | |
| 134 | **Self-correction failure**: If a self-correction breaks the code → revert that correction and keep the finding as a report item instead. |
| 135 | |
| 136 | --- |
| 137 | |
| 138 | ## Artifact Contract |
| 139 | |
| 140 | Step 5 persists `.claude/apex/docs/elicit-{task-slug}.json` so a later pass |
| 141 | diffs against prior verdicts instead of restarting from scratch. Full |
| 142 | contract, `{task-slug}` derivation, and |