recovery-protocol
Stop-diagnose-correct-learn protocol — handle agent errors and frustration systematically
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- recovery-protocol
- triggers
- Recovery, 'no es eso', frustration, error correction
- changelog
- docs/ciclos/cycle28-20260815.md
- description
- Stop-diagnose-correct-learn protocol — handle agent errors and frustration systematically
- token_budget
- 2850
03 SKILL.md 正文
When to Use
Stop-diagnose-correct-learn protocol — handle agent errors a
Trigger: "ya te dije", "no es eso", "no funciona", "otra vez", "wrong", "not what I asked", repeated correction 2x.
Protocol
1. STOP — immediately
Do NOT: explain · justify · suggest alt · generate more code Do: "Tenés razón, me equivoqué. Vamos de nuevo." Acknowledge specifically. Stop all generation.
2. DIAGNOSE — root cause
- Misunderstood req → re-read user's words
- Wrong approach → check docs/context
- Hallucinated API → verify with Context7/docs
- Wrong file → re-read actual file
- Repetition → check Engram for prior attempts
3. CORRECT — fix approach
Unsure? ASK: "¿Entendí bien? Decime si esto es lo que necesitás." User provided correct approach? Implement EXACTLY that. NEVER same mistake twice in one session.
4. LEARN — persist
mem_save title: "Correction: {what}"
type: learning
content: **What**: mistake | **Correct**: | **Root cause**: | **Prevention**:
5. ESCALATION — after 2 failed attempts
STOP code → Ask "¿Podés mostrarme exactamente qué esperás?" → Offer restart w/ clear spec
Frustration Signals
"ya te dije" → STOP+re-read+Engram · "no es eso/no funciona" → STOP+diagnose+re-read reqs · "otra vez/again" → STOP+Engram+diff approach · Short tone (1-3 words) → STOP+acknowledge+direct question
Workflow: Detect→STOP→ACKNOWLEDGE→DIAGNOSE→CORRECT→LEARN→continue
docs/skills/recovery-protocol/reference.md
Anti-Rationalization
| Rationalization | Red Flag | Verification |
|---|---|---|
| "reintentar sin diagnóstico" | nuevo intento con mismo error sin root cause | STOP + DIAGNOSE file:line antes de CORRECT |
| "saltar catalogación del error" | error repetido 2x sin ANTI-PATTERN-CATALOG.md | catalogar en 2ª ocurrencia, AGENTS.md rule en 3ª file:line |
| "frustración → cambio de scope" | redefinir tarea para evitar frustración | ACK específico + re-leer requerimiento original sin alterar scope |
Red Flags
- Doing work without checking output format → STOP, re-read skill
- Second occurrence of same rationalization → force RED zone
Verification
- Output matches skill ## Output contract + file:line citaton
- cross-ref-check.ps1 → SKILL.md OK
Refs
Cross-Refs: deep-debugging | engram-protocol | self-improvement | metricas
04 同仓库更多 Skills
web-quality-audit
Comprehensive web audit: performance, a11y, SEO, responsive, animation, design tokens.
ui-engine
UI system — Grid/Flexbox/@layer/:has(), container queries, compositor-only animation, OKLCH tokens, component patterns
baseline-ui
Anti-slop UI — layout, typography, responsive, animation, tokens. Use for cleanup or polish.
skill-creator
Create new AI agent skills following Agent Skills spec -- auto-bootstrap unknown tasks, define structure, register in AGENTS.md
senior-engineer
Apply senior engineering competencies — system design, trade-off analysis, delegation, mentoring, and tech debt strategy
prompt-engineering
Design effective prompts using SPEARS framework — scope, principles, examples, assertions, refinements, with ReAct and multi-agent patterns