Jump to content

ThinkTank/SPEC: Difference between revisions

From MindAttic Docs
md2wiki: sync from MindAttic.Docs
 
md2wiki: sync from MindAttic.Docs
Line 6: Line 6:


== 1. Product definition ==
== 1. Product definition ==
<strong>Place in the ecosystem:</strong> a product (Apps) in the MindAttic ecosystem. It owns no platform concern: every LLM call and vote goes through MindAttic.Legion, keys and settings come from MindAttic.Vault, UI controls from MindAttic.Components.


ThinkTank is a Blazor Server app that seats several LLMs (Claude, ChatGPT, Gemini, DeepSeek and, by 3.0, any provider MindAttic.Legion supports) at one table to debate a topic as personas, with the user interjecting and votes called by participants, by the user or every N rounds. Every call goes through MindAttic.Legion; keys come from MindAttic.Vault. It is the owner's internal tool, run locally from <code>R:\MindAttic\Apps\ThinkTank</code>. The finished product is ThinkTank 3.0: live streamed debates that survive a refresh and end in a verdict, visible personas and costs, one accessible UI on MindAttic.Components, debates kept and exported, and a tested core. The scope follows <code>docs/plans/thinktank-improvement-plan.md</code> Phases 2 and 3, minus everything that only made sense for public hosting.
ThinkTank is a Blazor Server app that seats several LLMs (Claude, ChatGPT, Gemini, DeepSeek and, by 3.0, any provider MindAttic.Legion supports) at one table to debate a topic as personas, with the user interjecting and votes called by participants, by the user or every N rounds. Every call goes through MindAttic.Legion; keys come from MindAttic.Vault. It is the owner's internal tool, run locally from <code>R:\MindAttic\Apps\ThinkTank</code>. The finished product is ThinkTank 3.0: live streamed debates that survive a refresh and end in a verdict, visible personas and costs, one accessible UI on MindAttic.Components, debates kept and exported, and a tested core. The scope follows <code>docs/plans/thinktank-improvement-plan.md</code> Phases 2 and 3, minus everything that only made sense for public hosting.
Line 106: Line 108:
* <strong>S3.3.2 No browser-launched processes</strong> — TT-T42 — built As the owner, I want the Vault Desktop launcher hidden whenever the app is not on my own desktop, so that no browser action starts a process on the server. Evidence: TT-T42 (closed)
* <strong>S3.3.2 No browser-launched processes</strong> — TT-T42 — built As the owner, I want the Vault Desktop launcher hidden whenever the app is not on my own desktop, so that no browser action starts a process on the server. Evidence: TT-T42 (closed)


=== E4. Local-first runtime — TT-T82 — MS-19 ===
=== E4. Runs locally on the platform — TT-T82 — MS-19 ===


ThinkTank runs locally from R:\MindAttic\Apps\ThinkTank on local SQL and Legion 28, with no Azure leftovers and docs that match (priority 900).
ThinkTank runs entirely on the owner's machine on the shared platform: installed from the shared run menu, local SQL Server, LLM calls through the current Legion, no cloud leftovers, and docs that describe it as it is (priority 900).


==== F4.1 Azure removal — TT-T84 — MS-19 ====
==== F4.1 Cloud-free codebase — TT-T84 — MS-19 ====


* <strong>S4.1.1 Remove Azure leftovers</strong> — TT-T80 — MS-19 Task: azure-deploy.yml, the Azure Identity and Data Protection packages and their wiring are gone; a local key ring folder replaces them.
* <strong>S4.1.1 Remove Azure leftovers</strong> — TT-T80 — MS-19 Task: azure-deploy.yml, the Azure Identity and Data Protection packages and their wiring are gone; a local key ring folder replaces them.


==== F4.2 Run from R: deploy — TT-T85 — MS-19 ====
==== F4.2 Installed like every app — TT-T85 — MS-19 ====


* <strong>S4.2.1 ThinkTank on R:</strong> — TT-T81 — MS-19 Task: the run menu deploys Debug and Release to R:\MindAttic\Apps\ThinkTank and both start.
* <strong>S4.2.1 ThinkTank on R:</strong> — TT-T81 — MS-19 Task: the run menu deploys Debug and Release to R:\MindAttic\Apps\ThinkTank and both start.


==== F4.3 Legion 28 upgrade — TT-T86 — MS-19 ====
==== F4.3 On the current Legion — TT-T86 — MS-19 ====


* <strong>S4.3.1 Bump to Legion 28</strong> — TT-T89 — MS-19 Task: ThinkTank.Core references MindAttic.Legion 28.0.0 and builds clean.
* <strong>S4.3.1 Bump to Legion 28</strong> — TT-T89 — MS-19 Task: ThinkTank.Core references MindAttic.Legion 28.0.0 and builds clean.


