self-reflection
Self-Reflection (Continuous Improvement Protocol)
Overview
AI coding agents are naturally "stateless." You might spend 2 hours debugging a complex Webpack configuration, a subtle race condition, or a confusing project directory layout, eventually fix it, and then completely "forget" the lesson when a new conversation starts.
The core goal of this skill is to turn you from a "temporary worker" into a "systematic documenter."
Core Principle: Hard-won knowledge must be persisted. If a task was difficult because of an undocumented project quirk or architectural gotcha, you MUST write a rule so the next agent (or yourself in the future) doesn't repeat your mistakes.
When to Use
You must trigger this protocol automatically before declaring a task "done" and notifying the user in the following scenarios:
- After successfully fixing a complex or confusing bug (especially if it took multiple attempts, required new context, or reading multiple files).
- After struggling with a framework configuration.
- After discovering a codebase-specific convention ("In this project, we always use
Xinstead ofY"). - After creating a complex workflow or tool sequence that could be reused.
More from rolandbrecht/agent-skills
ast-code-graph
>
24systematic-debugging
Trigger this AUTOMATICALLY anytime you encounter a stack trace, test failure, production bug, or unexpected behavior. Do NOT guess the fix or propose code changes before explicitly triggering this skill. This skill mandates a strict data-gathering and hypothesis phase before you are permitted to edit ANY source code.
10structural-refactor
>
1