fix: clarify memory selection semantics

This commit is contained in:
User
2026-07-14 13:13:59 +02:00
parent 1e3c5a1e99
commit c7d586aaf7
10 changed files with 205 additions and 24 deletions
+10 -10
View File
@@ -215,21 +215,21 @@ Prerequisite: Phase 1 closed.
allow_empty:true)`. Rules: at most **5** candidates; ONLY the 3 reusable types
(`concept_clarified`, `table_promoted`, `table_excluded`) — query-specific
decisions (`question_rewritten`, `sql_approved`, …) are NOT transferable, never
propose them. Each option carries `mem_id:"mem-<id>"` plus `type`/`subject`/
`rationale`. Selected options are applied (register the decision citing the
`mem_id` in the rationale); deselected ones are recorded as `memory_rejected` by
the gate (so the next `tht memory search --session` won't re-propose them). The
checklist starts pre-selected with the recommended memories. With `allow_empty:true`
an empty selection is accepted (no memory applied; deselected still recorded) and
the phase advances — no separate gate.
propose them. Each option carries `type`/`subject`/`rationale`; cite the source
memory id (`mem-<id>`) in its rationale when applying it. Every option describes a
candidate memory; never create an opposite "do not use" option. Only
`recommended:true` options start checked. A
deselected candidate is **not applied now**, not rejected, and may be considered
again if Phase 2 is reopened. With `allow_empty:true` an empty selection is accepted
(no memory applied) and the phase advances — no separate gate.
When the memory search returned **zero** candidates, still issue the single
`reviewer_decide(multi:true, advance:true, allow_empty:true)` with an empty merito list: the gate
detects the empty+advance case, shows the reviewer an info notice ("Nessuna memory
riutilizzabile … passo alla fase successiva") and auto-advances F2 — it does NOT present
an empty checklist, and you do NOT add a separate `reviewer_confirm kind:"phase"`.
4. Closing: if memories were applied or rejected (substantive decisions), `advance:true`
no-ops — close with `reviewer_confirm kind:"phase"`. Only a truly empty memory phase
(nothing applied, nothing rejected) auto-advances via `advance:true`.
4. Closing: if one or more memories were applied (substantive decisions), `advance:true`
no-ops — close with `reviewer_confirm kind:"phase"`. If none is applied, F2
auto-advances via `advance:true`.
5. Memories are promoted at the END of the workflow (Phase 8, the
`reviewer_memory_promote` gate) — never promote from here, never run
`tht memory promote`/`save-one` yourself (the gate blocks them).