==== F4.4 Docs match local app — TT-T87 — MS-19 ====
==== F4.4 Docs describe the local app — TT-T87 — MS-19 ====


* <strong>S4.4.1 Docs describe local app</strong> — TT-T16 — MS-19 Task: docs/overview.md and docs/BIBLE.md describe the local run from R:, local SQL, sign-in and Vault keys.
* <strong>S4.4.1 Docs describe local app</strong> — TT-T16 — MS-19 Task: docs/overview.md and docs/BIBLE.md describe the local run from R:, local SQL, sign-in and Vault keys.


=== E5. Observability and core tests — TT-T83 — MS-19 ===
=== E5. Observable and proven core — TT-T83 — MS-19 ===


ThinkTank logs to MindAttic.Log and its core LLM call path is under offline NUnit tests (priority 800).
ThinkTank logs to MindAttic.Log and its core LLM call path is under offline NUnit tests (priority 800).


==== F5.1 MindAttic.Log logging — TT-T17 — MS-19 ====
==== F5.1 Logs through MindAttic.Log — TT-T17 — MS-19 ====


* <strong>S5.1.1 Log setup</strong> — TT-T62 — MS-19 Task: Serilog WriteToMindAtticLog to the Vault-assigned log database at every entry point.
* <strong>S5.1.1 Log setup</strong> — TT-T62 — MS-19 Task: Serilog WriteToMindAtticLog to the Vault-assigned log database at every entry point.
Line 136: Line 138:
* <strong>S5.1.3 Unhandled exceptions and tests</strong> — TT-T64 — MS-19 Task: unhandled exceptions are logged; tests point the log at a temp file.
* <strong>S5.1.3 Unhandled exceptions and tests</strong> — TT-T64 — MS-19 Task: unhandled exceptions are logged; tests point the log at a temp file.


==== F5.2 Core call path tests — TT-T88 — MS-19 ====
==== F5.2 Core call path proven — TT-T88 — MS-19 ====


* <strong>S5.2.1 CallProvider dispatch tests</strong> — TT-T3 — MS-19 Task: NUnit tests for CallProvider dispatch, Claude fallback and auth precedence.
* <strong>S5.2.1 CallProvider dispatch tests</strong> — TT-T3 — MS-19 Task: NUnit tests for CallProvider dispatch, Claude fallback and auth precedence.
Line 216: Line 218:
** Given a 390 px wide screen, when I run a debate, then the roundtable, tooltips (with a tap alternative) and controls are all usable.
** Given a 390 px wide screen, when I run a debate, then the roundtable, tooltips (with a tap alternative) and controls are all usable.


=== E10. Keep and extend — TT-T151 — MS-147 ===
=== E10. Debates kept, every model seatable — TT-T151 — MS-147 ===


Debates are kept, searched and exported; every Legion provider can take a seat; long debates stay smooth (plan 2.9, 3.5, 3.6).
Debates are kept, searched and exported; every Legion provider can take a seat; long debates stay smooth (plan 2.9, 3.5, 3.6).
Line 270: Line 272:
== 6. Interfaces and dependencies ==
== 6. Interfaces and dependencies ==


* <strong>Platform owners (docs/ECOSYSTEM.md):</strong> LLM calls, votes and usage — MindAttic.Legion; credentials and settings — MindAttic.Vault; sign-in — MindAttic.Authentication; logging — MindAttic.Log; UI controls — MindAttic.Components (TT-T148 requires M.COMP-T262); shipping — the shared run menu.
* <strong>Uses:</strong> MindAttic.Legion (every LLM call and votes), MindAttic.Vault (keys and settings), MindAttic.Authentication (sign-in), MindAttic.Log (logging, MS-19), MindAttic.Components (UI, MS-147), the shared run menu (deploy to R:).
* <strong>Uses:</strong> MindAttic.Legion (every LLM call and votes), MindAttic.Vault (keys and settings), MindAttic.Authentication (sign-in), MindAttic.Log (logging, MS-19), MindAttic.Components (UI, MS-147), the shared run menu (deploy to R:).
* <strong>Used by:</strong> nothing; it is an end-user app.
* <strong>Used by:</strong> nothing; it is an end-user app.
Line 289: Line 292:
| Specification written from the BIBLE, USER_STORIES, RELEASE charter, improvement plan, code and ticket history; plan Phases 2-3 became MS-145 and MS-147; hosting-only items moved to Never
| Specification written from the BIBLE, USER_STORIES, RELEASE charter, improvement plan, code and ticket history; plan Phases 2-3 became MS-145 and MS-147; hosting-only items moved to Never
| MAT-T384
| MAT-T384
|-
| 2026-11-30
| MAT-T462 source-to-sea pass: 9 renamed; root task TT-T81 seated under F4.2 (TT-T85); MS-145 epics require E4 (TT-T82), MS-147 epics require the 2.0 release (TT-T145); UI re-pointed to MindAttic.Components (TT-T148 requires M.COMP-T262); seatable providers follow Vault's catalog (TT-T155 related M.VALT-T200)
| MAT-T469
|}
|}



