Daily self-reflection and continuous improvement system. Use when the agent needs to generate daily reflection reports at 02:00 to review the previous day's events, identify issues (user-corrected or self-discovered), perform root cause analysis, propose keep/improve strategies, AND check consistency between behavior and core files (SOUL.md, AGENTS.md). Check for internal conflicts within AGENTS.md/SOUL.md, cross-file conflicts, and quality issues (redundancy, vagueness). Also use for weekly summary on Saturday. Triggers include automated cron job at 02:00 or explicit user request for reflection.
This skill defines a structured self-reflection process for continuous improvement. The reflection analyzes daily interactions to identify successes, problems, root causes, and actionable strategies.
Core Rules:
When to Use This Skill:
Trigger: Daily at 02:00 via cron job
Scope: Review previous day's memory files (memory/YYYY-MM-DD.md and memory/YYYY-MM-DD-{slug}.md)
Output: Append "Self Reflection" section to (create if not exists; update existing section if present)
5-10 minutes of focused analysis
memory/YYYY-MM-DD.mdRead existing memory files for the target day:
memory/YYYY-MM-DD.md — standard daily memory (agent-curated notes)memory/YYYY-MM-DD-{slug}.md — session summaries (if multiple sessions, read all)Do NOT read raw session logs (.jsonl files) — too token-intensive.
Read the previous day's memory files:
memory/YYYY-MM-DD.md (standard daily memory with agent-curated notes)memory/YYYY-MM-DD-{slug}.md (session summaries, if they exist)Extract from these files:
Category A: User-Identified Issues
Category B: Self-Discovered Issues
For each positive outcome:
For each issue (positive or negative), analyze:
Contributing Factors:
Depth: Ask "why" 3-5 times to reach root cause
Example:
For Successes (Keep/Enhance):
For Issues (Improve):
Check alignment between behavior and core files:
A. Behavior vs Core Files
B. Internal Consistency of AGENTS.md
C. Internal Consistency of SOUL.md
D. Cross-File Consistency (AGENTS.md vs SOUL.md)
E. Quality Issues
F. Cron Jobs Conflicts
G. Cron Definition vs Backup Consistency
cron-jobs.json (backup) matches actual running cron jobs?H. Path Consistency
I. Skill Trigger Conflicts
J. Backup Scope Consistency
max/ directory includes all critical files?.skill package files up to date?Record specific inconsistencies with:
Write the reflection to memory/YYYY-MM-DD.md following these rules:
## Self Reflection
Generated at: [timestamp]
### Events Review
[Summary of key interactions and tasks from the day's memory files]
### What Went Well
#### Event 1: [Brief description]
- **Situation:** [Context]
- **Action:** [What I did]
- **Result:** [Outcome]
- **Success Factors:** [What enabled this]
- **Keep Strategy:** [How to maintain/enhance]
### Issues Identified
#### Issue 1: [Brief description]
- **Category:** [User-identified / Self-discovered]
- **Related Event:** [Reference to specific interaction]
- **Root Cause Analysis:**
- Why? [Answer]
- Why? [Answer]
- Root Cause: [Final factor]
- **Improvement Strategy:** [Specific action to take]
### Metrics
| Metric | Value | Notes |
|--------|-------|-------|
| Interactions | X | [Number of exchanges] |
| Corrections | Y | [Times user corrected me] |
| Clarifications | Z | [Times I asked for clarification] |
| Improvements | W | [Proactive suggestions adopted] |
### Key Learnings
- [Learning 1 with context]
- [Learning 2 with context]
### Consistency Check
#### Behavior vs Core Files
| Behavior Observed | Expected per File | Consistent? | Issue |
|-------------------|-------------------|-------------|-------|
| [What I did] | [SOUL.md/AGENTS.md says] | Yes/No | [If no, describe gap] |
#### Internal Consistency (AGENTS.md)
- **Conflicts Found:** [Yes/No]
- [Details if any]
#### Internal Consistency (SOUL.md)
- **Conflicts Found:** [Yes/No]
- [Details if any]
#### Cross-File Consistency
- **Conflicts Found:** [Yes/No]
- [Details if any]
### Proposed Improvements (Pending Approval)
| Issue | Proposed Change | Target File |
|-------|-----------------|-------------|
| [Issue 1] | [Specific change] | [SOUL.md/AGENTS.md/etc] |
## After Receiving User Feedback
When Nick approves specific changes:
1. **Read** `SOUL.md` and `AGENTS.md` completely
2. **Check** if new content contradicts existing principles
3. **Maintain** coherence — all principles should work together
4. **Be concise** — remove redundancy during updates
5. **Ask** Nick if you find inconsistencies
**Red flags for inconsistency:**
- Two principles suggesting opposite actions in the same scenario
- New advice that contradicts established boundaries
- Values that can't coexist logically
**Never remove principles without explicit permission.**
## Memory Maintenance
Periodically (every few days), use a heartbeat or dedicated session to:
1. Read through recent `memory/YYYY-MM-DD.md` files
2. Look at the "Self Reflection" sections for patterns
3. Identify significant events, lessons, or insights worth keeping long-term
4. Extract enduring lessons that should inform core behavior
5. Update MEMORY.md with distilled wisdom
6. Remove outdated info from MEMORY.md that's no longer relevant
Think of it like a human reviewing their journal and updating their mental model. Daily files are raw notes; MEMORY.md is curated wisdom.
## Core File Change Policy
**Strict Rule:** During reflection, NEVER modify:
- SOUL.md
- AGENTS.md
- SKILL.md
- Any other core behavior files
**Allowed Actions:**
- Write to memory/ files only
- Propose changes in reflection output
- Wait for user approval
**After User Approval:**
1. User explicitly states which changes to implement
2. Make the specific changes
3. Verify consistency with existing principles
4. Confirm completion
## Quality Principles
### Be Specific
❌ Vague: "Did good today"
✅ Specific: "Refactored the database layer reducing query time by 40%"
❌ Vague: "Made mistakes"
✅ Specific: "Forgot to handle null values in the user input validation"
### Seek Objective Evidence
- Count actual corrections: "Nick corrected me 3 times about X"
- Note specific feedback quotes
- Track measurable metrics
### Focus on Actionable Improvements
Each issue should lead to a concrete change:
- "Communication was unclear" → "Next time, start with a summary before details"
- "Missed edge case" → "Add verification step for user inputs"
### Be Concise
- Target 5-10 minutes of focused writing
- Omit obvious observations
- Focus on high-impact insights
## Cron Job Configuration
Add to cron jobs for automated reflection:
```json
{
"name": "Daily Self Reflection",
"schedule": {"kind": "cron", "expr": "0 2 * * *", "tz": "Asia/Shanghai"},
"payload": {
"kind": "agentTurn",
"message": "Use self-reflection skill. Generate daily reflection for yesterday. Read memory/YYYY-MM-DD.md and any memory/YYYY-MM-DD-{slug}.md files for yesterday's date. Analyze events, identify issues, perform root cause analysis, and append/update the 'Self Reflection' section in memory/YYYY-MM-DD.md. Do NOT modify core files.",
"model": "kimi-coding/k2p5",
"thinking": "low"
},
"sessionTarget": "isolated",
"delivery": {"mode": "announce"}
}
See references/framework.md for detailed analysis frameworks, root cause methods, and quality checklists.