Workflows
Workflows
AI4PKM provides three main workflows that work together to maintain your knowledge base. These workflows ensure your KB is kept up-to-date with automated processing and organization.
Daily Ingestion and Roundup (DIR)
Purpose: Daily content processing into episodic memory for your PKM.
Process Steps:
- Pick and Process Photos (PPP)
- Photos from each day are processed into photo log
- Ingested from iCloud Photos via Applescript
- EXIF metadata extracted and preserved
- Images saved to
Ingest/Photolog/Snap/with markdown metadata
- Process Life Logs (PLL)
- Voice-based life log from Limitless.AI is processed
- Requires triggering sync with Limitless.AI first
- Extracts memorable moments, emotions, and lessons learned
- Creates structured markdown in lifelog format
- Enrich Ingested Content (EIC)
- Processes content from Readwise Reader and Obsidian Web Clipper
- Improves structure and grammar
- Adds comprehensive summaries with key quotes
- Adds topic tags and cross-links
- Skip files already processed within CKU workflow
- Generate Daily Roundup (GDR)
- Builds episodic knowledge for the day
- Links meaningful updates and activities
- Connects to relevant topics
- Creates daily summary in
AI/Roundup/folder
- Topic Knowledge Addendum (TKA)
- Updates relevant topic notes with new insights
- Links daily roundup content to topic pages
- Maintains knowledge graph connections
- Create Thread Postings (CTP)
- Generates ideas for social media posting
- Creates threaded content from daily insights
- Suggests shareable knowledge snippets
Usage Notes:
DIRcan be run multiple times per day- Only updated contents will be added to existing notes on subsequent runs
- Can be triggered manually or via cron schedule
Example Commands:
# Run for today
ai4pkm -p "DIR for today"
# Run for specific date range
ai4pkm -p "DIR for 9/10-14"
# Backfill past week
ai4pkm -p "DIR for past week (backfill as needed)"
Note: Daily roundup workflow diagram is available in the vault at _Settings_/Prompts/_files_/Daily Roundup 2025-07-20 17.29.29.excalidraw.svg
Weekly Roundup and Planning (WRP)
Purpose: Weekly knowledge review and planning.
Process Steps:
- Generate Weekly Roundup (GWR)
- Reviews all daily roundups from the week
- Highlights key content and patterns
- Identifies themes and insights
- Creates weekly summary in
AI/Roundup/folder - Sets context for planning next week
Usage Notes:
GWRcan be run multiple times per day if needed- Only updated contents will be added to existing notes on subsequent runs
- Typically scheduled for Sunday
Example Commands:
# Run for this week
ai4pkm -p "WRP for this week"
# Run for specific week
ai4pkm -p "WRP for week of 9/10"
Continuous Knowledge Upkeep (CKU)
Purpose: Hourly maintenance to keep various index pages up-to-date, allowing AI agents to find contents more easily.
Process Steps:
- Apply EIC to New Content
- Processes all newly ingested content in
Books,Articles, andClippings - Does NOT process
Limitlessfiles (handled by PLL in DIR) - Improves structure and adds enrichment
- Can be executed via different agents:
- Gemini:
ai4pkm -a gemini -p "Run EIC on [filepath]" - Claude:
ai4pkm -a claude -p "Run EIC on [filepath]" - Codex:
ai4pkm -a codex -p "Run EIC on [filepath]"
- Gemini:
- Processes all newly ingested content in
- Update Folder Notes (UFN)
- Applies to all folders with:
- Updated notes since last run
- Existing folder notes
- Maintains folder index pages
- Summarizes recent changes
- Applies to all folders with:
- Apply Topic Knowledge Improvement (TKI)
- Reviews all updated
Topicsnotes - Improves structure and balance
- Adds relevant source attribution
- Enhances cross-linking
- Reviews all updated
- Fix Broken Links
- Scans for broken wiki links
- Attempts to resolve or flag for review
- Maintains knowledge graph integrity
- Add Source Attribution
- Ensures all insights have proper source references
- Adds missing citations
- Maintains traceability
Usage Notes:
- Only runs if there are updates in PKM since last update
- Doesn’t repeat jobs for files already processed
- Uses commit history/timestamp/contents to make judgments
- Typically runs hourly via cron
Example Commands:
# Run hourly maintenance
ai4pkm -p "CKU for hourly run"
# Run on-demand
ai4pkm -p "CKU check and process"
Troubleshooting:
For large files (>50KB), EIC may timeout with Gemini:
- Read the EIC prompt:
_Settings_/Prompts/Enrich Ingested Content (EIC).md - Apply ICT improvements manually: grammar, Korean translation, structure with H3
- Add comprehensive Summary section with quotes
- Update YAML: add tags, topics, set
status: processed - Ensure wiki links use complete filenames:
[[YYYY-MM-DD Title]]
Alternative: Use Claude or Codex agent which can directly modify files.
On-demand Task Processing
In addition to the three scheduled workflows above, AI4PKM provides an on-demand task processing system for real-time knowledge work.
Key Difference from Batch Workflows:
- Batch workflows (DIR, WRP, CKU) run on schedule and process multiple items
- On-demand processing responds immediately to individual triggers as they occur
How it works:
The system monitors the filesystem for trigger events and automatically processes them through a three-phase pipeline:
- KTG (Knowledge Task Generator) - Creates structured task from trigger
- KTP (Knowledge Task Processor) - Routes to appropriate agent and executes
- KTE (Knowledge Task Evaluator) - Validates outputs and marks completion
Task Triggers:
- Web Clippings: Content from Obsidian Web Clipper triggers EIC workflow
- #AI Hashtag: Add
#AIto any note to generate a knowledge task - Voice Commands: Limitless pendant with wake words
Hey PKMcreates tasks
Agent Routing: Tasks are automatically routed to the best agent for the job:
- EIC (content enrichment) → Claude Code
- Research tasks → Gemini
- Analysis tasks → Gemini
- Other tasks → Default agent
Start Task Management:
ai4pkm -t
# or
ai4pkm --task-management
Use Cases:
- Real-time content enrichment as you clip articles
- Immediate processing of voice-captured ideas
- On-the-fly research and analysis tasks
- Writing assistance triggered from any note
Learn More:
- On-demand Knowledge Task Processing - Implementation blog post
- README_KTM.md - Technical details
- CLI Tool - Usage reference
Workflow Automation
All workflows can be automated using the CLI cron scheduler. Configure schedules in cron.json:
[
{
"inline_prompt": "CKU for hourly run",
"cron": "0 * * * *",
"description": "Hourly maintenance"
},
{
"inline_prompt": "DIR for today",
"cron": "0 21 * * *",
"description": "Daily roundup at 9 PM"
},
{
"inline_prompt": "WRP for this week",
"cron": "0 12 * * 0",
"description": "Weekly review on Sunday at noon"
}
]
Start the scheduler with:
ai4pkm --cron
See Also
- Guidelines - PKM overview and architecture
- Prompts - Individual prompt details
- CLI Tool - Full CLI reference
- FAQ - Frequently asked questions and troubleshooting