Revision as of 20:28, 30 November 2026

ThinkTank — Product specification

The complete product, written down before it is built (owner, 2026-11-30, MAT-T360). Every epic, feature and story the finished product will have is listed here, built or not. The ticket tree mirrors this file one to one: every ID below is a ticket. Nothing gets built unless it is here, and anything taken out of here is closed wont-do in the tree. docs/RELEASE.md says which part of this the current milestone delivers.

1. Product definition

Place in the ecosystem: a product (Apps) in the MindAttic ecosystem. It owns no platform concern: every LLM call and vote goes through MindAttic.Legion, keys and settings come from MindAttic.Vault, UI controls from MindAttic.Components.

ThinkTank is a Blazor Server app that seats several LLMs (Claude, ChatGPT, Gemini, DeepSeek and, by 3.0, any provider MindAttic.Legion supports) at one table to debate a topic as personas, with the user interjecting and votes called by participants, by the user or every N rounds. Every call goes through MindAttic.Legion; keys come from MindAttic.Vault. It is the owner's internal tool, run locally from R:\MindAttic\Apps\ThinkTank. The finished product is ThinkTank 3.0: live streamed debates that survive a refresh and end in a verdict, visible personas and costs, one accessible UI on MindAttic.Components, debates kept and exported, and a tested core. The scope follows docs/plans/thinktank-improvement-plan.md Phases 2 and 3, minus everything that only made sense for public hosting.

2. Scope boundary

2.1 In the product

  • Roundtable debates across providers, personas with psychometric profiles, votes and verdicts.
  • Conversation persistence, Vault keys, appearance settings.
  • Sign-in (allow-listed, two-factor), server-side spend limits and an LLM usage record, cancellable runs.
  • Streaming, a server-side runner, cost and progress, starter debates, export, search and archive.
  • One accessible UI on MindAttic.Components; logging to MindAttic.Log; NUnit and spend-free end-to-end tests.

2.2 Never in the product

  • Public hosting on Azure (retired 2026-11-26, MAT-T297) or Hetzner (TT-T67..T69, closed): ThinkTank is local. Plan Phase 1 items that exist only for hosting (App Service keys, the deploy workflow, the web app, backups policy, the Deploy entry) go with it.
  • Multi-tenant data (plan 1.1: per-user conversation stores), an admin page for users and budgets (3.3), an invite flow (3.4) and scale-out with Azure SignalR (3.7): one owner, one machine.
  • Public share links for debates (the share half of plan 2.9): export covers keeping and passing on a debate.
  • Repeat bughunt, run-all-tests and cleanup sweeps as tickets of their own.

3. Users and roles

  • The owner: the one signed-in user; runs debates, sets personas, budgets and keys (keys in Vault.Desktop).
  • Participants: the LLM seats, each a persona over a provider and model, routed through Legion.
  • Maintainer: the owner and agents building, testing (on /test only) and deploying it.

4. Requirements

Status is built (closed ticket, with evidence) or MS-n: the milestone in §7 that delivers it. Every unbuilt story is approved and prioritised in build order; the planner splits a story into tasks when the queue reaches it. Built stories carry their old TT-US-* story ID and the tests that verify them, or the closed ticket that built them.

E1. Roundtable debates — TT-T93 — built

Personas from any provider debate a topic round by round, call votes mid-response and are routed through one provider-agnostic path.

F1.1 Provider-agnostic turns — TT-T94 — built

  • S1.1.1 One router for providers — TT-T95 — built As a user, I can dispatch every participant's turn through one provider-agnostic router, so I'm not locked to a vendor. Acceptance:
    • Given an unknown provider id, When a call is built, Then it throws rather than guessing an endpoint. Evidence: TT-US-A1, verified by CallProvider_UnknownProvider_ThrowsArgumentException.
  • S1.1.2 Clean transcript names — TT-T96 — built As a user, I never see a model talk to itself by name, so the transcript reads cleanly. Acceptance:
    • Given a response prefixed [Claude]:/Assistant:, When sanitized, Then the prefix is stripped case-insensitively. Evidence: TT-US-A2, verified by SanitizeModelOutput_StripsClaudePrefix, SanitizeModelOutput_StripsProviderPrefixes, SanitizeModelOutput_CaseInsensitive.
  • S1.1.3 Bounded context window — TT-T97 — built As a user, I can run long debates without blowing the context window, so calls stay valid. Acceptance:
    • Given more than MaxContextTurns turns, When history is built, Then it trims to the last N. Evidence: TT-US-A3, verified by TrimHistory_Over, TrimHistory_Exactly, TrimHistory_Under, TrimHistory_Empty_ReturnsEmpty.
  • S1.1.4 Redacted call diagnostics — TT-T98 — built As a developer, I can subscribe to redacted diagnostics for every API call, so I can debug without leaking content. Evidence: TT-US-A4, verified by DiagnosticsEvent_CanSubscribe.
  • S1.1.5 Round-by-round debate loop — TT-T99 — built As a user, I can start a topic, watch each participant respond round by round, and Stop the loop. Evidence: TT-US-A5, verified by round loop is UI logic in Chat.razor; covered only by Cypress chat.cy.js, not the unit run — see backlog.

F1.2 Personas — TT-T100 — built

  • S1.2.1 Markdown persona prompts — TT-T101 — built As a user, each participant gets a markdown personality as its system prompt, with optional per-seat model/key override. Evidence: TT-US-B1, verified by ChatParticipant_StoresAllFields, ParticipantTemplate_WithExpression, EffectivePersonaId_PrefersExplicitField, EffectivePersonaId_FallsBackToLegionTemplateIdConvention.
  • S1.2.2 Psychometric persona embodiment — TT-T102 — built As a user, library-backed participants are profiled psychometrically and embody the traits rather than reciting them, so personas feel distinct. Evidence: TT-US-B2, verified by Narrator_RendersAllFiveInstruments, Narrator_InstructsToEmbodyNotRecite, Service_ResolvesAndRendersStoredProfile, PersonaIdFromVoterId_StripsGuidSuffix.
  • S1.2.3 Default provider templates — TT-T103 — built As a user, default templates exist for every provider and have unique ids. Evidence: TT-US-B3, verified by Templates_ContainsDefaultTemplatesForAllProviders, Templates_CoverAllProviders, Templates_AllHaveUniqueIds.
  • S1.2.4 Generated participant names — TT-T104 — built As a user, I can have the LLM generate a participant name, with safe fallbacks for empty/garbage output. Evidence: TT-US-B4, verified by GenerateFirstName_ReturnsCleanName_WhenLLMRespondsCleanly, GenerateFirstName_FallsBackToAlex_WhenResponseIsEmpty, GenerateFirstName_StripsNonLetters.

F1.3 Votes — TT-T105 — built

  • S1.3.1 Participant-requested votes — TT-T106 — built As a participant, I can call a vote mid-response by emitting [REQUEST_VOTE: q], which is detected and stripped from my visible text. Evidence: TT-US-C1, verified by BasicMarker_Matches, ExtractsQuestion_Correctly, StripMarker_RemovesTagLeavesRemainingText, MarkerIsCaseInsensitive, MultipleMarkers_FirstOneMatched.
  • S1.3.2 Persona-faithful vote polling — TT-T107 — built As a user, a vote polls every participant preserving their persona and per-seat API/model overrides. Evidence: TT-US-C2, verified by MapToVoterProfiles_PreservesIdNameProviderPersonality, MapToVoterProfiles_FullAuthBlob_PopulatesBoth, MapToVoterProfiles_MultipleParticipants_PreservesOrder.
  • S1.3.3 Malformed vote auth tolerated — TT-T108 — built As a user, malformed per-seat auth in a vote degrades safely to null overrides rather than crashing the vote. Evidence: TT-US-C3, verified by MapToVoterProfiles_MalformedAuthOverride_OverridesAreNull, ExtractField_MalformedJson_ReturnsNull.
  • S1.3.4 Call Vote dialog — TT-T109 — built As a user, the Call Vote button + config dialog injects the result back into the shared history. Evidence: TT-US-C4, verified by dialog/injection is Chat.razor UI; covered only by Cypress vote-dialog.cy.js.

E2. Conversations, keys and appearance — TT-T110 — built

Conversations survive restarts, keys come from the Vault and the look is the user's choice.

