Skip to content

feat(reflection): add skill for systematic post-execution evaluation - #203

Merged
baleen37 merged 2 commits into
mainfrom
feat/reflection-skill
Jan 28, 2026
Merged

feat(reflection): add skill for systematic post-execution evaluation#203
baleen37 merged 2 commits into
mainfrom
feat/reflection-skill

Conversation

@baleen37

@baleen37 baleen37 commented Jan 28, 2026

Copy link
Copy Markdown
Owner

Summary

Adds reflection skill for systematic post-execution evaluation of skills/commands.

Key Features

  • 4-step evaluation process: CAPTURE → EVALUATE → DIAGNOSE → RECOMMEND
  • Checklist-based evaluation: Objective ✅/❌/⚠️ instead of subjective metrics
  • Root cause analysis: Recursive "why?" questioning (minimum 3x)
  • Rationalization detection: 12 common excuses with rebuttals
  • Pressure resistance: Red flags for time/fatigue/sunk-cost scenarios

TDD Methodology

  • ✅ RED: Documented baseline behavior without skill (3 scenarios)
  • ✅ GREEN: Wrote minimal skill addressing observed issues
  • ✅ REFACTOR: Added rationalization table and red flags from pressure tests

Usage

```bash
/reflection # Evaluates last skill automatically
/reflection create-pr # Evaluates specific skill
```

Test Results

  • ✅ Rule violations → Clear failure detection (no "partial success" rationalization)
  • ✅ Success cases → Appropriate recognition without false positives
  • ✅ Efficiency problems → Structural recommendations (e.g., local-first principle)
  • ✅ Pressure scenarios → Rationalization resistance verified

Implementation

  • File: plugins/me/skills/reflection/SKILL.md
  • Word count: 991 (comprehensive but concise)
  • Follows writing-skills guidelines

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive Reflection workflow guide with evaluation steps, diagnostic methods, classification schemes for root causes, and structured reporting format for post-skill evaluation and analysis.

✏️ Tip: You can customize this high-level summary in your review settings.

Adds reflection skill following TDD methodology (RED-GREEN-REFACTOR):
- RED: Documented baseline behavior without skill (3 scenarios)
- GREEN: Wrote minimal skill addressing observed issues
- REFACTOR: Added rationalization table and red flags

Features:
- 4-step evaluation process (CAPTURE-EVALUATE-DIAGNOSE-RECOMMEND)
- Checklist-based evaluation (no subjective metrics)
- Recursive "why?" questioning (min 3x) for root cause
- Rationalization detection with 12 common excuses
- Red flags for pressure scenarios
- Problem classification (skill bug/usage/environment/edge case)

Tested with:
- Rule violation scenarios (clear failure detection)
- Success cases (appropriate recognition)
- Efficiency problems (technical success vs optimal)
- Pressure scenarios (rationalization resistance)

Word count: 991 (within acceptable range for comprehensive skill)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jan 28, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

A new documentation file defines a Reflection workflow for post-skill evaluation, including structured steps for capturing execution details, evaluating outcomes, diagnosing root causes through iterative questioning, and recommending improvements. The document standardizes the reflection output format as a Markdown report.

Changes

Cohort / File(s) Summary
Reflection Skill Documentation
plugins/me/skills/reflection/SKILL.md
Introduces comprehensive reflection workflow documentation with a four-phase evaluation process (CAPTURE, EVALUATE, DIAGNOSE, RECOMMEND), root-cause analysis methodology, rationalization safeguards, and structured output format for post-skill assessments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A skill once done, now pause and think,
What worked, what failed, what's the missing link?
Four steps to wisdom, not just one,
Reflect with care when the task is done.
Why? Why? Why? Till truth rings clear,
And learn anew with every year. 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a reflection skill for systematic post-execution evaluation. It accurately summarizes the primary purpose of the new SKILL.md file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@plugins/me/skills/reflection/SKILL.md`:
- Line 222: Update the table cell in SKILL.md for the row with "Already spent
enough time" to use a standard unit spacing by replacing "5min" with "5 min" (or
"5 minutes") so the entry reads e.g. | "Already spent enough time" | 5 min saves
hours later. Sunk cost fallacy |; locate the exact string "Already spent enough
time" to make the correction.
🧹 Nitpick comments (3)
plugins/me/skills/reflection/SKILL.md (3)

28-33: Add language identifiers to fenced code blocks.

markdownlint flags these fences without a language; use text for diagrams and lists.

Proposed fix
-```
+```text
 1. CAPTURE (30s): Identify last skill/command from conversation
 2. EVALUATE (1min): Checklist-based assessment
 3. DIAGNOSE (2min if issues): Recursive "why?" to root cause
 4. RECOMMEND (1min): Specific, actionable improvements

@@
- +text
Observe symptom

"Why?" → 1st cause

"Why?" → 2nd cause

"Why?" → Root cause

@@
-```
+```text
Symptom: create-pr skill didn't check merge conflicts
  ↓
Why? → Didn't run git merge-tree command
  ↓
Why? → Skipped that step
  ↓
Why? → Rationalized "already checked locally"
  ↓
Root cause: Skill's rationalization table doesn't cover this case
</details>


Also applies to: 96-104, 110-120

---

`64-79`: **Surround headings with blank lines (markdownlint MD022).**

Add a blank line before these subheadings to satisfy markdownlint.  


<details>
<summary>Example fix (apply similarly to all flagged headings)</summary>

```diff
 ### Task Completion
 - [ ] Achieved intended goal?
 - [ ] Performed all required steps?
 - [ ] Reached expected final state?
 
+ 
 ### Skill Rule Compliance
 - [ ] Followed all MUST/ALWAYS rules?
 - [ ] Violated no NEVER rules?
 - [ ] Followed recommended workflow?

Also applies to: 237-250


14-25: Add explicit activation guidelines for the skill.

The file has “When to Use,” but the SKILL.md structure guideline calls for context-aware activation guidelines; add an explicit “Activation Guidelines” section with triggers/prerequisites.

Based on learnings: “Applies to **/skills//SKILL.md : Create SKILL.md files in skills//SKILL.md structure with context-aware activation guidelines and domain-specific best practices.”

|--------|---------|
| "Technically successful" | Rule violation = failure |
| "Small violation, ignore" | Small violation is still violation |
| "Already spent enough time" | 5min saves hours later. Sunk cost fallacy |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix “5min” spelling.

Use a standard unit spacing (e.g., “5 min” or “5 minutes”).

Proposed fix
-| "Already spent enough time" | 5min saves hours later. Sunk cost fallacy |
+| "Already spent enough time" | 5 min saves hours later. Sunk cost fallacy |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| "Already spent enough time" | 5min saves hours later. Sunk cost fallacy |
| "Already spent enough time" | 5 min saves hours later. Sunk cost fallacy |
🧰 Tools
🪛 LanguageTool

[grammar] ~222-~222: Ensure spelling is correct
Context: ...ation | | "Already spent enough time" | 5min saves hours later. Sunk cost fallacy | ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In `@plugins/me/skills/reflection/SKILL.md` at line 222, Update the table cell in
SKILL.md for the row with "Already spent enough time" to use a standard unit
spacing by replacing "5min" with "5 min" (or "5 minutes") so the entry reads
e.g. | "Already spent enough time" | 5 min saves hours later. Sunk cost fallacy
|; locate the exact string "Already spent enough time" to make the correction.

@baleen37
baleen37 enabled auto-merge (squash) January 28, 2026 06:36
@baleen37
baleen37 merged commit aea603f into main Jan 28, 2026
2 checks passed
@baleen37
baleen37 deleted the feat/reflection-skill branch January 28, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant