Reviewer curates, per promoted table, which columns to use over the full
catalog list (suggested pre-selected + bold); selection persists into
schema_linking.json + the decision ledger and softly guides SQL generation
(Option 1). Dedicated structured schema-linking gate widget (Approach A),
staged commit, inline gate + single columns modal. Hard SQL enforcement is
an explicit follow-up.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- present() = presentBlockingWidget: transport + no-limbo loop + response
validation; both branches share validateUiResponse; the id invariant must be
validated explicitly in the TUI branch (emitAndWait no longer runs there)
- TUI renderer uses numbered options + index parsing, never label mapping
(frontend already answers with ids); artifact-gate editor is viewer-only,
returned content ignored
- guards resolved: both TUI-only notices now ctx.mode === "tui"
- interactive-render.js as two layers (renderTuiDescriptor +
validateSyntheticResponse); add negative test cases + a real TUI smoke
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- #1 hasUI: real 0.80.3 comment is "true in TUI and RPC modes" (doc had the old
0.73.1 "false in print/RPC"). hasUI no longer distinguishes TUI from RPC, so it
is NOT a fallback for the interactive branch — only ctx.mode === "tui" is.
- #2 info/freetext: buildInfoRequest exists in builders.js but is NOT wired into
tht-gate.js (imports only select/multiselect/artifact-gate). info notices are
hand-written ctx.ui.notify; freetext is a control, not a descriptor. Table now
lists only the 3 real present() descriptors.
- #3 cite the REWRITE banner (tht-gate.js:8-10), not :227; id-match quoted verbatim.
- #4 new "Note implementative": 227 comment, 4/6 unguarded notify, and the
ctx.hasUI guard migration side-effect (now fires in RPC on 0.80.3).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Design doc for three coordinated harness fixes derived from the
2026-06-30-165708 session analysis: correct SKILL.md phase-advance
contract, fix the F6 cte_approved subject bug, and add a
tht-mediated schema_linking.json writer/validator.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Active/Archive accordions; rename group (client-side reassign); central
area shows only last user entry + gate notify/info + active widget; the
verbose model stream moves to a left on-demand panel toggled by the WIP
icon (moved above the composer). Frontend-only; fine thinking-separation
deferred.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Hard-fail preflight at session create/restart: ensure Ollama up + warm the
configured embedding model, refuse the session if embeddings unavailable.
Parameterized ollama bin/start_cmd; tht ollama ensure command + backend 503.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the SKILL.md design contract (persisted state is the truth) and a
dedicated Resume correctness section: backend new/resume prompt mode,
missing cold-start procedure in the skill, end-to-end verification gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Decisioni FE-1..FE-6: Vite+React SPA (no Next), TanStack Query+Zustand+hook SSE,
EventSource nativo (MVP auth=none), widget registry+fallback, test Vitest+RTL+MSW
+ Playwright e2e F1, build a slice con F1 come primo loop chiuso.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Decisioni BE-1..BE-7: un Pi per sessione attiva, SQL finale delegato a tht
(codepath unico, rischio D7 eliminato), resilienza via ricostruzione da disco +
re-emit del widget pendente, test con fake-Pi condiviso, backend pre-crea la
sessione, model/thinking/provider per-sessione persistiti, settings Pi MVP.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Due cambiamenti interconnessi da user review:
1. language come parametro workspace (spec decisione 9):
- Config.language (default 'en') + workspaces PSD con 'language: it'
- Generalizza Thoth oltre l'italiano: descrizioni tabelle/colonne ed evidence
sono nel workspace language; le istruzioni della skill restano in inglese
(piu' affidabili per modelli piccoli, meno ambigue)
2. Skill riscritta in INGLESE preservando la semantica COMPLETA dell'originale
(autocritica: la mia riscrittura precedente aveva perso ~10 vincoli precisi):
- 'promuovere' ambiguo (3 accezioni: phase advance / recommend / memory promote)
-> 'never advance a phase or record a decision without confirmation'
- recuperati vincoli persi: choice-is-confirmation (no reviewer_confirm dopo
reviewer_decide), reviewer_select SOLO per iterazione no-decision, messaggi
auto-contenuti obbligatori, artefatto = superficie di decisione (gate rilegge
da disco per CTE/SQL), candidati con provenienza+score non verita', opzione
'leave ambiguity open', F1 passa lista completa non solo ultima
- language contract esplicito (istruzioni EN, output nel workspace language)
Sottomoduli cte/memoria/rewriting/sql-generation in inglese, semantica tecnica
intatta (regole AV-SQL, dim_time trick, max 5 memorie solo 3 tipi riusabili).
Verifica: 0 residui nsp/chirone, tutti i tht <cmd> citati registrati, 165 passed.
Tre correzioni da user review:
5. Memory SOLO pgvector, niente registry. Il registry.jsonl di ChironeWp3 è vestigiale:
una volta che il metadata del vectordb ha subject/detail/rationale (decisione 6), il
registry non serve. Promotion (F5) = upsert diretto a vectordb. tht/memory.py non
porta le 6 funzioni registry. 'Cancellare' = metadata.status='superseded' (audit
trail; il writer e' upsert-only). Multi-workstation OK per costruzione.
7. Evidence: repo workspace separato per-cliente, NON dentro ThothII. ThothII e'
generico; un repo tht-workspace-<cliente>/ contiene evidence/ + workspace YAML +
indici LSH. Deploy = checkout ThothII + checkout workspace-cliente. Niente copia
in harness/.
8. LSH: scarica TUTTI i valori distinti (non 'campiona'), costruisce MinHash+LSH
dentro harness come preprocessing. Indice per-cliente (nel repo workspace cliente).
Sezione 3 punto 2 (F2) riscritta: save-one diretto, drop reference a promote/index
con registry. Arricchimento metadata ora 'obbligatorio' (non opzionale): senza
registry, il vectordb e' l'unica fonte. Residui nsp nei path spec corretti a tht.
Renaming richiesto in user review: Thoth (tht) e' il prodotto, PSD e' il cliente.
Nessun riferimento al contesto clinico nel codice.
Decisioni 8-10:
8. Rinomine: nsp->tht (comando+package+46 import), nsp-sessione->tht-sessione,
nsp-gate.js->tht-gate.js, chirone.*->tht.{example,test}.yaml (generici; il deploy
cliente crea il suo psd.yaml non-committato), THOTH_*->THT_* env.
9. Neutralizzazione riferimenti chirone/psd/policlinico/sandonato nei commenti/
docstring (resi generici o rimossi). Il contesto cliente vive SOLO nei file di
config reali (.env gitignored, workspace cliente non-committato).
10. Onda -1 isolata PRIMA del porting CLI: pytest resta 109 passed (rename verificato
da solo), poi il porting avviene col nome nuovo (niente doppio lavoro).
Ordine esecuzione aggiornato a 7 step (Onda -1 prima di tutto). Self-review:
corretti i residui incoerenti di nsp/chirone nello spec (righe che usavano ancora
i nomi vecchi dove dovevano essere tht). Residui rimasti sono legittimi (descrivono
il renaming o il path sorgente one-shot della copia evidence).
Tre decisioni su dipendenze implicite (domanda user review):
4. Indipendenza da ChironeWp3 (proprieta' architetturale): quando ThothII e' pronto,
il server non deve avere ChironeWp3 — solo Supabase (RPC SECURITY DEFINER nel DB,
indipendenti dal codice app) + cartella evidence (dentro ThothII). Verificato:
codice ThothII non ha riferimenti ChironeWp3/psdwp3, .env non punta a path chirone.
5. Registro memory: locale per-workstation (registry.jsonl in harness/artifacts/memory/
su ciascuna). La F2 legge dal vectordb condiviso e, grazie all'arricchimento metadata
(decisione 6), ricostruisce la decisione senza lookup registro. Il registro serve
solo per la F5 (promozione: locale + indicizza condiviso). Multi-workstation OK.
7. Evidence: dentro ThothII. La cartella (229 markdown statici curati, 11M, nessun ETL)
si sposta in harness/evidence/. ThothII self-contained. Nota: revisionare per PII
prima di committare.
Onda 0b aggiornata: cp evidence in harness/evidence/ invece di puntare path esterno.