F2.1 Conversation persistence — TT-T111 — built

  • S2.1.1 Conversations survive restart — TT-T112 — built As a user, my conversations survive a restart — turns replay from the on-disk log. Evidence: TT-US-D1, verified by LoadTurnsAsync_ParsesTurnEntries, LoadTurnsAsync_MultipleTurns_PreservesOrder, LoadTurnsAsync_ReplaysUserVoteAndSystemEntries, AppendChatJsonAsync_CreatesFileAndFolder.
  • S2.1.2 Corrupt logs never crash — TT-T113 — built As a user, a missing/corrupt log never crashes load. Evidence: TT-US-D2, verified by LoadTurnsAsync_MissingFile_ReturnsEmpty, LoadTurnsAsync_MissingFields_DefaultsGracefully.
  • S2.1.3 Perspectives round-trip to disk — TT-T114 — built As a user, each participant's perspective markdown round-trips to disk. Evidence: TT-US-D3, verified by WriteThenReadPerspective_Roundtrips, WritePerspectiveAsync_OverwritesExisting, ReadPerspectiveAsync_MissingFile_ReturnsEmpty.
  • S2.1.4 Coherent conversation tabs — TT-T115 — built As a user, the conversation tab lifecycle (create/switch/close) keeps the active tab coherent. Evidence: TT-US-D4, verified by CreateConversation_SetsAsActive, CloseConversation_ActiveClosedUpdatesToLast, CloseConversation_ActiveClosed_NoRemaining_SetsNull, SetActive_SwitchesToCorrectConversation.

F2.2 Credentials — TT-T116 — built

  • S2.2.1 Vault-supplied keys — TT-T117 — built As an operator, I can supply keys via Vault/IConfiguration and they never touch disk. Evidence: TT-US-E1, verified by Save_AfterOverlay_DoesNotPersistRuntimeKey, Construction_DoesNotWriteCredentialsToSharedStore, OverlayFromConfiguration_VaultKeySet_PopulatesRuntimeOverride.
  • S2.2.2 Deterministic key precedence — TT-T118 — built As an operator, credential precedence is deterministic (override > disk > vault). Evidence: TT-US-E2, verified by GetKeyForProvider_ExplicitOverride_WinsOverEverything, GetKeyForProvider_IgnoresDiskKey_UsesRuntime, GetKeyForProvider_EmptyDiskKey_FallsBackToRuntime.
  • S2.2.3 No committed keys — TT-T119 — built As a developer, no real-looking key is ever committed to the repo; Evidence: TT-US-E3, verified by ProviderAuthConfigs_ShouldNotContainRealLookingKeys_InRepoFiles, KeyPatterns_DetectRealShapes_AndIgnoreOrdinaryText.

F2.3 Appearance — TT-T120 — built

  • S2.3.1 Persisted theme choice — TT-T121 — built As a user, I can pick any of 18 themes and it persists, falling back to dark on an unknown value. Evidence: TT-US-F1, verified by ThemeSelect_HasAllEighteenThemes, Constructor_RestoresEveryPersistedTheme, Constructor_UnknownTheme_FallsBackToDark, SetMode_PersistsToSettings.
  • S2.3.2 Clamped layout settings — TT-T122 — built As a user, control height / gutter / border radius clamp to valid ranges. Evidence: TT-US-F2, verified by SetControlHeight_ClampsToMin, SetControlHeight_ClampsToMax, SetGutter_ClampsToMax, SetBorderRadius_ClampsToMin.

E3. Safe operation — TT-T123 — built

Sign-in, spend limits, usage records, cancellable runs, friendly errors and a hardened host (improvement plan Phase 0).

F3.1 Sign-in and spend limits — TT-T124 — built

  • S3.1.1 Allow-listed two-factor sign-in — TT-T46 — built As the owner, I want only allow-listed, two-factor accounts past the sign-in pages, so that nothing that spends an API key is reachable without a login. Evidence: TT-T46 (closed)
  • S3.1.2 Server-side spend limits — TT-T47 — built As the owner, I want participants, rounds, tokens, concurrent runs and a daily call budget capped on the server and every LLM call recorded, so that a debate can never run up an unbounded bill. Evidence: TT-T47 (closed)

F3.2 Robust runs — TT-T125 — built

  • S3.2.1 Immediate run cancellation — TT-T43 — built As a user, I want Pause, Close and a dropped connection to stop a run at once, so that no call keeps spending after I leave. Evidence: TT-T43 (closed)
  • S3.2.2 Friendly errors and input limits — TT-T44 — built As a user, I want a real error page, an error boundary around every page and provider errors as plain sentences, so that a failure never shows raw exception text. Evidence: TT-T44 (closed)

F3.3 Hardened host — TT-T126 — built

  • S3.3.1 Hardened transport headers — TT-T45 — built As the owner, I want forwarded headers, HTTPS redirect, HSTS, a host allow-list, security headers and a fitting CSP, so that the app is safe behind a proxy. Evidence: TT-T45 (closed)
  • S3.3.2 No browser-launched processes — TT-T42 — built As the owner, I want the Vault Desktop launcher hidden whenever the app is not on my own desktop, so that no browser action starts a process on the server. Evidence: TT-T42 (closed)

