๐Ÿ›๏ธ Round Table โ€” Code Mirror

FreeLattice ยท app.html lines 17606โ€“18650 ยท Tab ID: roundtable ยท Built-in (not a lazy-loaded module)

What this is: The original Round Table is a multi-domain specialist oracle. You bring a question or case; 80 AI specialists across 11 domains respond in sequence, building on each other's answers. It is a college-level learning room. The Consensus Table (#tab-round-table) is a separate, newer feature โ€” this page is about the original.

Architecture Overview

The Round Table is entirely inline in app.html โ€” no separate module file. It is initialized when the tab first becomes visible via LatticeEvents.on('tabChanged'). All state lives in the global _rtDomains object.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  #tab-roundtable                                        โ”‚
โ”‚  โ”œโ”€โ”€ Mode tabs (Discussion / Medical / Legal / โ€ฆ)       โ”‚
โ”‚  โ”œโ”€โ”€ #rtConversationView   โ€” AI minds talk together     โ”‚
โ”‚  โ”œโ”€โ”€ #rtMedicalView        โ€” Medical specialists        โ”‚
โ”‚  โ”œโ”€โ”€ #rtLegalView          โ€” Legal specialists          โ”‚
โ”‚  โ”œโ”€โ”€ #rtFinanceView        โ€” Finance specialists        โ”‚
โ”‚  โ”œโ”€โ”€ #rtNutritionView      โ€” Nutrition specialists      โ”‚
โ”‚  โ”œโ”€โ”€ #rtMentalHealthView   โ€” Frameworks / Psychology    โ”‚
โ”‚  โ”œโ”€โ”€ #rtBiologyView        โ€” Biology specialists        โ”‚
โ”‚  โ”œโ”€โ”€ #rtChemistryView      โ€” Chemistry specialists      โ”‚
โ”‚  โ”œโ”€โ”€ #rtPhysicsView        โ€” Physics specialists        โ”‚
โ”‚  โ”œโ”€โ”€ #rtPhilosophyView     โ€” Philosophy specialists     โ”‚
โ”‚  โ””โ”€โ”€ #rtWorkspaceView      โ€” Workspace / Productivity   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

State: window._rtDomains = {}   (keyed by domain id)
Each domain: { history: [], caseText: '', running: false, specialists: {} }

The 11 Domains

๐Ÿ’ฌ Discussion
5 AI minds (Aria, Nova, Sage, Lyric, Wren)
๐Ÿฉบ Medical
8 specialties (Endocrinology, Rheumatology, Immunology, Cardiology, Neurology, Hematology, Oncology, Gastroenterology)
โš–๏ธ Legal
8 specialties (Contract, Property, Civil Rights, Employment, Family, Criminal, Constitutional, IP)
๐Ÿ’ฐ Finance
8 specialties (Tax, Investment, Retirement, Insurance, Estate, Business, Real Estate, Debt)
๐Ÿฅฌ Nutrition
8 specialties (Clinical, Sports, Functional, Gut Health, Metabolic, Plant-Based, Pediatric, Longevity)
๐Ÿง  Frameworks
8 specialties (CBT, ACT, Mindfulness, Narrative, Systems, Stoic, Existential, Positive Psych)
๐Ÿงฌ Biology
8 specialties
โš›๏ธ Chemistry
8 specialties
โš™๏ธ Physics
8 specialties
๐Ÿ“œ Philosophy
8 specialties
โ™พ Workspace
8 specialties

Key Functions

FunctionWhat it doesLine
rtSwitchMode(mode)Shows/hides the correct domain view, updates tab underline~18077
rtToggleSeat(btn)Toggles a specialist seat active/inactive (pill buttons)~18108
rtCreateDomain(config)Factory function โ€” creates a domain with its own state, begin/continue/ask/render~18120
rtGetActiveMinds()Returns array of active AI minds in Discussion mode~18539
rtMeasureConvergence()Measures how much the AI minds are agreeing (for convergence indicator)~18550
rtBeginConversation()Starts a Discussion mode session~18562
rtContinueConversation()Continues a Discussion mode session (next turn)~18572
rtPlantSpecialistInsight(text, speaker)Plants a specialist's insight to The Core~18473
rtLearnMore(sourceMode)Sends the current discussion to Chat for deeper exploration~18485

