Skip to content

feat(brain): autonomous discovery pipeline + daily gist publishing + email improvements#349

Merged
ruvnet merged 3 commits intomainfrom
feature/brain-hypothesis-engine
Apr 13, 2026
Merged

feat(brain): autonomous discovery pipeline + daily gist publishing + email improvements#349
ruvnet merged 3 commits intomainfrom
feature/brain-hypothesis-engine

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented Apr 13, 2026

Summary

Three changes to make the pi.ruv.io brain autonomously discover and publish:

1. Gist Publishing Thresholds Tuned

The brain's Gist publisher (gist.rs) was never firing because thresholds were set for a 3K-memory brain (now 10K+). Relaxed all thresholds to enable ~1 gist/day of genuine discoveries. The 3-pass Gemini pipeline (Google Search grounding → brain memory search → synthesis) is already implemented — it just needed the gate opened.

2. Daily Email Improved

The digest was showing 10 identical "Self-reflection: training cycle" debug entries. Now filters noise (debug category, training cycles, IEEE events, short content), adds category emojis, better subject lines, sentence-boundary truncation.

3. ADR-148: Brain Hypothesis Engine

Architecture for the autonomous discovery loop:

  • Gemini 2.5 Flash for hypothesis generation from cross-domain edges
  • DiskANN for scalable quality scoring (hybrid with existing HNSW)
  • Noise filtering via meta-mincut on knowledge graph
  • Benchmark suite for self-improvement tracking

Test plan

  • mcp-brain-server builds clean
  • Email noise filtering logic verified against known noisy entries
  • Gist thresholds validated: brain's current output (135 props, 315 inferences, 83 SONA patterns) would pass new gates
  • No changes to existing brain API routes or data model

🤖 Generated with claude-flow

Reuven and others added 3 commits April 13, 2026 15:48
…experimentation

Proposes four additive capabilities for the pi.ruv.io brain:
1. Hypothesis generation via Gemini 2.5 Flash on cross-domain edges
2. Quality scoring via DiskANN + PageRank (ForwardPush sublinear)
3. Noise filtering (ingestion gate + meta-mincut on knowledge graph)
4. Self-improvement tracking (50-query benchmark suite + auto-rollback)

All feature-gated. No changes to running brain. Separate Cloud Run service
for hypothesis engine. DiskANN is fallback-only (HNSW stays primary <50K).

5-week phased implementation. ~$0.03/day Gemini cost.

Co-Authored-By: claude-flow <ruv@ruv.net>
The daily digest was showing 10 identical "Self-reflection: training
cycle" debug entries. Now:

1. Filters out debug category memories entirely
2. Filters known noise patterns (training cycles, IEEE events, DailyMed)
3. Skips content < 50 chars (scraping artifacts)
4. Category emojis for visual scanning
5. Cleaner layout with sentence-boundary truncation
6. Better subject line: "[pi brain] 5 new discoveries today"
7. Updated header: "What the Brain Learned Today"
8. Filters auto-generated tags from display

Co-Authored-By: claude-flow <ruv@ruv.net>
Gist publishing was never firing because thresholds were too aggressive
(set when brain had 3K memories; now has 10K+):
- MIN_NEW_INFERENCES: 10 → 3
- MIN_EVIDENCE: 1000 → 100
- MIN_STRANGE_LOOP_SCORE: 0.1 → 0.01
- MIN_PROPOSITIONS: 20 → 5
- MIN_PARETO_GROWTH: 3 → 1
- MIN_INFERENCE_CONFIDENCE: 0.70 → 0.60
- MIN_UNIQUE_CATEGORIES: 4 → 2
- strong_inferences: >= 3 → >= 1
- strong_propositions: >= 5 → >= 2
- min_interval: 3 days → 1 day

Daily email improvements:
- Filter debug/training-cycle entries from digest
- Filter known noise patterns (IEEE events, DailyMed, etc.)
- Skip content < 50 chars (scraping artifacts)
- Category emojis for visual scanning
- Cleaner subject: "[pi brain] N new discoveries today"
- Better header: "What the Brain Learned Today"
- Sentence-boundary truncation for content previews
- System font instead of monospace for readability

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet ruvnet merged commit 63577c1 into main Apr 13, 2026
7 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant