Automation
中文 | English
Global Config
Scheduled maintenance uses the global config:
~/.llm-wiki/config.jsonThe recommended layout now separates shared defaults from named tasks:
{
"root": "/Users/bytedance/csh/llm-wiki",
"scheduler": {
"enabled": true,
"codex_path": "/Users/bytedance/.nvm/versions/node/v23.11.1/bin/codex",
"log_dir": "/Users/bytedance/.llm-wiki/logs",
"max_runtime_minutes": 20
},
"schedulers": {
"content_patrol": {
"interval_minutes": 30,
"label": "com.bytedance.llmwiki.maintenance.content",
"prompt": "$llm-wiki run a content patrol on this vault..."
},
"taxonomy_patrol": {
"interval_minutes": 1440,
"label": "com.bytedance.llmwiki.maintenance.taxonomy",
"max_runtime_minutes": 45,
"prompt": "$llm-wiki run a taxonomy patrol on this vault..."
}
}
}Notes:
scheduleris the shared default block.schedulerscontains named tasks that inherit fromschedulerand override what they need.- The old single-
schedulerformat still works for backward compatibility, but new setups should prefer named tasks.
Recommended Split
Use two scheduled tasks:
content_patrolEvery 30 minutes. Focus on integrating new or changedraw/content, translation drift, index/log drift, and obvious missing cross-links.taxonomy_patrolOnce per day. Focus on whole-project directory structure according to the llm-wiki taxonomy rules forraw/andwiki/, and only land refactors when the structure is genuinely drifting.
This split keeps frequent maintenance conservative while reserving heavier directory refactors for a slower cadence.
Change The Interval
Edit:
~/.llm-wiki/config.jsonChange the specific task:
"schedulers": {
"content_patrol": {
"interval_minutes": 30
},
"taxonomy_patrol": {
"interval_minutes": 1440
}
}Examples:
30: every 30 minutes60: every hour120: every 2 hours1440: once per day
After changing any schedule-related field, reinstall the launch agents:
python3 /Users/bytedance/csh/llm-wiki/.codex/skills/llm-wiki/scripts/manage_launch_agent.py installThis is required because launchd writes StartInterval into each plist.
Common Commands
Check every configured task:
python3 /Users/bytedance/csh/llm-wiki/.codex/skills/llm-wiki/scripts/manage_launch_agent.py statusCheck one task:
python3 /Users/bytedance/csh/llm-wiki/.codex/skills/llm-wiki/scripts/manage_launch_agent.py status taxonomy_patrolRun all enabled tasks immediately:
python3 /Users/bytedance/csh/llm-wiki/.codex/skills/llm-wiki/scripts/manage_launch_agent.py run-nowRun one task immediately:
python3 /Users/bytedance/csh/llm-wiki/.codex/skills/llm-wiki/scripts/manage_launch_agent.py run-now content_patrolInstall or reinstall every enabled scheduled task:
python3 /Users/bytedance/csh/llm-wiki/.codex/skills/llm-wiki/scripts/manage_launch_agent.py installInstall or reinstall one task:
python3 /Users/bytedance/csh/llm-wiki/.codex/skills/llm-wiki/scripts/manage_launch_agent.py install taxonomy_patrolUninstall every configured task:
python3 /Users/bytedance/csh/llm-wiki/.codex/skills/llm-wiki/scripts/manage_launch_agent.py uninstallWhat Each Task Checks
content_patrol should focus on:
- newly added or changed raw content
- screenshot-heavy raw sources that may require OCR extraction before synthesis
- broken
wiki/source/rawlinks - broken raw-local navigation links after path changes
- missing or stale translation siblings
- raw markdown rendering hazards such as malformed links, transient
blob:embeds, unmatched HTML tags, or angle-bracket placeholders exposed outside code spans - drift in
index.md,index.zh.md, orlog.md - obviously missing cross-links
When one of these issues is clearly syntax-only, content_patrol should repair it directly in the same pass instead of merely reporting it.
taxonomy_patrol should focus on:
- raw taxonomy drift when
raw/has become hard to navigate - raw/source families that are already clear enough to deserve their own subtree
- wiki sections where a topic family, source family, or navigation slice is obvious enough to group together
- whole-project link repair after page or raw moves
- bilingual sibling repair after directory moves
- overview, index, and source-page navigation drift caused by taxonomy changes
Treat family clarity and navigability as the primary trigger. The taxonomy task should stay conservative and avoid no-op reshuffles, but it should not wait for arbitrary directory-count thresholds when a stable grouping is already obvious.
Overlap Protection
Overlap protection is per task.
If a previous content_patrol is still running, the next content_patrol run is skipped, but taxonomy_patrol can still run if it has its own free lock. Each task has its own:
- lock file
- structured state file
- final summary file
If a task times out or fails:
statusshows that task state explicitly- the next run of the same task receives the previous summary and log excerpt as continuation context
- the next run can continue unfinished work instead of restarting blindly
Patrol Logs
Logs live under:
~/.llm-wiki/logs/Single-task legacy mode keeps the old layout:
~/.llm-wiki/logs/2026-04-08/
maintenance-20260408-150012.log
maintenance-20260408-150012-last-message.txtNamed-task mode groups logs by task:
~/.llm-wiki/logs/content-patrol/2026-04-09/
maintenance-content-patrol-20260409-132143.log
maintenance-content-patrol-20260409-132143-last-message.txt
~/.llm-wiki/logs/taxonomy-patrol/2026-04-09/
maintenance-taxonomy-patrol-20260409-090001.log
maintenance-taxonomy-patrol-20260409-090001-last-message.txtState files also split by task in named-task mode, for example:
~/.llm-wiki/content-patrol-state.json
~/.llm-wiki/taxonomy-patrol-state.jsonThis makes it obvious which maintenance lane ran, what it did, and whether only one lane needs attention.