PhoenixClaw: Zero-Tag Passive Journaling
PhoenixClaw automatically distills daily conversations into meaningful reflections using semantic intelligence.
Automatically identifies journal-worthy moments, patterns, and growth opportunities.
🛠️ Core Workflow
[!critical] MANDATORY: Complete Workflow Execution
This 9-step workflow MUST be executed in full regardless of invocation method:
- Cron execution (10 PM nightly)
- Manual invocation ("Show me my journal", "Generate today's journal", etc.)
- Regeneration requests ("Regenerate my journal", "Update today's entry")
Never skip steps. Partial execution causes:
- Missing images (session logs not scanned)
- Missing finance data (Ledger plugin not triggered)
- Incomplete journals (plugins not executed)
PhoenixClaw follows a structured pipeline to ensure consistency and depth:
- User Configuration: Check for
~/.phoenixclaw/config.yaml. If missing, initiate the onboarding flow defined in references/user-config.md.
- Context Retrieval:
- Scan memory files (NEW): Read
memory/YYYY-MM-DD.md and memory/YYYY-MM-DD-*.md files for manually recorded daily reflections. These files contain personal thoughts, emotions, and context that users explicitly ask the AI to remember via commands like "记一下" (remember this). CRITICAL: Do not skip these files - they contain explicit user reflections that session logs may miss.
- Scan session logs: Call
memory_get for the current day's memory, then CRITICAL: Scan ALL raw session logs and filter by message timestamp. Session files are often split across multiple files. Do NOT classify images by session file mtime:# Read all session logs from ALL known OpenClaw locations, then filter by per-message timestamp
# Use timezone-aware epoch range to avoid UTC/local-day mismatches.
TARGET_DAY="$(date +%Y-%m-%d)"
TARGET_TZ="${TARGET_TZ:-Asia/Shanghai}"
read START_EPOCH END_EPOCH < <(
python3 - <<'PY' "$TARGET_DAY" "$TARGET_TZ"
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo
import sys
day, tz = sys.argv[1], sys.argv[2]
start = datetime.strptime(day, "%Y-%m-%d").replace(tzinfo=ZoneInfo(tz))
end = start + timedelta(days=1)
print(int(start.timestamp()), int(end.timestamp()))
PY
)
for dir in "$HOME/.openclaw/sessions" \
"$HOME/.openclaw/agents" \
"$HOME/.openclaw/cron/runs" \
"$HOME/.agent/sessions"; do
[ -d "$dir" ] || continue
find "$dir" -name "*.jsonl" -print0
done |
xargs -0 jq -cr --argjson start "$START_EPOCH" --argjson end "$END_EPOCH" '
(.timestamp // .created_at // empty) as $ts
| ($ts | fromdateiso8601?) as $epoch
| select($epoch != null and $epoch >= $start and $epoch < $end)
'
```
Read **all matching files** regardless of their numeric naming (e.g., file_22, file_23 may be earlier in name but still contain today's messages).
- **EXTRACT IMAGES FROM SESSION LOGS**: Session logs contain `type: "image"` entries with file paths. You MUST:
1. Find all image entries (e.g., `"type":"image"`)
2. Keep only entries where message `timestamp` is in the target date range
3. Extract the `file_path` or `url` fields
4. Copy files into `assets/YYYY-MM-DD/`
5. Rename with descriptive names when possible
- **Why session logs are mandatory**: `memory_get` returns **text only**. Image metadata, photo references, and media attachments are **only available in session logs**. Skipping session logs = missing all photos.
- **Activity signal quality**: Do not treat heartbeat/cron system noise as user activity. Extract user/assistant conversational content and media events first, then classify moments.
- **FILTER HEARTBEAT MESSAGES (CRITICAL)**: Session logs contain system heartbeat messages that MUST be excluded from journaling. When scanning messages, SKIP any message matching these criteria:
1. **User heartbeat prompts**: Messages containing "Read HEARTBEAT.md" AND "reply HEARTBEAT_OK"
2. **Assistant heartbeat responses**: Messages containing ONLY "HEARTBEAT_OK" (with optional leading/trailing whitespace)
3. **Cron system messages**: Messages with role "system" or "cron" containing job execution summaries (e.g., "Cron job completed", "A cron job")
Example jq filter to exclude heartbeats:
```jq
# Exclude heartbeat messages
| select(
(.message.content? | type == "array" and
(.message.content | map(.text?) | join("") |
test("Read HEARTBEAT\.md"; "i") | not))
and
(.message.content? | type == "array" and
(.message.content | map(.text?) | join("") |
test("^\\s*HEARTBEAT_OK\\s*$"; "i") | not))
)
```
- **Edge case - Midnight boundary**: For late-night activity that spans midnight, expand the **timestamp** range to include spillover windows (for example, previous day 23:00-24:00) and still filter per-message by `timestamp`.
- Merge sources: Combine content from both memory files and session logs. Memory files capture explicit user reflections; session logs capture conversational flow and media. Use both to build complete context.
- Fallback: If memory is sparse, reconstruct context from session logs, then update memory so future runs use the enriched memory. Incorporate historical context via
memory_search (skip if embeddings unavailable)
Moment Identification: Identify "journal-worthy" content: critical decisions, emotional shifts, milestones, or shared media. See references/media-handling.md for photo processing. This step generates the moments data structure that plugins depend on.
Image Processing (CRITICAL):
- For each extracted image, generate descriptive alt-text via Vision Analysis
- Categorize images (food, selfie, screenshot, document, etc.)
Filter Finance Screenshots (NEW):
Payment screenshots (WeChat Pay, Alipay, etc.) should NOT be included in the journal narrative. These are tool images, not life moments.
Detection criteria (check any):
- OCR keywords: "支付成功", "支付完成", "微信支付", "支付宝", "订单号", "交易单号", "¥" + amount
- Context clues: Image sent with nearby text containing "记账", "支付", "付款", "转账"
- Visual patterns: Standard payment app UI layouts (green WeChat, blue Alipay)
Handling rules:
Mark as finance_screenshot type
Route to Ledger plugin (if enabled) for transaction recording
EXCLUDE from journal main narrative unless explicitly described as part of a life moment (e.g., "今天请朋友吃饭" with payment screenshot)
Never include raw payment screenshots in daily journal images section
Match images to moments (e.g., breakfast photo → breakfast moment)
Store image metadata with moments for journal embedding
Pattern Recognition: Detect recurring themes, mood fluctuations, and energy levels. Map these to growth opportunities using references/skill-recommendations.md.
Plugin Execution: Execute all registered plugins at their declared hook points. See references/plugin-protocol.md for the complete plugin lifecycle:
pre-analysis → before conversation analysis
post-moment-analysis → Ledger and other primary plugins execute here
post-pattern-analysis → after patterns detected
journal-generation → plugins inject custom sections
post-journal → after journal complete
Journal Generation: Synthesize the day's events into a beautiful Markdown file using assets/daily-template.md. Follow the visual guidelines in references/visual-design.md. Include all plugin-generated sections at their declared section_order positions.
- Embed curated images only, not every image. Prioritize highlights and moments.
- Route finance screenshots to Ledger sections (receipts, invoices, transaction proofs).
- Use Obsidian format from
references/media-handling.md with descriptive captions.
- Generate image links from filesystem truth: compute the image path relative to the current journal file directory. Never output absolute paths.
- Do not hardcode path depth (
../ or ../../): calculate dynamically from daily_file_path and image_path.
- Use copied filename as source of truth: if asset file is
image_124917_2.jpg, the link must reference that exact filename.
Timeline Integration: If significant events occurred, append them to the master index in timeline.md using the format from assets/timeline-template.md and references/obsidian-format.md.
Growth Mapping: Update growth-map.md (based on assets/growth-map-template.md) if new behavioral patterns or skill interests are detected.
Profile Evolution: Update the long-term user profile (profile.md) to reflect the latest observations on values, goals, and personality traits. See references/profile-evolution.md and assets/profile-template.md.
⏰ Cron & Passive Operation
PhoenixClaw is designed to run without user intervention. It utilizes OpenClaw's built-in cron system to trigger its analysis daily at 10:00 PM local time (0 22 * * *).
- Setup details can be found in
references/cron-setup.md.
- Mode: Primarily Passive. The AI proactively summarizes the day's activities without being asked.
Rolling Journal Window (NEW)
To solve the 22:00-24:00 content loss issue, PhoenixClaw now supports a rolling journal window mechanism:
Problem: Fixed 24-hour window (00:00-22:00) misses content between 22:00-24:00 when journal is generated at 22:00.
Solution: scripts/rolling-journal.js scans from last journal time → now instead of fixed daily boundaries.
Features:
- Configurable schedule hour (default: 22:00, customizable via
~/.phoenixclaw/config.yaml)
- Rolling window: No content loss even if generation time varies
- Backward compatible with existing
late-night-supplement.js
Configuration (~/.phoenixclaw/config.yaml):
schedule:
hour: 22 # Journal generation time
minute: 0
rolling_window: true # Enable rolling window (recommended)
Usage:
# Default: generate from last journal to now
node scripts/rolling-journal.js
# Specific date
node scripts/rolling-journal.js 2026-02-12
💬 Explicit Triggers
While passive by design, users can interact with PhoenixClaw directly using these phrases:
- "Show me my journal for today/yesterday."
- "What did I accomplish today?"
- "Analyze my mood patterns over the last week."
- "Generate my weekly/monthly summary."
- "How am I doing on my personal goals?"
- "Regenerate my journal." / "重新生成日记"
[!warning] Manual Invocation = Full Pipeline
When users request journal generation/regeneration, you MUST execute the complete 9-step Core Workflow above. This ensures:
- Photos are included (via session log scanning)
- Ledger plugin runs (via
post-moment-analysis hook)
- All plugins execute (at their respective hook points)
Common mistakes to avoid:
- ❌ Only calling
memory_get (misses photos)
- ❌ Skipping moment identification (plugins never trigger)
- ❌ Generating journal directly without plugin sections
📚 Documentation Reference
References (references/)
user-config.md: Initial onboarding and persistence settings.
cron-setup.md: Technical configuration for nightly automation.
plugin-protocol.md: Plugin architecture, hook points, and integration protocol.
media-handling.md: Strategies for extracting meaning from photos and rich media.
session-day-audit.js: Diagnostic utility for verifying target-day message coverage across session logs.
visual-design.md: Layout principles for readability and aesthetics.
obsidian-format.md: Ensuring compatibility with Obsidian and other PKM tools.
profile-evolution.md: How the system maintains a long-term user identity.
skill-recommendations.md: Logic for suggesting new skills based on journal insights.
Assets (assets/)
daily-template.md: The blueprint for daily journal entries.
weekly-template.md: The blueprint for high-level weekly summaries.
profile-template.md: Structure for the profile.md persistent identity file.
timeline-template.md: Structure for the timeline.md chronological index.
growth-map-template.md: Structure for the growth-map.md thematic index.
1---
2name: phoenixclaw
3description: |
4 Passive journaling skill that scans daily conversations via cron to generate
5 markdown journals using semantic understanding.
6
7 Use when:
8 - User requests journaling ("Show me my journal", "What did I do today?")
9 - User asks for pattern analysis ("Analyze my patterns", "How am I doing?")
10 - User requests summaries ("Generate weekly/monthly summary")
11metadata:
12 source: https://skillmd.com/skills/modbender/phoenixclaw
13 version: 0.0.15
14---
15
16# PhoenixClaw: Zero-Tag Passive Journaling
17
18PhoenixClaw automatically distills daily conversations into meaningful reflections using semantic intelligence.
19
20Automatically identifies journal-worthy moments, patterns, and growth opportunities.
21
22## 🛠️ Core Workflow
23
24> [!critical] **MANDATORY: Complete Workflow Execution**
25> This 9-step workflow MUST be executed in full regardless of invocation method:
26> - **Cron execution** (10 PM nightly)
27> - **Manual invocation** ("Show me my journal", "Generate today's journal", etc.)
28> - **Regeneration requests** ("Regenerate my journal", "Update today's entry")
29>
30> **Never skip steps.** Partial execution causes:
31> - Missing images (session logs not scanned)
32> - Missing finance data (Ledger plugin not triggered)
33> - Incomplete journals (plugins not executed)
34
35PhoenixClaw follows a structured pipeline to ensure consistency and depth:
36
371. **User Configuration:** Check for `~/.phoenixclaw/config.yaml`. If missing, initiate the onboarding flow defined in `references/user-config.md`.
382. **Context Retrieval:**
39 - **Scan memory files (NEW):** Read `memory/YYYY-MM-DD.md` and `memory/YYYY-MM-DD-*.md` files for manually recorded daily reflections. These files contain personal thoughts, emotions, and context that users explicitly ask the AI to remember via commands like "记一下" (remember this). **CRITICAL**: Do not skip these files - they contain explicit user reflections that session logs may miss.
40 - **Scan session logs:** Call `memory_get` for the current day's memory, then **CRITICAL: Scan ALL raw session logs and filter by message timestamp**. Session files are often split across multiple files. Do NOT classify images by session file `mtime`:
41 ```bash
42 # Read all session logs from ALL known OpenClaw locations, then filter by per-message timestamp
43 # Use timezone-aware epoch range to avoid UTC/local-day mismatches.
44 TARGET_DAY="$(date +%Y-%m-%d)"
45 TARGET_TZ="${TARGET_TZ:-Asia/Shanghai}"
46 read START_EPOCH END_EPOCH < <(
47 python3 - <<'PY' "$TARGET_DAY" "$TARGET_TZ"
48from datetime import datetime, timedelta
49from zoneinfo import ZoneInfo
50import sys
51
52day, tz = sys.argv[1], sys.argv[2]
53start = datetime.strptime(day, "%Y-%m-%d").replace(tzinfo=ZoneInfo(tz))
54end = start + timedelta(days=1)
55print(int(start.timestamp()), int(end.timestamp()))
56PY
57 )
58
59 for dir in "$HOME/.openclaw/sessions" \
60 "$HOME/.openclaw/agents" \
61 "$HOME/.openclaw/cron/runs" \
62 "$HOME/.agent/sessions"; do
63 [ -d "$dir" ] || continue
64 find "$dir" -name "*.jsonl" -print0
65 done |
66 xargs -0 jq -cr --argjson start "$START_EPOCH" --argjson end "$END_EPOCH" '
67 (.timestamp // .created_at // empty) as $ts
68 | ($ts | fromdateiso8601?) as $epoch
69 | select($epoch != null and $epoch >= $start and $epoch < $end)
70 '
71 ```
72 Read **all matching files** regardless of their numeric naming (e.g., file_22, file_23 may be earlier in name but still contain today's messages).
73 - **EXTRACT IMAGES FROM SESSION LOGS**: Session logs contain `type: "image"` entries with file paths. You MUST:
74 1. Find all image entries (e.g., `"type":"image"`)
75 2. Keep only entries where message `timestamp` is in the target date range
76 3. Extract the `file_path` or `url` fields
77 4. Copy files into `assets/YYYY-MM-DD/`
78 5. Rename with descriptive names when possible
79 - **Why session logs are mandatory**: `memory_get` returns **text only**. Image metadata, photo references, and media attachments are **only available in session logs**. Skipping session logs = missing all photos.
80 - **Activity signal quality**: Do not treat heartbeat/cron system noise as user activity. Extract user/assistant conversational content and media events first, then classify moments.
81 - **FILTER HEARTBEAT MESSAGES (CRITICAL)**: Session logs contain system heartbeat messages that MUST be excluded from journaling. When scanning messages, SKIP any message matching these criteria:
82 1. **User heartbeat prompts**: Messages containing "Read HEARTBEAT.md" AND "reply HEARTBEAT_OK"
83 2. **Assistant heartbeat responses**: Messages containing ONLY "HEARTBEAT_OK" (with optional leading/trailing whitespace)
84 3. **Cron system messages**: Messages with role "system" or "cron" containing job execution summaries (e.g., "Cron job completed", "A cron job")
85
86 Example jq filter to exclude heartbeats:
87 ```jq
88 # Exclude heartbeat messages
89 | select(
90 (.message.content? | type == "array" and
91 (.message.content | map(.text?) | join("") |
92 test("Read HEARTBEAT\.md"; "i") | not))
93 and
94 (.message.content? | type == "array" and
95 (.message.content | map(.text?) | join("") |
96 test("^\\s*HEARTBEAT_OK\\s*$"; "i") | not))
97 )
98 ```
99 - **Edge case - Midnight boundary**: For late-night activity that spans midnight, expand the **timestamp** range to include spillover windows (for example, previous day 23:00-24:00) and still filter per-message by `timestamp`.
100 - **Merge sources:** Combine content from both memory files and session logs. Memory files capture explicit user reflections; session logs capture conversational flow and media. Use both to build complete context.
101 - **Fallback:** If memory is sparse, reconstruct context from session logs, then update memory so future runs use the enriched memory. Incorporate historical context via `memory_search` (skip if embeddings unavailable)
102
1033. **Moment Identification:** Identify "journal-worthy" content: critical decisions, emotional shifts, milestones, or shared media. See `references/media-handling.md` for photo processing. This step generates the `moments` data structure that plugins depend on.
104 **Image Processing (CRITICAL)**:
105 - For each extracted image, generate descriptive alt-text via Vision Analysis
106 - Categorize images (food, selfie, screenshot, document, etc.)
107
108 **Filter Finance Screenshots (NEW)**:
109 Payment screenshots (WeChat Pay, Alipay, etc.) should NOT be included in the journal narrative. These are tool images, not life moments.
110
111 Detection criteria (check any):
112 1. **OCR keywords**: "支付成功", "支付完成", "微信支付", "支付宝", "订单号", "交易单号", "¥" + amount
113 2. **Context clues**: Image sent with nearby text containing "记账", "支付", "付款", "转账"
114 3. **Visual patterns**: Standard payment app UI layouts (green WeChat, blue Alipay)
115
116 Handling rules:
117 - Mark as `finance_screenshot` type
118 - Route to Ledger plugin (if enabled) for transaction recording
119 - **EXCLUDE from journal main narrative** unless explicitly described as part of a life moment (e.g., "今天请朋友吃饭" with payment screenshot)
120 - Never include raw payment screenshots in daily journal images section
121
122 - Match images to moments (e.g., breakfast photo → breakfast moment)
123 - Store image metadata with moments for journal embedding
1244. **Pattern Recognition:** Detect recurring themes, mood fluctuations, and energy levels. Map these to growth opportunities using `references/skill-recommendations.md`.
125
1265. **Plugin Execution:** Execute all registered plugins at their declared hook points. See `references/plugin-protocol.md` for the complete plugin lifecycle:
127 - `pre-analysis` → before conversation analysis
128 - `post-moment-analysis` → **Ledger and other primary plugins execute here**
129 - `post-pattern-analysis` → after patterns detected
130 - `journal-generation` → plugins inject custom sections
131 - `post-journal` → after journal complete
132
133
1346. **Journal Generation:** Synthesize the day's events into a beautiful Markdown file using `assets/daily-template.md`. Follow the visual guidelines in `references/visual-design.md`. **Include all plugin-generated sections** at their declared `section_order` positions.
135 - **Embed curated images only**, not every image. Prioritize highlights and moments.
136 - **Route finance screenshots to Ledger** sections (receipts, invoices, transaction proofs).
137 - Use Obsidian format from `references/media-handling.md` with descriptive captions.
138 - **Generate image links from filesystem truth**: compute the image path relative to the current journal file directory. Never output absolute paths.
139 - **Do not hardcode path depth** (`../` or `../../`): calculate dynamically from `daily_file_path` and `image_path`.
140 - **Use copied filename as source of truth**: if asset file is `image_124917_2.jpg`, the link must reference that exact filename.
141
1427. **Timeline Integration:** If significant events occurred, append them to the master index in `timeline.md` using the format from `assets/timeline-template.md` and `references/obsidian-format.md`.
143
1448. **Growth Mapping:** Update `growth-map.md` (based on `assets/growth-map-template.md`) if new behavioral patterns or skill interests are detected.
145
1469. **Profile Evolution:** Update the long-term user profile (`profile.md`) to reflect the latest observations on values, goals, and personality traits. See `references/profile-evolution.md` and `assets/profile-template.md`.
147
148## ⏰ Cron & Passive Operation
149PhoenixClaw is designed to run without user intervention. It utilizes OpenClaw's built-in cron system to trigger its analysis daily at 10:00 PM local time (0 22 * * *).
150- Setup details can be found in `references/cron-setup.md`.
151- **Mode:** Primarily Passive. The AI proactively summarizes the day's activities without being asked.
152
153### Rolling Journal Window (NEW)
154To solve the 22:00-24:00 content loss issue, PhoenixClaw now supports a **rolling journal window** mechanism:
155
156**Problem**: Fixed 24-hour window (00:00-22:00) misses content between 22:00-24:00 when journal is generated at 22:00.
157
158**Solution**: `scripts/rolling-journal.js` scans from **last journal time → now** instead of fixed daily boundaries.
159
160**Features**:
161- Configurable schedule hour (default: 22:00, customizable via `~/.phoenixclaw/config.yaml`)
162- Rolling window: No content loss even if generation time varies
163- Backward compatible with existing `late-night-supplement.js`
164
165**Configuration** (`~/.phoenixclaw/config.yaml`):
166```yaml
167schedule:
168 hour: 22 # Journal generation time
169 minute: 0
170 rolling_window: true # Enable rolling window (recommended)
171```
172
173**Usage**:
174```bash
175# Default: generate from last journal to now
176node scripts/rolling-journal.js
177
178# Specific date
179node scripts/rolling-journal.js 2026-02-12
180```
181
182## 💬 Explicit Triggers
183
184While passive by design, users can interact with PhoenixClaw directly using these phrases:
185- *"Show me my journal for today/yesterday."*
186- *"What did I accomplish today?"*
187- *"Analyze my mood patterns over the last week."*
188- *"Generate my weekly/monthly summary."*
189- *"How am I doing on my personal goals?"*
190- *"Regenerate my journal."* / *"重新生成日记"*
191
192> [!warning] **Manual Invocation = Full Pipeline**
193> When users request journal generation/regeneration, you MUST execute the **complete 9-step Core Workflow** above. This ensures:
194> - **Photos are included** (via session log scanning)
195> - **Ledger plugin runs** (via `post-moment-analysis` hook)
196> - **All plugins execute** (at their respective hook points)
197>
198> **Common mistakes to avoid:**
199> - ❌ Only calling `memory_get` (misses photos)
200> - ❌ Skipping moment identification (plugins never trigger)
201> - ❌ Generating journal directly without plugin sections
202
203## 📚 Documentation Reference
204### References (`references/`)
205- `user-config.md`: Initial onboarding and persistence settings.
206- `cron-setup.md`: Technical configuration for nightly automation.
207- `plugin-protocol.md`: Plugin architecture, hook points, and integration protocol.
208- `media-handling.md`: Strategies for extracting meaning from photos and rich media.
209- `session-day-audit.js`: Diagnostic utility for verifying target-day message coverage across session logs.
210- `visual-design.md`: Layout principles for readability and aesthetics.
211- `obsidian-format.md`: Ensuring compatibility with Obsidian and other PKM tools.
212- `profile-evolution.md`: How the system maintains a long-term user identity.
213- `skill-recommendations.md`: Logic for suggesting new skills based on journal insights.
214
215### Assets (`assets/`)
216- `daily-template.md`: The blueprint for daily journal entries.
217- `weekly-template.md`: The blueprint for high-level weekly summaries.
218- `profile-template.md`: Structure for the `profile.md` persistent identity file.
219- `timeline-template.md`: Structure for the `timeline.md` chronological index.
220- `growth-map-template.md`: Structure for the `growth-map.md` thematic index.
221
222---