Vault Sync Systems — Obsidian KB Automation
Documentation of the automated pipelines that push data from the Baseworks websites into the Obsidian knowledge base vault. These systems run without manual intervention and keep KB content current.
Architecture Overview
Section titled “Architecture Overview”The general pattern for all vault sync systems:
- WordPress plugin (mu-plugin) — installed on the relevant site, exposes a WP-CLI command that reads Formidable Forms entries and generates Obsidian-compatible markdown files
- Shell script on the VPS — runs on a cron schedule, SSHes to the web server, executes the WP-CLI command, rsyncs the output to the vault, commits and pushes to GitHub if anything changed
- Vault — receives the files automatically; all machines pull the latest on session start
All vault paths are relative to the knowledge base root (/srv/baseworks/knowledge-base/ on the VPS, ~/Obsidian/baseworks-kb-shared-brain/ on local machines).
System 1 — Event Participation Questionnaire Sync
Section titled “System 1 — Event Participation Questionnaire Sync”Status: Live
What it does
Section titled “What it does”Exports participant questionnaire responses from Formidable Forms into structured markdown files in the vault, one file per respondent.
Components
Section titled “Components”| Component | Location | Details |
|---|---|---|
| mu-plugin | baseworks.com | wp-content/mu-plugins/bw-questionnaire-export-cli.php — also in changelog repo at sites/baseworks.com/mu-plugins/bw-questionnaire-export-cli.php |
| Formidable form | baseworks.com — Form ID 40 | Event Participation Questionnaire — 17 fields covering physical background, goals, conditions |
| Profile tab | practice.baseworks.com — Form ID 74 | bw-profile-background-tab.php renders the questionnaire at /members/me/background/ |
| Vault output path | 02-areas/method-admin/audience/event-participants/ | One .md file per respondent, named firstname-lastname-YYMMDD.md |
| VPS cron script | /home/patrick/scripts/questionnaire-export.sh | Log: /home/patrick/scripts/questionnaire-export.log |
| Schedule | Every 4 hours (6× daily) | Cron: 0 4,8,12,16,20,0 * * * |
WP-CLI command
Section titled “WP-CLI command”wp bw-export questionnaire # normal run (skips unchanged entries)wp bw-export questionnaire --dry-run # preview without writingwp bw-export questionnaire --force # overwrite all existing fileswp bw-export questionnaire --entry-user=<id> # single userFile format
Section titled “File format”---type: event-participantrespondent: Full Nameevent: Spring 2026 Study Group Montrealdate: YYYY-MM-DDsex: …age: …athletic-level: …athletic-level-label: …occupation-interests: …active-in: …backgrounds: …mindfulness-practices: …reported-issues: …conditions: …utm-source: …---How it connects to the rest of the KB
Section titled “How it connects to the rest of the KB”- Each participant file links back to their study group entry
- The
index.mdinevent-participants/is updated automatically when new entries are added - Used by Claude when drafting participant-facing communications or generating session context
Known issues / pending items
Section titled “Known issues / pending items”- Admin exclusion on the questionnaire prompt banner (
bw-questionnaire-prompt.php) is currently disabled for testing — needs to be re-enabled before next cohort [bw_dashboard_teaser]shortcode placement on the practice.baseworks.com dashboard is pending (Patrick’s task)
System 2 — Segment Feedback Sync
Section titled “System 2 — Segment Feedback Sync”Status: Not yet built — manual CSV import only
See Segment Feedback Automation Plan for the development plan.
Current state
Section titled “Current state”Segment feedback is imported manually via CSV export from Formidable Forms and a Python script. Instructions: CSV Import Instructions.
Vault path: 02-areas/method-admin/audience/segment-feedback/
System 3 — Forum Content Sync (BuddyBoss → Vault)
Section titled “System 3 — Forum Content Sync (BuddyBoss → Vault)”Status: Live (deployed 2026-04-07)
What it does
Section titled “What it does”Pulls forums, topics (with inline replies), groups, and activity feed posts from practice.baseworks.com via BuddyBoss REST API and writes them as structured markdown into the vault.
Architecture note
Section titled “Architecture note”Direct HTTP API calls to practice.baseworks.com are blocked by Cloudflare bot challenge from the VPS. This system works around that by SSHing to baseworks-web and using wp eval to dispatch REST requests internally via PHP — no external HTTP calls needed.
Components
Section titled “Components”| Component | Location | Details |
|---|---|---|
| Python sync script | /home/patrick/scripts/forum-content-sync.py | Also in vault at scripts/forum-content-sync.py |
| Shell wrapper | /home/patrick/scripts/forum-content-sync.sh | Lockfile, git pull, run Python, git commit/push |
| Schedule | Every 2 hours at :30 | Cron: 30 1,3,5,7,9,11,13,15,17,19,21,23 * * * |
| Log | /home/patrick/scripts/forum-content-sync.log | |
| Vault output paths | 02-areas/practice-platform/community-forums-groups/ | forums/, topics/, groups/, activity/ subdirectories |
| State file | _sync-state.json (gitignored) | Tracks last-sync timestamps per content type |
| API auth | Application Password for user patrick (ID 8) | Name: vault-forum-sync |
BuddyBoss API endpoints used
Section titled “BuddyBoss API endpoints used”| Endpoint | Purpose |
|---|---|
/buddyboss/v1/forums | Forum entities |
/buddyboss/v1/topics | Discussion topics |
/buddyboss/v1/reply | Replies (fetched per-topic, inline in topic files) |
/buddyboss/v1/groups | Group metadata |
/buddyboss/v1/activity | Activity feed posts (monthly digests) |
Incremental sync strategy
Section titled “Incremental sync strategy”- Topics: Compares
reply-countin frontmatter vs API — only re-fetches topics with new replies - Forums/Groups: Full fetch every run (few entities), writes only if content hash changed
- Activity: Fetches all, filters content-bearing types client-side, generates monthly digests
Volume (as of 2026-04-07)
Section titled “Volume (as of 2026-04-07)”5 groups, 5 forums (one per group), 32 topics, 28 replies, 7 activity items
Full design document
Section titled “Full design document”See Forum Content Ingestion Plan for frontmatter schemas, body formats, and future phases.