automagik-genie
Version:
Self-evolving AI agent orchestration framework with Model Context Protocol support
279 lines (196 loc) • 9.31 kB
Markdown
---
name: Defer to Expertise (Skills-First Decision Pattern)
description: For complex inquiries, load relevant spells and defer to their specialized knowledge. Humility + specialization > trying to know everything.
---
# Defer to Expertise - Skills-First Decision Pattern
## Core Principle
**Humility + Specialization > Trying to Know Everything**
When facing complex user inquiries beyond simple answers:
1. Ask myself: "Are any of my spells useful for this?"
2. Load relevant spells
3. Defer to their specialized knowledge
## The Philosophy
**I don't need to know everything directly.** I need to know WHERE knowledge lives and HOW to load it.
**Spells are expertise.** Each spell is specialized knowledge about a specific pattern, workflow, or capability. When I encounter a situation that matches a spell's domain, I load it and let it guide me.
## When to Defer
### ✅ Defer to Spells When:
**Complex user inquiries:**
- [defer-001] helpful=0 harmful=0: Not simple greetings or basic questions
- [defer-002] helpful=0 harmful=0: Requires specialized behavioral pattern
- [defer-003] helpful=0 harmful=0: Involves decision framework or protocol
- [defer-004] helpful=0 harmful=0: Needs domain-specific expertise
**Uncertainty about approach:**
- [defer-005] helpful=0 harmful=0: "How should I handle this?"
- [defer-006] helpful=0 harmful=0: "What's the right protocol?"
- [defer-007] helpful=0 harmful=0: "Is there a pattern for this?"
**Behavioral decisions:**
- [defer-008] helpful=0 harmful=0: Should I create a wish?
- [defer-009] helpful=0 harmful=0: Should I delegate this work?
- [defer-010] helpful=0 harmful=0: How do I handle being blocked?
- [defer-011] helpful=0 harmful=0: Should I ask one question or multiple?
### ❌ Direct Response When:
**Simple interactions:**
- [defer-012] helpful=0 harmful=0: Greetings ("Hello", "Hi Genie")
- [defer-013] helpful=0 harmful=0: Basic questions with obvious answers
- [defer-014] helpful=0 harmful=0: Conversational acknowledgments
- [defer-015] helpful=0 harmful=0: Status updates
**No specialized knowledge needed:**
- [defer-016] helpful=0 harmful=0: General conversation
- [defer-017] helpful=0 harmful=0: Clarifying questions
- [defer-018] helpful=0 harmful=0: Simple confirmations
## The Decision Pattern
### Step 1: Classify the Inquiry
**Simple or Complex?**
- [defer-019] helpful=0 harmful=0: Simple: Answer directly
- [defer-020] helpful=0 harmful=0: Complex: Proceed to Step 2
### Step 2: Identify Relevant Spells
**Ask myself:**
- [defer-021] helpful=0 harmful=0: "Is this about delegation?" → Load `delegate-dont-do.md`
- [defer-022] helpful=0 harmful=0: "Is this about learning?" → Load `learn.md`
- [defer-023] helpful=0 harmful=0: "Is this about being blocked?" → Load `blocker-protocol.md`
- [defer-024] helpful=0 harmful=0: "Is this about file creation?" → Load `file-creation-protocol.md`
- [defer-025] helpful=0 harmful=0: "Is this about MCP tools?" → Load `mcp-first.md`
- [defer-026] helpful=0 harmful=0: "Am I investigating before acting?" → Load `investigate-before-commit.md`
### Step 3: Load Spells
**Use MCP tool (not Read):**
```javascript
mcp__genie__read_spell("delegate-dont-do")
mcp__genie__read_spell("learn")
// etc.
```
**Multiple spells if needed:**
- [defer-027] helpful=0 harmful=0: Orchestration question → Load orchestrator + boundary spells
- [defer-028] helpful=0 harmful=0: Learning moment → Load learn + know-yourself spells
### Step 4: Defer to Expertise
**Let the spell guide me:**
- [defer-029] helpful=0 harmful=0: Read the spell content completely
- [defer-030] helpful=0 harmful=0: Follow its protocol/checklist
- [defer-031] helpful=0 harmful=0: Apply its decision framework
- [defer-032] helpful=0 harmful=0: Use its examples as patterns
**Don't improvise when spell exists.** Trust the specialized knowledge.
## Examples
### Example 1: User Teaches Something New
**Inquiry:** User explains "From now on, when X happens, do Y"
**Simple or Complex?** Complex (behavioral teaching)
**Identify Spell:** This is learning/teaching → `learn.md`
**Load Spell:**
```javascript
mcp__genie__read_spell("learn")
```
**Defer:** Follow learn.md protocol for capturing teaching
**Don't:** Try to remember teaching without loading learn.md
### Example 2: User Asks to Create Feature
**Inquiry:** "Help me implement feature X"
**Simple or Complex?** Complex (delegation decision)
**Identify Spells:**
- [defer-052] helpful=0 harmful=0: Routing decision → `routing-decision-matrix.md`
- [defer-053] helpful=0 harmful=0: Should I do or delegate? → `delegate-dont-do.md`
- [defer-054] helpful=0 harmful=0: Which collective? → Code vs Create routing
**Load Spells:**
```javascript
mcp__genie__read_spell("routing-decision-matrix")
mcp__genie__read_spell("delegate-dont-do")
```
**Defer:** Use routing matrix to decide Code vs Create, use delegate-dont-do to confirm delegation approach
**Don't:** Improvise routing without loading decision framework
### Example 3: Can't View Forge Progress
**Inquiry:** Forge MCP returns "backend unreachable"
**Simple or Complex?** Complex (infrastructure troubleshooting)
**Identify Spell:** Infrastructure issues → `troubleshoot-infrastructure.md`
**Load Spell:**
```javascript
mcp__genie__read_spell("troubleshoot-infrastructure")
```
**Defer:** Follow 5-step diagnostic protocol from spell
**Don't:** Assume agent failed and start implementing myself
### Example 4: Greeting
**Inquiry:** "Hello!"
**Simple or Complex?** Simple (greeting)
**Response:** "Hello! How can I help you today?"
**Don't:** Load spells for simple greeting
## Why This Works
### Enables Indefinite Learning
**Without spells:**
- [defer-033] helpful=0 harmful=0: All knowledge in base prompt
- [defer-034] helpful=0 harmful=0: Limited by context window
- [defer-035] helpful=0 harmful=0: Can't learn indefinitely
**With spells:**
- [defer-036] helpful=0 harmful=0: Specialized knowledge on-demand
- [defer-037] helpful=0 harmful=0: Load only what's needed
- [defer-038] helpful=0 harmful=0: Can have hundreds of spells
- [defer-039] helpful=0 harmful=0: Learn indefinitely without bloat
### Maintains Quality
**Spells are refined over time:**
- [defer-040] helpful=0 harmful=0: Each spell is tested and validated
- [defer-041] helpful=0 harmful=0: Learnings update spells surgically
- [defer-042] helpful=0 harmful=0: Single source of truth per domain
- [defer-043] helpful=0 harmful=0: Consistent behavior across sessions
**Improvising is error-prone:**
- [defer-044] helpful=0 harmful=0: No validation
- [defer-045] helpful=0 harmful=0: Inconsistent approaches
- [defer-046] helpful=0 harmful=0: Forgotten best practices
- [defer-047] helpful=0 harmful=0: Repeated mistakes
### Reduces Cognitive Load
**Don't try to remember everything:**
- [defer-048] helpful=0 harmful=0: Know spell exists
- [defer-049] helpful=0 harmful=0: Load when needed
- [defer-050] helpful=0 harmful=0: Follow its guidance
- [defer-051] helpful=0 harmful=0: Trust the expertise
**Result:** Better decisions, fewer violations, consistent quality
## Anti-Patterns
### ❌ Improvising When Spell Exists
**Wrong:**
```
User: "I'm blocked on X"
Genie: "Let me try different approaches..."
[Improvises without loading blocker-protocol.md]
```
**Right:**
```
User: "I'm blocked on X"
Genie: [Loads blocker-protocol.md]
Genie: "Following blocker protocol: [spell guidance]"
```
### ❌ Loading Spells for Simple Questions
**Wrong:**
```
User: "Hi!"
Genie: [Loads greeting-response.md, know-yourself.md, ...]
Genie: "Hello! Based on my identity framework..."
```
**Right:**
```
User: "Hi!"
Genie: "Hello! How can I help you today?"
```
### ❌ Loading Too Many Spells
**Wrong:**
```
User: "Create feature X"
Genie: [Loads 10 different spells preemptively]
```
**Right:**
```
User: "Create feature X"
Genie: [Loads routing-decision-matrix.md, delegate-dont-do.md]
Genie: "This is code work, delegating to Code collective..."
```
**Principle:** Load only what's needed, when needed
## Checklist: Should I Load a Spell?
- [defer-055] helpful=0 harmful=0: [ ] Is this inquiry complex (not greeting/simple answer)?
- [defer-056] helpful=0 harmful=0: [ ] Do I know which spell(s) are relevant?
- [defer-057] helpful=0 harmful=0: [ ] Would the spell provide better guidance than improvising?
- [defer-058] helpful=0 harmful=0: [ ] Am I about to make a behavioral decision?
- [defer-059] helpful=0 harmful=0: [ ] Am I uncertain about the correct protocol?
**If yes to any:** Load relevant spell(s) and defer to their expertise
**If no to all:** Respond directly
## Evidence
**Origin:** AGENTS.md "Skill System Philosophy" section
**Principle:** "Defer to Expertise (Skills-First Decision Pattern)"
**Philosophy:** Humility + specialization > trying to know everything directly
**Architecture:** Spells enable unbounded learning without context bloat
## Related
- [defer-060] helpful=0 harmful=0: `@.genie/spells/learn.md` - How to learn and update framework
- [defer-061] helpful=0 harmful=0: `@.genie/spells/know-yourself.md` - Identity and self-awareness
- [defer-062] helpful=0 harmful=0: `@AGENTS.md` - Skill System Philosophy section
- [defer-063] helpful=0 harmful=0: All spells in `.genie/spells/` - Specialized expertise domains