docs: retrofit domain docs to GLOSSARY.md and chronological ADRs
Publish documentation / publish (push) Successful in 29s

Align domain documentation with the mattpocock-skills v1.3.1 format.

- GLOSSARY.md (Italian) replaces CONTEXT.md and describes the implemented
  system (Phase F1–F8, Gate, Reviewer widget). The unimplemented 2026-08-23
  modular-workflow vocabulary (Workflow Kernel, Stage, Module outcome,
  Extension point, Question Admission, ...) is removed.
- docs/adr/ renumbered chronologically, in English, with status/date
  frontmatter. Retroactive decisions recovered from deleted specs and the
  Evidence ADRs deleted in a54d4769 are restored.
- docs/agents/domain.md regenerated; references updated across docs.

New ADRs:
  0001–0016  retroactive decisions, 2026-06-25 → 2026-08-20
  0017–0024  Evidence ADRs of 2026-08-24 (old 0001–0008, deleted in a54d4769)

Renumbered ADRs (old → new):
  0001 → 0025  postgres-metadata-catalog
  0002 → 0026  workspace-database-secret-references
  0003 → 0027  installation-local-database-bindings
  0004 → 0028  fastify-kysely-metadata-catalog
  0005 → 0029  hard-delete-catalog-tables-during-synchronization
  0006 → 0030  separate-physical-and-logical-relationships
  0007 → 0031  durable-authoritative-schema-synchronization
  0008 → 0032  allow-manual-catalog-metadata-cleanup
  0009 → 0033  use-one-sequential-description-generation-run
  0010 → 0034  allow-bounded-real-source-samples-for-description-generation
  0011 → 0035  gate-source-samples-with-a-sensitive-data-flag
  0012 → 0036  use-the-catalog-as-the-logical-relationship-authority
  0013 → 0037  use-one-installation-model-catalog-with-runtime-projections
  0014 → 0038  assess-sensitive-columns-locally-from-source-content
  0015 → 0039  use-progressive-sampling-for-sensitive-columns
  0016 → 0040  use-postgres-metadata-for-all-core-consumers
  0017 → 0041  separate-reference-vectors-from-runtime-memory
  0018 → 0042  use-postgres-for-memory-and-qdrant-for-retrieval
  0019 → 0043  author-evidence-in-app... → maintain-local-evidence-with-external-editors
  0020 → 0044  unify-administration-pages-and-use-namespaced-routes
  0021 → 0045  separate-shell-modes-and-replaceable-portal-adapter
  0022 → 0046  separate-ui-locale-from-session-interaction-language
  0023 → 0047  separate-delivery-operations-from-finalized-sessions