E4. Runs locally on the platform — TT-T82 — MS-19

ThinkTank runs entirely on the owner's machine on the shared platform: installed from the shared run menu, local SQL Server, LLM calls through the current Legion, no cloud leftovers, and docs that describe it as it is (priority 900).

F4.1 Cloud-free codebase — TT-T84 — MS-19

  • S4.1.1 Remove Azure leftovers — TT-T80 — MS-19 Task: azure-deploy.yml, the Azure Identity and Data Protection packages and their wiring are gone; a local key ring folder replaces them.

F4.2 Installed like every app — TT-T85 — MS-19

  • S4.2.1 ThinkTank on R: — TT-T81 — MS-19 Task: the run menu deploys Debug and Release to R:\MindAttic\Apps\ThinkTank and both start.

F4.3 On the current Legion — TT-T86 — MS-19

  • S4.3.1 Bump to Legion 28 — TT-T89 — MS-19 Task: ThinkTank.Core references MindAttic.Legion 28.0.0 and builds clean.

F4.4 Docs describe the local app — TT-T87 — MS-19

  • S4.4.1 Docs describe local app — TT-T16 — MS-19 Task: docs/overview.md and docs/BIBLE.md describe the local run from R:, local SQL, sign-in and Vault keys.

E5. Observable and proven core — TT-T83 — MS-19

ThinkTank logs to MindAttic.Log and its core LLM call path is under offline NUnit tests (priority 800).

F5.1 Logs through MindAttic.Log — TT-T17 — MS-19

  • S5.1.1 Log setup — TT-T62 — MS-19 Task: Serilog WriteToMindAtticLog to the Vault-assigned log database at every entry point.
  • S5.1.2 Log events — TT-T63 — MS-19 Task: startup, data-changing user actions and failures are logged.
  • S5.1.3 Unhandled exceptions and tests — TT-T64 — MS-19 Task: unhandled exceptions are logged; tests point the log at a temp file.

F5.2 Core call path proven — TT-T88 — MS-19

  • S5.2.1 CallProvider dispatch tests — TT-T3 — MS-19 Task: NUnit tests for CallProvider dispatch, Claude fallback and auth precedence.
  • S5.2.2 Prompt building tests — TT-T4 — MS-19 Task: NUnit tests for BuildPrompt and context-turn limits.
  • S5.2.3 VotingService tests — TT-T8 — MS-19 Task: NUnit tests for VoteAsync and psychometric voter profiles.

E6. Live debates — TT-T127 — MS-145

Replies stream as they are written, the debate runs on the server and its cost and progress are always in view (plan 2.1, 2.2, 2.6).

F6.1 Streamed replies — TT-T128 — MS-145

  • S6.1.1 Streamed participant replies — TT-T129 — MS-145 As a user, I want each reply to appear as it is generated, with a stop button, so that a debate feels live instead of waiting on whole turns. Acceptance:
    • Given a turn starts, when the provider streams, then the first words appear within about a second.
    • Given I press stop mid-reply, when the stream is cancelled, then the call ends and the partial reply is kept and marked stopped.

F6.2 Server-side debate runner — TT-T130 — MS-145

  • S6.2.1 Debates survive refresh — TT-T131 — MS-145 As a user, I want the debate loop to run on the server per conversation, so that a refresh or a dropped connection never stops or desyncs a debate. Acceptance:
    • Given a running debate, when I refresh the page, then it is still running and the transcript is in sync.
    • Given two browser tabs on one conversation, when a turn lands, then both show it.

F6.3 Cost and progress — TT-T132 — MS-145

  • S6.3.1 Debate cost and progress — TT-T134 — MS-145 As a user, I want round X of Y, calls and tokens used in this debate and today, and the remaining daily budget in view, so that I always know what a debate costs. Acceptance:
    • Given a running debate, when a call completes, then the header numbers update and match the LlmUsage table.
    • Given the daily budget is nearly spent, when I look at the header, then the remaining budget says so before the cap blocks a call.

E7. Verdicts and personas — TT-T135 — MS-145

Every finished debate ends in a verdict, votes can run every N rounds, and each seat's persona is visible (plan 2.4, 2.5, RFC 0001).