The Domain Factory Pattern

All 10 specialist domains (Medical, Legal, Finance, etc.) are created using the same rtCreateDomain(config) factory. Each domain config looks like this:

rtCreateDomain({
  id: 'medical',
  specialists: {
    endocrinology: { name: 'Dr. Chen', color: '#f59e0b', focus: 'endocrinology and metabolic disorders' },
    rheumatology:  { name: 'Dr. Patel', color: '#a78bfa', focus: 'rheumatology and autoimmune conditions' },
    // ... 6 more
  },
  seatsId:         'rtMedicalSeats',      // pill button container
  inputId:         'rtMedicalCaseInput',  // textarea
  feedId:          'rtMedicalFeed',       // response stream
  actionsId:       'rtMedicalActions',    // continue/ask buttons
  thinkingPrefix:  'rtMedical',
  lpPrefix:        'roundtable_medical',
  dataAttr:        'data-specialty',
  promptRules:     'You are an educator, not a treating physician. Educational purposes only. ...'
});

The factory returns { begin, cont, ask } which are wired to the HTML buttons via onclick. The AI call is made via sendToAI() with a system prompt that includes the specialist's name, focus, and all prior discussion turns.

Current Visual Problems

This is what Kirk means by "it's a mess." The Round Table is one of the most powerful features in FreeLattice โ€” 80 specialists, 11 domains, real multi-turn AI discussion โ€” but it looks like a plain form. Here is what is wrong:

ProblemImpact
Mode tabs are a plain horizontal scroll bar โ€” no visual weightUsers don't know 11 domains exist
Specialist seat pills are tiny and all look the sameNo sense of who is "at the table"
The response feed is a plain div with no visual structureSpecialist responses blend together โ€” hard to follow who said what
No convergence indicator visible to userrtMeasureConvergence() runs but nothing shows
No visual distinction between domains โ€” Medical looks like Legal looks like FinanceNo sense of place
The "Begin" button is the same gold as everything elseNo clear call to action
No welcome/orientation text โ€” user lands with no guidanceNew users don't know what to do

What the Response Feed Looks Like Now

Each specialist response is rendered by the domain's internal render() function as a plain div:

<div style="padding:12px;border-bottom:1px solid rgba(255,255,255,0.06);">
  <span style="color: [specialist.color]; font-weight:600;">[name]</span>
  <span style="color:#e2e8f0;"> [response text] </span>
</div>

There is no avatar, no role label, no visual separation between turns. All 8 specialists look identical except for the name color.

LP Awards

ActionLPKey
Start a Round Table session2 LProundtable_start
Domain case started3 LProundtable_[domain]_start
Each round of conversation1 LProundtable_round
Convergence reached5 LProundtable_converge
Insight planted to The Core3 LProundtable_plant

CSS Classes

ClassWhat it styles
.rt-containerOuter wrapper, padding and max-width
.rt-seat-btnSpecialist pill buttons (inactive state)
.rt-seat-activeActive specialist pill (filled background)

All other styles are inline. There is no dedicated CSS block for the Round Table โ€” all visual design is embedded in the HTML.

What Fable and Grok should improve โ€” Go 3

The goal: Make the Round Table feel like a real learning room. A place you want to sit in. Right now it is a form. It should feel like a seminar.

Additive only. The JS logic (rtCreateDomain, rtSwitchMode, rtToggleSeat, rtBeginConversation, etc.) must not change. Only HTML structure and CSS.

Specific requests:

File to edit: docs/app.html โ€” the HTML between lines 17606โ€“17930 (the #tab-roundtable panel) and the CSS block for .rt-container, .rt-seat-btn, .rt-seat-active.

Do not change: Any JS function (rtSwitchMode, rtToggleSeat, rtCreateDomain, rtBeginConversation, rtMeasureConvergence, rtPlantSpecialistInsight). Only HTML structure and CSS classes.

Test: After the change, open the Round Table, switch to Medical, select 3 specialists, enter a case, click Begin. Confirm responses appear with the new card style. Confirm the convergence bar updates. Confirm the plant button appears on each response card.


FreeLattice ยท code-roundtable-original.html ยท v5.75.3 ยท Built by Harmonia ยท 2026-07-09