Commits and Gitea issues before this commit cite the old numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-10-17 22:23:25 +02:00
co-authored by Claude Opus 5.5
parent 3222713ec6
commit 8bd1f3e793
75 changed files with 1327 additions and 1078 deletions
@@ -1,26 +0,0 @@
# PostgreSQL come autorità dei metadati dei database dei workspace
ThothII userà un Metadata Catalog PostgreSQL interno per conservare, per ogni workspace, la
struttura fisica acquisita interrogando il relativo database e i metadati semantici generati con
l'AI. Ogni Workspace Database conserverà un `workspace_id` obbligatorio e univoco: questo realizza
l'associazione uno-a-uno senza introdurre nel catalogo una tabella Workspace o una foreign key SQL.
Identità e lista dei workspace resteranno autorevoli in `thoth-workspaces.yaml`; il servizio
validerà il riferimento contro quel catalogo. `schema/annotations.yaml` verrà sostituito come input
del core in uno step successivo; l'interfaccia e il lifecycle amministrativi resteranno separati dal
workflow NL→SQL.
## Considered Options
- Conservare `annotations.yaml` come fonte di verità avrebbe mantenuto il revisionamento Git, ma
non avrebbe fornito il CRUD e il processo di introspezione/generazione richiesti.
- Leggere metadati mutabili dal catalogo senza un confine esplicito avrebbe accoppiato il workflow
alla disponibilità del nuovo servizio e consentito viste parziali durante gli aggiornamenti.
## Consequences
PSD importerà le annotations esistenti; gli altri workspace genereranno i metadati da zero. Il
cutover futuro dovrà sostituire consapevolmente i consumatori delle annotations e verificarne
l'equivalenza semantica. PostgreSQL può garantire che uno stesso `workspace_id` non sia assegnato a
due database, ma l'esistenza del workspace e la gestione di rename o rimozioni restano responsabilità
del confine applicativo con il catalogo YAML. Le sessioni di test esistenti non sono un vincolo di
migrazione.
@@ -0,0 +1,20 @@
---
status: accepted
date: 2026-06-25
---
# Run the agent through Pi RPC with a gate extension
The model runs inside Pi in `--mode rpc`, one child process per session. Human review is enforced
by a gate extension inside Pi (`harness/.pi/extensions/tht-gate.js`) that emits widget descriptors
through Pi's extension UI requests; the backend only translates those requests and the reviewer's
responses between Pi and the browser and implements no gate logic of its own. The gate,
anti-bypass and kickoff logic came from ChironeWp3 and already relied on Pi's extension and RPC
contract; reimplementing them in the backend would have meant rewriting the most delicate part of
the workflow from scratch.
## Consequences
Every reviewer interaction is a JSON widget descriptor, so the browser, not a terminal, is the
primary reviewer surface (see ADR-0009 for native terminal rendering). Pi upgrades are a direct
dependency of the review contract.
@@ -0,0 +1,21 @@
---
status: accepted
date: 2026-06-25
---
# Keep workflow state in harness phase documents
The harness owns the NL→SQL workflow and all of its persistence. A session is a manifest, one
document per phase (`question.md`, `schema_linking.json`, `sql_final.sql`, …) and an append-only
decision ledger; there is no stored transcript, and a resumed Pi process rebuilds its context from
those documents. The workflow is a linear sequence of phases declared in `harness/workflow.yaml`,
and the current phase is never stored: it is an integer derived by folding the ledger. This keeps
the ChironeWp3 session model, whose append-only ledger was its most reliable part, and makes
resumption independent of chat history.
## Consequences
What is not recorded in a phase document or in the ledger did not happen. Phase logic must be read
from the fold, not from a field, and adding parallel or optional branches would require a different
model than the linear workflow. Where sessions are stored changed later (ADR-0011); this ownership
did not.
@@ -1,19 +0,0 @@
# Riferimenti al secret store per i Workspace Database
Il Metadata Catalog non conserverà credenziali o chiavi dei Workspace Database. Riuserà il secret
store cifrato già posseduto da ThothII e conserverà soltanto riferimenti ai requisiti segreti del
workspace, evitando un secondo vault e impedendo che API, esportazioni o log espongano i valori.
## Considered Options
- Copiare i campi testuali del modello ThothAI avrebbe semplificato il CRUD, ma avrebbe conservato
password e passphrase in chiaro.
- Introdurre subito un secondo vault avrebbe separato il catalogo dal runtime workspace, ma avrebbe
duplicato cifratura, rotazione, autorizzazioni e procedure operative senza un'esigenza distinta.
## Consequences
Il catalogo e il runtime condividono l'identità dei requisiti segreti, mentre permessi e API del
catalogo restano separati. Sostituzione e cancellazione di un Workspace Database dovranno definire
esplicitamente il lifecycle dei relativi riferimenti senza includere i valori nelle transazioni del
catalogo PostgreSQL.
@@ -1,26 +0,0 @@
# Binding di database specifiche dell'installazione
Il Metadata Catalog separa il Workspace Database logico dalla Database Binding che lo rende
raggiungibile in una specifica installazione. Esiste un solo Workspace Database per `workspace_id`
e una sola binding attiva nel catalogo di ciascuna installazione; per esempio PSD usa REST in locale
e PostgreSQL diretto sul server senza diventare due database distinti.
Nel modello finale il catalogo è autorevole per engine, nome fisico, schema, capability e binding,
mentre `thoth-workspaces.yaml` conserva l'identità del workspace. Gli attuali campi DWH dei
descriptor sono una sorgente di bootstrap da importare e confrontare durante un cutover esplicito,
non una seconda fonte di verità permanente.
## Considered Options
- Conservare un record database per ogni trasporto avrebbe duplicato identità, struttura e
metadati dello stesso DWH fra locale e server.
- Conservare permanentemente i dati DWH sia nello YAML sia nel catalogo avrebbe introdotto
conflitti non risolvibili deterministicamente.
- Rendere globali le binding avrebbe mescolato endpoint e credenziali che appartengono a
installazioni con topologie e confini di sicurezza differenti.
## Consequences
La lista amministrativa unisce workspace YAML, database configurati e record orphaned. Il cutover
deve importare e confrontare la configurazione esistente prima di rimuoverla dai descriptor; il
runtime non deve osservare simultaneamente due autorità discordanti.
@@ -0,0 +1,18 @@
---
status: accepted
date: 2026-06-25
---
# Keep the workflow CLI in Python
The deterministic workflow logic (introspection, value sampling, LSH and RRF search, schema
linking, SQL validation and preview) lives in a Python CLI inside the harness, ported from
ChironeWp3, and the gate calls it through `bash`. The Node backend does not reimplement it. Porting
the existing SQLAlchemy, LSH and schema-linking code was less risky than a TypeScript rewrite, and
it kept drivers such as Informix, which have no usable Node driver, available.
## Consequences
The harness has two runtimes (Python and the JavaScript gate), and the CLI's `--json` output is a
machine contract between them and the backend. The backend later gained its own database access
for the Metadata Catalog (ADR-0028); the NL→SQL workflow logic remains in Python.
@@ -1,22 +0,0 @@
# Metadata Catalog nello stesso backend con Kysely
Il Metadata Catalog vive nello stesso processo Fastify come modulo isolato, invece di introdurre un
microservizio. Usa il driver `pg` già presente attraverso Kysely per query, transazioni e migrazioni
tipizzate; route, repository, service, readiness e diagnostica restano separati dal workflow e
l'indisponibilità del catalogo non rende indisponibili sessioni o SSE.
## Considered Options
- Un microservizio avrebbe conservato letteralmente il backend bridge senza database, ma avrebbe
aggiunto deployment, autenticazione e failure mode per un solo contesto amministrativo.
- Usare soltanto `pg` avrebbe evitato una dipendenza, ma avrebbe richiesto infrastruttura locale per
transazioni, tipi delle righe, ordinamento e locking delle migrazioni.
- Drizzle o Prisma avrebbero aggiunto schema DSL, generatori e toolchain non necessari a un servizio
che vuole mantenere SQL e constraint PostgreSQL espliciti.
## Consequences
Il backend possiede una connection pool del catalogo e la chiude con il lifecycle Fastify. Le
migrazioni timestampate sono compilate insieme al backend ma vengono eseguite soltanto da
`catalog:migrate`, con credenziali migrator separate dal ruolo DML usato a runtime. Il modulo resta
dietro un'interfaccia repository per mantenere unit test e route test indipendenti da PostgreSQL.
@@ -0,0 +1,20 @@
---
status: accepted
date: 2026-06-25
---
# Tear down later artifacts when reopening a phase
When the reviewer returns to an earlier phase, every choice made after that point is forgotten and
the artifacts produced by later phases are deleted. `tht phase reopen` first appends
`phase_reopened` to the ledger and then removes the later artifacts; the ledger itself stays
append-only, and an effective view excludes decisions made stale by the reopen. ChironeWp3 only
appended the reopen decision, so stale artifacts and decisions survived and could block
finalization (for example orphan CTEs); a rollback that leaves inconsistent state was judged worse
than none.
## Consequences
Helpers must read the effective view, never the raw ledger. The ledger-first order means a crash
can leave a reopened session with stale files, which later steps must tolerate, but never later
artifacts without the reopen that invalidates them.
@@ -0,0 +1,12 @@
---
status: superseded by ADR-0010
date: 2026-06-25
---
# Run all layers on the operator workstation
The first release runs frontend, backend and harness on the operator's own machine over localhost,
like a desktop application with a browser UI, while the data warehouse and vector store stay
central and are reached over REST. This matched how operators worked on dedicated workstations
with ChironeWp3. Keeping three separate layers even on one machine was meant to allow a later move
to a central web application without changing the contracts.
@@ -0,0 +1,12 @@
---
status: superseded by ADR-0013
date: 2026-06-25
---
# Share a central vector store through reader and writer keys
The pgvector store stays central and is exposed over REST through two allow-listed endpoints with
distinct API keys: a reader key for search and an optional writer key that can only upsert records
and read hashes, never delete. A targeted `memory save-one` upsert lets a remote workstation save
the Memory it just created without a full server-side resync. The split let remote workstations
write Memory without receiving a key that could clear the shared store.
@@ -0,0 +1,12 @@
---
status: superseded by ADR-0015
date: 2026-06-25
---
# Select authentication from none, mock or OIDC
Authentication is chosen by configuration: `none` (a fixed local user, the primary mode for a
single-operator workstation), `mock` (a static user from a header, for tests) or standard `oidc`.
Sessions record the authenticated user as their author. One OIDC code path covers both an external
identity provider and a later central deployment, while `none` keeps the harness and its tests
independent of authentication.
@@ -0,0 +1,11 @@
---
status: superseded by ADR-0012
date: 2026-06-25
---
# Define workspaces as harness YAML
Each workspace (relational database, vector store, Evidence and embeddings) is a YAML file under
`harness/workspaces/`, with secrets kept in `.env` and referenced as `${VAR}`. Loading is isolated
in one harness module so that a later storage change touches only that boundary. This followed
ChironeWp3 and kept workspaces versionable and testable.
@@ -0,0 +1,18 @@
---
status: proposed
date: 2026-07-04
---
# Render gate widgets natively in the Pi terminal
When Pi runs interactively, the gate could render reviewer widgets with Pi's native terminal
primitives (`select`, `confirm`, `editor`) instead of printing the JSON widget descriptor, while
RPC mode keeps emitting descriptors for the browser. The discriminator is `ctx.mode === "tui"`;
`ctx.hasUI` cannot be used because it is also true in RPC mode on current Pi releases. A feasibility
review found the approach supported by Pi, but only the `ctx.mode` guards for terminal-only notices
were implemented; in a terminal the gate still shows raw JSON.
## Consequences
If accepted, every widget kind needs a terminal mapping with the same response shape as the RPC
path, including multi-select and invalid-choice handling, and both paths need round-trip tests.
@@ -0,0 +1,18 @@
---
status: accepted
date: 2026-07-11
---
# Ship two invariant application images
ThothII is distributed as two application images: `core` (backend, harness, Pi and the workflow
CLI) and `frontend` (the React build and its reverse proxy). The same images run on the server that
hosts the data warehouse, on a standalone server and on a PC or Mac. Differences between those
targets are expressed only through adapters, configuration and deployment profiles, never through
workflow variants or differently built images. This replaces the workstation-only model of
ADR-0005.
## Consequences
Customer paths, credentials and certificates never enter an image or the portable Compose files;
they are supplied by installation-local configuration and secrets.
@@ -0,0 +1,19 @@
---
status: accepted
date: 2026-07-16
---
# Store sessions per principal
A session belongs to an authenticated principal identified by `(issuer, subject)`, never by email
or username. On a server, sessions, artifacts, the decision ledger and preferences are stored in a
private PostgreSQL schema protected by forced row-level security, a runtime role without
`BYPASSRLS` and a transaction-local actor context; database failures fail closed. A local
installation keeps them on the filesystem, with no fallback or synchronization between the two.
Only artifacts and the ledger are durable: chat and SSE remain runtime memory, as required by
ADR-0002.
## Consequences
Users in the configured administrators group can manage every session; any other unauthorized
access returns 404. Sessions get no embeddings or vector columns.
@@ -0,0 +1,20 @@
---
status: accepted
date: 2026-08-03
---
# Keep workspaces in a Git registry with pinned revisions
Workspace definitions live as versioned YAML in a generic remote Git repository, independent of
any particular data warehouse, vector store or Git hosting provider. Each installation keeps a
persistent local checkout, resolves its own connectivity through local variables and secret files,
and exchanges changes by pull and push. Every new session is pinned to an immutable workspace
revision, and the installation keeps working from its last valid snapshot when the remote is
unavailable. This replaces harness-local YAML (ADR-0008) so that the same logical workspace can be
used by several installations.
## Consequences
Secret values never enter the repository. The workspace descriptor was later narrowed to identity
and Evidence: database facts moved to the Metadata Catalog (ADR-0025, ADR-0040) and model facts to
the installation (ADR-0037).
@@ -0,0 +1,19 @@
---
status: accepted
date: 2026-08-08
---
# Run Qdrant and Ollama inside the installation
ThothII owns its semantic infrastructure: every deployment includes a private Qdrant vector store
and a private Ollama embedding service as mandatory Compose services, reachable only on the
internal network. Qdrant replaces pgvector as the only vector store, and Ollama replaces
workspace-selected external embedding endpoints, with `qwen3-embedding:0.6b` (1024 dimensions,
CPU-viable, multilingual) as the required model. The data warehouse remains external and
read-only. This replaces the shared vector store of ADR-0006.
## Consequences
Vector indexes are derived data that each installation must build through preprocessing. One
collection per workspace initially held schema, Evidence and Memory points; ADR-0041 later split
reference and memory collections.
@@ -0,0 +1,21 @@
---
status: accepted
date: 2026-08-15
---
# Use one tht command name for host and core
The only product command is `tht`, and the name covers two programs: a native Go binary on the host
for installation, lifecycle, authentication and diagnostics, and the Python workflow CLI inside
`core` used by Pi, the gate and the backend. `thothctl` was removed without an alias or
deprecation period. The host binary needs no Go, Python or virtualenv on macOS, Linux or Windows;
the Python CLI is never installed on the host or shown in operator help.
## Considered Options
- A separate name such as `tht-runtime` for the inner CLI was rejected to keep one product name.
## Consequences
Commands called by Pi, the gate or the backend are machine contracts: their semantics, pristine
`--json` output, stdin handling and exit codes do not change to simplify operator help.
@@ -0,0 +1,19 @@
---
status: accepted
date: 2026-08-16
---
# Authenticate with local accounts or OIDC
Production authentication is either `local` (passwords hashed with Argon2id, optional "remember
me" sessions) or provider-neutral `oidc`. OIDC must return a `groups` claim in the ID token as a
JSON array; a missing or malformed claim fails authentication instead of granting ordinary access.
Groups map to ThothII roles in installation configuration, and each mapped group must be proven to
exist through a provider-specific catalog adapter, initially Authentik. The browser receives only
an opaque `HttpOnly` session cookie and never stores tokens. `none` and `mock` are test-only. This
replaces ADR-0007.
## Consequences
`upstream`, where a trusted proxy injects identity headers, was kept as a migration adapter. It
became the integration path for Omics Portal (ADR-0045).
@@ -0,0 +1,19 @@
---
status: accepted
date: 2026-08-20
---
# Issue one revocable DWH REST key per installation
The single shared `X-API-Key` protecting the data warehouse REST route is replaced by one random
256-bit key per ThothII installation, independently rotatable, optionally expiring and revocable.
A separate `dwh-auth` service checks the key through Nginx `auth_request` against a protected
file-based registry. It is optional server infrastructure that lives in this repository but is not
started by `tht`, and the client protocol is unchanged.
## Considered Options
- Extending the portable `tht` CLI would distribute server-only administration code to every
workstation, although the route has its own lifecycle.
- A manual Nginx key map encourages plaintext keys and makes rotation and revocation unreliable.
- SQLite would add a dependency, migrations and backups without benefit at this registry size.
@@ -0,0 +1,12 @@
---
status: superseded by ADR-0043
date: 2026-08-24
---
# Use workspace activation as the Evidence publication boundary
Curated Evidence becomes Published Evidence only when it is valid, belongs to the
active workspace revision, and belongs to the atomically published Evidence generation.
Human Git review remains required before activation, but its approval is not duplicated
as mutable state in the Evidence manifest; this keeps Git and the workspace registry as
the existing sources of truth instead of introducing a second approval mechanism.
@@ -0,0 +1,13 @@
---
status: accepted
date: 2026-08-24
---
# Keep Evidence identifiers independent from kind
An Evidence Unit keeps the same identifier when its kind is corrected or its Source
Evidence is unambiguously renamed; kind remains a separate validated field. This avoids
breaking citations and evaluation fixtures for a classification change, while genuine
semantic splits receive new identifiers so independent units never share an identity.
Identifiers use `evidence:<slug>`, are assigned once, persisted in the manifest and are
never recomputed automatically from mutable titles, paths or content hashes.
@@ -1,152 +0,0 @@
---
status: accepted
date: 2026-09-08
---
# Maintain local Evidence with external editors and manual consolidation
Evidence management must provide complete access to registered Evidence and a
maintenance path, as accepted in Q11–Q15 and revised during simplification. The owner subsequently
clarified that a context specialist writes drafts independently of the installation
and without PostgreSQL access; the system refines and stores them locally for use
and maintenance. Implementation is pending.
The storage mechanics of Q11 were revisited in the
[simplification review](../plans/2026-09-08-memory-evidence-simplification-review.md).
The original choice combined the workspace repository as Evidence authority with
application-managed Git writes. The owner accepted the separation of external draft
files/repositories from a durable local canonical file archive and removes
commit/push from normal CRUD. The management surface must expose discoverable,
editable Markdown for domain specialists, without JSONL editing. The owner chose
external editors for release 0: their preferred Mac/PC editor or vim/nano on the
server. No web editor or content form is required. The page keeps browsing,
filtering, and detail, with actual host file paths and maintenance instructions.
The owner also requested manual consolidation followed by manual Git diff, commit,
and push, relying on operator discipline rather than automation. The owner accepted
the remaining simplifications and requested explicit clarification of the core
format change and the simple terminal-based Git check. The original application Git writer
is not the final implementation prescription. A suggestion
to move Evidence authority into PostgreSQL was withdrawn after the clarification.
Memory remains a distinct module with its own PostgreSQL authority under
[ADR 0018](0018-use-postgres-for-memory-and-qdrant-for-retrieval.md).
## Manual consolidation and Git follow-up
The external-editor decision replaces the form's single Save with saving files and
running one consolidation command. The command checks expected structure, required
fields, types, identifiers, references, and provenance. It reports the affected file
and the necessary correction. Invalid input stops activation; valid input updates
derived metadata, the corpus, and the Evidence index. New and deleted files use the
same path. An inaccessible archive must not be interpreted as deleted Evidence.
Structural validation does not prove semantic correctness or rerun model refinement
to rewrite manually edited rules.
The core reads only successfully consolidated active content, never the editable
working files directly. Candidate validation and activation must preserve the last
valid corpus on failure, or report unavailability if its integrity cannot be
guaranteed. Unconsolidated edits must not mix new text with old retrieval data.
Consolidation reports full local success only once the updated content is available
to the core. If persistence succeeds but activation fails, the command reports the
partial outcome and can be rerun without duplicating units or losing edits.
The operation does not imply atomicity across
authoritative storage and Qdrant; their failure and recovery behavior requires
explicit implementation. An interrupted operation must not leave a partial corpus
advertised as ready for subsequent use.
The maintained archive is a persistent Git working tree containing the local
Evidence; it may reuse the workspace repository. Draft sources and curated units
remain distinct even when in the same repository. Setup and the page identify the
repository, working tree, actual host paths, branch, and configured remote. A
rebuildable runtime snapshot is not the editing location.
Before consolidation, the operator checks Git status, including inspection of new
untracked files. Normal terminal Git diff commands are available for line-level
inspection when needed; no custom viewer or mandatory double review is required.
After consolidation, the operator stages the Evidence and required metadata changes,
commits, and pushes using normal Git commands. No watcher, automatic Git writes, retrying push, pull, merge,
or dedicated web execution control is required. Missing credentials, unconfigured
upstreams, and Git conflicts are handled by the operator.
Consolidation activates local changes before commit/push. If the operator omits the
Git steps or push fails, the local update remains effective while transfer to the
remote is incomplete. Pushing does not automatically update other installations.
The system relies on operator discipline to complete the sequence; it does not add
a separate editorial publication state machine or require a second reviewer.
Approved conflict repairs from the core still call the same persistence and
activation service directly. They do not require an external editor or manual
consolidation before the session can use its own approved correction. Their local
file changes are included in the operator's subsequent Git maintenance.
## Administration without concurrent core work
The owner's simplification instruction replaces the earlier Q12 requirement to
refresh open sessions after administrative edits. Core activity can be assumed
absent during administration, or its overlap can be ignored. No dedicated live
update, session notification, restart, maintenance mode, or reader coordination
is required. Completed administrative changes apply to subsequent work.
Deliberate writes from the workflow itself still exist: approved conflict repairs
and the final Memory summary use the same persistence services and handle their
outcome before proceeding. In particular, a session must be able to use its own
approved Evidence correction. This does not require updating all other sessions
or rewriting previously approved decisions, artifacts, or SQL.
## Manual corrections survive source updates
When an updated source contradicts an administrator's correction, the saved manual
Evidence remains active. Evidence management shows the conflicting content for an
explicit decision and subsequent save. The source's newer content does not
automatically override the correction. The owner accepts that the manual rule can
remain in use until that comparison is resolved.
Deleted Evidence must not silently reappear after preparation or reindexing. The
authoring implementation must preserve both manual corrections and suppression of
deleted units through source refreshes. The current protection for uncommitted Git
changes is insufficient: it does not preserve already committed manual corrections
against regeneration, and retirement currently removes the unit without recording
suppression for later preparation.
## Manual creation and explicit source refresh
Administrators can create Evidence without providing an external document. In R0,
they add Markdown using the documented example and consolidate it. The application
records a manual declaration as the managed source of the current statement.
Explicit consolidation approves that declaration; it does not
claim independent documentary verification.
A correction that changes a unit's meaning uses the same explicit manual origin.
The original document remains linked for provenance and source-change detection,
but its excerpt is not presented as support for a rule it does not contain. The
canonical contract must distinguish the current supporting source from the original
document rather than silently retaining outdated support metadata.
External sources are reacquired only when an administrator requests a source
refresh. Ordinary saves and session lookups use the acquired local content; they
do not poll sources or fetch their current versions. A remote change is therefore
detected at the next requested refresh, when the manual-precedence rule applies.
The revised storage recommendation reads the specialist's repository as an input;
ordinary local edits do not write back to it or refresh its content automatically.
## Implementation consequences
The existing [Evidence lifecycle](../evidence.md) and
[Workspace Evidence v3 contract](../contracts/workspace-evidence-v3.md) require
explicit evolution for editable local Markdown, manual consolidation, and manual
precedence. Source provenance and coherent canonical metadata remain requirements;
manual changes must not be presented as statements supported by an unrelated source
excerpt. Under the accepted local-file direction, curated files are primary
installation data preserved by Clear and backed up separately from rebuildable
indexes. Visible Markdown content must become authoritative for editing; operators
must not maintain hidden duplicate text, hashes, or manifest entries themselves.
This is a core Evidence contract change: parser, renderer, authoring, validation,
normalization, and their integration with indexing and recall must be adapted
together. E1 includes a new Curated unit format version, conversion of existing
Evidence, reindexing, and end-to-end verification that visible edits reach core
consumption. Preserve the internal typed model where possible; the change does
not require redesigning the NL-to-SQL workflow phases.
Local edits do not automatically change external drafts or another installation;
Git versioning and transfer occur through the explicit manual follow-up.
The [Evidence management project](../plans/2026-09-08-evidence-management.md)
records the implementation sequence and acceptance checks.
@@ -0,0 +1,12 @@
---
status: superseded by ADR-0043
date: 2026-08-24
---
# Evaluate candidate Evidence before activation
Evidence preprocessing builds a candidate vector generation and runs the workspace's
versioned evaluation set against that exact generation before atomically activating it.
The workspace revision may temporarily have no matching active Evidence during this
maintenance window, which is accepted as fail-closed degradation instead of introducing
a distributed transaction across Git, the workspace registry and Qdrant.
@@ -0,0 +1,11 @@
---
status: accepted
date: 2026-08-24
---
# Treat Formula Evidence as a composable SQL expression
Formula Evidence contains one validated PostgreSQL expression with declared input
columns, not a complete query or statement. This makes formulas safely composable by
SQL generation; complete documented queries remain Example Evidence, and incompatible
legacy formulas require human review during migration.
@@ -0,0 +1,22 @@
---
status: accepted
date: 2026-08-24
---
# Let Evidence contribute to workflow phases
The Evidence Module contributes to the existing workflow phases; it is not a visible phase of its
own. Clarification, rewriting, schema linking, CTE and final SQL query it with their corresponding
purpose; Memory remains owned by the Memory Module and synthesis performs no Evidence search. Each
phase searches independently and the workflow records only a minimal receipt containing phase,
purpose, vector generation and returned Evidence IDs.
A successful search may return no matches and does not block the phase. Technical unavailability
is a distinct typed outcome that blocks the calling phase until retry, without stale-generation or
purpose fallback. This favors an explicit temporary stop over silently treating a broken Evidence
dependency as absence of domain knowledge.
## Consequences
Curated Evidence v4 later reduced the declared purposes to `disambiguation`, `rewriting`,
`schema_linking` and `sql_generation`.
@@ -1,101 +0,0 @@
# ADR 0021 — Shell separati e adapter sostituibile per il portale
- Stato: accettato
- Data: 2026-09-13
## Decisione
ThothII espone due modalità di installazione, selezionate da `shell.mode`:
- `embedded` (default): ThothII è ospitato da Omics Portal. Non renderizza alcun header e
riceve dal portale lingua, tema e fullscreen. L'accesso resta verificato dal server.
- `full`: ThothII è autonomo. Renderizza il proprio header, con selettore lingua, tema,
fullscreen e nome utente. Il click sul nome apre il logout. Non mostra mai la rotellina o
altri comandi amministrativi del portale. Mantiene un rail vuoto a sinistra di almeno 20 px.
Il fatto che la shell sia `full` è distinto dallo stato `fullscreen`: la prima decide quale
contenitore viene renderizzato, il secondo indica se è attiva la Fullscreen API del browser.
L'icona passa da “entra in fullscreen” a “torna alla modalità normale”; anche `Esc` aggiorna lo
stato visualizzato.
La configurazione installata resta semplice e retrocompatibile. Sul Mac di sviluppo il profilo
locale userà:
```yaml
shell:
mode: full
defaultLocale: en
```
Il deploy sul server userà invece:
```yaml
shell:
mode: embedded
adapter: omics-portal
```
`defaultLocale` indica la lingua iniziale della shell full; in embedded la fonte autorevole resta
il portale.
L'adapter è l'unico confine tra ThothII e il portale. La sua interfaccia pubblica è volutamente
profonda e minima: consegna solo snapshot dello stato, senza esporre comandi, token, identità o
dettagli di trasporto.
```ts
export type HostShellState = {
locale: string; // BCP-47, inizialmente it/en
theme: "light" | "dark";
fullscreen: boolean;
};
export interface PortalAdapter {
subscribe(
onState: (state: HostShellState) => void,
onError: (error: Error) => void,
): () => void;
}
```
`OmicsPortalAdapter` è l'implementazione corrente. Un adapter per un altro portale potrà
sostituirlo senza modificare shell, i18n o workflow. In `full` l'adapter non viene istanziato:
lo stato è gestito internamente dalla shell.
Per l'integrazione oggi operativa, che monta la SPA direttamente nel DOM di Omics Portal,
l'adapter legge la lingua effettiva dal selettore Omics, osserva l'attributo del tema e ascolta
il fullscreen del documento. Selettori e osservatori restano privati dell'implementazione Omics.
La lingua segue il normale ricaricamento Django; tema e fullscreen cambiano nella pagina aperta.
La revisione approvata del 2026-09-13 elimina il precedente handshake a eventi: non servono
messaggi personalizzati, versioni di trasporto o timeout di avvio. Un futuro adapter potrà usare
un diverso trasporto senza modificare l'interfaccia applicativa.
Se `shell` o l'adapter embedded sono omessi, si usa `embedded` con `omics-portal`. Questo default
supporta il documento Omics esistente; nomi adapter sconosciuti o dati host mancanti producono
un errore esplicito, senza attivare la shell full.
## Confini che restano invariati
L'identità e l'autorizzazione del backend non vengono ricostruite nel browser. In embedded,
Omics Portal continua a gestire login e logout e la catena server-side `auth_request` continua a
fornire i principal header già previsti. Lo stato UI non dichiara l'utente autenticato: il modulo
di accesso usa la verifica backend esistente anche alla riconnessione e al ritorno alla pagina.
Un rifiuto su una singola operazione non equivale automaticamente alla perdita dell'accesso.
La lingua UI e la lingua di interazione con il modello restano separate dalla lingua del
workspace; il relativo contratto è in [ADR 0022](0022-separate-ui-locale-from-session-interaction-language.md).
## Alternative scartate
- Duplicare l'header di Omics in embedded: crea due fonti di stato e incompatibilità visive.
- Spargere controlli `if embedded/full` nei componenti: lega ogni pagina al portale.
- Trasmettere utente o token nel bridge: aumenta superficie e accoppia UI e autenticazione.
- Introdurre un protocollo completo request/response: non aggiunge funzionalità richiesta.
- Usare `profile` per distinguere le shell: `profile` descrive la topologia dell'installazione,
non la sua presentazione.
## Conseguenze
La soluzione richiede un adapter nel frontend che osserva il documento condiviso e mantiene la
logica di shell locale a ThothII. Il backend non necessita di un nuovo protocollo di autenticazione
o di una nuova sessione browser. Un nuovo portale deve soddisfare anche il contratto server di
identità fidata: la sola sostituzione della classe UI non sostituisce quel contratto.
@@ -0,0 +1,17 @@
---
status: accepted
date: 2026-08-24
---
# Ground and atomically apply Evidence preparation
Every proposed Evidence Unit carries one to five short supporting excerpts that can be
found in its normalized Source Evidence. The model may reuse only identifiers supplied
for previous units; deterministic application code assigns all new canonical IDs. This
makes provenance and identity mechanically checkable without pretending that automated
validation can replace human semantic review.
Preparation validates the complete changed batch in a temporary area and applies
curated files plus the manifest atomically. A model timeout or invalid response is not
retried automatically and leaves the worktree unchanged. Explicit `evidence resolve`
actions retire or relink units while preserving an ordinary, recoverable Git diff.
@@ -0,0 +1,18 @@
---
status: superseded by ADR-0041
date: 2026-08-24
---
# Add BM25 without rebuilding the shared Qdrant collection
The workspace keeps its existing unnamed dense vector and adds only the sparse `bm25`
vector with IDF through Qdrant's additive vector-schema operation. Only Evidence points
are repopulated with both default dense and BM25 values. Schema, Memory and solved
questions retain their current dense points and are verified before and after the
upgrade.
This replaces the planned destructive conversion to a named `dense` vector. If BM25 is
missing, Evidence preprocessing may add it and verify the resulting schema; session
runtime remains read-only. An incompatible existing BM25 definition fails without
mutation. A candidate failure leaves the additive schema in place while Evidence stays
unavailable, avoiding data loss in the other workflow modules.
@@ -0,0 +1,29 @@
---
status: accepted
date: 2026-08-24
---
# Make hybrid Evidence retrieval deterministic and diagnosable
Dense and BM25 retrieval receive the same deterministic query text. It preserves the
original question and appends nonempty concepts, tables and columns in a fixed order;
question and context receive Unicode NFC, newline canonicalization and outer trimming.
Context values are then deduplicated exactly and sorted, without lowercasing. Case,
punctuation and internal whitespace remain intact. This avoids accidental ranking
changes caused only by metadata ordering, preserves quoted PostgreSQL identifiers and
keeps the two retrieval branches directly comparable.
Evidence fragmentation follows semantic headings, typed fields and paragraph
boundaries. Formulas, value/meaning pairs, mappings, rules and URLs remain atomic. An
atomic element larger than the existing `max_chunk_chars` limit creates the blocking
`atomic_content_too_large` Review item rather than being split mechanically. The limit
applies to the complete rendered text, defaults to 4,000 characters and is not
duplicated by an Evidence-specific setting.
An L0 contract test starts the exact Qdrant image referenced by `compose.yaml` and
proves Italian server-side `qdrant/bm25` ingestion and search in a temporary collection.
There is no FastEmbed or dense fallback for Evidence when that capability is absent.
The versioned evaluation set contains lexical, semantic and mixed queries. Its report
shows dense-only, BM25-only and fused ranks for expected Evidence. Publication remains
governed only by the simple fused top-10 rule; branch ranks and hit@5 are diagnostic.
@@ -0,0 +1,27 @@
---
status: accepted
date: 2026-08-26
---
# Use PostgreSQL as the metadata catalog
ThothII uses an internal PostgreSQL Metadata Catalog to store, for each workspace, the physical
structure obtained by introspecting its database and the AI-generated semantic metadata. Each
Workspace Database carries a mandatory, unique `workspace_id`, which enforces the one-to-one
association without a Workspace table or SQL foreign key; workspace identity and the workspace list
stay authoritative in the workspace descriptors, and the service validates references against them.
The catalog's administrative interface and lifecycle stay separate from the NL→SQL workflow.
## Considered Options
- Keeping `annotations.yaml` as the source of truth would have kept Git versioning, but not the
required CRUD and introspection/generation process.
- Reading mutable metadata from the catalog without an explicit boundary would have coupled the
workflow to the availability of the new service and allowed partial views during updates.
## Consequences
Replacing `schema/annotations.yaml` as the core input is a later, explicit cutover (ADR-0040).
PostgreSQL guarantees that one `workspace_id` is not assigned to two databases, but workspace
existence, renames and removals remain the responsibility of the application boundary with the
workspace descriptors.
@@ -0,0 +1,23 @@
---
status: accepted
date: 2026-08-27
---
# Reference Workspace Database secrets
The Metadata Catalog stores no Workspace Database credentials or keys. It reuses ThothII's existing
encrypted secret store and keeps only references to the workspace's secret requirements, which
avoids a second vault and keeps values out of APIs, exports and logs.
## Considered Options
- Copying the ThothAI text fields would have simplified CRUD but stored passwords and passphrases
in plaintext.
- A second vault would have duplicated encryption, rotation, authorization and operating procedures
without a distinct need.
## Consequences
Catalog and runtime share the identity of secret requirements while catalog permissions and APIs
remain separate. Replacing or deleting a Workspace Database must define the lifecycle of its
references without including secret values in catalog transactions.
@@ -0,0 +1,27 @@
---
status: accepted
date: 2026-08-27
---
# Bind databases per installation
The Metadata Catalog separates the logical Workspace Database from the Database Binding that makes
it reachable in one installation. There is one Workspace Database per `workspace_id` and one active
binding in each installation's catalog: PSD uses REST locally and direct PostgreSQL on the server
without becoming two databases. The catalog is authoritative for engine, physical name, schema,
capabilities and binding; the DWH fields in workspace descriptors are only a bootstrap source,
imported and compared during an explicit cutover.
## Considered Options
- One database record per transport would have duplicated the identity, structure and metadata of
the same warehouse.
- Keeping warehouse facts permanently in both YAML and catalog would have created conflicts with no
deterministic resolution.
- Global bindings would have mixed endpoints and credentials of installations with different
topologies and security boundaries.
## Consequences
The runtime must never observe two disagreeing authorities: the cutover imports and compares
existing configuration before removing it from descriptors.
@@ -0,0 +1,25 @@
---
status: accepted
date: 2026-08-27
---
# Host the Metadata Catalog in the backend with Kysely
The Metadata Catalog lives in the existing Fastify process as an isolated module rather than a
microservice. It uses the existing `pg` driver through Kysely for typed queries, transactions and
migrations; its routes, repository, readiness and diagnostics stay separate from the workflow, and
catalog unavailability does not make sessions or SSE unavailable.
## Considered Options
- A microservice would have kept the backend free of a database, but added deployment,
authentication and failure modes for a single administrative context.
- Plain `pg` would have avoided a dependency but required local infrastructure for transactions,
row types and migration ordering and locking.
- Drizzle or Prisma would have added a schema DSL, generators and toolchain to a service that keeps
SQL and PostgreSQL constraints explicit.
## Consequences
Migrations ship with the backend but run only through `catalog:migrate`, with migrator credentials
separate from the runtime DML role.
@@ -1,5 +1,6 @@
---
status: superseded by ADR-0008
status: superseded by ADR-0032
date: 2026-08-27
---
# Hard-delete catalog tables during synchronization
@@ -1,3 +1,8 @@
---
status: accepted
date: 2026-08-27
---
# Separate physical and logical relationships
ThothII persists each database-declared foreign-key constraint as an immutable Catalog
@@ -1,3 +1,8 @@
---
status: accepted
date: 2026-08-27
---
# Use durable runs for authoritative schema synchronization
All table, column, relationship, and full-schema synchronizations run as durable background
@@ -1,5 +1,6 @@
---
status: accepted
date: 2026-08-28
---
# Allow explicit manual catalog metadata cleanup
@@ -11,6 +12,6 @@ Catalog Relationships; a table selection can remove its Catalog Columns or every
outgoing Catalog Relationship. Each selection is atomic, and a later Schema Synchronization can
rebuild the removed projection from the external schema.
This supersedes ADR-0005's broader invariant that physical membership cannot be edited manually.
This supersedes ADR-0029's broader invariant that physical membership cannot be edited manually.
Synchronization remains authoritative when it runs, while manual cleanup intentionally permits an
incomplete catalog between cleanup and the next successful synchronization.
@@ -1,5 +1,6 @@
---
status: accepted
date: 2026-08-29
---
# Use one sequential description-generation run
@@ -1,5 +1,6 @@
---
status: accepted
date: 2026-08-29
---
# Allow bounded real source samples for description generation
@@ -1,5 +1,6 @@
---
status: accepted
date: 2026-08-30
---
# Gate source samples with a Sensitive Data Flag
@@ -24,7 +25,7 @@ per-column proposals, prompts, raw provider output, or provider diagnostics. Thi
history of the AI attempt, not an audit trail of human flag decisions; reloading discards an unsaved
proposal.
Description generation extends ADR-0010 by sending bounded real values when `sensitive` is false
Description generation extends ADR-0034 by sending bounded real values when `sensitive` is false
and deterministic plausible synthetic values when it is true, without identifying the synthetic
values to the model. The false default deliberately favors the expected stable schemas and the
minority of protected columns: a new column remains eligible for real sampling until a user marks
@@ -1,7 +1,12 @@
---
status: accepted
date: 2026-09-01
---
# Use the Catalog as the logical relationship authority
ThothII stores database-declared foreign keys and user-managed Logical Relationships in separate
Catalog models, as required by ADR-0006, but exposes them through one effective relationship map.
Catalog models, as required by ADR-0030, but exposes them through one effective relationship map.
Physical relationships remain read-only and are refreshed from the database. Logical relationships
are either Generated by deterministic column-name inference or Manual; inference does not call an
AI model and does not inspect source values.
@@ -1,3 +1,8 @@
---
status: accepted
date: 2026-09-02
---
# Use one Installation Model Catalog with runtime projections
ThothII currently declares model availability independently in installation
@@ -12,7 +17,7 @@ Runtime Projections of that catalog. Runtime Model Selection stores only a canon
identity and use-specific controls such as thinking level; endpoint, provider, capabilities, and
credential references remain catalog facts, while secret values remain in protected secret stores.
The metadata-generation helper continues to use LiteLLM independently of Pi, as established by
ADR-0009: unifying model declaration does not unify execution lifecycles.
ADR-0033: unifying model declaration does not unify execution lifecycles.
The migration is intentionally fail-closed. Workspace schema v4 removes `llm_policy` and the
entire redundant `semantic_index`; collection identity is derived from the workspace identity,
@@ -1,5 +1,6 @@
---
status: superseded by ADR-0015
status: superseded by ADR-0039
date: 2026-09-02
---
# Assess sensitive columns locally from source content
@@ -48,8 +49,8 @@ available, and would reintroduce queue latency, non-deterministic judgments, pro
surface, and contention with normal inference. Introducing such a fallback would require a new
decision based on evidence that the NER path is unusable.
This decision supersedes ADR-0011 only where that ADR assigns draft sensitivity suggestions to an
AI using structural metadata. ADR-0011's human authority, transient draft, explicit scope, and
This decision supersedes ADR-0035 only where that ADR assigns draft sensitivity suggestions to an
AI using structural metadata. ADR-0035's human authority, transient draft, explicit scope, and
Sensitive Data Flag remain in force. How description generation uses the flag is outside this
decision.
@@ -1,5 +1,6 @@
---
status: accepted
date: 2026-09-03
---
# Use progressive sampling for sensitive columns
@@ -27,7 +28,7 @@ The HTTP operation has no global analysis deadline. It is canceled when the clie
the backend restarts. Historic and interrupted run records retain the database field named
`unknown` for compatibility, where it counts unprocessed columns rather than a v2 assessment.
This decision supersedes ADR-0014 only for scan effort, coverage semantics, and the assessment
domain. ADR-0014 remains authoritative for the single local TypeScript decision point, the absence
This decision supersedes ADR-0038 only for scan effort, coverage semantics, and the assessment
domain. ADR-0038 remains authoritative for the single local TypeScript decision point, the absence
of generative LLMs, transient human-reviewed drafts, the 500-character rule, and optional CPU-only
NER evidence.
@@ -1,8 +1,13 @@
---
status: accepted
date: 2026-09-06
---
# Use PostgreSQL metadata for all core consumers
The Metadata Catalog in PostgreSQL is the sole authority for every fact about a Workspace Database
used by the core. This completes the cutover anticipated by ADR-0001 and ADR-0003 and supersedes the
ADR-0012 statements that kept workspace annotations authoritative for descriptions and materialized
used by the core. This completes the cutover anticipated by ADR-0025 and ADR-0027 and supersedes the
ADR-0036 statements that kept workspace annotations authoritative for descriptions and materialized
a relationship-only snapshot per session. The Workspace Descriptor retains workspace identity and
Evidence scope, but contains no database identity, binding, structure, description, or relationship
data.
@@ -1,3 +1,8 @@
---
status: accepted
date: 2026-09-06
---
# Separate reference vectors from runtime memory
Schema, relationships, and Evidence are deterministic projections of PostgreSQL Catalog metadata
@@ -22,7 +22,7 @@ The owner also accepted hybrid semantic/lexical Qdrant retrieval with scope filt
and explicit card links traversed in core. Both belong to the planned first version;
there is no dedicated graph database or external Memory framework.
This extends [ADR 0017](0017-separate-reference-vectors-from-runtime-memory.md):
This extends [ADR 0041](0041-separate-reference-vectors-from-runtime-memory.md):
the separate reference and memory collections remain, while Memory gains sparse
lexical indexing in addition to dense vectors. Memory projections become rebuildable
from the module's PostgreSQL authority. Preprocessing Clear still preserves Memory;
@@ -0,0 +1,41 @@
---
status: accepted
date: 2026-09-08
---
# Maintain local Evidence with external editors
A context specialist writes Evidence drafts independently of the installation and without
PostgreSQL access; the installation refines them and keeps the curated Evidence in a durable local
file archive, a persistent Git working tree that may reuse the workspace repository. Domain
specialists edit visible Markdown with their own editor (or vim/nano on the server), with no web
editor and no JSONL editing, and run one consolidation command that validates, activates and
indexes the change. Git diff, commit and push stay manual. This replaces both the workspace-Git
publication boundary and the evaluation-before-activation gate of ADR-0017 and ADR-0019, and keeps
Evidence separate from Memory (ADR-0042).
## Considered Options
- Application-managed Git writes from the Evidence page: rejected to remove commit and push from
normal editing and to rely on operator discipline.
- Moving Evidence authority into PostgreSQL: withdrawn once it was clear that specialists author
drafts outside the installation.
- A web editor or content form: not needed for the first release.
## Consequences
- The core reads only consolidated, activated content, never the working files. A failed
activation keeps the last valid corpus and can be rerun without duplicating units or losing
edits; persistence and Qdrant are not atomic, so recovery is explicit.
- Activation happens before commit and push: a skipped or failed push leaves the local change in
effect and other installations unchanged.
- A saved manual correction stays active when its source later contradicts it, and deleted
Evidence must not reappear after preparation or reindexing; sources are reacquired only on an
explicit refresh.
- Corrections approved inside a session use the same persistence and activation service, so a
session can use its own correction without manual consolidation.
- Administration assumes no concurrent core work: completed changes apply to subsequent sessions,
without live refresh of open ones.
The format and commands are in the [Curated Evidence v4 contract](../contracts/curated-evidence-v4.md)
and the [Evidence lifecycle](../evidence.md).
@@ -1,6 +1,9 @@
# Unify administration pages and use namespaced routes
---
status: accepted
date: 2026-09-10
---
# Unify administration pages and use namespaced routes
Workspace and Pi management will become full Administration Pages alongside Evidence, Memory and
Database, using one shared Administrative Page Family. The Embedded Thoth Shell will identify the
@@ -0,0 +1,31 @@
---
status: accepted
date: 2026-09-13
---
# Separate shell modes behind a portal adapter
ThothII has two presentation modes selected by `shell.mode`: `embedded` (the default), where Omics
Portal hosts ThothII, which renders no header and takes locale, theme and fullscreen from the
portal; and `full`, where ThothII renders its own header with locale, theme, fullscreen and user
controls. One deliberately minimal `PortalAdapter` is the only boundary with the host portal: it
delivers snapshots of host shell state and never exposes commands, tokens, identity or transport,
so another portal can replace `OmicsPortalAdapter` without touching shell, i18n or workflow. In
`full` no adapter is instantiated. The interface and configuration are in the
[portal shell adapter contract](../contracts/portal-shell-adapter-v1.md).
## Considered Options
- Duplicating the Omics header in embedded mode creates two sources of state and visual mismatch.
- Scattering `embedded`/`full` checks through components ties every page to the portal.
- Passing user or tokens through the bridge widens the surface and couples UI and authentication.
- A full request/response protocol adds no required capability.
- Using `profile` to select the shell conflates installation topology with presentation.
## Consequences
Identity and authorization are never rebuilt in the browser: in embedded mode Omics Portal keeps
login and logout and the server-side `auth_request` chain supplies principal headers (ADR-0015).
A new portal must also satisfy that trusted-identity server contract; replacing the UI adapter
alone is not enough. Shell mode is independent of the browser fullscreen state, and UI locale is
governed by ADR-0046.
@@ -1,6 +1,9 @@
# Separate UI locale from session interaction language
---
status: accepted
date: 2026-09-13
---
# Separate UI locale from session interaction language
ThothII distinguishes three language concepts:
@@ -1,6 +1,9 @@
# Separate delivery operations from finalized SQL sessions
---
status: accepted
date: 2026-09-28
---
# Separate delivery operations from finalized SQL sessions
For [Studio integrazione in ETL — ticket #41](https://git.tylconsulting.it/mptyl/ThothII/issues/41),
SQL file delivery and ETL integration have a lifecycle separate from the session that