Step 1: Determine Time Range
If the user specified a time range (e.g., "7 days", "30 days", "this week"), use that.
If no range specified, default to the last 7 days.
Calculate the date range and identify which session logs and daily notes fall within it.
Step 2: Gather Data
Read the following within the time range:
- Session logs (
Machine/Session-Logs/): All logs within the date range.
- Corrections (
Machine/Memory/corrections.md): All corrections, noting dates.
- Decisions (
Machine/Memory/decisions.md): Recent decisions.
- Daily notes (
Human/Daily/): Notes within the date range.
- Active rules (
Machine/Rules/active-rules.md): Current rules for comparison.
- Rule changelog (
Machine/Rules/rule-changelog.md): Recent rule changes.
Step 3: Analyze Patterns
Session Patterns
- Frequency: How many sessions in the period? Average per day?
- Duration: How long are sessions typically?
- Topics: What subjects come up most often?
- Productivity: What is the ratio of accomplishments to open items?
Correction Patterns
- Frequency: How many corrections in the period?
- Categories: Group corrections by type (formatting, tone, process, content, etc.)
- Repeats: Are the same corrections being given multiple times? This indicates a rule that is not being followed or a missing rule.
- Promotion rate: How many corrections have been promoted to rules?
Task Patterns
- Completion rate: Of tasks that appear in daily notes, how many get checked off?
- Carryover frequency: How often do tasks carry over between days?
- Eat-the-frog items: Tasks that have persisted the longest
- Peak productivity: Any patterns in when tasks get completed (time of day, day of week)?
Decision Patterns
- Volume: How many decisions in the period?
- Reversals: Any decisions marked as
superseded?
- Decision domains: What areas are decisions being made in?
User Working Patterns
- Session timing: When does the user typically start sessions?
- Focus areas: What projects or topics get the most attention?
- Workflow style: Does the user prefer long deep sessions or short bursts?
- Common requests: What types of tasks does the user most often ask for?
Step 4: Generate Proposals
Based on the analysis, propose specific improvements:
Rule Proposals
- New rules derived from repeated corrections
- Rule modifications based on observed drift
- Rules to remove if they are consistently irrelevant
Process Proposals
- Workflow improvements based on session patterns
- Suggestions for recurring tasks that could be templated
- Eat-the-frog interventions for chronically deferred tasks
Memory Proposals
- Entities that should be added or updated
- Context cache improvements
- Stale information that should be cleaned up
Step 5: Generate Reflection Report
Write the report to Machine/reflection-{YYYY-MM-DD}.md:
---
date: YYYY-MM-DD
tags: [reflection, meta]
type: reflection
period: {start-date} to {end-date}
---
# Reflection: {start-date} to {end-date}
## Overview
- **Sessions:** {count} ({avg}/day)
- **Corrections:** {count}
- **Decisions:** {count}
- **Tasks completed:** {count}/{total} ({percent}%)
## Session Patterns
{analysis of session frequency, duration, topics}
## Recurring Themes
1. **{theme}** -- appeared in {N} sessions
{description}
## Correction Analysis
- **Total corrections:** {N}
- **Repeated corrections:** {list of corrections given 2+ times}
- **Categories:** {breakdown}
- **Promoted to rules:** {N}/{total}
### Corrections Needing Rules
{corrections that keep recurring but have not been promoted to rules}
## User Working Patterns
{observations about the user's work style}
## Eat the Frog
{tasks that have been deferred repeatedly}
## Proposals
### Rule Changes
1. **Add rule:** "{rule}" -- based on {N} corrections about {topic}
2. **Modify rule:** "{rule}" -- current wording does not match practice
3. **Remove rule:** "{rule}" -- not applicable based on {N} sessions
### Process Improvements
1. {suggestion}
### Memory Cleanup
1. {suggestion}
## Meta
This reflection was generated by the reflect skill on {date}.
Previous reflection: {link to last reflection or "None found"}
Step 6: Present and Discuss
Present the key findings and proposals to the user. Ask:
- "Should I apply any of these rule proposals to active-rules.md?"
- "Any of these observations surprise you or seem off?"
- "Want me to act on any of the process improvement suggestions?"
1---2name: brain-reflect3description: AI self-review - analyzes recent sessions, patterns, and proposes improvements. Use when the user says "reflect", "self-review", "analyze patterns", "how are we doing", "review sessions", "meta-analysis", or wants insight into recurring themes and AI performance.4---56<objective>7Analyze recent session logs, corrections, and vault activity to identify recurring patterns, frequent mistakes, the user's working habits, and opportunities for rule improvements. Generate a reflection report with actionable proposals.8</objective>910<protocol>1112## Step 1: Determine Time Range1314If the user specified a time range (e.g., "7 days", "30 days", "this week"), use that.15If no range specified, default to the last 7 days.1617Calculate the date range and identify which session logs and daily notes fall within it.1819## Step 2: Gather Data2021Read the following within the time range:22231. **Session logs** (`Machine/Session-Logs/`): All logs within the date range.242. **Corrections** (`Machine/Memory/corrections.md`): All corrections, noting dates.253. **Decisions** (`Machine/Memory/decisions.md`): Recent decisions.264. **Daily notes** (`Human/Daily/`): Notes within the date range.275. **Active rules** (`Machine/Rules/active-rules.md`): Current rules for comparison.286. **Rule changelog** (`Machine/Rules/rule-changelog.md`): Recent rule changes.2930## Step 3: Analyze Patterns3132### Session Patterns33- **Frequency:** How many sessions in the period? Average per day?34- **Duration:** How long are sessions typically?35- **Topics:** What subjects come up most often?36- **Productivity:** What is the ratio of accomplishments to open items?3738### Correction Patterns39- **Frequency:** How many corrections in the period?40- **Categories:** Group corrections by type (formatting, tone, process, content, etc.)41- **Repeats:** Are the same corrections being given multiple times? This indicates a rule that is not being followed or a missing rule.42- **Promotion rate:** How many corrections have been promoted to rules?4344### Task Patterns45- **Completion rate:** Of tasks that appear in daily notes, how many get checked off?46- **Carryover frequency:** How often do tasks carry over between days?47- **Eat-the-frog items:** Tasks that have persisted the longest48- **Peak productivity:** Any patterns in when tasks get completed (time of day, day of week)?4950### Decision Patterns51- **Volume:** How many decisions in the period?52- **Reversals:** Any decisions marked as `superseded`?53- **Decision domains:** What areas are decisions being made in?5455### User Working Patterns56- **Session timing:** When does the user typically start sessions?57- **Focus areas:** What projects or topics get the most attention?58- **Workflow style:** Does the user prefer long deep sessions or short bursts?59- **Common requests:** What types of tasks does the user most often ask for?6061## Step 4: Generate Proposals6263Based on the analysis, propose specific improvements:6465### Rule Proposals66- New rules derived from repeated corrections67- Rule modifications based on observed drift68- Rules to remove if they are consistently irrelevant6970### Process Proposals71- Workflow improvements based on session patterns72- Suggestions for recurring tasks that could be templated73- Eat-the-frog interventions for chronically deferred tasks7475### Memory Proposals76- Entities that should be added or updated77- Context cache improvements78- Stale information that should be cleaned up7980## Step 5: Generate Reflection Report8182Write the report to `Machine/reflection-{YYYY-MM-DD}.md`:8384```markdown85---86date: YYYY-MM-DD87tags: [reflection, meta]88type: reflection89period: {start-date} to {end-date}90---9192# Reflection: {start-date} to {end-date}9394## Overview95- **Sessions:** {count} ({avg}/day)96- **Corrections:** {count}97- **Decisions:** {count}98- **Tasks completed:** {count}/{total} ({percent}%)99100## Session Patterns101{analysis of session frequency, duration, topics}102103## Recurring Themes1041. **{theme}** -- appeared in {N} sessions105 {description}106107## Correction Analysis108- **Total corrections:** {N}109- **Repeated corrections:** {list of corrections given 2+ times}110- **Categories:** {breakdown}111- **Promoted to rules:** {N}/{total}112113### Corrections Needing Rules114{corrections that keep recurring but have not been promoted to rules}115116## User Working Patterns117{observations about the user's work style}118119## Eat the Frog120{tasks that have been deferred repeatedly}121122## Proposals123124### Rule Changes1251. **Add rule:** "{rule}" -- based on {N} corrections about {topic}1262. **Modify rule:** "{rule}" -- current wording does not match practice1273. **Remove rule:** "{rule}" -- not applicable based on {N} sessions128129### Process Improvements1301. {suggestion}131132### Memory Cleanup1331. {suggestion}134135## Meta136This reflection was generated by the reflect skill on {date}.137Previous reflection: {link to last reflection or "None found"}138```139140## Step 6: Present and Discuss141142Present the key findings and proposals to the user. Ask:143144- "Should I apply any of these rule proposals to active-rules.md?"145- "Any of these observations surprise you or seem off?"146- "Want me to act on any of the process improvement suggestions?"147148</protocol>149150<rules>151- This is primarily a read-and-analyze operation. Do not modify rules without user approval.152- The reflection report file is always saved to `Machine/` (AI zone).153- Be honest about patterns, even uncomfortable ones (like task avoidance).154- Frame observations constructively -- identify the pattern and suggest a solution.155- If there are not enough session logs for meaningful analysis, say so and suggest a minimum data threshold (at least 5 sessions).156- Compare against previous reflection reports if they exist, to track improvement over time.157- Never fabricate patterns -- if the data does not support a conclusion, do not make one.158</rules>159160<success_criteria>161- All session logs within the time range are analyzed162- Recurring correction patterns are identified163- User working patterns are observed164- Concrete rule improvement proposals are generated165- Reflection report is saved to Machine/166- Proposals are presented for user review, not auto-applied167- Comparison with previous reflections if available168</success_criteria>