F7.1 Debate verdicts — TT-T136 — MS-145

  • S7.1.1 Closing verdict card — TT-T137 — MS-145 As a user, I want every finished debate to end with an automatic closing vote and a summary card, so that a debate always reaches a conclusion I can read at a glance. Acceptance:
    • Given a debate finishes, when the closing vote runs, then a card shows the decision, agreement percentage and each seat's final position.
    • Given a provider fails during the closing vote, when the card renders, then it shows the votes that did arrive and names the missing seat.
  • S7.1.2 Auto-vote every N rounds — TT-T138 — MS-145 As a user, I want a setting that calls a vote every N rounds (RFC 0001), so that long debates check in on themselves without me pressing Call Vote. Acceptance:
    • Given auto-vote is set to N, when round N completes, then a vote runs and its result joins the shared history.
    • Given auto-vote is off, when rounds complete, then no vote is called automatically.

F7.2 Persona cards — TT-T139 — MS-145

  • S7.2.1 Seat persona cards — TT-T140 — MS-145 As a user, I want to hover or tap a seat to see its persona and psychometric profile, and see each vote broken down by seat, so that I understand who is arguing and why they voted as they did. Acceptance:
    • Given a scored persona, when I hover or tap its seat, then its OCEAN/MBTI profile and personality summary show.
    • Given a finished vote, when I open its card, then it shows who voted what.

E8. First run — TT-T141 — MS-145

A landing page with starter debates, then the 2.0 polish and release (plan 2.3).

F8.1 Starter debates — TT-T142 — MS-145

  • S8.1.1 Landing page and starters — TT-T143 — MS-145 As a first-time user, I want a one-screen explanation, three one-click starter debates and a finished example to read, so that I reach a running debate in two clicks without spending anything first. Acceptance:
    • Given a new user on the home page, when they click a starter, then a debate with its topic and panel preset is running within two clicks.
    • Given the example debate, when it is opened, then it reads without making any LLM call.

F8.2 Polish and release 2.0 — TT-T144 — MS-145

  • S8.2.1 ThinkTank 2.0 release — TT-T145 — MS-145 As the owner, I want ThinkTank 2.0 polished, documented and deployed, so that live debates with verdicts are what I run. Acceptance:
    • Given every 2.0 story is closed, when Release is deployed from the run menu, then it starts from R:\MindAttic\Apps\ThinkTank\Release.
    • Given the docs, when read, then overview, BIBLE, SPEC and USER_STORIES describe 2.0.
    • Given the owner runs the 2.0 flows, when satisfied, then they sign off the 2.0 milestone.

E9. One accessible UI — TT-T146 — MS-147

The UI moves onto MindAttic.Components and works by keyboard and on a phone (plan 2.7, 2.8).

F9.1 Shared components UI — TT-T147 — MS-147

  • S9.1.1 UI on shared components — TT-T148 — MS-147 As the owner, I want ThinkTank's buttons, inputs, dialogs and tabs to come from MindAttic.Components with one theme in light and dark, so that it looks and behaves like the rest of MindAttic. Acceptance:
    • Given the app, when every page is reviewed, then no one-off button or input style remains and the vendored Bootstrap and dead CSS are gone.
    • Given the theme toggle, when I switch, then light and dark both apply with no flash.

F9.2 Accessibility and phone layout — TT-T149 — MS-147

  • S9.2.1 Keyboard and phone ready — TT-T150 — MS-147 As a user, I want to run a whole debate by keyboard and on a phone, so that ThinkTank works without a mouse or a wide screen. Acceptance:
    • Given a dialog opens, when I press Tab and Escape, then focus is trapped inside and Escape closes it.
    • Given a 390 px wide screen, when I run a debate, then the roundtable, tooltips (with a tap alternative) and controls are all usable.

E10. Debates kept, every model seatable — TT-T151 — MS-147

Debates are kept, searched and exported; every Legion provider can take a seat; long debates stay smooth (plan 2.9, 3.5, 3.6).

F10.1 Export, search and archive — TT-T152 — MS-147

  • S10.1.1 Export, search, archive debates — TT-T153 — MS-147 As a user, I want to export a debate to Markdown or PDF, search past debates and archive old ones, so that finished debates are kept and findable without an endless tab strip. Acceptance:
    • Given a finished debate, when I export it, then a Markdown or PDF file holds the full transcript and verdict.
    • Given many past debates, when I search a word, then matching debates list and archived ones leave the tab strip.

F10.2 More providers — TT-T154 — MS-147

  • S10.2.1 Every Legion provider seatable — TT-T155 — MS-147 As a user, I want any provider Legion supports (Kimi, Grok, Mistral and more) to take a seat with its own model picker, so that the panel is not limited to four vendors. Acceptance:
    • Given a provider with a Vault key, when I add a seat, then I can pick it and one of its models.
    • Given a provider without a key, when I add a seat, then it is shown as unavailable rather than failing mid-debate.

