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:
- Call
memory_get for the current day's memory
- 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 both 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/.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.
- **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`.
- If memory is sparse, reconstruct context from session logs, then update daily 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.)
- 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.
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.
💬 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: phoenixclaw3description: Passive journaling skill that scans daily conversations via cron to generate markdown journals using semantic understanding. Use when: - User requests journaling ("Show me my journal", "What did I do today?") - User asks for pattern analysis ("Analyze my patterns", "How am I doing?") - User requests summaries ("Generate weekly/monthly summary")4---56# PhoenixClaw: Zero-Tag Passive Journaling78PhoenixClaw automatically distills daily conversations into meaningful reflections using semantic intelligence.910Automatically identifies journal-worthy moments, patterns, and growth opportunities.1112## 🛠️ Core Workflow1314> [!critical] **MANDATORY: Complete Workflow Execution**15> This 9-step workflow MUST be executed in full regardless of invocation method:16> - **Cron execution** (10 PM nightly)17> - **Manual invocation** ("Show me my journal", "Generate today's journal", etc.)18> - **Regeneration requests** ("Regenerate my journal", "Update today's entry")19> 20> **Never skip steps.** Partial execution causes:21> - Missing images (session logs not scanned)22> - Missing finance data (Ledger plugin not triggered)23> - Incomplete journals (plugins not executed)2425PhoenixClaw follows a structured pipeline to ensure consistency and depth:26271. **User Configuration:** Check for `~/.phoenixclaw/config.yaml`. If missing, initiate the onboarding flow defined in `references/user-config.md`.28292. **Context Retrieval:** 30 - Call `memory_get` for the current day's memory31 - **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`:32 ```bash33 # Read all session logs from both OpenClaw locations, then filter by per-message timestamp34 # Use timezone-aware epoch range to avoid UTC/local-day mismatches.35 TARGET_DAY="$(date +%Y-%m-%d)"36 TARGET_TZ="${TARGET_TZ:-Asia/Shanghai}"37 read START_EPOCH END_EPOCH < <(38 python3 - <<'PY' "$TARGET_DAY" "$TARGET_TZ"39from datetime import datetime, timedelta40from zoneinfo import ZoneInfo41import sys4243day, tz = sys.argv[1], sys.argv[2]44start = datetime.strptime(day, "%Y-%m-%d").replace(tzinfo=ZoneInfo(tz))45end = start + timedelta(days=1)46print(int(start.timestamp()), int(end.timestamp()))47PY48 )4950 for dir in "$HOME/.openclaw/sessions" "$HOME/.agent/sessions"; do51 [ -d "$dir" ] || continue52 find "$dir" -name "*.jsonl" -print053 done |54 xargs -0 jq -cr --argjson start "$START_EPOCH" --argjson end "$END_EPOCH" '55 (.timestamp // .created_at // empty) as $ts56 | ($ts | fromdateiso8601?) as $epoch57 | select($epoch != null and $epoch >= $start and $epoch < $end)58 '59 ```60 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).61 - **EXTRACT IMAGES FROM SESSION LOGS**: Session logs contain `type: "image"` entries with file paths. You MUST:62 1. Find all image entries (e.g., `"type":"image"`)63 2. Keep only entries where message `timestamp` is in the target date range64 3. Extract the `file_path` or `url` fields65 4. Copy files into `assets/YYYY-MM-DD/`66 5. Rename with descriptive names when possible67 - **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.68 - **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.69 - **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`.70 - If memory is sparse, reconstruct context from session logs, then update daily memory71 - Incorporate historical context via `memory_search` (skip if embeddings unavailable)72733. **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.74 **Image Processing (CRITICAL)**:75 - For each extracted image, generate descriptive alt-text via Vision Analysis76 - Categorize images (food, selfie, screenshot, document, etc.)77 - Match images to moments (e.g., breakfast photo → breakfast moment)78 - Store image metadata with moments for journal embedding79804. **Pattern Recognition:** Detect recurring themes, mood fluctuations, and energy levels. Map these to growth opportunities using `references/skill-recommendations.md`.81825. **Plugin Execution:** Execute all registered plugins at their declared hook points. See `references/plugin-protocol.md` for the complete plugin lifecycle:83 - `pre-analysis` → before conversation analysis84 - `post-moment-analysis` → **Ledger and other primary plugins execute here**85 - `post-pattern-analysis` → after patterns detected86 - `journal-generation` → plugins inject custom sections87 - `post-journal` → after journal complete8889906. **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.91 - **Embed curated images only**, not every image. Prioritize highlights and moments.92 - **Route finance screenshots to Ledger** sections (receipts, invoices, transaction proofs).93 - Use Obsidian format from `references/media-handling.md` with descriptive captions.94957. **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`.96978. **Growth Mapping:** Update `growth-map.md` (based on `assets/growth-map-template.md`) if new behavioral patterns or skill interests are detected.98999. **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`.100101## ⏰ Cron & Passive Operation102PhoenixClaw 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 * * *).103- Setup details can be found in `references/cron-setup.md`.104- **Mode:** Primarily Passive. The AI proactively summarizes the day's activities without being asked.105106## 💬 Explicit Triggers107108While passive by design, users can interact with PhoenixClaw directly using these phrases:109- *"Show me my journal for today/yesterday."*110- *"What did I accomplish today?"*111- *"Analyze my mood patterns over the last week."*112- *"Generate my weekly/monthly summary."*113- *"How am I doing on my personal goals?"*114- *"Regenerate my journal."* / *"重新生成日记"*115116> [!warning] **Manual Invocation = Full Pipeline**117> When users request journal generation/regeneration, you MUST execute the **complete 9-step Core Workflow** above. This ensures:118> - **Photos are included** (via session log scanning)119> - **Ledger plugin runs** (via `post-moment-analysis` hook)120> - **All plugins execute** (at their respective hook points)121> 122> **Common mistakes to avoid:**123> - ❌ Only calling `memory_get` (misses photos)124> - ❌ Skipping moment identification (plugins never trigger)125> - ❌ Generating journal directly without plugin sections126127## 📚 Documentation Reference128### References (`references/`)129- `user-config.md`: Initial onboarding and persistence settings.130- `cron-setup.md`: Technical configuration for nightly automation.131- `plugin-protocol.md`: Plugin architecture, hook points, and integration protocol.132- `media-handling.md`: Strategies for extracting meaning from photos and rich media.133- `session-day-audit.js`: Diagnostic utility for verifying target-day message coverage across session logs.134- `visual-design.md`: Layout principles for readability and aesthetics.135- `obsidian-format.md`: Ensuring compatibility with Obsidian and other PKM tools.136- `profile-evolution.md`: How the system maintains a long-term user identity.137- `skill-recommendations.md`: Logic for suggesting new skills based on journal insights.138139### Assets (`assets/`)140- `daily-template.md`: The blueprint for daily journal entries.141- `weekly-template.md`: The blueprint for high-level weekly summaries.142- `profile-template.md`: Structure for the `profile.md` persistent identity file.143- `timeline-template.md`: Structure for the `timeline.md` chronological index.144- `growth-map-template.md`: Structure for the `growth-map.md` thematic index.145146---