Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for INVIFESCUS

Inspiration

I was capturing notes in five places — class, journal, screenshots, voice memos, Excalidraw sketches — and never seeing them again. The real loss wasn't memory. It was the bridge I never noticed between, say, decomposition in CS and form breakdown in gymnastics. Polymath thinkers (Munger, Jobs, Musk) win because they transfer patterns across domains. The best knowledge tools today (Obsidian, Notion) are vaults; they don't transfer. Invifescus is a Second Brain that transfers.

What it does

Invifescus is a gamified second-brain engine in four surfaces:

  • Feed Input — drop any input (text, image, voice, sketch, screenshot, class note). Each is enriched with emotion_signal and a stickiness_score.
  • Omnilattice — your live knowledge graph. Four visual modes: Polymath Brain (light, expansive), Rings (radial), Glow Cloud (live 2D/3D physics), Force-Graph 3D (three.js halos). Click any node to grow it with 2-hop MemPalace siblings + cross-domain bridges + live OpenAlex / Wikipedia / arXiv hits + persona coalitions.
  • Empiricum — the decision lab. A question triggers a 5-agent MiroFish debate (support / oppose / reframe with confidence), a 3-horizon scenario forecast, a mirror to the closest of 50 unpredictable scenarios, daily / weekly / monthly quest plans, and mad-loot reward drops so the gamification stays unpredictable and rewarding.
  • Community Syndicate — OSSN-style profile + connection + feed + questions + DMs over a MapLibre / OpenStreetMap atlas of pods. modcandy screens every post; under-16 mode locks down DM, posts queue for human review, Discord is disabled, and connection requests need guardian approval.

A 15-agent backend runs across 8 layers (Knowledge, Input, Decision, Community, Safety, UI, Bridge, Memory). All persistence goes to MemPalace.

How we built it

Stack: Next.js 14 · TypeScript · D3 · Vega-Lite · react-force-graph-3d/2d · three.js · MapLibre GL · Tailwind · Apple HIG + Material Design 3 tokens.

Algorithms shipped:

  • Multi-source expansion — one click fetches 4 sources in parallel and injects ~21 new nodes/edges into the live graph.
  • Centrality engine — degree + weighted degree + cross-domain count; hubs darken automatically.
  • L1–L4 insight engine — direct ties, 2-hop reach, same-domain peers, cross-domain bridges, all with priority ranking.
  • Karpathy-tiny-LLM forward pass (vocab=40, d=32, L=4, heads=4, T=0.85) shown stage-by-stage as the Decision Lab's engine layer:

\( \text{Attention}(Q,K,V) = \text{softmax}!\left(\frac{QK^\top}{\sqrt{d}}\right)\,V \)

  • mad-loot reward roll — direct port of OSRS-style tier dice:

$$P(\text{drop}) = \frac{\text{tableChance.low}}{\text{tableChance.high}} \times \frac{\text{itemChance.low}}{\text{itemChance.high}}$$

with guaranteed drops on top. Three tables (dailyQuest, weeklySynthesis, bossDecision) cover the cadence.

  • MiroFish persona debate — each agent has a stance, bias, knowledge scope, speaking style, confidence; debate stages: moderator → proponent → critic → synthesizer.
  • 3-horizon scenariostomorrow / next-week / next-quarter with upside, downside, leading indicator.
  • modcandy-style toxicity classifier + age-policy enforcement.

Training corpus — 50 unpredictable life scenarios, 200 cross-domain solutions, 60 mental models, a 6-agent MACS spec, gamification, community schema, and a 339 KB synthetic 8-entity dataset (20 users · 100 inputs · 100 concepts · 40 transfers · 100 tasks · 80 reflections · 100 outcomes · 60 community records). Shipped in lib/training/dataset/.

Challenges we ran into

  • Hydration mismatch when a file-backed memory store made the server count 90 nodes and the client count 98. Fixed with a mount guard so SSR shows "…" and the client swaps in the real number after hydration.
  • OpenAlex abstracts are inverted indices, not strings. Built a reconstructor to splice them back into readable snippets.
  • Performance with 1000+ glowing particles. Migrated the Glow Cloud to a hand-rolled canvas physics engine (Coulomb + spring + group cohesion, damping = 0.92^{60 \cdot dt} for frame-rate independence) and used three.js for the 3D variant with halo pattern (back-side sphere at 1.7× radius).
  • Free-only constraint — no paid model APIs. Designed the tiny LLM in TypeScript and the 5-agent debate as template-driven so the whole app runs at $0 with optional Ollama upgrade path.

Accomplishments that we're proud of

  • A single click grows the graph by ~21 entities from 4 parallel sources.
  • 9 agents → 15 agents, all visible live in the Community → Agents tab.
  • Apple HIG + MD3 dual design system added as 149 additive tokens with zero overwrites of the existing polymath theme — every working component keeps rendering exactly as before.
  • The Karpathy forward pass is real, deterministic, and stage-traced — not a stub.

What we learned

  • Polymath thinking is edge weight + cross-domain count, not node count.
  • Gamification works when the surprise is real — mad-loot's tier dice beat fixed XP curves every time.
  • Apple HIG and Material Design 3 are complementary, not competing — HIG for vibrancy, MD3 for tonal elevation.
  • Hydration bugs hide everywhere the server has state the client doesn't.

What's next for Invifescus

  • Wire Ollama (llama3.1) as the optional upgrade path for the tiny LLM
  • Real Discord OAuth bridge for pod servers (currently stubbed)
  • Apple Health + Google Fit input adapters for biometric stickiness
  • Public hosted instance with per-user MemPalace partitions
  • Vector embeddings via Sentence Transformers to replace the hash-based embedding in the tiny LLM
  • Real-time co-editing of a single Omnilattice between two paired users
  • Mobile app (React Native) for voice + photo capture on the go

Math

The polymath score we compute per node:

$$\text{polymath}(n) = \text{centrality}(n) \times |\text{domains}(N_1(n))| \times \sum_{e \in E(n)} w(e)$$

where \(N_1(n)\) is the 1-hop neighborhood and \(w(e)\) is edge weight. The Convergence Agent ranks by this score.

Built With

Share this project:

Updates