F10.3 Long-debate performance — TT-T156 — MS-147

  • S10.3.1 Smooth long debates — TT-T157 — MS-147 As a user, I want a 500-message debate to scroll and load smoothly, so that long debates stay usable. Acceptance:
    • Given a 500-message transcript, when I scroll, then it stays smooth because the list is virtualized.
    • Given a reload, when static assets load, then they come from cache and responses are compressed.

E11. Maintainable core — TT-T158 — MS-147

Chat.razor is split into components, the orchestration is tested and end-to-end runs need no spend; then the 3.0 release (plan 3.1, 3.2).

F11.1 Tested round loop — TT-T159 — MS-147

  • S11.1.1 Round loop under tests — TT-T160 — MS-147 As a maintainer, I want Chat.razor split into components and the round loop, resume, vote injection and limits in services with NUnit tests, so that the core debate behaviour is covered without a browser. Acceptance:
    • Given the split, when the solution builds, then Chat.razor holds no orchestration logic.
    • Given the new tests, when /test runs them, then the round loop, resume, vote injection and limits are covered.

F11.2 End-to-end tests — TT-T161 — MS-147

  • S11.2.1 Spend-free end-to-end tests — TT-T162 — MS-147 As a maintainer, I want end-to-end tests that drive sign-in and a debate against a fake Legion provider at phone and desktop sizes, so that the whole app is checked without spending a cent. Acceptance:
    • Given the fake provider, when /test runs the end-to-end suite, then sign-in, a debate, a vote and export pass at both viewport sizes.

F11.3 Polish and release 3.0 — TT-T163 — MS-147

  • S11.3.1 ThinkTank 3.0 release — TT-T164 — MS-147 As the owner, I want ThinkTank 3.0 polished, documented and deployed, so that the finished ThinkTank is what I run. Acceptance:
    • Given every 3.0 story is closed, when Release is deployed from the run menu, then it starts from R:\MindAttic\Apps\ThinkTank\Release.
    • Given the docs, when read, then overview, BIBLE, SPEC and USER_STORIES describe 3.0 with no stale statement.
    • Given the owner runs the 3.0 flows, when satisfied, then they sign off the 3.0 milestone.

5. Non-functional requirements

  • Platform: .NET 10, Blazor Server, Windows, local SQL Server (auth schema and LlmUsage), local key ring folder.
  • Cost safety: every cap (participants, rounds, tokens, runs at once, daily calls, rate limits) is enforced on the server and is a Vault setting; every LLM call is recorded.
  • Security: sign-in required for everything but the sign-in pages and /healthz; no key in the repo, in a stored conversation or in a log line.
  • Reliability: runs cancel at once; corrupt settings or logs never crash a load; failed log writes never abort a turn.
  • Testing: offline NUnit tests (and spend-free end-to-end tests by 3.0), run only on /test.

6. Interfaces and dependencies

  • Platform owners (docs/ECOSYSTEM.md): LLM calls, votes and usage — MindAttic.Legion; credentials and settings — MindAttic.Vault; sign-in — MindAttic.Authentication; logging — MindAttic.Log; UI controls — MindAttic.Components (TT-T148 requires M.COMP-T262); shipping — the shared run menu.
  • Uses: MindAttic.Legion (every LLM call and votes), MindAttic.Vault (keys and settings), MindAttic.Authentication (sign-in), MindAttic.Log (logging, MS-19), MindAttic.Components (UI, MS-147), the shared run menu (deploy to R:).
  • Used by: nothing; it is an end-user app.

7. Release sequence

  1. MS-19 ThinkTank local 1.0 (active, docs/RELEASE.md): E4 local-first runtime, E5 observability and core tests.
  2. MS-145 ThinkTank 2.0: live debates with verdicts (planned): E6 live debates, E7 verdicts and personas, E8 first run, ending with F8.2 polish and release.
  3. MS-147 ThinkTank 3.0: finished (planned): E9 one accessible UI, E10 keep and extend, E11 maintainable core, ending with F11.3 polish and release. Reaching it finishes the product.

8. Change log

Date Change to scope Ticket
2026-11-30 Specification written from the BIBLE, USER_STORIES, RELEASE charter, improvement plan, code and ticket history; plan Phases 2-3 became MS-145 and MS-147; hosting-only items moved to Never MAT-T384
2026-11-30 MAT-T462 source-to-sea pass: 9 renamed; root task TT-T81 seated under F4.2 (TT-T85); MS-145 epics require E4 (TT-T82), MS-147 epics require the 2.0 release (TT-T145); UI re-pointed to MindAttic.Components (TT-T148 requires M.COMP-T262); seatable providers follow Vault's catalog (TT-T155 related M.VALT-T200) MAT-T469
Part of ThinkTank.
From ThinkTank/docs/SPEC.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.