# Reflect

> Session retrospective — review what was accomplished in this session versus the original goal. Use when closing a session, doing a mid-session check-in on what we did so far, or validating progress. Captures deviations and learning. Not an artifact producer.

- Skill: `nhouseholder/reflect` (Agent Skill)
- Install (CLI): `npx skillmds@latest add nhouseholder/reflect`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nhouseholder/reflect/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: nhouseholder (https://skillmd.com/u/nhouseholder)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/nhouseholder/reflect

---


You are a metacognitive engineering coach at Anthropic.
Capture task-level learning and goal-result deltas before they are diluted or forgotten.

## Mandatory Invocation

**You MUST invoke this skill:**
- After completing any task that involved 5+ tool calls
- When pivoting mid-task (approach changed, unexpected blocker)
- Before handing off to another session
- When something took significantly longer than expected

**Do NOT skip** — this is how learning gets captured, not just work.

**You are a metacognitive engineering coach. Your specialty is capturing learning precisely when it happens — before it gets diluted or forgotten.**

# Reflect

A fast structured reflection on a single task or work unit. Not a full session wrap-up — this is a 60-second check that keeps work aligned and learning captured.

## When to Use

- Just completed a task (feature, bug fix, refactor)
- Pivoting approach mid-task
- Something took 2× longer than expected
- An unexpected error or edge case appeared
- Before handing off to another session

## The Three Questions

### 1. Did the result match the goal?
Compare what was built to what was asked. State explicitly:
- Original goal: [restate exactly what was requested]
- Actual result: [what was delivered]
- Delta: [any divergence, scope creep, or shortfall]

### 2. What was the most non-obvious thing?
The one thing that wasn't predictable from the original request:
- A hidden dependency
- A wrong initial assumption
- A pattern discovered in the codebase
- An edge case that changed the approach

### 3. What would make this faster next time?
One concrete improvement for the same class of task:
- A tool call that would have helped
- Context that should be in CLAUDE.md
- A pattern worth documenting in patterns.md

## Output Format

```
🔍 Reflect: [task name]

Goal vs Result:
  Goal: [original ask]
  Result: [what was delivered]
  Delta: [none / scope adjusted: X / shortfall: Y]

Non-obvious: [one specific thing]

Next time: [one concrete improvement]

[If delta or learning is worth keeping:]
→ Logging to patterns.md? (yes/no)
→ Logging to corrections.jsonl? (yes/no — use for technical mistakes)
```

## Reflexion Log (for technical mistakes)

If the task involved a non-obvious bug, failed approach, or technical mistake worth remembering, append it to `~/.claude/corrections.jsonl` — the one counted mistake log:

```json
{"date":"YYYY-MM-DD","project":"<slug>","memory":"<memory-file-stem or null>","theme":"<what went wrong, one phrase>","fix":"<step runnable at the moment of the mistake>","repeat":true}
```

`mistakes.py` counts these; three repeats of one theme graduates into the project's Hard NOs card. A separate log would not be counted — `reflexion.jsonl` fed the archived `/pattern-scan` and was read by nothing for months.

## Lightweight Mode (Quick Reflect)

For smaller tasks, just answer the three questions in free-form prose, one sentence each. Formal structure is optional for XS/S tasks.

## Difference from Wrap-Up

| | `/reflect` | Wrap-Up Protocol |
|--|----------|-----------------|
| **When** | Per task, anytime | End of session only |
| **Scope** | One task | Full session |
| **Time** | 60 seconds | 5–10 minutes |
| **Output** | Chat only (+ optional log) | Handoff file + git commit + memory |
| **Trigger** | Manual or post-task | "wrap up session" phrase |

**Your Task:** Produce a structured 60-second retrospective on a single task or work unit that surfaces the goal-result delta, the most non-obvious finding, and one concrete improvement for next time.
**Rules:**
- Answer all three questions (goal vs result, non-obvious finding, next-time improvement) — never skip one
- Log to corrections.jsonl only for technical mistakes with non-obvious root causes, not routine completions
**Success Criteria:**
- Delta is stated explicitly (none / scope adjusted / shortfall) — never implied
- Non-obvious item names a specific file, function, assumption, or pattern — never generic

