
In Self-Compacting & Bi-Temporal Agent Memory, we introduced the Phase B4 Multi-Agent Swarm Blackboard Protocol (~/scripts/antigravity_blackboard.py) to solve a classic multi-agent failure mode: shared-file write contention and coordinator context bloat.
Instead of letting parallel workers overwrite a single shared Markdown file or dump raw logs back into the main agent’s context window, each worker writes exclusively to its own atomic JSON scratchpad (worker-<name>.json), and a Coordinator reducer distills all outcomes into a <500-token SUMMARY.md.
To put that architecture to work on a real daily workflow, we built ~/scripts/editorial_review_swarm.py: an offline, zero-token-waste Pre-Commit Editorial Board that audits every blog draft before it is scheduled on WordPress.
Why an Offline Editorial Swarm?
When you author technical posts directly inside an Obsidian vault and publish them via REST API, the same three categories of regressions slip through:
- Privacy & Security Leaks: Accidental inclusion of private RFC1918 or Tailscale CGNAT IPs, hardcoded local
/home/<user>/paths, or personal phone numbers. - Broken Vault-to-Web Translation: Leaving Obsidian
[[wikilinks]]in prose instead of root-relative/slug/URLs, referencing missing local diagrams, or unbalancing fenced code blocks. - Missing SEO & Jetpack Metadata: Publishing without
seo-title,seo-description, or at least three frontmatter tags.
Running a single monolithic LLM pass over a 1,200-word draft to check all of these is slow, expensive, and non-deterministic. Splitting the audit into two deterministic, parallel specialist workers behind a Blackboard reducer finishes in milliseconds and acts as a strict CI-style gate (--strict).
Architecture: Separate Before Serializing

When editorial_review_swarm.py inspects a draft, it initializes an isolated task directory under Meta/states/blackboard/<task-id>/ and launches two parallel threads via ThreadPoolExecutor:
Worker A (worker-a-tech): Technical Accuracy & Redaction
Worker A focuses exclusively on correctness and operational security:
* Sensitive Data Redaction: Scans the full draft against regex rules for private RFC1918 IPs, Tailscale CGNAT ranges, local home paths, and phone numbers. Any match emits a BLOCKER.
* Wikilink & Asset Integrity: Strips fenced code blocks so regexes don’t misfire on code snippets, flags any remaining [[wikilinks]], verifies every relative ../Images/... path exists on disk, and checks for balanced code fences.
* Script Verification: Extracts ~/scripts/*.py or ~/scripts/*.sh references and confirms those scripts exist locally.
Worker B (worker-b-style-seo): Tone, Structure & Jetpack/SEO Meta
Worker B audits readability and publishing metadata:
* SEO Frontmatter: Validates presence and character bounds for seo-title and seo-description, plus frontmatter tags count.
* Structural Hygiene: Verifies single-H1 discipline (ignoring # comments inside code fences), section breaks (H2), estimated reading time, and flags generic AI filler phrases.
Lock-Free Writes & <500-Token Reduction
Both workers report back through antigravity_blackboard.post_worker_update(), which writes atomically via .tmp + os.replace() to separate files:
* worker-worker-a-tech.json
* worker-worker-b-style-seo.json
Once both futures resolve, the coordinator calls antigravity_blackboard.reduce_task(tid, max_tokens=450). The result is a compact SUMMARY.md that fits comfortably inside any agent’s context window:
### Swarm Blackboard Synthesis: Editorial Peer Review (2/2 workers done)
- worker-a-tech (done): Tech audit: 0 blocker(s), 2 image(s) verified, 3 script(s) checked.
- worker-b-style-seo (done): Style/SEO audit: 1083 words (~5 min read), 9 tags, 0 blocker(s).
Verdict: APPROVED (0 blocker(s), 227 est. tokens)
If either worker raises a BLOCKER, --strict exits with status code 1, halting publication before the WordPress REST API is ever called.
Key Takeaways
- Blackboard isolation scales to non-LLM workers: Parallelizing deterministic Python/regex auditors through the same
antigravity_blackboard.pyprotocol gives you uniformSUMMARY.mdartifacts and automatic Dream harvesting. - Strip code fences before prose checks: Parsing
#headings or[[brackets]]without excluding fenced code blocks produces false positives on shell scripts and JSON examples. - Dogfood your own gates: Running
editorial_review_swarm.py --strictbefore every WordPress upload turns editorial hygiene from a checklist you remember into a pre-commit invariant.