For: Anyone wondering "is what I'm seeing current?"
The short answer: changes you make in the source files appear here within about 30 minutes. No nightly cron. No "wait until tomorrow."
The pipeline
Edit a next.md, next-notes.md, or any file under 02_active/rwp/reference/
↓ (watchdog FSEvents catches the change in <1 second)
sync_portal.py sets a pending-rebuild timer (debounce = 30 min default)
↓ (the timer resets every time you edit something else)
After 30 min of no new edits, the rebuild fires:
- gen_state_index.py walks every next.md → State page HTML
- gen_digest.py asks Ollama for a weekly digest
- gen_doc_pages.py renders every reference/*.md to a detail page
- gen_inferred_skills.py asks Ollama what capabilities recent activity shows
- gen_timeline.py builds the chronological view
↓ (all writes are atomic — temp file + os.replace)
Sync daemon notices the published/ files changed
↓
Mirrors to ~/Sites/rwp-portal/ → git commit + push → Netlify deploy
↓ (~30-60 seconds)
This portal updates
Why this matters
The architecture choice was deliberate: change-triggered with debounce, not nightly cron. Nightly rebuilds carry a real failure mode — you log in some morning, ten minutes before a meeting, to find the page you wanted is broken. By the time you figure out why, the meeting has started.
Change-triggered means rebuilds happen close to the edit that prompted them, during work hours, when you can react if something looks off.
Atomic writes are the safety net
Even if a generator crashes mid-run, the previous content stays live. Every generator writes to a temp file first, then atomically replaces the target. The worst-case failure mode is "yesterday's content stays live" — never "page is missing at meeting time."
Knobs you can turn
| Need | How |
|---|---|
| Faster updates after editing | REBUILD_DEBOUNCE_SECONDS=300 (5 min) |
| Slower updates | REBUILD_DEBOUNCE_SECONDS=7200 (2 hours) |
| Rebuild right now | python3 02_active/rwp/workspaces/rebuild_now.py |
| Skip digest while iterating | rebuild_now.py --skip-digest |
| Skip Ollama entirely | OLLAMA_URL=http://invalid python3 ... |
The health badge
There's a small status indicator on every page (top-right of the topbar)
showing time since last successful rebuild. If the number gets large,
either nothing has changed (fine) or something is broken (check the daemon
log at ~/Library/Logs/sync-portal.log).