Transform your AI assistant into a continuously improving partner. Every correction becomes a permanent improvement that persists across all future sessions.
| Command | Action |
|---|---|
reflect |
Analyze conversation for learnings |
reflect on |
Enable auto-reflection |
reflect off |
Disable auto-reflection |
reflect status |
Show state and metrics |
reflect review |
Review pending learnings |
Analyze the conversation for correction signals and learning opportunities.
Signal Confidence Levels:
| Confidence | Triggers | Examples |
|---|---|---|
| HIGH | Explicit corrections | "never", "always", "wrong", "stop", "the rule is" |
| MEDIUM | Approved approaches | "perfect", "exactly", "that's right", accepted output |
| LOW | Observations | Patterns that worked but not explicitly validated |
See signal_patterns.md for full detection rules.
Map each signal to the appropriate target:
| Category | Target Files |
|---|---|
| Code Style | code-reviewer, backend-developer, frontend-developer |
| Architecture | solution-architect, api-architect, architecture-reviewer |
| Process | CLAUDE.md, orchestrator agents |
| Domain | Domain-specific agents, CLAUDE.md |
| Tools | CLAUDE.md, relevant specialists |
| New Skill | Create new skill file |
See agent_mappings.md for mapping rules.
Some learnings should become new skills rather than agent updates:
Skill-Worthy Criteria:
Quality Gates (must pass all):
Present findings in structured format:
# Reflection Analysis
## Session Context
- **Date**: [timestamp]
- **Messages Analyzed**: [count]
## Signals Detected
| # | Signal | Confidence | Source Quote | Category |
|---|--------|------------|--------------|----------|
| 1 | [learning] | HIGH | "[exact words]" | Code Style |
## Proposed Changes
### Change 1: Update [agent-name]
**Target**: `[file path]`
**Section**: [section name]
**Confidence**: HIGH
```diff
+ New rule from learning
Apply these changes? (Y/N/modify/1,2,3)
### Step 5: Apply with User Approval **On `Y` (approve):** 1. Apply each change using Edit tool 2. Commit with descriptive message 3. Update metrics **On `N` (reject):** 1. Discard proposed changes 2. Log rejection for analysis **On `modify`:** 1. Present each change individually 2. Allow editing before applying **On selective (e.g., `1,3`):** 1. Apply only specified changes 2. Commit partial updates ## State Management State is stored in `~/.reflect/` (configurable via `REFLECT_STATE_DIR`): ```yaml # reflect-state.yaml auto_reflect: false last_reflection: "2026-01-26T10:30:00Z" pending_reviews: []7w4.net小葱技能。
# reflect-metrics.yaml
total_sessions_analyzed: 42
total_signals_detected: 156
total_changes_accepted: 89
acceptance_rate: 78%
confidence_breakdown:
high: 45
medium: 32
low: 12
most_updated_agents:
code-reviewer: 23
backend-developer: 18
skills_created: 5
Project-level (versioned with repo):
.claude/reflections/YYYY-MM-DD_HH-MM-SS.md - Full reflection.claude/skills/{name}/SKILL.md - New skillsGlobal (user-level):
~/.reflect/learnings.yaml - Learning log~/.reflect/reflect-metrics.yaml - Aggregate metricsUser says: "Never use var in TypeScript, always use const or let"
Signal detected:
frontend-developer.mdProposed change:
## Style Guidelines
+ * Use `const` or `let` instead of `var` in TypeScript
User says: "Always run tests before committing"
Signal detected:
CLAUDE.mdProposed change:
## Commit Hygiene
+ * Run test suite before creating commits
Context: Spent 30 minutes debugging a React hydration mismatch
Signal detected:
Proposed skill: react-hydration-fix/SKILL.md
No signals detected:
Conflict warning:
Agent file not found:
这个 Skill 的设计理念很好,文档非常详细,信号检测和分类的逻辑清晰,安全机制也很完善。不过它目前还只是个「使用手册」,没有实际的代码程序能用。换句话说,它告诉你应该怎么做,但没给你真正能运行的工具。对于想实际使用的用户来说,可能还需要等待开发者补充可执行的代码实现。